diff --git a/mixly/.eslintrc.js b/mixly/.eslintrc.js new file mode 100644 index 00000000..2350479c --- /dev/null +++ b/mixly/.eslintrc.js @@ -0,0 +1,33 @@ +module.exports = { + // 继承 Eslint 规则 + extends: ["eslint:recommended"], + env: { + es6: true, + node: true, // 启用node中全局变量 + browser: true, // 启用浏览器中全局变量 + }, + parserOptions: { + ecmaVersion: 15, + sourceType: "module", + }, + rules: { + "no-dupe-args": 2, // 函数参数不能重复 + "no-duplicate-case": 2, // switch中的case标签不能重复 + "no-else-return": 2, // 如果if语句里面有return,后面不能跟else语句 + "no-empty": 2, // 块语句中的内容不能为空 + "no-var": 0, // 不能使用 var 定义变量 + "indent": [2, 4, { SwitchCase: 1 }], // 缩进风格 + "strict": 2, + "use-isnan": 2, + "no-redeclare": 0, // 禁止重复声明变量 + "no-trailing-spaces": 1, // 一行结束后面不要有空格 + "no-this-before-super": 2, // 在调用super()之前不能使用this或super + "no-unneeded-ternary": 2, // 禁止不必要的嵌套 var isYes = answer === 1 ? true : false; + "no-unreachable": 2, // 不能有无法执行的代码 + "no-use-before-define": 2, // 未定义前不能使用 + "new-cap": 2, // 函数名首行大写必须使用new方式调用,首行小写必须用不带new方式调用 + "new-parens": 2, // new时必须加小括号 + "eqeqeq": 0, // 必须使用全等 + "no-import-assign": 0 + }, +}; diff --git a/mixly/.gitignore b/mixly/.gitignore new file mode 100644 index 00000000..7228044f --- /dev/null +++ b/mixly/.gitignore @@ -0,0 +1,20 @@ +# 同步时忽略以下路径 +__pycache__ +*.pyc +*.DS_Store +boards/default/**/libraries/ThirdParty/ +boards/default/**/libraries/myLib/ +boards/default/**/libraries/cloudLibsUrl.json +boards/default/**/wiki/content.md +boards/default/**/build/lib/libs.json +boards/default/**/build/upload/ +boards/default_src/**/libraries/ThirdParty/ +boards/default_src/**/libraries/myLib/ +boards/default_src/**/libraries/cloudLibsUrl.json +boards/default_src/**/wiki/content.md +boards/default_src/**/build/lib/libs.json +boards/default_src/**/build/upload/ +boards/extend/ +node_modules +.idea +yarn.lock diff --git a/mixly/README.md b/mixly/README.md new file mode 100644 index 00000000..986d39a3 --- /dev/null +++ b/mixly/README.md @@ -0,0 +1,72 @@ +

+ + Mixly + +

+

Mixly

+

+ 一款面向初学者、硬件编程爱好者的图形化编程工具 +

+ +--- + +## 跨平台代码 + +### Mixly官方网站 + +http://mixly.org + +### Mixly wiki帮助 + +http://wiki.mixly.org + +### 网盘下载地址 + +- [百度网盘链接](https://pan.baidu.com/s/1EdBmAlYFzJ_2rULhKm2g3g?pwd=ny1n) + +### 图片预览 + +--- + + + + + + + + + + + + + + + + + + +
+ +### 更新工具 + +- Mixly3.0一键更新工具:[下载](https://www.123pan.com/s/uAxvTd-8229d) + +### 更新说明 + +[更新日志](https://gitee.com/mixly3/mixly3.0_src/blob/master/CHANGELOG.md) + +### 官方交流群 + + + + + + + + + + + + +
Arduino米思齐官方交流群XPython米思齐官方交流群米思齐公益培训群2023
+ diff --git a/mixly/boards.json b/mixly/boards.json new file mode 100644 index 00000000..eee2c597 --- /dev/null +++ b/mixly/boards.json @@ -0,0 +1,230 @@ +[ + { + "boardImg": "./boards/default/micropython_esp32s2/media/mixgoce_compressed.png", + "boardType": "MixGo CE", + "boardIndex": "./boards/default/micropython_esp32s2/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_esp32s3/media/mixgo_nova.png", + "boardType": "Python ESP32-S3", + "boardIndex": "./boards/default/micropython_esp32s3/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_esp32c3/media/esp32c3_compressed.png", + "boardType": "Python ESP32-C3", + "boardIndex": "./boards/default/micropython_esp32c3/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_esp32c2/media/esp32c2_compressed.png", + "boardType": "Python ESP32-C2", + "boardIndex": "./boards/default/micropython_esp32c2/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_esp32c5/media/esp32c5_compressed.png", + "boardType": "Python ESP32-C5", + "boardIndex": "./boards/default/micropython_esp32c5/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_esp32/media/esp32_compressed.png", + "boardType": "Python ESP32", + "boardIndex": "./boards/default/micropython_esp32/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/arduino_avr/media/uno_compressed.png", + "boardType": "Arduino AVR", + "boardIndex": "./boards/default/arduino_avr/index.xml", + "env": { + "electron": true, + "web": false, + "webCompiler": true, + "webSocket": true + }, + "language": "C/C++" + }, + { + "boardImg": "./boards/default/python_mixpy/media/py.png", + "boardType": "Python 3", + "boardIndex": "./boards/default/python_mixpy/index.xml", + "env": { + "electron": true, + "web": false, + "webCompiler": false, + "webSocket": false + }, + "language": "Python" + }, + { + "boardImg": "./boards/default/python_skulpt/media/webpy.png", + "boardType": "Python 3 Lite", + "boardIndex": "./boards/default/python_skulpt/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "Python" + }, + /*{ + "boardImg": "./boards/default/python_skulpt/media/webpy.png", + "boardType": "Python 3 MixToy", + "boardIndex": "./boards/default/python_skulpt_mixtoy/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "Python" + },*/ + { + "boardImg": "./boards/default/python_skulpt/media/webpy.png", + "boardType": "Python 3 Car", + "boardIndex": "./boards/default/python_skulpt_car/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "Python" + }, + { + "boardImg": "./boards/default/python_pyodide/media/webpy.png", + "boardType": "Python 3 Online", + "boardIndex": "./boards/default/python_pyodide/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": false, + "webSocket": false + }, + "language": "Python" + }, + { + "boardImg": "./boards/default/micropython_robot/media/mixbot.png", + "boardType": "Python Robot", + "boardIndex": "./boards/default/micropython_robot/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_k210_mixgoai/media/mixgoai_compressed.png", + "boardType": "MixGo AI", + "boardIndex": "./boards/default/micropython_k210_mixgoai/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + /* { + "boardImg": "./boards/default/micropython_educore/media/educore.png", + "boardType": "Python Educore", + "boardIndex": "./boards/default/micropython_educore/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + },*/ + { + "boardImg": "./boards/default/micropython_nrf51822_mithoncc/media/mithon_compressed.png", + "boardType": "Mithon CC", + "boardIndex": "./boards/default/micropython_nrf51822_mithoncc/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/micropython_nrf51822_microbit/media/microbit_compressed.png", + "boardType": "BBC micro:bit", + "boardIndex": "./boards/default/micropython_nrf51822_microbit/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, + { + "boardImg": "./boards/default/arduino_esp8266/media/esp8266_compressed.png", + "boardType": "Arduino ESP8266", + "boardIndex": "./boards/default/arduino_esp8266/index.xml", + "env": { + "electron": true, + "web": false, + "webCompiler": true, + "webSocket": true + }, + "language": "C/C++" + }, + { + "boardImg": "./boards/default/arduino_esp32/media/esp32_compressed.png", + "boardType": "Arduino ESP32", + "boardIndex": "./boards/default/arduino_esp32/index.xml", + "env": { + "electron": true, + "web": false, + "webCompiler": true, + "webSocket": true + }, + "language": "C/C++" + } +] \ No newline at end of file diff --git a/mixly/common/blockly-core/base.js b/mixly/common/blockly-core/base.js new file mode 100644 index 00000000..ed11cd3f --- /dev/null +++ b/mixly/common/blockly-core/base.js @@ -0,0 +1,526 @@ +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS-IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @fileoverview Bootstrap for the Google JS Library (Closure). + * + * In uncompiled mode base.js will attempt to load Closure's deps file, unless + * the global CLOSURE_NO_DEPS is set to true. This allows projects + * to include their own deps file(s) from different locations. + * + * Avoid including base.js more than once. This is strictly discouraged and not + * supported. goog.require(...) won't work properly in that case. + * + * @provideGoog + */ + + +/** + * Base namespace for the Closure library. Checks to see goog is already + * defined in the current scope before assigning to prevent clobbering if + * base.js is loaded more than once. + * + * @const + */ +var goog = goog || {}; + +/** + * Reference to the global object. + * https://www.ecma-international.org/ecma-262/9.0/index.html#sec-global-object + * + * More info on this implementation here: + * https://docs.google.com/document/d/1NAeW4Wk7I7FV0Y2tcUFvQdGMc89k2vdgSXInw8_nvCI/edit + * + * @const + * @suppress {undefinedVars} self won't be referenced unless `this` is falsy. + * @type {!Global} + */ +goog.global = + // Check `this` first for backwards compatibility. + // Valid unless running as an ES module or in a function wrapper called + // without setting `this` properly. + // Note that base.js can't usefully be imported as an ES module, but it may + // be compiled into bundles that are loadable as ES modules. + this || + // https://developer.mozilla.org/en-US/docs/Web/API/Window/self + // For in-page browser environments and workers. + self; + +/** + * Builds an object structure for the provided namespace path, ensuring that + * names that already exist are not overwritten. For example: + * "a.b.c" -> a = {};a.b={};a.b.c={}; + * Used by goog.provide and goog.exportSymbol. + * @param {string} name name of the object that this file defines. + * @private + */ +goog.exportPath_ = function(name) { + var parts = name.split('.'); + var cur = goog.global; + + // Internet Explorer exhibits strange behavior when throwing errors from + // methods externed in this manner. See the testExportSymbolExceptions in + // base_test.html for an example. + if (!(parts[0] in cur) && typeof cur.execScript != 'undefined') { + cur.execScript('var ' + parts[0]); + } + + for (var part; parts.length && (part = parts.shift());) { + if (cur[part] && cur[part] !== Object.prototype[part]) { + cur = cur[part]; + } else { + cur = cur[part] = {}; + } + } +}; + +/** + * Defines a namespace in Closure. + * + * A namespace may only be defined once in a codebase. It may be defined using + * goog.provide() or goog.module(). + * + * The presence of one or more goog.provide() calls in a file indicates + * that the file defines the given objects/namespaces. + * Provided symbols must not be null or undefined. + * + * In addition, goog.provide() creates the object stubs for a namespace + * (for example, goog.provide("goog.foo.bar") will create the object + * goog.foo.bar if it does not already exist). + * + * Build tools also scan for provide/require/module statements + * to discern dependencies, build dependency files (see deps.js), etc. + * + * @see goog.require + * @see goog.module + * @param {string} name Namespace provided by this file in the form + * "goog.package.part". + */ +goog.provide = function(name) { + // Ensure that the same namespace isn't provided twice. + // A goog.module/goog.provide maps a goog.require to a specific file + /* + if (goog.isProvided_(name)) { + throw Error('Namespace "' + name + '" already declared.'); + } + + delete goog.implicitNamespaces_[name]; + */ + + var namespace = name; + while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) { + if (goog.getObjectByName(namespace)) { + break; + } + goog.implicitNamespaces_[namespace] = true; + } + + goog.exportPath_(name); +}; + +/** + * @private {?{ + * moduleName: (string|undefined), + * declareLegacyNamespace:boolean, + * type: ?goog.ModuleType + * }} + */ +goog.moduleLoaderState_ = null; + +/** + * Check if the given name has been goog.provided. This will return false for + * names that are available only as implicit namespaces. + * @param {string} name name of the object to look for. + * @return {boolean} Whether the name has been provided. + * @private + */ +goog.isProvided_ = function(name) { + return (!goog.implicitNamespaces_[name] && + goog.isDefAndNotNull(goog.getObjectByName(name))); +}; + +/** + * Namespaces implicitly defined by goog.provide. For example, + * goog.provide('goog.events.Event') implicitly declares that 'goog' and + * 'goog.events' must be namespaces. + * + * @type {!Object} + * @private + */ +goog.implicitNamespaces_ = {}; + +// NOTE: We add goog.module as an implicit namespace as goog.module is defined +// here and because the existing module package has not been moved yet out of +// the goog.module namespace. This satisfies both the debug loader and +// ahead-of-time dependency management. + + +/** + * Returns an object based on its fully qualified external name. The object + * is not found if null or undefined. If you are using a compilation pass that + * renames property names beware that using this function will not find renamed + * properties. + * + * @param {string} name The fully qualified name. + * @param {Object=} opt_obj The object within which to look; default is + * |goog.global|. + * @return {?} The value (object or primitive) or, if not found, null. + */ +goog.getObjectByName = function(name, opt_obj) { + var parts = name.split('.'); + var cur = opt_obj || goog.global; + for (var i = 0; i < parts.length; i++) { + cur = cur[parts[i]]; + if (!goog.isDefAndNotNull(cur)) { + return null; + } + } + return cur; +}; + + +/** + * Adds a dependency from a file to the files it requires. + * @param {string} relPath The path to the js file. + * @param {!Array} provides An array of strings with + * the names of the objects this file provides. + * @param {!Array} requires An array of strings with + * the names of the objects this file requires. + */ +goog.addDependency = function(relPath, provides, requires) { + goog.debugLoader_.addDependency(relPath, provides, requires); +}; + + + + +// NOTE(nnaze): The debug DOM loader was included in base.js as an original way +// to do "debug-mode" development. The dependency system can sometimes be +// confusing, as can the debug DOM loader's asynchronous nature. +// +// With the DOM loader, a call to goog.require() is not blocking -- the script +// will not load until some point after the current script. If a namespace is +// needed at runtime, it needs to be defined in a previous script, or loaded via +// require() with its registered dependencies. +// +// User-defined namespaces may need their own deps file. For a reference on +// creating a deps file, see: +// Externally: https://developers.google.com/closure/library/docs/depswriter +// +// Because of legacy clients, the DOM loader can't be easily removed from +// base.js. Work was done to make it disableable or replaceable for +// different environments (DOM-less JavaScript interpreters like Rhino or V8, +// for example). See bootstrap/ for more information. + + +/** + * Implements a system for the dynamic resolution of dependencies that works in + * parallel with the BUILD system. + * + * Note that all calls to goog.require will be stripped by the compiler. + * + * @see goog.provide + * @param {string} namespace Namespace (as was given in goog.provide, + * goog.module, or goog.declareModuleId) in the form + * "goog.package.part". + * @return {?} If called within a goog.module or ES6 module file, the associated + * namespace or module otherwise null. + */ +goog.require = function(namespace) { + // If the object already exists we do not need to do anything. + if (!goog.isProvided_(namespace)) { + goog.debugLoader_.load_(namespace); + } + + return null; +}; + +/** + * Requires a symbol for its type information. This is an indication to the + * compiler that the symbol may appear in type annotations, yet it is not + * referenced at runtime. + * + * When called within a goog.module or ES6 module file, the return value may be + * assigned to or destructured into a variable, but it may not be otherwise used + * in code outside of a type annotation. + * + * Note that all calls to goog.requireType will be stripped by the compiler. + * + * @param {string} namespace Namespace (as was given in goog.provide, + * goog.module, or goog.declareModuleId) in the form + * "goog.package.part". + * @return {?} + */ +goog.requireType = function(namespace) { + // Return an empty object so that single-level destructuring of the return + // value doesn't crash at runtime when using the debug loader. Multi-level + // destructuring isn't supported. + return {}; +}; + +/** + * Path for included scripts. + * @type {string} + */ +goog.basePath = ''; + +/** + * Normalize a file path by removing redundant ".." and extraneous "." file + * path components. + * @param {string} path + * @return {string} + * @private + */ +goog.normalizePath_ = function(path) { + var components = path.split('/'); + var i = 0; + while (i < components.length) { + if (components[i] == '.') { + components.splice(i, 1); + } else if ( + i && components[i] == '..' && components[i - 1] && + components[i - 1] != '..') { + components.splice(--i, 2); + } else { + i++; + } + } + return components.join('/'); +}; + + +//============================================================================== +// Language Enhancements +//============================================================================== + + +/** + * Returns true if the specified value is defined and not null. + * @param {?} val Variable to test. + * @return {boolean} Whether variable is defined and not null. + */ +goog.isDefAndNotNull = function(val) { + // Note that undefined == null. + return val != null; +}; + +//============================================================================== +// goog.defineClass implementation +//============================================================================== + + +// There's a bug in the compiler where without collapse properties the +// Closure namespace defines do not guard code correctly. To help reduce code +// size also check for !COMPILED even though it redundant until this is fixed. + +/** + * Tries to detect the base path of base.js script that bootstraps Closure. + * @private + */ +goog.findBasePath_ = function() { + /** @type {!Document} */ + var doc = goog.global.document; + // If we have a currentScript available, use it exclusively. + var currentScript = doc.currentScript; + if (currentScript) { + var scripts = [currentScript]; + } else { + var scripts = doc.getElementsByTagName('SCRIPT'); + } + // Search backwards since the current script is in almost all cases the one + // that has base.js. + for (var i = scripts.length - 1; i >= 0; --i) { + var script = /** @type {!HTMLScriptElement} */ (scripts[i]); + var src = script.src; + var qmark = src.lastIndexOf('?'); + var l = qmark == -1 ? src.length : qmark; + if (src.substr(l - 7, 7) == 'base.js') { + goog.basePath = src.substr(0, l - 7); + return; + } + } +}; + +goog.findBasePath_(); + +/** + * A debug loader is responsible for downloading and executing javascript + * files in an unbundled, uncompiled environment. + * + * @struct @constructor @final @private + */ +goog.DebugLoader_ = function() { + /** @private @const {!Object} */ + this.dependencies_ = {}; + /** @private @const {!Object} */ + this.idToPath_ = {}; + /** @private @const {!Object} */ + this.written_ = {}; + /** @private {!Array} */ + this.depsToLoad_ = []; +}; + + +/** + * Travserses the dependency graph and queues the given dependency, and all of + * its transitive dependencies, for loading and then starts loading if not + * paused. + * + * @param {string} namespace + * @private + */ +goog.DebugLoader_.prototype.load_ = function(namespace) { + if (!this.getPathFromDeps_(namespace)) { + throw Error('goog.require could not find: ' + namespace); + } else { + var loader = this; + + var deps = []; + + /** @param {string} namespace */ + var visit = function(namespace) { + var path = loader.getPathFromDeps_(namespace); + + if (!path) { + throw Error('Bad dependency path or symbol: ' + namespace); + } + + if (loader.written_[path]) { + return; + } + + loader.written_[path] = true; + + var dep = loader.dependencies_[path]; + for (var i = 0; i < dep.requires.length; i++) { + if (!goog.isProvided_(dep.requires[i])) { + visit(dep.requires[i]); + } + } + + deps.push(dep); + }; + + visit(namespace); + + var wasLoading = !!this.depsToLoad_.length; + this.depsToLoad_ = this.depsToLoad_.concat(deps); + + if (!wasLoading) { + this.loadDeps_(); + } + } +}; + + +/** + * Loads any queued dependencies until they are all loaded or paused. + * + * @private + */ +goog.DebugLoader_.prototype.loadDeps_ = async function() { + var loader = this; + var depsPath = []; + var namespacePath = ''; + if (!this.depsToLoad_.length) { + return; + } + for (var dep of this.depsToLoad_) { + depsPath.push(dep.path); + } + namespacePath = depsPath.pop(); + LazyLoad.js(depsPath, function() { + LazyLoad.js(namespacePath); + }); +}; + + +/** + * @param {string} absPathOrId + * @return {?string} + * @private + */ +goog.DebugLoader_.prototype.getPathFromDeps_ = function(absPathOrId) { + return this.idToPath_[absPathOrId]; +}; + + +/** + * Basic super class for all dependencies Closure Library can load. + * + * This default implementation is designed to load untranspiled, non-module + * scripts in a web broswer. + * + * For transpiled non-goog.module files {@see goog.TranspiledDependency}. + * For goog.modules see {@see goog.GoogModuleDependency}. + * For untranspiled ES6 modules {@see goog.Es6ModuleDependency}. + * + * @param {string} path Absolute path of this script. + * @param {!Array} requires goog symbols or relative paths to Closure + * this depends on. + * @struct @constructor + */ +goog.Dependency = function(path, requires) { + /** @const */ + this.path = path; + /** @const */ + this.requires = requires; +}; + +/** + * Map of script ready / state change callbacks. Old IE cannot handle putting + * these properties on goog.global. + * + * @private @const {!Object} + */ +goog.Dependency.callbackMap_ = {}; + + +/** + * Starts loading this dependency. This dependency can pause loading if it + * needs to and resume it later via the controller interface. + * + * When this is loaded it should call controller.loaded(). Note that this will + * end up calling the loaded method of this dependency; there is no need to + * call it explicitly. + */ +goog.Dependency.prototype.load = function() { + /** @type {!HTMLDocument} */ + var doc = goog.global.document; + doc.write('"); +/** + * An object for executing Python code and passing the results along to interested components. + * + * @constructor + * @this {BlockPyEditor} + * @param {Object} main - The main BlockPy instance + * @param {HTMLElement} tag - The HTML object this is attached to. + */ +var PyEngine = function(programStatus, mixpyProject) { + this.loadEngine(); + this.programStatus = programStatus; + this.mixpyProject = mixpyProject; +} + +/** + * Definable function to be run when execution has fully ended, + * whether it succeeds or fails. + * + */ +PyEngine.prototype.onExecutionEnd = null; + +/** + * Helper function that will attempt to call the defined onExecutionEnd, + * but will do nothing if there is no function defined. + */ +PyEngine.prototype.executionEnd_ = function() { + if (this.onExecutionEnd !== null) { + this.onExecutionEnd(); + } +}; + +/** + * Initializes the Python Execution engine and the Printer (console). + */ +PyEngine.prototype.loadEngine = function() { + var engine = this; + // No connected services + Sk.connectedServices = {} + // TODO + //Sk.console = printer.getConfiguration(); + // Definitely use a prompt + Sk.inputfunTakesPrompt = true; + + // Keeps track of the tracing while the program is executing; destroyed afterwards. + this.executionBuffer = {}; +} + +/** + * Used to access Skulpt built-ins. This is pretty generic, taken + * almost directly from the Skulpt docs. + * + * @param {String} filename - The python filename (e.g., "os" or "pprint") that will be loaded. + * @returns {String} The JavaScript source code of the file (weird, right?) + * @throws Will throw an error if the file isn't found. + */ +PyEngine.prototype.readFile = function(file) { + console.log("Attempting file: " + Sk.ffi.remapToJs(file)); + // 加载模块 + if (PyGameZero.matchModelName(file)) { + return PyGameZero.load(file) + } + if (externalLibs[file] !== undefined) { + return Sk.misceval.promiseToSuspension( + fetch(externalLibs[file]).then( + function (resp){ return resp.text(); } + )); + } + if (Sk.builtinFiles === undefined || Sk.builtinFiles.files[file] === undefined) { + throw "File not found: '" + file + "'"; + } + return Sk.builtinFiles.files[file]; +} + +PyEngine.prototype.fileread = function(filename, mode) { + if(this.mixpyProject.exist(filename)){ + return this.mixpyProject.getFileContent(filename); + }else{ + if(mode.indexOf('w') !== -1){ + this.mixpyProject.add(filename, '', 1); + return ''; + }else + return null; + } +} + +PyEngine.prototype.filewrite = function(fileItem, str) { + var filename = fileItem.name; + this.mixpyProject.modify(filename, str); + this.mixpyProject.select(filename); +} + +PyEngine.prototype.skInput = function(prompt) { + return new Promise((resolve, reject) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + var currText = statusBarTerminal.getValue(); + if (currText.lastIndexOf('\n') !== currText.length - 1) + statusBarTerminal.addValue('\n>>>' + prompt); + else + statusBarTerminal.addValue('>>>' + prompt); + const { editor } = statusBarTerminal; + const { selection } = editor; + editor.setReadOnly(false); + const session = editor.getSession(); + const initRow = session.getLength(); + editor.gotoLine(initRow); + selection.moveCursorLineEnd(); + const initCursor = selection.getCursor(); + const cursorCallback = session.selection.on('changeCursor', function (e) { + const cursor = selection.getCursor(); + if (cursor.row < initCursor.row) + selection.moveCursorTo(initCursor.row, initCursor.column, true); + else if (cursor.row === initCursor.row + && cursor.column <= initCursor.column) + selection.moveCursorTo(initCursor.row, initCursor.column, true); + let endRowStr = session.getLine(cursor.row - 1); + if (endRowStr.indexOf('>>>') !== -1 + && cursor.row === initCursor.row + 1 + && cursor.column === 0) { + endRowStr = endRowStr.replace('>>>' + prompt, ''); + session.selection.removeEventListener('changeCursor', cursorCallback); + selection.moveCursorLineEnd(); + editor.setReadOnly(true); + resolve(endRowStr); + } else { + const nowRow = session.getLength(); + if (nowRow !== initRow) { + session.selection.removeEventListener('changeCursor', cursorCallback); + editor.setReadOnly(true); + resolve(''); + } + } + }); + }); +} + +/** + * Resets the state of the execution engine, including reinitailizing + * the execution buffer (trace, step, etc.), reseting the printer, and + * hiding the trace button. + * + */ +PyEngine.prototype.reset = function() { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + //点击取消按钮发送数据 + Sk.execLimit = 0; + Sk.execLimit = Number.POSITIVE_INFINITY; + //$("#side_code").text(''); + //$("#blocklySVG").empty(); + statusBarTerminal.setValue(''); +} + +PyEngine.prototype.kill = function(type) { + // event_save('kill'); + //点击取消按钮发送数据 + Sk.execLimit = 0; + $("#loading").css('display', "none"); + if (document.getElementById("img01")) { + document.getElementById("img01").src=""; + } +} + +/** + * "Steps" the execution of the code, meant to be used as a callback to the Skulpt + * environment. + * + * @param {Object} variables - Hash that maps the names of variables (Strings) to their Skulpt representation. + * @param {Number} lineNumber - The corresponding line number in the source code that is being executed. + * @param {Number} columnNumber - The corresponding column number in the source code that is being executed. Think of it as the "X" position to the lineNumber's "Y" position. + * @param {String} filename - The name of the python file being executed (e.g., "__main__.py"). + * @param {String} astType - Unused? TODO: What is this? + * @param {String} ast - String-encoded JSON representation of the AST node associated with this element. + */ +PyEngine.prototype.step = function(variables, lineNumber, + columnNumber, filename, astType, ast) { + if (filename == '.py') { + var currentStep = this.executionBuffer.step; + var globals = this.parseGlobals(variables); + this.executionBuffer.trace.push( + {'step': currentStep, + 'filename': filename, + //'block': highlightMap[lineNumber-1], + 'line': lineNumber, + 'column': columnNumber, + 'properties': globals.properties, + 'modules': globals.modules}); + this.executionBuffer.step = currentStep+1; + this.executionBuffer.last_step = currentStep+1; + this.executionBuffer.line_number = lineNumber; + } +} + +/** + * Runs the AbstractInterpreter to get some static information about the code, + * in particular the variables' types. This is needed for type checking. + * + * @returns {Object} Maps variable names (as Strings) to types as constructed by the AbstractIntepreter. + */ +PyEngine.prototype.analyzeVariables = function() { + // Get the code + var code = this.main.model.programs['__main__'](); + if (code.trim() == "") { + return {}; + } + + var analyzer = new AbstractInterpreter(code); + report = analyzer.report; + return analyzer.variableTypes; +} + +/** + * Runs the AbstractInterpreter to get some static information about the code, + * including potential semantic errors. It then parses that information to give + * feedback. + * + * @returns {Boolean} Whether the code was successfully analyzed. + */ +PyEngine.prototype.analyze = function() { + this.main.model.execution.status("analyzing"); + + var feedback = this.main.components.feedback; + + // Get the code + var code = this.main.model.programs['__main__'](); + if (code.trim() == "") { + this.main.components.feedback.emptyProgram("You haven't written any code yet!"); + //this.main.model.feedback.status("semantic"); + return false; + } + + var analyzer = new AbstractInterpreter(code); + this.main.model.execution.ast = analyzer.ast; + + report = analyzer.report; + // Syntax error + if (report.error !== false) { + console.log(report.error.args.v) + var codeLine = '.'; + if (report.error.args.v.length > 3) { + codeLine = ', where it says:
'+report.error.args.v[3][2]+''; + } + this.main.reportError('editor', report.error, "While attempting to process your Python code, I found a syntax error. In other words, your Python code has a mistake in it (e.g., mispelled a keyword, bad indentation, unnecessary symbol). You should check to make sure that you have written all of your code correctly. To me, it looks like the problem is on line "+ report.error.args.v[2]+codeLine, report.error.args.v[2]); + return false; + } + + if (report["Unconnected blocks"].length >= 1) { + var variable = report['Unconnected blocks'][0]; + feedback.semanticError("Unconnected blocks", "It looks like you have unconnected blocks on line "+variable.position.line+". Before you run your program, you must make sure that all of your blocks are connected and that there are no unfilled holes.", variable.position.line) + return false; + } else if (report['Iteration variable is iteration list'].length >= 1) { + var variable = report['Iteration variable is iteration list'][0]; + feedback.semanticError("Iteration Problem", "The property "+variable.name+" was iterated on line "+variable.position.line+", but you used the same variable as the iteration variable. You should choose a different variable name for the iteration variable. Usually, the iteration variable is the singular form of the iteration list (e.g., for dog in dogs:).", variable.position.line) + return false; + } else if (report["Undefined variables"].length >= 1) { + var variable = report["Undefined variables"][0]; + feedback.semanticError("Initialization Problem", "The property "+variable.name+" was read on line "+variable.position.line+", but it was not given a value on a previous line. You cannot use a property until it has been initialized.", variable.position.line) + return false; + } else if (report["Possibly undefined variables"].length >= 1) { + var variable = report["Possibly undefined variables"][0]; + feedback.semanticError("Initialization Problem", "The property "+variable.name+" was read on line "+variable.position.line+", but it was possibly not given a value on a previous line. You cannot use a property until it has been initialized. Check to make sure that this variable was declared in all of the branches of your decision.", variable.position.line); + return false; + } else if (report["Unread variables"].length >= 1) { + var variable = report["Unread variables"][0]; + feedback.semanticError("Unused Property", "The property "+variable.name+" was set, but was never used after that.", null) + return false; + } else if (report["Overwritten variables"].length >= 1) { + var variable = report["Overwritten variables"][0]; + feedback.semanticError("Overwritten Property", "The property "+variable.name+" was set, but before it could be read it was changed on line "+variable.position.line+". It is unnecessary to change an existing variable's value without reading it first.", variable.position.line) + return false; + } else if (report["Empty iterations"].length >= 1) { + var variable = report["Empty iterations"][0]; + feedback.semanticError("Iterating over empty list", "The property "+variable.name+" was set as an empty list, and then you attempted to iterate over it on "+variable.position.line+". You should only iterate over non-empty lists.", variable.position.line) + return false; + } else if (report["Non-list iterations"].length >= 1) { + var variable = report["Non-list iterations"][0]; + feedback.semanticError("Iterating over non-list", "The property "+variable.name+" is not a list, but you attempted to iterate over it on "+variable.position.line+". You should only iterate over non-empty lists.", variable.position.line) + return false; + } else if (report["Incompatible types"].length >= 1) { + var variable = report["Incompatible types"][0]; + feedback.semanticError("Incompatible types", "You attempted to "+variable.operation+" a "+variable.left.type+" and a "+variable.right.type+" on line "+variable.position.line+". But you can't do that with that operator. Make sure both sides of the operator are the right type.", variable.position.line) + return false; + } + + return true; +} + +var GLOBAL_VALUE; + + +/** + * Runs the given python code, resetting the console and Trace Table. + * 分步调试代码 + */ +PyEngine.prototype.steprun = function(type) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.show(); + if (!$('#skulpt-img').length) { + $('body').append($( + `` + )); + } + var xml = Blockly.Xml.workspaceToDom(Mixly.Editor.blockEditor); + var data = Blockly.Xml.domToText(xml); + if (document.getElementById("boardSelector").value == ""){ + var fn = 'filename.xml' + }else{ + var fn = document.getElementById("boardSelector").value + '.xml' + } + + window.actionArrayRecord = []; + $("#blocklySVG").empty(); + $("#loading").css('display', "inline-block"); + + // Reset everything + this.reset(); + + //SK设置 + this.loadEngine(); + // Major Skulpt configurations + Sk.configure({ + // Function to handle the text outputted by Skulpt + //设置文本输出 + output: function(lineText){ + statusBarTerminal.addValue(lineText); + }, + // Function to handle loading in new files + read: this.readFile.bind(this), + inputfun:this.skInput.bind(this), + inputfunTakesPrompt: true, + execLimit:Number.POSITIVE_INFINITY, + fileread:this.fileread.bind(this), + filewrite:this.filewrite.bind(this), + __future__: Sk.python3,//python3已成默认值,要使用python2需要单独设置 + }); + + Sk.builtins.value = new Sk.builtin.func(function() { + return Sk.ffi.remapToPy(GLOBAL_VALUE === undefined ? 5 : GLOBAL_VALUE); + }); + Sk.builtins.set_value = new Sk.builtin.func(function(v) { + GLOBAL_VALUE = v.v; + }); + + // Get the code + var code = Mixly.MFile.getCode(); + //如果存在游戏模块,则只能读取模块代码 + /*if ((code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + code = Blockly.Python.workspaceToCode(Mixly.Editor.blockEditor) || '';//code + code+="\nprint(blocklygame.getFinishState())" + }*/ + + var engine = this; + if(code === "") { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + statusBarTerminal.setValue('==无程序需运行==\n'); + return; + } + + var pack_num = 0; + //检验是否有数据分析、机器学习相关的模块 + var pack_list = ["numpy","pandas","scikit-learn","matplotlib"]; + var code_pack_list = []; + for (var i = 0; i < pack_list.length; i++) { + if ((code.indexOf("import "+pack_list[i])!=-1)||(code.indexOf("from "+pack_list[i]+" import")!=-1)){ + pack_num++; + code_pack_list.push(pack_list[i]) + } + } + + //检验是否存在pygame-zero模块 + var pyzrun_pack="pgzrun" + var ifpgzrun=false; + if ((code.indexOf("import "+pyzrun_pack)!=-1)||(code.indexOf("from "+pyzrun_pack+" import")!=-1)){ + ifpgzrun=true; + } + + if (this.layerNum && this.layerSize) { + this.layerSize.content = [ + $('#skulpt-img').width(), + $('#skulpt-img').height(), + ]; + } + + if(code_pack_list.includes('matplotlib')){ + document.getElementById("mat_div").style.height='100%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + $("#matplot_img").css('width', this?.layerSize?.content[0] ?? ($('body').width() / 2 + 'px')); + $("#matplot_img").css('height',this?.layerSize?.content[1] ?? ($('body').height() * 0.7 - 30 + 'px')); + } + + //如果存在pygame-zero,则进行相关的配置 + if(ifpgzrun){ + document.getElementById("mat_div").style.height='0%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='100%' + const Sk = window.Sk; + Sk.TurtleGraphics.reset && Sk.TurtleGraphics.reset() + Sk.TurtleGraphics.target = "pggame_stage"; + Sk.TurtleGraphics.width = (this?.layerSize?.content[0] ?? ($('body').width() / 2) - 30) - 5; + Sk.TurtleGraphics.height = (this?.layerSize?.content[1] ?? ($('body').height() * 0.7 - 40)) - 5; + + const PyGameZero = window.PyGameZero; + const stageSize = {width: 0, height: 0}; + const stageEl = document.getElementById("pggame_stage"); + // 配置容器 + stageSize.width = $('#pggame_stage').width() - 50; + stageSize.height = $('#pggame_stage').height() - 50; + PyGameZero.setContainer(stageEl) + PyGameZero.reset(); + + } + + //检验是否存在pygame-zero模块 + var bg_nonehl_pack="blocklygame" + var ifbg_nonehl=false; + if ((code.indexOf("import "+bg_nonehl_pack)!=-1)||(code.indexOf("from "+bg_nonehl_pack+" import")!=-1)){ + ifbg_nonehl=true; + } + + //如果存在bg_nonehl,则进行相关的配置 + if(ifbg_nonehl){ + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + document.getElementById("blocklySVG").style.height='100%' + } + + // event_save('steprun'); + + if (ifpgzrun || ifbg_nonehl) { + const _this = this; + this.layerNum = Mixly.LayerExt.open({ + title: [Mixly.Msg.Lang['显示'], '30px'], + shade: 0, + offset: 'rt', + area: _this?.layerSize?.layero ?? ['34%', '70%'], + max: [$('body').width() + 'px', $('body').height() + 'px'], + fixed: false, + content: $('#skulpt-img'), + resizing: function(size) { + _this.layerSize = size; + }, + end: function() { + _this.layerNum = null; + pyengine.kill(); + } + }); + } + + //如果是第五关、第七关,则需要把检查循环次数的代码加进去 + if(code.indexOf("settedMap(4")!=-1 | code.indexOf("settedMap(6")!=-1){ + if(code.indexOf("moveDirection")!=-1){//初始化的时候不加这行代码 + code=code+"actor.isCirculationRight();\n" + } + } + + //除了第六关,其他把检查是否成功代码加进去 + if(code.indexOf("settedMap(5)")==-1){ + if(code.indexOf("moveDirection")!=-1){//初始化的时候不加这行代码 + code=code+"actor.isSuccess();\n" + } + } + console.log(code) + + //已经读取了代码:code + // Actually run the python code + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, code, true); + }); + executionPromise.then( + function (module) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + // Run the afterSingleExecution one extra time for final state + /*Sk.afterSingleExecution(module.$d, -1, 0, ".py"); + engine.check(code, execution.trace(), execution.output(), execution.ast, module.$d); + engine.executionEnd_(); + */ + statusBarTerminal.addValue('==程序运行完成==\n'); + console.log('success'); + }, + function(error) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + + var original = prettyPrintError(error); + //hack for kill program with time limiterror + if(original.indexOf("TimeLimitError") !== -1) + return; + if($('.inputMsg').length > 0) + $('#side_code').text($('#side_code').text() + $('.inputMsg').val()) + + // var $errorE = $('').addClass('errorMsg').html(original); + // $("#side_code").append($errorE) + statusBarTerminal.addValue(original); + var matchRet = /on line (\d+)/.exec(original); + var lineNumber = -1; + if(matchRet !== null && matchRet.length == 2){ + lineNumber = parseInt(matchRet[1]) - 1; + editor.session.addMarker(new EditorRange(lineNumber, 0, lineNumber, 1), "errorMarker", "fullLine"); + editor.hasMarker = true; + } + engine.executionEnd_(); + console.log(error.toString()); + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue(error.toString() + '\n==程序运行完成==\n'); + } +); + +} + +/** + * Runs the given python code, resetting the console and Trace Table. + * 直接运行,不分步高亮显示 + */ + PyEngine.prototype.run = function(type) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.show(); + if (!$('#skulpt-img').length) { + $('body').append($( + `` + )); + } + var xml = Blockly.Xml.workspaceToDom(Mixly.Editor.blockEditor); + var data = Blockly.Xml.domToText(xml); + if (document.getElementById("boardSelector").value == ""){ + var fn = 'filename.xml' + }else{ + var fn = document.getElementById("boardSelector").value + '.xml' + } + + window.actionArrayRecord = []; + $("#blocklySVG").empty(); + $("#loading").css('display', "inline-block"); + + + /*if(sidecodeDisplay === false){ + sidecodeClick(); + }*/ + // Reset everything + this.reset(); + + //SK设置 + this.loadEngine(); + // Major Skulpt configurations + Sk.configure({ + // Function to handle the text outputted by Skulpt + //设置文本输出 + output: function(lineText){ + statusBarTerminal.addValue(lineText); + }, + // Function to handle loading in new files + read: this.readFile.bind(this), + inputfun:this.skInput.bind(this), + inputfunTakesPrompt: true, + execLimit:Number.POSITIVE_INFINITY, + fileread:this.fileread.bind(this), + filewrite:this.filewrite.bind(this), + __future__: Sk.python2,//python3已成默认值,要使用python2需要单独设置 + }); + + Sk.builtins.value = new Sk.builtin.func(function() { + return Sk.ffi.remapToPy(GLOBAL_VALUE === undefined ? 5 : GLOBAL_VALUE); + }); + Sk.builtins.set_value = new Sk.builtin.func(function(v) { + GLOBAL_VALUE = v.v; + }); + // event_save('run'); + // Get the code + var code = Mixly.MFile.getCode(); + if(code === "") { + this.programStatus['running'] = false; + $("#loading").css('display', "none"); + statusBarTerminal.setValue('==无程序需运行==\n'); + return; + } + //如果存在游戏模块,则只能读取模块代码 + /*if ((code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + code = Blockly.Python.workspaceToCode(Mixly.Editor.blockEditor) || '';//code + code+="\nprint(blocklygame.getFinishState())" + }*/ + //改为只读区代码区的代码,这样就能够消除高亮执行 + if ((code.indexOf("import blocktool")!=-1)||(code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + //正则匹配替换block id元素 + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + var target=""; + var re=/,?'block_id=[\s\S]*'/.exec(code_piece[i]); + if(re!=null){ + target=re[0]; + code_piece[i]=code_piece[i].replace(target,""); + } + } + //检查是否是高亮辅助块\toll,如果是,则将此行代码移除 + if((code_piece[i].indexOf("import blocktool") >= 0) || (code_piece[i].indexOf("blocktool.highlight") >= 0) ){ + code_piece[i]="delete"; + } + //如果使用的是分步调试的blocklygame,要将其换成非分步调试的模块bg_nonehl + if((code_piece[i].indexOf("blocklygame") >= 0)){ + code_piece[i]=code_piece[i].replace("blocklygame","bg_nonehl"); + } + + } + code="" + for(var i=0;i= 0){//处理print函数中的end + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + if(code_piece[i].indexOf(",end") >= 0 ){ + var target=""; + var re=/,end =([\s\S]*)\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + target=/['"]([\s\S]*)['"]/.exec(target)[0] + code_piece[i]=code_piece[i].replace(/,end =([\s\S]*)\)$/,")"+";print("+target+");"); + } + //console.log(code_piece[i]) + }else{ + var target=""; + var re=/\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + // code_piece[i]=code_piece[i].replace(/\)$/,"+'\\n'"+target) + code_piece[i]=code_piece[i].replace(/\)$/,target+";"); + } + //console.log(code_piece[i]) + } + } + } + code_new=code_piece.join("\n"); + //console.log(code_new) + code=code_new + } + + //如果是第五关、第七关,则需要把检查循环次数的代码加进去 + if(code.indexOf("settedMap(4)")!=-1 | code.indexOf("settedMap(6)")!=-1){ + if(code.indexOf("moveDirection")!=-1){//初始化的时候不加这行代码 + code=code+"actor.isCirculationRight();\n" + } + } + + //除了第六关,其他把检查是否成功代码加进去 + if(code.indexOf("settedMap(5)")==-1){ + if(code.indexOf("moveDirection")!=-1){//初始化的时候不加这行代码 + code=code+"actor.isSuccess();\n" + } + } + + console.log(code) + if(code_pack_list.includes('matplotlib')){ + document.getElementById("mat_div").style.height='100%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + $("#matplot_img").css('width', this?.layerSize?.content[0] ?? ($('body').width() / 2 + 'px')); + $("#matplot_img").css('height',this?.layerSize?.content[1] ?? ($('body').height() - 30 + 'px')); + } + + //如果存在pygame-zero,则进行相关的配置 + if(ifpgzrun){ + document.getElementById("mat_div").style.height='0%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='100%' + + const Sk = window.Sk; + Sk.TurtleGraphics.reset && Sk.TurtleGraphics.reset() + Sk.TurtleGraphics.target = "pggame_stage"; + Sk.TurtleGraphics.width = (this?.layerSize?.content[0] ?? ($('body').width() / 2) - 30) - 5; + Sk.TurtleGraphics.height = (this?.layerSize?.content[1] ?? ($('body').height() - 35)) - 5; + + const PyGameZero = window.PyGameZero; + const stageSize = {width: 0, height: 0}; + const stageEl = document.getElementById("pggame_stage"); + // 配置容器 + stageSize.width = $('#pggame_stage').width() - 50; + stageSize.height = $('#pggame_stage').height() - 50; + PyGameZero.setContainer(stageEl) + PyGameZero.reset(); + } + + //如果存在bg_nonehl,则进行相关的配置 + if(ifbg_nonehl){ + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + document.getElementById("blocklySVG").style.height='100%' + } + + if (ifpgzrun || ifbg_nonehl) { + const _this = this; + this.layerNum = Mixly.LayerExt.open({ + title: [Mixly.Msg.Lang['显示'], '30px'], + shade: 0, + offset: 'rt', + area: _this?.layerSize?.layero ?? ['34%', '70%'], + max: [$('body').width() + 'px', $('body').height() + 'px'], + fixed: false, + content: $('#skulpt-img'), + resizing: function(size) { + _this.layerSize = size; + }, + end: function() { + _this.layerNum = null; + pyengine.kill(); + } + }); + } + + //已经读取了代码:code + // Actually run the python code + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, code, true); + }); + executionPromise.then( + function (module) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + // Run the afterSingleExecution one extra time for final state + /*Sk.afterSingleExecution(module.$d, -1, 0, ".py"); + engine.check(code, execution.trace(), execution.output(), execution.ast, module.$d); + engine.executionEnd_(); + */ + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + window.userOpEvents && window.userOpEvents.addRecord({ + operation: 'run-success' + }); + window.userEvents && window.userEvents.addRecord({ + operation: 'run-success' + }); + statusBarTerminal.addValue(`==${Mixly.Msg.Lang['shell.finish']}==\n`); + }, + function(error) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + + var original = prettyPrintError(error); + //hack for kill program with time limiterror + if(original.indexOf("TimeLimitError") !== -1) + return; + + var $errorE = $('').addClass('errorMsg').html(original); + // $("#side_code").append($errorE) + statusBarTerminal.addValue(original); + var matchRet = /on line (\d+)/.exec(original); + var lineNumber = -1; + if(matchRet !== null && matchRet.length == 2){ + lineNumber = parseInt(matchRet[1]) - 1; + editor.session.addMarker(new EditorRange(lineNumber, 0, lineNumber, 1), "errorMarker", "fullLine"); + editor.hasMarker = true; + } + engine.executionEnd_(); + console.log(error.toString()); + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue(error.toString() + '\n'); + window.userOpEvents && window.userOpEvents.addRecord({ + operation: 'run-error' + }); + window.userEvents && window.userEvents.addRecord({ + operation: 'run-error' + }); + statusBarTerminal.addValue(`==${Mixly.Msg.Lang['shell.finish']}==\n`); + } +); + +} + +//提交代码:先运行代码,返回运行结果,然后提交 +PyEngine.prototype.run2 = function(type) { + var xml = Blockly.Xml.workspaceToDom(Mixly.Editor.blockEditor); + var data = Blockly.Xml.domToText(xml); + if (document.getElementById("boardSelector").value == ""){ + var fn = 'filename.xml' + }else{ + var fn = document.getElementById("boardSelector").value + '.xml' + } + + layer.closeAll('page'); + window.actionArrayRecord = []; + $("#blocklySVG").empty(); + $("#loading").css('display', "inline-block"); + + + /*if(sidecodeDisplay === false){ + sidecodeClick(); + }*/ + // Reset everything + this.reset(); + + //SK设置 + this.loadEngine(); + // Major Skulpt configurations + Sk.configure({ + // Function to handle the text outputted by Skulpt + //设置文本输出 + output: function(lineText){ + statusBarTerminal.addValue(lineText); + }, + // Function to handle loading in new files + read: this.readFile.bind(this), + inputfun:this.skInput.bind(this), + inputfunTakesPrompt: true, + execLimit:Number.POSITIVE_INFINITY, + fileread:this.fileread.bind(this), + filewrite:this.filewrite.bind(this), + __future__: Sk.python2,//python3已成默认值,要使用python2需要单独设置 + }); + + Sk.builtins.value = new Sk.builtin.func(function() { + return Sk.ffi.remapToPy(GLOBAL_VALUE === undefined ? 5 : GLOBAL_VALUE); + }); + Sk.builtins.set_value = new Sk.builtin.func(function(v) { + GLOBAL_VALUE = v.v; + }); + // Get the code + var code = Mixly.MFile.getCode(); + //如果存在游戏模块,则只能读取模块代码 + /*if ((code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + code = Blockly.Python.workspaceToCode(Mixly.Editor.blockEditor) || '';//code + code+="\nprint(blocklygame.getFinishState())" + }*/ + //改为只读区代码区的代码,这样就能够消除高亮执行 + if ((code.indexOf("import blocktool")!=-1)||(code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + //正则匹配替换block id元素 + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + var target=""; + var re=/,?'block_id=[\s\S]*'/.exec(code_piece[i]); + if(re!=null){ + target=re[0]; + code_piece[i]=code_piece[i].replace(target,""); + } + } + //检查是否是高亮辅助块\toll,如果是,则将此行代码移除 + if((code_piece[i].indexOf("import blocktool") >= 0) || (code_piece[i].indexOf("blocktool.highlight") >= 0) ){ + code_piece[i]="delete"; + } + //如果使用的是分步调试的blocklygame,要将其换成非分步调试的模块bg_nonehl + if((code_piece[i].indexOf("blocklygame") >= 0)){ + code_piece[i]=code_piece[i].replace("blocklygame","bg_noanimation"); + } + + } + code="" + for(var i=0;i= 0){//处理print函数中的end + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + if(code_piece[i].indexOf(",end") >= 0 ){ + var target=""; + var re=/,end =([\s\S]*)\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + target=/['"]([\s\S]*)['"]/.exec(target)[0] + code_piece[i]=code_piece[i].replace(/,end =([\s\S]*)\)$/,")"+";print("+target+");"); + } + //console.log(code_piece[i]) + }else{ + var target=""; + var re=/\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + // code_piece[i]=code_piece[i].replace(/\)$/,"+'\\n'"+target) + code_piece[i]=code_piece[i].replace(/\)$/,target+";print('\\n');"); + } + //console.log(code_piece[i]) + } + } + } + code_new=code_piece.join("\n"); + //console.log(code_new) + code=code_new + } + + if(code_pack_list.includes('matplotlib')){ + document.getElementById("mat_div").style.height='100%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + $("#matplot_img").css('width','450px'); + $("#matplot_img").css('height','450px'); + } + + //如果存在pygame-zero,则进行相关的配置 + if(ifpgzrun){ + document.getElementById("mat_div").style.height='0%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='100%' + + const Sk = window.Sk; + Sk.TurtleGraphics.reset && Sk.TurtleGraphics.reset() + Sk.TurtleGraphics.target = "pggame_stage"; + Sk.TurtleGraphics.width = $('#pggame_stage').width() - 50 + Sk.TurtleGraphics.height = $('#pggame_stage').height() - 50 + + const PyGameZero = window.PyGameZero; + const stageSize = {width: 0, height: 0}; + const stageEl = document.getElementById("pggame_stage"); + // 配置容器 + stageSize.width = $('#pggame_stage').width() - 50; + stageSize.height = $('#pggame_stage').height() - 50; + PyGameZero.setContainer(stageEl) + PyGameZero.reset(); + + } + console.log(code) + + //已经读取了代码:code + // Actually run the python code + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, code, true); + }); + executionPromise.then( + function (module) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + // Run the afterSingleExecution one extra time for final state + /*Sk.afterSingleExecution(module.$d, -1, 0, ".py"); + engine.check(code, execution.trace(), execution.output(), execution.ast, module.$d); + engine.executionEnd_(); + */ + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue('==程序运行完成==\n'); + console.log('success'); + }, + function(error) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + + var original = prettyPrintError(error); + //hack for kill program with time limiterror + if(original.indexOf("TimeLimitError") !== -1) + return; + if($('.inputMsg').length > 0) + $('#side_code').text($('#side_code').text() + $('.inputMsg').val()) + + var $errorE = $('').addClass('errorMsg').html(original); + // $("#side_code").append($errorE) + statusBarTerminal.addValue(original); + var matchRet = /on line (\d+)/.exec(original); + var lineNumber = -1; + if(matchRet !== null && matchRet.length == 2){ + lineNumber = parseInt(matchRet[1]) - 1; + editor.session.addMarker(new EditorRange(lineNumber, 0, lineNumber, 1), "errorMarker", "fullLine"); + editor.hasMarker = true; + } + engine.executionEnd_(); + console.log(error.toString()); + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue(error.toString() + '\n==程序运行完成==\n'); + } +); + +} + + +/** + * Indents the given string by 4 spaces. This correctly handles multi-line strings. + * + * @param {String} str - The string to be manipulated. + * @returns {String} The string with four spaces added at the start of every new line. + */ +function indent(str) { + return str.replace(/^(?=.)/gm, ' '); +} + +function prettyPrintError (error) { + if (typeof error === "string") { + return error; + } else { + // A weird skulpt thing? + if (error.tp$str !== undefined) { + return error.tp$str().v; + } else { + return ""+error.name + ": " + error.message; + } + } +} + +/** + * Skulpt Module for holding the Instructor API. + * + * This module is a little hackish. We need to sit down and reevaluate the best way to + * organize it and whether this particular structure is ideal. I suspect it should be + * it's own proper JS file. + * + * @param {String} name - The name of the module (should always be 'instructor') + * + */ +var instructor_module = function(name) { + // Main module object that gets returned at the end. + var mod = {}; + + /** + * Skulpt Exception that represents a Feedback object, to be rendered to the user + * when the feedback system finds a problem. + * + * @param {Array} args - A list of optional arguments to pass to the Exception. + * Usually this will include a message for the user. + */ + Sk.builtin.Feedback = function (args) { + var o; + if (!(this instanceof Sk.builtin.Feedback)) { + o = Object.create(Sk.builtin.Feedback.prototype); + o.constructor.apply(o, arguments); + return o; + } + Sk.builtin.Exception.apply(this, arguments); + }; + Sk.abstr.setUpInheritance("Feedback", Sk.builtin.Feedback, Sk.builtin.Exception); + + /** + * Skulpt Exception that represents a Success object, to be thrown when the user + * completes their program successfully. + * + ** @param {Array} args - A list of optional arguments to pass to the Exception. + * Usually this will be empty. + */ + Sk.builtin.Success = function (args) { + var o; + if (!(this instanceof Sk.builtin.Success)) { + o = Object.create(Sk.builtin.Success.prototype); + o.constructor.apply(o, arguments); + return o; + } + Sk.builtin.Exception.apply(this, arguments); + }; + Sk.abstr.setUpInheritance("Success", Sk.builtin.Success, Sk.builtin.Exception); + + /** + * Skulpt Exception that represents a Finished object, to be thrown when the user + * completes their program successfully, but isn't in a problem with a "solution". + * This is useful for open-ended canvases where we still want to capture the students' + * code in Canvas. + * + ** @param {Array} args - A list of optional arguments to pass to the Exception. + * Usually this will be empty. + */ + Sk.builtin.Finished = function (args) { + var o; + if (!(this instanceof Sk.builtin.Finished)) { + o = Object.create(Sk.builtin.Finished.prototype); + o.constructor.apply(o, arguments); + return o; + } + Sk.builtin.Exception.apply(this, arguments); + }; + Sk.abstr.setUpInheritance("Finished", Sk.builtin.Finished, Sk.builtin.Exception); + + /** + * A Skulpt function that throws a Feedback exception, allowing us to give feedback + * to the user through the Feedback panel. This function call is done for aesthetic + * reasons, so that we are calling a function instead of raising an error. Still, + * exceptions allow us to break out of the control flow immediately, like a + * return, so they are a good mechanism to use under the hood. + * + * @param {String} message - The message to display to the user. + */ + mod.set_feedback = new Sk.builtin.func(function(message) { + Sk.builtin.pyCheckArgs("set_feedback", arguments, 1, 1); + Sk.builtin.pyCheckType("message", "string", Sk.builtin.checkString(message)); + throw new Sk.builtin.Feedback(message.v); + }); + + /** + * A Skulpt function that throws a Success exception. This will terminate the + * feedback analysis, but reports that the students' code was successful. + * This function call is done for aesthetic reasons, so that we are calling a + * function instead of raising an error. Still, exceptions allow us to break + * out of the control flow immediately, like a return would, so they are a + * good mechanism to use under the hood. + */ + mod.set_success = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("set_success", arguments, 0, 0); + throw new Sk.builtin.Success(); + }); + + /** + * A Skulpt function that throws a Finished exception. This will terminate the + * feedback analysis, but reports that the students' code was successful. + * This function call is done for aesthetic reasons, so that we are calling a + * function instead of raising an error. Still, exceptions allow us to break + * out of the control flow immediately, like a return would, so they are a + * good mechanism to use under the hood. + */ + mod.set_finished = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("set_finished", arguments, 0, 0); + throw new Sk.builtin.Finished(); + }); + + // Memoization of previous parses - some mild redundancy to save time + // TODO: There's no evidence this is good, and could be a memory hog on big + // programs. Someone should investigate this. The assumption is that multiple + // helper functions might be using parses. But shouldn't we trim old parses? + // Perhaps a timed cache would work better. + var parses = {}; + + /** + * Given source code as a string, return a flat list of all of the AST elements + * in the parsed source code. + * + * TODO: There's redundancy here, since the source code was previously parsed + * to run the file and to execute it. We should probably be able to do this just + * once and shave off time. + * + * @param {String} source - Python source code. + * @returns {Array.} + */ + function getParseList(source) { + if (!(source in parses)) { + var parse = Sk.parse("__main__", source); + parses[source] = Sk.astFromParse(parse.cst, "__main__", parse.flags); + } + var ast = parses[source]; + return (new NodeVisitor()).recursive_walk(ast); + } + + /** + * Given source code as a string, return a list of all of the AST elements + * that are Num (aka numeric literals) but that are not inside List elements. + * + * @param {String} source - Python source code. + * @returns {Array.number} The list of JavaScript numeric literals that were found. + */ + function getNonListNums(source) { + if (!(source in parses)) { + var parse = Sk.parse("__main__", source); + parses[source] = Sk.astFromParse(parse.cst, "__main__", parse.flags); + } + var ast = parses[source]; + var visitor = new NodeVisitor(); + var insideList = false; + var nums = []; + visitor.visit_List = function(node) { + insideList = true; + this.generic_visit(node); + insideList = false; + } + visitor.visit_Num = function(node) { + if (!insideList) { + nums.push(node.n); + } + this.generic_visit(node); + } + visitor.visit(ast); + return nums; + } + + /** + * Given source code as a string, return a list of all of the AST elements + * that are being printed (using the print function) but are not variables. + * + * @param {String} source - Python source code. + * @returns {Array.} The list of AST elements that were found. + */ + function getPrintedNonProperties(source) { + if (!(source in parses)) { + var parse = Sk.parse("__main__", source); + parses[source] = Sk.astFromParse(parse.cst, "__main__", parse.flags); + } + var ast = parses[source]; + var visitor = new NodeVisitor(); + var nonVariables = []; + visitor.visit_Call = function(node) { + var func = node.func; + var args = node.args; + if (func._astname == 'Name' && func.id.v == 'print') { + for (var i =0; i < args.length; i+= 1) { + if (args[i]._astname != "Name") { + nonVariables.push(args[i]); + } + } + } + this.generic_visit(node); + } + visitor.visit(ast); + return nonVariables; + } + + /** + * Skulpt function to iterate through the final state of + * all the variables in the program, and check to see if they have + * a given value. + */ + mod.get_value_by_name = new Sk.builtin.func(function(name) { + Sk.builtin.pyCheckArgs("get_value_by_name", arguments, 1, 1); + Sk.builtin.pyCheckType("name", "string", Sk.builtin.checkString(name)); + name = name.v; + var final_values = Sk.builtins._final_values; + if (name in final_values) { + return final_values[name]; + } else { + return Sk.builtin.none.none$; + } + }); + mod.get_value_by_type = new Sk.builtin.func(function(type) { + Sk.builtin.pyCheckArgs("get_value_by_type", arguments, 1, 1); + + var final_values = Sk.builtins._final_values; + var result = []; + for (var property in final_values) { + if (final_values[property].tp$name == type.tp$name) { + result.push(final_values[property]); + } + } + return Sk.builtin.list(result); + }); + + mod.parse_json = new Sk.builtin.func(function(blob) { + Sk.builtin.pyCheckArgs("parse_json", arguments, 1, 1); + Sk.builtin.pyCheckType("blob", "string", Sk.builtin.checkString(blob)); + blob = blob.v; + return Sk.ffi.remapToPy(JSON.parse(blob)); + }); + mod.get_property = new Sk.builtin.func(function(name) { + Sk.builtin.pyCheckArgs("get_property", arguments, 1, 1); + Sk.builtin.pyCheckType("name", "string", Sk.builtin.checkString(name)); + name = name.v; + var trace = Sk.builtins._trace; + if (trace.length <= 0) { + return Sk.builtin.none.none$; + } + var properties = trace[trace.length-1]["properties"]; + for (var i = 0, len = properties.length; i < len; i += 1) { + if (properties[i]['name'] == name) { + return Sk.ffi.remapToPy(properties[i]) + } + } + return Sk.builtin.none.none$; + }); + + mod.calls_function = new Sk.builtin.func(function(source, name) { + Sk.builtin.pyCheckArgs("calls_function", arguments, 2, 2); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + Sk.builtin.pyCheckType("name", "string", Sk.builtin.checkString(name)); + + source = source.v; + name = name.v; + + var ast_list = getParseList(source); + + var count = 0; + for (var i = 0, len = ast_list.length; i < len; i = i+1) { + if (ast_list[i]._astname == 'Call') { + if (ast_list[i].func._astname == 'Attribute') { + count += Sk.ffi.remapToJs(ast_list[i].func.attr) == name | 0; + } else if (ast_list[i].func._astname == 'Name') { + count += Sk.ffi.remapToJs(ast_list[i].func.id) == name | 0; + } + } + } + + return Sk.ffi.remapToPy(count > 0); + }); + + mod.count_components = new Sk.builtin.func(function(source, component) { + Sk.builtin.pyCheckArgs("count_components", arguments, 2, 2); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + Sk.builtin.pyCheckType("component", "string", Sk.builtin.checkString(component)); + + source = source.v; + component = component.v; + + var ast_list = getParseList(source); + + var count = 0; + for (var i = 0, len = ast_list.length; i < len; i = i+1) { + if (ast_list[i]._astname == component) { + count = count+1; + } + } + + return Sk.ffi.remapToPy(count); + }); + + mod.no_nonlist_nums = new Sk.builtin.func(function(source) { + Sk.builtin.pyCheckArgs("no_nonlist_nums", arguments, 1, 1); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + + source = source.v; + + var num_list = getNonListNums(source); + + var count = 0; + for (var i = 0, len = num_list.length; i < len; i = i+1) { + if (num_list[i].v != 0 && num_list[i].v != 1) { + return Sk.ffi.remapToPy(true); + } + } + return Sk.ffi.remapToPy(false); + }); + mod.only_printing_properties = new Sk.builtin.func(function(source) { + Sk.builtin.pyCheckArgs("only_printing_properties", arguments, 1, 1); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + + source = source.v; + + var non_var_list = getPrintedNonProperties(source); + return Sk.ffi.remapToPy(non_var_list.length == 0); + }); + + return mod; +} + +PyEngine.prototype.setupEnvironment = function(student_code, traceTable, output, ast, final_values) { + var model = this.main.model; + this._backup_execution = Sk.afterSingleExecution; + Sk.afterSingleExecution = undefined; + Sk.builtins.get_output = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("get_output", arguments, 0, 0); + return Sk.ffi.remapToPy(model.execution.output()); + }); + Sk.builtins.reset_output = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("reset_output", arguments, 0, 0); + model.execution.output.removeAll(); + }); + Sk.builtins.log = new Sk.builtin.func(function(data) { + Sk.builtin.pyCheckArgs("log", arguments, 1, 1); + console.log(data) + }); + //Sk.builtins.trace = Sk.ffi.remapToPy(traceTable); + Sk.builtins._trace = traceTable; + Sk.builtins._final_values = final_values; + Sk.builtins.code = Sk.ffi.remapToPy(student_code); + Sk.builtins.set_success = this.instructor_module.set_success; + Sk.builtins.set_feedback = this.instructor_module.set_feedback; + Sk.builtins.set_finished = this.instructor_module.set_finished; + Sk.builtins.count_components = this.instructor_module.count_components; + Sk.builtins.no_nonlist_nums = this.instructor_module.no_nonlist_nums; + Sk.builtins.only_printing_properties = this.instructor_module.only_printing_properties; + Sk.builtins.calls_function = this.instructor_module.calls_function; + Sk.builtins.get_property = this.instructor_module.get_property; + Sk.builtins.get_value_by_name = this.instructor_module.get_value_by_name; + Sk.builtins.get_value_by_type = this.instructor_module.get_value_by_type; + Sk.builtins.parse_json = this.instructor_module.parse_json; + Sk.skip_drawing = true; + model.settings.mute_printer(true); +} + +PyEngine.prototype.disposeEnvironment = function() { + Sk.afterSingleExecution = this._backup_execution; + Sk.builtins.get_output = undefined; + Sk.builtins.reset_output = undefined; + Sk.builtins.log = undefined; + Sk.builtins._trace = undefined; + Sk.builtins.trace = undefined; + Sk.builtins.code = undefined; + Sk.builtins.set_success = undefined; + Sk.builtins.set_feedback = undefined; + Sk.builtins.set_finished = undefined; + Sk.builtins.count_components = undefined; + Sk.builtins.calls_function = undefined; + Sk.builtins.get_property = undefined; + Sk.builtins.get_value_by_name = undefined; + Sk.builtins.get_value_by_type = undefined; + Sk.builtins.no_nonlist_nums = undefined; + Sk.builtins.only_printing_properties = undefined; + Sk.builtins.parse_json = undefined; + Sk.skip_drawing = false; + GLOBAL_VALUE = undefined; + this.main.model.settings.mute_printer(false); +} + +PyEngine.prototype.check = function(student_code, traceTable, output, ast, final_values) { + var engine = this; + var model = this.main.model; + var on_run = model.programs['give_feedback'](); + if (on_run !== undefined && on_run.trim() !== "") { + on_run = 'def run_code():\n'+indent(student_code)+'\n'+on_run; + this.setupEnvironment(student_code, traceTable, output, ast, final_values); + + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, on_run, true); + }); + executionPromise.then( + function (module) { + engine.main.components.feedback.noErrors(); + engine.disposeEnvironment(); + }, function (error) { + engine.disposeEnvironment(); + console.log(error.tp$name, error.tp$name == "Success"); + if (error.tp$name == "Success") { + server.markSuccess(1.0); + engine.main.components.feedback.complete(); + } else if (error.tp$name == "Feedback") { + server.markSuccess(0.0); + engine.main.components.feedback.instructorFeedback("Incorrect Answer", error.args.v[0].v); + } else if (error.tp$name == "Finished") { + server.markSuccess(1.0); + engine.main.components.feedback.finished(); + } else { + console.error(error); + engine.main.components.feedback.internalError(error, "Feedback Error", "Error in instructor's feedback. Please show the above message to an instructor!"); + server.logEvent('blockly_instructor_error', ''+error); + } + }); + } +} + +PyEngine.prototype.parseGlobals = function(variables) { + var result = Array(); + var modules = Array(); + for (var property in variables) { + var value = variables[property]; + if (property !== "__name__" && property !== "__doc__") { + property = property.replace('_$rw$', '') + .replace('_$rn$', ''); + var parsed = this.parseValue(property, value); + if (parsed !== null) { + result.push(parsed); + } else if (value.constructor == Sk.builtin.module) { + modules.push(value.$d.__name__.v); + } + } + } + return {"properties": result, "modules": modules}; +} + +PyEngine.prototype.parseValue = function(property, value) { + if (value == undefined) { + return {'name': property, + 'type': 'Unknown', + "value": 'Undefined' + }; + } + switch (value.constructor) { + case Sk.builtin.func: + return {'name': property, + 'type': "Function", + "value": + (value.func_code.co_varnames !== undefined ? + " Arguments: "+value.func_code.co_varnames.join(", ") : + ' No arguments') + }; + case Sk.builtin.module: return null; + case Sk.builtin.str: + return {'name': property, + 'type': "String", + "value": value.$r().v + }; + case Sk.builtin.none: + return {'name': property, + 'type': "None", + "value": "None" + }; + case Sk.builtin.bool: + return {'name': property, + 'type': "Boolean", + "value": value.$r().v + }; + case Sk.builtin.nmber: + return {'name': property, + 'type': "int" == value.skType ? "Integer": "Float", + "value": value.$r().v + }; + case Sk.builtin.int_: + return {'name': property, + 'type': "Integer", + "value": value.$r().v + }; + case Sk.builtin.float_: + return {'name': property, + 'type': "Float", + "value": value.$r().v + }; + case Sk.builtin.tuple: + return {'name': property, + 'type': "Tuple", + "value": value.$r().v + }; + case Sk.builtin.list: + if (value.v.length <= 20) { + return {'name': property, + 'type': "List", + "value": value.$r().v, + 'exact_value': value + }; + } else { + return {'name': property, + 'type': "List", + "value": "[... "+value.v.length+" elements ...]", + "exact_value": value + }; + } + case Sk.builtin.dict: + return {'name': property, + 'type': "Dictionary", + "value": value.$r().v + }; + case Number: + return {'name': property, + 'type': value % 1 === 0 ? "Integer" : "Float", + "value": value + }; + case String: + return {'name': property, + 'type': "String", + "value": value + }; + case Boolean: + return {'name': property, + 'type': "Boolean", + "value": (value ? "True": "False") + }; + default: + return {'name': property, + 'type': value.tp$name == undefined ? value : value.tp$name, + "value": value.$r == undefined ? value : value.$r().v + }; + } +} diff --git a/mixly/common/js/skulpt_mixcar/inittool.js b/mixly/common/js/skulpt_mixcar/inittool.js new file mode 100644 index 00000000..8e29cbc9 --- /dev/null +++ b/mixly/common/js/skulpt_mixcar/inittool.js @@ -0,0 +1,20 @@ +var $builtinmodule = function (name) { + let mod= {__name__: new Sk.builtin.str("blocktool")}; + + var highlight = function(id) { + id=Sk.ffi.remapToJs(id) + Mixly.Editor.blockEditor.highlightBlock(id); + }; + + var highlight_f=function(block_id) { + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + setTimeout( () => { + highlight(block_id) + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.highlight = new Sk.builtin.func(highlight_f); + + return mod; +} \ No newline at end of file diff --git a/mixly/common/js/skulpt_mixcar/pic/Start_final.png b/mixly/common/js/skulpt_mixcar/pic/Start_final.png new file mode 100644 index 00000000..6cfa9913 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/Start_final.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/actor_car.png b/mixly/common/js/skulpt_mixcar/pic/actor_car.png new file mode 100644 index 00000000..258e8fa5 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/actor_car.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/actor_car3.png b/mixly/common/js/skulpt_mixcar/pic/actor_car3.png new file mode 100644 index 00000000..d6572178 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/actor_car3.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/astro.png b/mixly/common/js/skulpt_mixcar/pic/astro.png new file mode 100644 index 00000000..f71f1268 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/astro.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/astro2.png b/mixly/common/js/skulpt_mixcar/pic/astro2.png new file mode 100644 index 00000000..6ed8b1ae Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/astro2.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/award.png b/mixly/common/js/skulpt_mixcar/pic/award.png new file mode 100644 index 00000000..6ef5623e Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/award.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bamboo.png b/mixly/common/js/skulpt_mixcar/pic/bamboo.png new file mode 100644 index 00000000..6614c91e Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bamboo.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/barrier.png b/mixly/common/js/skulpt_mixcar/pic/barrier.png new file mode 100644 index 00000000..f6cd5a42 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/barrier.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg1.jpg b/mixly/common/js/skulpt_mixcar/pic/bg1.jpg new file mode 100644 index 00000000..9075665b Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg1.jpg differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg2.jpg b/mixly/common/js/skulpt_mixcar/pic/bg2.jpg new file mode 100644 index 00000000..5d7407c2 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg2.jpg differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg3.jpg b/mixly/common/js/skulpt_mixcar/pic/bg3.jpg new file mode 100644 index 00000000..ab53ffb9 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg3.jpg differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg4.jpg b/mixly/common/js/skulpt_mixcar/pic/bg4.jpg new file mode 100644 index 00000000..d54f0f3c Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg4.jpg differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg_astro.jpg b/mixly/common/js/skulpt_mixcar/pic/bg_astro.jpg new file mode 100644 index 00000000..8c71174d Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg_astro.jpg differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg_astro.png b/mixly/common/js/skulpt_mixcar/pic/bg_astro.png new file mode 100644 index 00000000..8c71174d Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg_astro.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg_default.png b/mixly/common/js/skulpt_mixcar/pic/bg_default.png new file mode 100644 index 00000000..5911b325 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg_default.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/bg_panda.jpg b/mixly/common/js/skulpt_mixcar/pic/bg_panda.jpg new file mode 100644 index 00000000..e812a938 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/bg_panda.jpg differ diff --git a/mixly/common/js/skulpt_mixcar/pic/blue.png b/mixly/common/js/skulpt_mixcar/pic/blue.png new file mode 100644 index 00000000..b610512f Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/blue.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/car.png b/mixly/common/js/skulpt_mixcar/pic/car.png new file mode 100644 index 00000000..e53021ea Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/car.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/default.png b/mixly/common/js/skulpt_mixcar/pic/default.png new file mode 100644 index 00000000..13609c3b Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/default.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/full_oil.png b/mixly/common/js/skulpt_mixcar/pic/full_oil.png new file mode 100644 index 00000000..e7ba61d9 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/full_oil.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/green.png b/mixly/common/js/skulpt_mixcar/pic/green.png new file mode 100644 index 00000000..5abdec84 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/green.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/greenlight.png b/mixly/common/js/skulpt_mixcar/pic/greenlight.png new file mode 100644 index 00000000..d3371044 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/greenlight.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/marker.png b/mixly/common/js/skulpt_mixcar/pic/marker.png new file mode 100644 index 00000000..235f3165 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/marker.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/maze_path.png b/mixly/common/js/skulpt_mixcar/pic/maze_path.png new file mode 100644 index 00000000..a9dcdec7 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/maze_path.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/no_oil.png b/mixly/common/js/skulpt_mixcar/pic/no_oil.png new file mode 100644 index 00000000..8b74c868 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/no_oil.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/none_oil.png b/mixly/common/js/skulpt_mixcar/pic/none_oil.png new file mode 100644 index 00000000..d4a42cfa Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/none_oil.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/oilstation.png b/mixly/common/js/skulpt_mixcar/pic/oilstation.png new file mode 100644 index 00000000..04739032 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/oilstation.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/panda.png b/mixly/common/js/skulpt_mixcar/pic/panda.png new file mode 100644 index 00000000..439ff501 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/panda.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/panda2.png b/mixly/common/js/skulpt_mixcar/pic/panda2.png new file mode 100644 index 00000000..a90d68ae Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/panda2.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/pegman copy.png b/mixly/common/js/skulpt_mixcar/pic/pegman copy.png new file mode 100644 index 00000000..a47862a6 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/pegman copy.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/pegman.png b/mixly/common/js/skulpt_mixcar/pic/pegman.png new file mode 100644 index 00000000..bcd09ad2 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/pegman.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/pipeline.png b/mixly/common/js/skulpt_mixcar/pic/pipeline.png new file mode 100644 index 00000000..0292152d Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/pipeline.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/red.png b/mixly/common/js/skulpt_mixcar/pic/red.png new file mode 100644 index 00000000..76ab1376 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/red.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/redlight.png b/mixly/common/js/skulpt_mixcar/pic/redlight.png new file mode 100644 index 00000000..88f48f10 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/redlight.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/roadblock.png b/mixly/common/js/skulpt_mixcar/pic/roadblock.png new file mode 100644 index 00000000..88ac9b2a Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/roadblock.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/robot.png b/mixly/common/js/skulpt_mixcar/pic/robot.png new file mode 100644 index 00000000..1014ef73 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/robot.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/tiles_astro.png b/mixly/common/js/skulpt_mixcar/pic/tiles_astro.png new file mode 100644 index 00000000..e21a1930 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/tiles_astro.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/tiles_panda.png b/mixly/common/js/skulpt_mixcar/pic/tiles_panda.png new file mode 100644 index 00000000..1e096b77 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/tiles_panda.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/tiles_road.png b/mixly/common/js/skulpt_mixcar/pic/tiles_road.png new file mode 100644 index 00000000..ea0caefb Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/tiles_road.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/trafficlight.png b/mixly/common/js/skulpt_mixcar/pic/trafficlight.png new file mode 100644 index 00000000..be7b8156 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/trafficlight.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/wall.png b/mixly/common/js/skulpt_mixcar/pic/wall.png new file mode 100644 index 00000000..6cf58ec4 Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/wall.png differ diff --git a/mixly/common/js/skulpt_mixcar/pic/yellow.png b/mixly/common/js/skulpt_mixcar/pic/yellow.png new file mode 100644 index 00000000..e67f311d Binary files /dev/null and b/mixly/common/js/skulpt_mixcar/pic/yellow.png differ diff --git a/mixly/common/js/skulpt_mixcar/pygame_zero_main.js b/mixly/common/js/skulpt_mixcar/pygame_zero_main.js new file mode 100644 index 00000000..6d7cd310 --- /dev/null +++ b/mixly/common/js/skulpt_mixcar/pygame_zero_main.js @@ -0,0 +1,15269 @@ +(function() { + function Kb(a) { + return a && a.__esModule ? { + d: a.default + } : { + d: a + } + } + function Gc(name) { + var err = new Error("Cannot find module '" + name + "'"); + err.code = "MODULE_NOT_FOUND"; + throw err + } + var Hc = this; + var Lb = {}; + var ma = {}; + var te, Mb, ha = {}; + !function(e, t) { + "object" == typeof ha ? ha = t(function() { + try { + return Gc("poly-decomp") + } catch (e) {} + }()) : "function" == typeof Mb && Mb.amd ? Mb("Matter", ["poly-decomp"], t) : "object" == typeof ha ? (te = t(function() { + try { + return Gc("poly-decomp") + } catch (e) {} + }()), + ha.Matter = te) : e.Matter = t(e.decomp) + }(ha, function(e) { + return function(e) { + var t = {}; + function n(i) { + if (t[i]) + return t[i].exports; + var o = t[i] = { + i: i, + l: !1, + exports: {} + }; + return e[i].call(o.exports, o, o.exports, n), + o.l = !0, + o.exports + } + return n.m = e, + n.c = t, + n.d = function(e, t, i) { + n.o(e, t) || Object.defineProperty(e, t, { + enumerable: !0, + get: i + }) + } + , + n.r = function(e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { + value: "Module" + }), + Object.defineProperty(e, "__esModule", { + value: !0 + }) + } + , + n.t = function(e, t) { + if (1 & t && (e = n(e)), + 8 & t) + return e; + if (4 & t && "object" == typeof e && e && e.__esModule) + return e; + var i = Object.create(null); + if (n.r(i), + Object.defineProperty(i, "default", { + enumerable: !0, + value: e + }), + 2 & t && "string" != typeof e) + for (var o in e) + n.d(i, o, function(t) { + return e[t] + } + .bind(null, o)); + return i + } + , + n.n = function(e) { + var t = e && e.__esModule ? function() { + return e.default + } + : function() { + return e + } + ; + return n.d(t, "a", t), + t + } + , + n.o = function(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + } + , + n.p = "", + n(n.s = 24) + }([function(e, t) { + var n = {}; + e.exports = n, + function() { + n._nextId = 0, + n._seed = 0, + n._nowStartTime = +new Date, + n.extend = function(e, t) { + var i, o; + "boolean" == typeof t ? (i = 2, + o = t) : (i = 1, + o = !0); + for (var r = i; r < arguments.length; r++) { + var s = arguments[r]; + if (s) + for (var a in s) + o && s[a] && s[a].constructor === Object ? e[a] && e[a].constructor !== Object ? e[a] = s[a] : (e[a] = e[a] || {}, + n.extend(e[a], o, s[a])) : e[a] = s[a] + } + return e + } + , + n.clone = function(e, t) { + return n.extend({}, t, e) + } + , + n.keys = function(e) { + if (Object.keys) + return Object.keys(e); + var t = []; + for (var n in e) + t.push(n); + return t + } + , + n.values = function(e) { + var t = []; + if (Object.keys) { + for (var n = Object.keys(e), i = 0; i < n.length; i++) + t.push(e[n[i]]); + return t + } + for (var o in e) + t.push(e[o]); + return t + } + , + n.get = function(e, t, n, i) { + t = t.split(".").slice(n, i); + for (var o = 0; o < t.length; o += 1) + e = e[t[o]]; + return e + } + , + n.set = function(e, t, i, o, r) { + var s = t.split(".").slice(o, r); + return n.get(e, t, 0, -1)[s[s.length - 1]] = i, + i + } + , + n.shuffle = function(e) { + for (var t = e.length - 1; t > 0; t--) { + var i = Math.floor(n.random() * (t + 1)) + , o = e[t]; + e[t] = e[i], + e[i] = o + } + return e + } + , + n.choose = function(e) { + return e[Math.floor(n.random() * e.length)] + } + , + n.isElement = function(e) { + return "undefined" != typeof HTMLElement ? e instanceof HTMLElement : !!(e && e.nodeType && e.nodeName) + } + , + n.isArray = function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + } + , + n.isFunction = function(e) { + return "function" == typeof e + } + , + n.isPlainObject = function(e) { + return "object" == typeof e && e.constructor === Object + } + , + n.isString = function(e) { + return "[object String]" === toString.call(e) + } + , + n.clamp = function(e, t, n) { + return e < t ? t : e > n ? n : e + } + , + n.sign = function(e) { + return e < 0 ? -1 : 1 + } + , + n.now = function() { + if ("undefined" != typeof window && window.performance) { + if (window.performance.now) + return window.performance.now(); + if (window.performance.webkitNow) + return window.performance.webkitNow() + } + return new Date - n._nowStartTime + } + , + n.random = function(t, n) { + return n = void 0 !== n ? n : 1, + (t = void 0 !== t ? t : 0) + e() * (n - t) + } + ; + var e = function() { + return n._seed = (9301 * n._seed + 49297) % 233280, + n._seed / 233280 + }; + n.colorToNumber = function(e) { + return 3 == (e = e.replace("#", "")).length && (e = e.charAt(0) + e.charAt(0) + e.charAt(1) + e.charAt(1) + e.charAt(2) + e.charAt(2)), + parseInt(e, 16) + } + , + n.logLevel = 1, + n.log = function() { + console && n.logLevel > 0 && n.logLevel <= 3 && console.log.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) + } + , + n.info = function() { + console && n.logLevel > 0 && n.logLevel <= 2 && console.info.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) + } + , + n.warn = function() { + console && n.logLevel > 0 && n.logLevel <= 3 && console.warn.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) + } + , + n.nextId = function() { + return n._nextId++ + } + , + n.indexOf = function(e, t) { + if (e.indexOf) + return e.indexOf(t); + for (var n = 0; n < e.length; n++) + if (e[n] === t) + return n; + return -1 + } + , + n.map = function(e, t) { + if (e.map) + return e.map(t); + for (var n = [], i = 0; i < e.length; i += 1) + n.push(t(e[i])); + return n + } + , + n.topologicalSort = function(e) { + var t = [] + , i = [] + , o = []; + for (var r in e) + i[r] || o[r] || n._topologicalSort(r, i, o, e, t); + return t + } + , + n._topologicalSort = function(e, t, i, o, r) { + var s = o[e] || []; + i[e] = !0; + for (var a = 0; a < s.length; a += 1) { + var l = s[a]; + i[l] || t[l] || n._topologicalSort(l, t, i, o, r) + } + i[e] = !1, + t[e] = !0, + r.push(e) + } + , + n.chain = function() { + for (var e = [], t = 0; t < arguments.length; t += 1) { + var n = arguments[t]; + n._chained ? e.push.apply(e, n._chained) : e.push(n) + } + var i = function() { + for (var t, n = new Array(arguments.length), i = 0, o = arguments.length; i < o; i++) + n[i] = arguments[i]; + for (i = 0; i < e.length; i += 1) { + var r = e[i].apply(t, n); + void 0 !== r && (t = r) + } + return t + }; + return i._chained = e, + i + } + , + n.chainPathBefore = function(e, t, i) { + return n.set(e, t, n.chain(i, n.get(e, t))) + } + , + n.chainPathAfter = function(e, t, i) { + return n.set(e, t, n.chain(n.get(e, t), i)) + } + }() + } + , function(e, t) { + var n = {}; + e.exports = n, + n.create = function(e) { + var t = { + min: { + x: 0, + y: 0 + }, + max: { + x: 0, + y: 0 + } + }; + return e && n.update(t, e), + t + } + , + n.update = function(e, t, n) { + e.min.x = 1 / 0, + e.max.x = -1 / 0, + e.min.y = 1 / 0, + e.max.y = -1 / 0; + for (var i = 0; i < t.length; i++) { + var o = t[i]; + o.x > e.max.x && (e.max.x = o.x), + o.x < e.min.x && (e.min.x = o.x), + o.y > e.max.y && (e.max.y = o.y), + o.y < e.min.y && (e.min.y = o.y) + } + n && (n.x > 0 ? e.max.x += n.x : e.min.x += n.x, + n.y > 0 ? e.max.y += n.y : e.min.y += n.y) + } + , + n.contains = function(e, t) { + return t.x >= e.min.x && t.x <= e.max.x && t.y >= e.min.y && t.y <= e.max.y + } + , + n.overlaps = function(e, t) { + return e.min.x <= t.max.x && e.max.x >= t.min.x && e.max.y >= t.min.y && e.min.y <= t.max.y + } + , + n.translate = function(e, t) { + e.min.x += t.x, + e.max.x += t.x, + e.min.y += t.y, + e.max.y += t.y + } + , + n.shift = function(e, t) { + var n = e.max.x - e.min.x + , i = e.max.y - e.min.y; + e.min.x = t.x, + e.max.x = t.x + n, + e.min.y = t.y, + e.max.y = t.y + i + } + } + , function(e, t) { + var n = {}; + e.exports = n, + n.create = function(e, t) { + return { + x: e || 0, + y: t || 0 + } + } + , + n.clone = function(e) { + return { + x: e.x, + y: e.y + } + } + , + n.magnitude = function(e) { + return Math.sqrt(e.x * e.x + e.y * e.y) + } + , + n.magnitudeSquared = function(e) { + return e.x * e.x + e.y * e.y + } + , + n.rotate = function(e, t, n) { + var i = Math.cos(t) + , o = Math.sin(t); + n || (n = {}); + var r = e.x * i - e.y * o; + return n.y = e.x * o + e.y * i, + n.x = r, + n + } + , + n.rotateAbout = function(e, t, n, i) { + var o = Math.cos(t) + , r = Math.sin(t); + i || (i = {}); + var s = n.x + ((e.x - n.x) * o - (e.y - n.y) * r); + return i.y = n.y + ((e.x - n.x) * r + (e.y - n.y) * o), + i.x = s, + i + } + , + n.normalise = function(e) { + var t = n.magnitude(e); + return 0 === t ? { + x: 0, + y: 0 + } : { + x: e.x / t, + y: e.y / t + } + } + , + n.dot = function(e, t) { + return e.x * t.x + e.y * t.y + } + , + n.cross = function(e, t) { + return e.x * t.y - e.y * t.x + } + , + n.cross3 = function(e, t, n) { + return (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x) + } + , + n.add = function(e, t, n) { + return n || (n = {}), + n.x = e.x + t.x, + n.y = e.y + t.y, + n + } + , + n.sub = function(e, t, n) { + return n || (n = {}), + n.x = e.x - t.x, + n.y = e.y - t.y, + n + } + , + n.mult = function(e, t) { + return { + x: e.x * t, + y: e.y * t + } + } + , + n.div = function(e, t) { + return { + x: e.x / t, + y: e.y / t + } + } + , + n.perp = function(e, t) { + return { + x: (t = !0 === t ? -1 : 1) * -e.y, + y: t * e.x + } + } + , + n.neg = function(e) { + return { + x: -e.x, + y: -e.y + } + } + , + n.angle = function(e, t) { + return Math.atan2(t.y - e.y, t.x - e.x) + } + , + n._temp = [n.create(), n.create(), n.create(), n.create(), n.create(), n.create()] + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(2) + , r = n(0); + i.create = function(e, t) { + for (var n = [], i = 0; i < e.length; i++) { + var o = e[i] + , r = { + x: o.x, + y: o.y, + index: i, + body: t, + isInternal: !1 + }; + n.push(r) + } + return n + } + , + i.fromPath = function(e, t) { + var n = []; + return e.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi, function(e, t, i) { + n.push({ + x: parseFloat(t), + y: parseFloat(i) + }) + }), + i.create(n, t) + } + , + i.centre = function(e) { + for (var t, n, r, s = i.area(e, !0), a = { + x: 0, + y: 0 + }, l = 0; l < e.length; l++) + r = (l + 1) % e.length, + t = o.cross(e[l], e[r]), + n = o.mult(o.add(e[l], e[r]), t), + a = o.add(a, n); + return o.div(a, 6 * s) + } + , + i.mean = function(e) { + for (var t = { + x: 0, + y: 0 + }, n = 0; n < e.length; n++) + t.x += e[n].x, + t.y += e[n].y; + return o.div(t, e.length) + } + , + i.area = function(e, t) { + for (var n = 0, i = e.length - 1, o = 0; o < e.length; o++) + n += (e[i].x - e[o].x) * (e[i].y + e[o].y), + i = o; + return t ? n / 2 : Math.abs(n) / 2 + } + , + i.inertia = function(e, t) { + for (var n, i, r = 0, s = 0, a = e, l = 0; l < a.length; l++) + i = (l + 1) % a.length, + r += (n = Math.abs(o.cross(a[i], a[l]))) * (o.dot(a[i], a[i]) + o.dot(a[i], a[l]) + o.dot(a[l], a[l])), + s += n; + return t / 6 * (r / s) + } + , + i.translate = function(e, t, n) { + var i; + if (n) + for (i = 0; i < e.length; i++) + e[i].x += t.x * n, + e[i].y += t.y * n; + else + for (i = 0; i < e.length; i++) + e[i].x += t.x, + e[i].y += t.y; + return e + } + , + i.rotate = function(e, t, n) { + if (0 !== t) { + for (var i = Math.cos(t), o = Math.sin(t), r = 0; r < e.length; r++) { + var s = e[r] + , a = s.x - n.x + , l = s.y - n.y; + s.x = n.x + (a * i - l * o), + s.y = n.y + (a * o + l * i) + } + return e + } + } + , + i.contains = function(e, t) { + for (var n = 0; n < e.length; n++) { + var i = e[n] + , o = e[(n + 1) % e.length]; + if ((t.x - i.x) * (o.y - i.y) + (t.y - i.y) * (i.x - o.x) > 0) + return !1 + } + return !0 + } + , + i.scale = function(e, t, n, r) { + if (1 === t && 1 === n) + return e; + var s, a; + r = r || i.centre(e); + for (var l = 0; l < e.length; l++) + s = e[l], + a = o.sub(s, r), + e[l].x = r.x + a.x * t, + e[l].y = r.y + a.y * n; + return e + } + , + i.chamfer = function(e, t, n, i, s) { + t = "number" == typeof t ? [t] : t || [8], + n = void 0 !== n ? n : -1, + i = i || 2, + s = s || 14; + for (var a = [], l = 0; l < e.length; l++) { + var c = e[l - 1 >= 0 ? l - 1 : e.length - 1] + , d = e[l] + , u = e[(l + 1) % e.length] + , p = t[l < t.length ? l : t.length - 1]; + if (0 !== p) { + var f = o.normalise({ + x: d.y - c.y, + y: c.x - d.x + }) + , v = o.normalise({ + x: u.y - d.y, + y: d.x - u.x + }) + , m = Math.sqrt(2 * Math.pow(p, 2)) + , y = o.mult(r.clone(f), p) + , g = o.normalise(o.mult(o.add(f, v), .5)) + , x = o.sub(d, o.mult(g, m)) + , h = n; + -1 === n && (h = 1.75 * Math.pow(p, .32)), + (h = r.clamp(h, i, s)) % 2 == 1 && (h += 1); + for (var b = Math.acos(o.dot(f, v)) / h, w = 0; w < h; w++) + a.push(o.add(o.rotate(y, b * w), x)) + } else + a.push(d) + } + return a + } + , + i.clockwiseSort = function(e) { + var t = i.mean(e); + return e.sort(function(e, n) { + return o.angle(t, e) - o.angle(t, n) + }), + e + } + , + i.isConvex = function(e) { + var t, n, i, o, r = 0, s = e.length; + if (s < 3) + return null; + for (t = 0; t < s; t++) + if (i = (t + 2) % s, + o = (e[n = (t + 1) % s].x - e[t].x) * (e[i].y - e[n].y), + (o -= (e[n].y - e[t].y) * (e[i].x - e[n].x)) < 0 ? r |= 1 : o > 0 && (r |= 2), + 3 === r) + return !1; + return 0 !== r || null + } + , + i.hull = function(e) { + var t, n, i = [], r = []; + for ((e = e.slice(0)).sort(function(e, t) { + var n = e.x - t.x; + return 0 !== n ? n : e.y - t.y + }), + n = 0; n < e.length; n += 1) { + for (t = e[n]; r.length >= 2 && o.cross3(r[r.length - 2], r[r.length - 1], t) <= 0; ) + r.pop(); + r.push(t) + } + for (n = e.length - 1; n >= 0; n -= 1) { + for (t = e[n]; i.length >= 2 && o.cross3(i[i.length - 2], i[i.length - 1], t) <= 0; ) + i.pop(); + i.push(t) + } + return i.pop(), + r.pop(), + i.concat(r) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0); + i.on = function(e, t, n) { + for (var i, o = t.split(" "), r = 0; r < o.length; r++) + i = o[r], + e.events = e.events || {}, + e.events[i] = e.events[i] || [], + e.events[i].push(n); + return n + } + , + i.off = function(e, t, n) { + if (t) { + "function" == typeof t && (n = t, + t = o.keys(e.events).join(" ")); + for (var i = t.split(" "), r = 0; r < i.length; r++) { + var s = e.events[i[r]] + , a = []; + if (n && s) + for (var l = 0; l < s.length; l++) + s[l] !== n && a.push(s[l]); + e.events[i[r]] = a + } + } else + e.events = {} + } + , + i.trigger = function(e, t, n) { + var i, r, s, a, l = e.events; + if (l && o.keys(l).length > 0) { + n || (n = {}), + i = t.split(" "); + for (var c = 0; c < i.length; c++) + if (s = l[r = i[c]]) { + (a = o.clone(n, !1)).name = r, + a.source = e; + for (var d = 0; d < s.length; d++) + s[d].apply(e, [a]) + } + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(4) + , r = n(0) + , s = n(1) + , a = n(6); + i.create = function(e) { + return r.extend({ + id: r.nextId(), + type: "composite", + parent: null, + isModified: !1, + bodies: [], + constraints: [], + composites: [], + label: "Composite", + plugin: {} + }, e) + } + , + i.setModified = function(e, t, n, o) { + if (e.isModified = t, + n && e.parent && i.setModified(e.parent, t, n, o), + o) + for (var r = 0; r < e.composites.length; r++) { + var s = e.composites[r]; + i.setModified(s, t, n, o) + } + } + , + i.add = function(e, t) { + var n = [].concat(t); + o.trigger(e, "beforeAdd", { + object: t + }); + for (var s = 0; s < n.length; s++) { + var a = n[s]; + switch (a.type) { + case "body": + if (a.parent !== a) { + r.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)"); + break + } + i.addBody(e, a); + break; + case "constraint": + i.addConstraint(e, a); + break; + case "composite": + i.addComposite(e, a); + break; + case "mouseConstraint": + i.addConstraint(e, a.constraint); + } + } + return o.trigger(e, "afterAdd", { + object: t + }), + e + } + , + i.remove = function(e, t, n) { + var r = [].concat(t); + o.trigger(e, "beforeRemove", { + object: t + }); + for (var s = 0; s < r.length; s++) { + var a = r[s]; + switch (a.type) { + case "body": + i.removeBody(e, a, n); + break; + case "constraint": + i.removeConstraint(e, a, n); + break; + case "composite": + i.removeComposite(e, a, n); + break; + case "mouseConstraint": + i.removeConstraint(e, a.constraint); + } + } + return o.trigger(e, "afterRemove", { + object: t + }), + e + } + , + i.addComposite = function(e, t) { + return e.composites.push(t), + t.parent = e, + i.setModified(e, !0, !0, !1), + e + } + , + i.removeComposite = function(e, t, n) { + var o = r.indexOf(e.composites, t); + if (-1 !== o && (i.removeCompositeAt(e, o), + i.setModified(e, !0, !0, !1)), + n) + for (var s = 0; s < e.composites.length; s++) + i.removeComposite(e.composites[s], t, !0); + return e + } + , + i.removeCompositeAt = function(e, t) { + return e.composites.splice(t, 1), + i.setModified(e, !0, !0, !1), + e + } + , + i.addBody = function(e, t) { + return e.bodies.push(t), + i.setModified(e, !0, !0, !1), + e + } + , + i.removeBody = function(e, t, n) { + var o = r.indexOf(e.bodies, t); + if (-1 !== o && (i.removeBodyAt(e, o), + i.setModified(e, !0, !0, !1)), + n) + for (var s = 0; s < e.composites.length; s++) + i.removeBody(e.composites[s], t, !0); + return e + } + , + i.removeBodyAt = function(e, t) { + return e.bodies.splice(t, 1), + i.setModified(e, !0, !0, !1), + e + } + , + i.addConstraint = function(e, t) { + return e.constraints.push(t), + i.setModified(e, !0, !0, !1), + e + } + , + i.removeConstraint = function(e, t, n) { + var o = r.indexOf(e.constraints, t); + if (-1 !== o && i.removeConstraintAt(e, o), + n) + for (var s = 0; s < e.composites.length; s++) + i.removeConstraint(e.composites[s], t, !0); + return e + } + , + i.removeConstraintAt = function(e, t) { + return e.constraints.splice(t, 1), + i.setModified(e, !0, !0, !1), + e + } + , + i.clear = function(e, t, n) { + if (n) + for (var o = 0; o < e.composites.length; o++) + i.clear(e.composites[o], t, !0); + return t ? e.bodies = e.bodies.filter(function(e) { + return e.isStatic + }) : e.bodies.length = 0, + e.constraints.length = 0, + e.composites.length = 0, + i.setModified(e, !0, !0, !1), + e + } + , + i.allBodies = function(e) { + for (var t = [].concat(e.bodies), n = 0; n < e.composites.length; n++) + t = t.concat(i.allBodies(e.composites[n])); + return t + } + , + i.allConstraints = function(e) { + for (var t = [].concat(e.constraints), n = 0; n < e.composites.length; n++) + t = t.concat(i.allConstraints(e.composites[n])); + return t + } + , + i.allComposites = function(e) { + for (var t = [].concat(e.composites), n = 0; n < e.composites.length; n++) + t = t.concat(i.allComposites(e.composites[n])); + return t + } + , + i.get = function(e, t, n) { + var o, r; + switch (n) { + case "body": + o = i.allBodies(e); + break; + case "constraint": + o = i.allConstraints(e); + break; + case "composite": + o = i.allComposites(e).concat(e); + } + return o ? 0 === (r = o.filter(function(e) { + return e.id.toString() === t.toString() + })).length ? null : r[0] : null + } + , + i.move = function(e, t, n) { + return i.remove(e, t), + i.add(n, t), + e + } + , + i.rebase = function(e) { + for (var t = i.allBodies(e).concat(i.allConstraints(e)).concat(i.allComposites(e)), n = 0; n < t.length; n++) + t[n].id = r.nextId(); + return i.setModified(e, !0, !0, !1), + e + } + , + i.translate = function(e, t, n) { + for (var o = n ? i.allBodies(e) : e.bodies, r = 0; r < o.length; r++) + a.translate(o[r], t); + return i.setModified(e, !0, !0, !1), + e + } + , + i.rotate = function(e, t, n, o) { + for (var r = Math.cos(t), s = Math.sin(t), l = o ? i.allBodies(e) : e.bodies, c = 0; c < l.length; c++) { + var d = l[c] + , u = d.position.x - n.x + , p = d.position.y - n.y; + a.setPosition(d, { + x: n.x + (u * r - p * s), + y: n.y + (u * s + p * r) + }), + a.rotate(d, t) + } + return i.setModified(e, !0, !0, !1), + e + } + , + i.scale = function(e, t, n, o, r) { + for (var s = r ? i.allBodies(e) : e.bodies, l = 0; l < s.length; l++) { + var c = s[l] + , d = c.position.x - o.x + , u = c.position.y - o.y; + a.setPosition(c, { + x: o.x + d * t, + y: o.y + u * n + }), + a.scale(c, t, n) + } + return i.setModified(e, !0, !0, !1), + e + } + , + i.bounds = function(e) { + for (var t = i.allBodies(e), n = [], o = 0; o < t.length; o += 1) { + var r = t[o]; + n.push(r.bounds.min, r.bounds.max) + } + return s.create(n) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2) + , s = n(7) + , a = (n(10), + n(0)) + , l = n(1) + , c = n(15); + !function() { + i._inertiaScale = 4, + i._nextCollidingGroupId = 1, + i._nextNonCollidingGroupId = -1, + i._nextCategory = 1, + i.create = function(t) { + var n = { + id: a.nextId(), + type: "body", + label: "Body", + parts: [], + plugin: {}, + angle: 0, + vertices: o.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"), + position: { + x: 0, + y: 0 + }, + force: { + x: 0, + y: 0 + }, + torque: 0, + positionImpulse: { + x: 0, + y: 0 + }, + constraintImpulse: { + x: 0, + y: 0, + angle: 0 + }, + totalContacts: 0, + speed: 0, + angularSpeed: 0, + velocity: { + x: 0, + y: 0 + }, + angularVelocity: 0, + isSensor: !1, + isStatic: !1, + isSleeping: !1, + motion: 0, + sleepThreshold: 60, + density: .001, + restitution: 0, + friction: .1, + frictionStatic: .5, + frictionAir: .01, + collisionFilter: { + category: 1, + mask: 4294967295, + group: 0 + }, + slop: .05, + timeScale: 1, + render: { + visible: !0, + opacity: 1, + strokeStyle: null, + fillStyle: null, + lineWidth: null, + sprite: { + xScale: 1, + yScale: 1, + xOffset: 0, + yOffset: 0 + } + }, + events: null, + bounds: null, + chamfer: null, + circleRadius: 0, + positionPrev: null, + anglePrev: 0, + parent: null, + axes: null, + area: 0, + mass: 0, + inertia: 0, + _original: null + } + , i = a.extend(n, t); + return e(i, t), + i + } + , + i.nextGroup = function(e) { + return e ? i._nextNonCollidingGroupId-- : i._nextCollidingGroupId++ + } + , + i.nextCategory = function() { + return i._nextCategory = i._nextCategory << 1, + i._nextCategory + } + ; + var e = function(e, t) { + t = t || {}, + i.set(e, { + bounds: e.bounds || l.create(e.vertices), + positionPrev: e.positionPrev || r.clone(e.position), + anglePrev: e.anglePrev || e.angle, + vertices: e.vertices, + parts: e.parts || [e], + isStatic: e.isStatic, + isSleeping: e.isSleeping, + parent: e.parent || e + }), + o.rotate(e.vertices, e.angle, e.position), + c.rotate(e.axes, e.angle), + l.update(e.bounds, e.vertices, e.velocity), + i.set(e, { + axes: t.axes || e.axes, + area: t.area || e.area, + mass: t.mass || e.mass, + inertia: t.inertia || e.inertia + }); + var n = e.isStatic ? "#14151f" : a.choose(["#f19648", "#f5d259", "#f55a3c", "#063e7b", "#ececd1"]) + , s = e.isStatic ? "#555" : "#ccc" + , d = e.isStatic && null === e.render.fillStyle ? 1 : 0; + e.render.fillStyle = e.render.fillStyle || n, + e.render.strokeStyle = e.render.strokeStyle || s, + e.render.lineWidth = e.render.lineWidth || d, + e.render.sprite.xOffset += -(e.bounds.min.x - e.position.x) / (e.bounds.max.x - e.bounds.min.x), + e.render.sprite.yOffset += -(e.bounds.min.y - e.position.y) / (e.bounds.max.y - e.bounds.min.y) + }; + i.set = function(e, t, n) { + var o; + for (o in "string" == typeof t && (o = t, + (t = {})[o] = n), + t) + if (Object.prototype.hasOwnProperty.call(t, o)) + switch (n = t[o], + o) { + case "isStatic": + i.setStatic(e, n); + break; + case "isSleeping": + s.set(e, n); + break; + case "mass": + i.setMass(e, n); + break; + case "density": + i.setDensity(e, n); + break; + case "inertia": + i.setInertia(e, n); + break; + case "vertices": + i.setVertices(e, n); + break; + case "position": + i.setPosition(e, n); + break; + case "angle": + i.setAngle(e, n); + break; + case "velocity": + i.setVelocity(e, n); + break; + case "angularVelocity": + i.setAngularVelocity(e, n); + break; + case "parts": + i.setParts(e, n); + break; + case "centre": + i.setCentre(e, n); + break; + default: + e[o] = n; + } + } + , + i.setStatic = function(e, t) { + for (var n = 0; n < e.parts.length; n++) { + var i = e.parts[n]; + i.isStatic = t, + t ? (i._original = { + restitution: i.restitution, + friction: i.friction, + mass: i.mass, + inertia: i.inertia, + density: i.density, + inverseMass: i.inverseMass, + inverseInertia: i.inverseInertia + }, + i.restitution = 0, + i.friction = 1, + i.mass = i.inertia = i.density = 1 / 0, + i.inverseMass = i.inverseInertia = 0, + i.positionPrev.x = i.position.x, + i.positionPrev.y = i.position.y, + i.anglePrev = i.angle, + i.angularVelocity = 0, + i.speed = 0, + i.angularSpeed = 0, + i.motion = 0) : i._original && (i.restitution = i._original.restitution, + i.friction = i._original.friction, + i.mass = i._original.mass, + i.inertia = i._original.inertia, + i.density = i._original.density, + i.inverseMass = i._original.inverseMass, + i.inverseInertia = i._original.inverseInertia, + i._original = null) + } + } + , + i.setMass = function(e, t) { + var n = e.inertia / (e.mass / 6); + e.inertia = n * (t / 6), + e.inverseInertia = 1 / e.inertia, + e.mass = t, + e.inverseMass = 1 / e.mass, + e.density = e.mass / e.area + } + , + i.setDensity = function(e, t) { + i.setMass(e, t * e.area), + e.density = t + } + , + i.setInertia = function(e, t) { + e.inertia = t, + e.inverseInertia = 1 / e.inertia + } + , + i.setVertices = function(e, t) { + t[0].body === e ? e.vertices = t : e.vertices = o.create(t, e), + e.axes = c.fromVertices(e.vertices), + e.area = o.area(e.vertices), + i.setMass(e, e.density * e.area); + var n = o.centre(e.vertices); + o.translate(e.vertices, n, -1), + i.setInertia(e, i._inertiaScale * o.inertia(e.vertices, e.mass)), + o.translate(e.vertices, e.position), + l.update(e.bounds, e.vertices, e.velocity) + } + , + i.setParts = function(e, t, n) { + var r; + for (t = t.slice(0), + e.parts.length = 0, + e.parts.push(e), + e.parent = e, + r = 0; r < t.length; r++) { + var s = t[r]; + s !== e && (s.parent = e, + e.parts.push(s)) + } + if (1 !== e.parts.length) { + if (n = void 0 === n || n) { + var a = []; + for (r = 0; r < t.length; r++) + a = a.concat(t[r].vertices); + o.clockwiseSort(a); + var l = o.hull(a) + , c = o.centre(l); + i.setVertices(e, l), + o.translate(e.vertices, c) + } + var d = i._totalProperties(e); + e.area = d.area, + e.parent = e, + e.position.x = d.centre.x, + e.position.y = d.centre.y, + e.positionPrev.x = d.centre.x, + e.positionPrev.y = d.centre.y, + i.setMass(e, d.mass), + i.setInertia(e, d.inertia), + i.setPosition(e, d.centre) + } + } + , + i.setCentre = function(e, t, n) { + n ? (e.positionPrev.x += t.x, + e.positionPrev.y += t.y, + e.position.x += t.x, + e.position.y += t.y) : (e.positionPrev.x = t.x - (e.position.x - e.positionPrev.x), + e.positionPrev.y = t.y - (e.position.y - e.positionPrev.y), + e.position.x = t.x, + e.position.y = t.y) + } + , + i.setPosition = function(e, t) { + var n = r.sub(t, e.position); + e.positionPrev.x += n.x, + e.positionPrev.y += n.y; + for (var i = 0; i < e.parts.length; i++) { + var s = e.parts[i]; + s.position.x += n.x, + s.position.y += n.y, + o.translate(s.vertices, n), + l.update(s.bounds, s.vertices, e.velocity) + } + } + , + i.setAngle = function(e, t) { + var n = t - e.angle; + e.anglePrev += n; + for (var i = 0; i < e.parts.length; i++) { + var s = e.parts[i]; + s.angle += n, + o.rotate(s.vertices, n, e.position), + c.rotate(s.axes, n), + l.update(s.bounds, s.vertices, e.velocity), + i > 0 && r.rotateAbout(s.position, n, e.position, s.position) + } + } + , + i.setVelocity = function(e, t) { + e.positionPrev.x = e.position.x - t.x, + e.positionPrev.y = e.position.y - t.y, + e.velocity.x = t.x, + e.velocity.y = t.y, + e.speed = r.magnitude(e.velocity) + } + , + i.setAngularVelocity = function(e, t) { + e.anglePrev = e.angle - t, + e.angularVelocity = t, + e.angularSpeed = Math.abs(e.angularVelocity) + } + , + i.translate = function(e, t) { + i.setPosition(e, r.add(e.position, t)) + } + , + i.rotate = function(e, t, n) { + if (n) { + var o = Math.cos(t) + , r = Math.sin(t) + , s = e.position.x - n.x + , a = e.position.y - n.y; + i.setPosition(e, { + x: n.x + (s * o - a * r), + y: n.y + (s * r + a * o) + }), + i.setAngle(e, e.angle + t) + } else + i.setAngle(e, e.angle + t) + } + , + i.scale = function(e, t, n, r) { + var s = 0 + , a = 0; + r = r || e.position; + for (var d = 0; d < e.parts.length; d++) { + var u = e.parts[d]; + o.scale(u.vertices, t, n, r), + u.axes = c.fromVertices(u.vertices), + u.area = o.area(u.vertices), + i.setMass(u, e.density * u.area), + o.translate(u.vertices, { + x: -u.position.x, + y: -u.position.y + }), + i.setInertia(u, i._inertiaScale * o.inertia(u.vertices, u.mass)), + o.translate(u.vertices, { + x: u.position.x, + y: u.position.y + }), + d > 0 && (s += u.area, + a += u.inertia), + u.position.x = r.x + (u.position.x - r.x) * t, + u.position.y = r.y + (u.position.y - r.y) * n, + l.update(u.bounds, u.vertices, e.velocity) + } + e.parts.length > 1 && (e.area = s, + e.isStatic || (i.setMass(e, e.density * s), + i.setInertia(e, a))), + e.circleRadius && (t === n ? e.circleRadius *= t : e.circleRadius = null) + } + , + i.update = function(e, t, n, i) { + var s = Math.pow(t * n * e.timeScale, 2) + , a = 1 - e.frictionAir * n * e.timeScale + , d = e.position.x - e.positionPrev.x + , u = e.position.y - e.positionPrev.y; + e.velocity.x = d * a * i + e.force.x / e.mass * s, + e.velocity.y = u * a * i + e.force.y / e.mass * s, + e.positionPrev.x = e.position.x, + e.positionPrev.y = e.position.y, + e.position.x += e.velocity.x, + e.position.y += e.velocity.y, + e.angularVelocity = (e.angle - e.anglePrev) * a * i + e.torque / e.inertia * s, + e.anglePrev = e.angle, + e.angle += e.angularVelocity, + e.speed = r.magnitude(e.velocity), + e.angularSpeed = Math.abs(e.angularVelocity); + for (var p = 0; p < e.parts.length; p++) { + var f = e.parts[p]; + o.translate(f.vertices, e.velocity), + p > 0 && (f.position.x += e.velocity.x, + f.position.y += e.velocity.y), + 0 !== e.angularVelocity && (o.rotate(f.vertices, e.angularVelocity, e.position), + c.rotate(f.axes, e.angularVelocity), + p > 0 && r.rotateAbout(f.position, e.angularVelocity, e.position, f.position)), + l.update(f.bounds, f.vertices, e.velocity) + } + } + , + i.applyForce = function(e, t, n) { + e.force.x += n.x, + e.force.y += n.y; + var i = t.x - e.position.x + , o = t.y - e.position.y; + e.torque += i * n.y - o * n.x + } + , + i._totalProperties = function(e) { + for (var t = { + mass: 0, + area: 0, + inertia: 0, + centre: { + x: 0, + y: 0 + } + }, n = 1 === e.parts.length ? 0 : 1; n < e.parts.length; n++) { + var i = e.parts[n] + , o = i.mass !== 1 / 0 ? i.mass : 1; + t.mass += o, + t.area += i.area, + t.inertia += i.inertia, + t.centre = r.add(t.centre, r.mult(i.position, o)) + } + return t.centre = r.div(t.centre, t.mass), + t + } + }() + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(4); + i._motionWakeThreshold = .18, + i._motionSleepThreshold = .08, + i._minBias = .9, + i.update = function(e, t) { + for (var n = t * t * t, o = 0; o < e.length; o++) { + var r = e[o] + , s = r.speed * r.speed + r.angularSpeed * r.angularSpeed; + if (0 === r.force.x && 0 === r.force.y) { + var a = Math.min(r.motion, s) + , l = Math.max(r.motion, s); + r.motion = i._minBias * a + (1 - i._minBias) * l, + r.sleepThreshold > 0 && r.motion < i._motionSleepThreshold * n ? (r.sleepCounter += 1, + r.sleepCounter >= r.sleepThreshold && i.set(r, !0)) : r.sleepCounter > 0 && (r.sleepCounter -= 1) + } else + i.set(r, !1) + } + } + , + i.afterCollisions = function(e, t) { + for (var n = t * t * t, o = 0; o < e.length; o++) { + var r = e[o]; + if (r.isActive) { + var s = r.collision + , a = s.bodyA.parent + , l = s.bodyB.parent; + if (!(a.isSleeping && l.isSleeping || a.isStatic || l.isStatic) && (a.isSleeping || l.isSleeping)) { + var c = a.isSleeping && !a.isStatic ? a : l + , d = c === a ? l : a; + !c.isStatic && d.motion > i._motionWakeThreshold * n && i.set(c, !1) + } + } + } + } + , + i.set = function(e, t) { + var n = e.isSleeping; + t ? (e.isSleeping = !0, + e.sleepCounter = e.sleepThreshold, + e.positionImpulse.x = 0, + e.positionImpulse.y = 0, + e.positionPrev.x = e.position.x, + e.positionPrev.y = e.position.y, + e.anglePrev = e.angle, + e.speed = 0, + e.angularSpeed = 0, + e.motion = 0, + n || o.trigger(e, "sleepStart")) : (e.isSleeping = !1, + e.sleepCounter = 0, + n && o.trigger(e, "sleepEnd")) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2) + , s = n(7) + , a = n(1) + , l = n(15) + , c = n(0); + i._warming = .4, + i._torqueDampen = 1, + i._minLength = 1e-6, + i.create = function(e) { + var t = e; + t.bodyA && !t.pointA && (t.pointA = { + x: 0, + y: 0 + }), + t.bodyB && !t.pointB && (t.pointB = { + x: 0, + y: 0 + }); + var n = t.bodyA ? r.add(t.bodyA.position, t.pointA) : t.pointA + , i = t.bodyB ? r.add(t.bodyB.position, t.pointB) : t.pointB + , o = r.magnitude(r.sub(n, i)); + t.length = void 0 !== t.length ? t.length : o, + t.id = t.id || c.nextId(), + t.label = t.label || "Constraint", + t.type = "constraint", + t.stiffness = t.stiffness || (t.length > 0 ? 1 : .7), + t.damping = t.damping || 0, + t.angularStiffness = t.angularStiffness || 0, + t.angleA = t.bodyA ? t.bodyA.angle : t.angleA, + t.angleB = t.bodyB ? t.bodyB.angle : t.angleB, + t.plugin = {}; + var s = { + visible: !0, + lineWidth: 2, + strokeStyle: "#ffffff", + type: "line", + anchors: !0 + }; + return 0 === t.length && t.stiffness > .1 ? (s.type = "pin", + s.anchors = !1) : t.stiffness < .9 && (s.type = "spring"), + t.render = c.extend(s, t.render), + t + } + , + i.preSolveAll = function(e) { + for (var t = 0; t < e.length; t += 1) { + var n = e[t] + , i = n.constraintImpulse; + n.isStatic || 0 === i.x && 0 === i.y && 0 === i.angle || (n.position.x += i.x, + n.position.y += i.y, + n.angle += i.angle) + } + } + , + i.solveAll = function(e, t) { + for (var n = 0; n < e.length; n += 1) { + var o = e[n] + , r = !o.bodyA || o.bodyA && o.bodyA.isStatic + , s = !o.bodyB || o.bodyB && o.bodyB.isStatic; + (r || s) && i.solve(e[n], t) + } + for (n = 0; n < e.length; n += 1) + r = !(o = e[n]).bodyA || o.bodyA && o.bodyA.isStatic, + s = !o.bodyB || o.bodyB && o.bodyB.isStatic, + r || s || i.solve(e[n], t) + } + , + i.solve = function(e, t) { + var n = e.bodyA + , o = e.bodyB + , s = e.pointA + , a = e.pointB; + if (n || o) { + n && !n.isStatic && (r.rotate(s, n.angle - e.angleA, s), + e.angleA = n.angle), + o && !o.isStatic && (r.rotate(a, o.angle - e.angleB, a), + e.angleB = o.angle); + var l = s + , c = a; + if (n && (l = r.add(n.position, s)), + o && (c = r.add(o.position, a)), + l && c) { + var d = r.sub(l, c) + , u = r.magnitude(d); + u < i._minLength && (u = i._minLength); + var p, f, v, m, y, g = (u - e.length) / u, x = e.stiffness < 1 ? e.stiffness * t : e.stiffness, h = r.mult(d, g * x), b = (n ? n.inverseMass : 0) + (o ? o.inverseMass : 0), w = b + ((n ? n.inverseInertia : 0) + (o ? o.inverseInertia : 0)); + if (e.damping) { + var S = r.create(); + v = r.div(d, u), + y = r.sub(o && r.sub(o.position, o.positionPrev) || S, n && r.sub(n.position, n.positionPrev) || S), + m = r.dot(v, y) + } + n && !n.isStatic && (f = n.inverseMass / b, + n.constraintImpulse.x -= h.x * f, + n.constraintImpulse.y -= h.y * f, + n.position.x -= h.x * f, + n.position.y -= h.y * f, + e.damping && (n.positionPrev.x -= e.damping * v.x * m * f, + n.positionPrev.y -= e.damping * v.y * m * f), + p = r.cross(s, h) / w * i._torqueDampen * n.inverseInertia * (1 - e.angularStiffness), + n.constraintImpulse.angle -= p, + n.angle -= p), + o && !o.isStatic && (f = o.inverseMass / b, + o.constraintImpulse.x += h.x * f, + o.constraintImpulse.y += h.y * f, + o.position.x += h.x * f, + o.position.y += h.y * f, + e.damping && (o.positionPrev.x += e.damping * v.x * m * f, + o.positionPrev.y += e.damping * v.y * m * f), + p = r.cross(a, h) / w * i._torqueDampen * o.inverseInertia * (1 - e.angularStiffness), + o.constraintImpulse.angle += p, + o.angle += p) + } + } + } + , + i.postSolveAll = function(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t] + , c = n.constraintImpulse; + if (!(n.isStatic || 0 === c.x && 0 === c.y && 0 === c.angle)) { + s.set(n, !1); + for (var d = 0; d < n.parts.length; d++) { + var u = n.parts[d]; + o.translate(u.vertices, c), + d > 0 && (u.position.x += c.x, + u.position.y += c.y), + 0 !== c.angle && (o.rotate(u.vertices, c.angle, n.position), + l.rotate(u.axes, c.angle), + d > 0 && r.rotateAbout(u.position, c.angle, n.position, u.position)), + a.update(u.bounds, u.vertices, n.velocity) + } + c.angle *= i._warming, + c.x *= i._warming, + c.y *= i._warming + } + } + } + , + i.pointAWorld = function(e) { + return { + x: (e.bodyA ? e.bodyA.position.x : 0) + e.pointA.x, + y: (e.bodyA ? e.bodyA.position.y : 0) + e.pointA.y + } + } + , + i.pointBWorld = function(e) { + return { + x: (e.bodyB ? e.bodyB.position.x : 0) + e.pointB.x, + y: (e.bodyB ? e.bodyB.position.y : 0) + e.pointB.y + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(18); + i.create = function(e, t) { + var n = e.bodyA + , o = e.bodyB + , r = e.parentA + , s = e.parentB + , a = { + id: i.id(n, o), + bodyA: n, + bodyB: o, + contacts: {}, + activeContacts: [], + separation: 0, + isActive: !0, + confirmedActive: !0, + isSensor: n.isSensor || o.isSensor, + timeCreated: t, + timeUpdated: t, + inverseMass: r.inverseMass + s.inverseMass, + friction: Math.min(r.friction, s.friction), + frictionStatic: Math.max(r.frictionStatic, s.frictionStatic), + restitution: Math.max(r.restitution, s.restitution), + slop: Math.max(r.slop, s.slop) + }; + return i.update(a, e, t), + a + } + , + i.update = function(e, t, n) { + var r = e.contacts + , s = t.supports + , a = e.activeContacts + , l = t.parentA + , c = t.parentB; + if (e.collision = t, + e.inverseMass = l.inverseMass + c.inverseMass, + e.friction = Math.min(l.friction, c.friction), + e.frictionStatic = Math.max(l.frictionStatic, c.frictionStatic), + e.restitution = Math.max(l.restitution, c.restitution), + e.slop = Math.max(l.slop, c.slop), + a.length = 0, + t.collided) { + for (var d = 0; d < s.length; d++) { + var u = s[d] + , p = o.id(u) + , f = r[p]; + f ? a.push(f) : a.push(r[p] = o.create(u)) + } + e.separation = t.depth, + i.setActive(e, !0, n) + } else + !0 === e.isActive && i.setActive(e, !1, n) + } + , + i.setActive = function(e, t, n) { + t ? (e.isActive = !0, + e.timeUpdated = n) : (e.isActive = !1, + e.activeContacts.length = 0) + } + , + i.id = function(e, t) { + return e.id < t.id ? "A" + e.id + "B" + t.id : "A" + t.id + "B" + e.id + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0) + , r = n(5) + , s = n(1) + , a = n(4) + , l = n(11) + , c = n(2) + , d = n(14); + !function() { + var e, t; + "undefined" != typeof window && (e = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(e) { + window.setTimeout(function() { + e(o.now()) + }, 1e3 / 60) + } + , + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame), + i.create = function(e) { + var t = { + controller: i, + engine: null, + element: null, + canvas: null, + mouse: null, + frameRequestId: null, + options: { + width: 800, + height: 600, + pixelRatio: 1, + background: "#14151f", + wireframeBackground: "#14151f", + hasBounds: !!e.bounds, + enabled: !0, + wireframes: !0, + showSleeping: !0, + showDebug: !1, + showBroadphase: !1, + showBounds: !1, + showVelocity: !1, + showCollisions: !1, + showSeparations: !1, + showAxes: !1, + showPositions: !1, + showAngleIndicator: !1, + showIds: !1, + showShadows: !1, + showVertexNumbers: !1, + showConvexHulls: !1, + showInternalEdges: !1, + showMousePosition: !1 + } + } + , r = o.extend(t, e); + return r.canvas && (r.canvas.width = r.options.width || r.canvas.width, + r.canvas.height = r.options.height || r.canvas.height), + r.mouse = e.mouse, + r.engine = e.engine, + r.canvas = r.canvas || n(r.options.width, r.options.height), + r.context = r.canvas.getContext("2d"), + r.textures = {}, + r.bounds = r.bounds || { + min: { + x: 0, + y: 0 + }, + max: { + x: r.canvas.width, + y: r.canvas.height + } + }, + 1 !== r.options.pixelRatio && i.setPixelRatio(r, r.options.pixelRatio), + o.isElement(r.element) ? r.element.appendChild(r.canvas) : r.canvas.parentNode || o.log("Render.create: options.element was undefined, render.canvas was created but not appended", "warn"), + r + } + , + i.run = function(t) { + !function n(o) { + t.frameRequestId = e(n), + i.world(t) + }() + } + , + i.stop = function(e) { + t(e.frameRequestId) + } + , + i.setPixelRatio = function(e, t) { + var n = e.options + , i = e.canvas; + "auto" === t && (t = u(i)), + n.pixelRatio = t, + i.setAttribute("data-pixel-ratio", t), + i.width = n.width * t, + i.height = n.height * t, + i.style.width = n.width + "px", + i.style.height = n.height + "px" + } + , + i.lookAt = function(e, t, n, i) { + i = void 0 === i || i, + t = o.isArray(t) ? t : [t], + n = n || { + x: 0, + y: 0 + }; + for (var r = { + min: { + x: 1 / 0, + y: 1 / 0 + }, + max: { + x: -1 / 0, + y: -1 / 0 + } + }, s = 0; s < t.length; s += 1) { + var a = t[s] + , l = a.bounds ? a.bounds.min : a.min || a.position || a + , c = a.bounds ? a.bounds.max : a.max || a.position || a; + l && c && (l.x < r.min.x && (r.min.x = l.x), + c.x > r.max.x && (r.max.x = c.x), + l.y < r.min.y && (r.min.y = l.y), + c.y > r.max.y && (r.max.y = c.y)) + } + var u = r.max.x - r.min.x + 2 * n.x + , p = r.max.y - r.min.y + 2 * n.y + , f = e.canvas.height + , v = e.canvas.width / f + , m = u / p + , y = 1 + , g = 1; + m > v ? g = m / v : y = v / m, + e.options.hasBounds = !0, + e.bounds.min.x = r.min.x, + e.bounds.max.x = r.min.x + u * y, + e.bounds.min.y = r.min.y, + e.bounds.max.y = r.min.y + p * g, + i && (e.bounds.min.x += .5 * u - u * y * .5, + e.bounds.max.x += .5 * u - u * y * .5, + e.bounds.min.y += .5 * p - p * g * .5, + e.bounds.max.y += .5 * p - p * g * .5), + e.bounds.min.x -= n.x, + e.bounds.max.x -= n.x, + e.bounds.min.y -= n.y, + e.bounds.max.y -= n.y, + e.mouse && (d.setScale(e.mouse, { + x: (e.bounds.max.x - e.bounds.min.x) / e.canvas.width, + y: (e.bounds.max.y - e.bounds.min.y) / e.canvas.height + }), + d.setOffset(e.mouse, e.bounds.min)) + } + , + i.startViewTransform = function(e) { + var t = e.bounds.max.x - e.bounds.min.x + , n = e.bounds.max.y - e.bounds.min.y + , i = t / e.options.width + , o = n / e.options.height; + e.context.setTransform(e.options.pixelRatio / i, 0, 0, e.options.pixelRatio / o, 0, 0), + e.context.translate(-e.bounds.min.x, -e.bounds.min.y) + } + , + i.endViewTransform = function(e) { + e.context.setTransform(e.options.pixelRatio, 0, 0, e.options.pixelRatio, 0, 0) + } + , + i.world = function(e) { + var t, n = e.engine, o = n.world, u = e.canvas, p = e.context, v = e.options, m = r.allBodies(o), y = r.allConstraints(o), g = v.wireframes ? v.wireframeBackground : v.background, x = [], h = [], b = { + timestamp: n.timing.timestamp + }; + if (a.trigger(e, "beforeRender", b), + e.currentBackground !== g && f(e, g), + p.globalCompositeOperation = "source-in", + p.fillStyle = "transparent", + p.fillRect(0, 0, u.width, u.height), + p.globalCompositeOperation = "source-over", + v.hasBounds) { + for (t = 0; t < m.length; t++) { + var w = m[t]; + s.overlaps(w.bounds, e.bounds) && x.push(w) + } + for (t = 0; t < y.length; t++) { + var S = y[t] + , A = S.bodyA + , P = S.bodyB + , C = S.pointA + , M = S.pointB; + A && (C = c.add(A.position, S.pointA)), + P && (M = c.add(P.position, S.pointB)), + C && M && (s.contains(e.bounds, C) || s.contains(e.bounds, M)) && h.push(S) + } + i.startViewTransform(e), + e.mouse && (d.setScale(e.mouse, { + x: (e.bounds.max.x - e.bounds.min.x) / e.options.width, + y: (e.bounds.max.y - e.bounds.min.y) / e.options.height + }), + d.setOffset(e.mouse, e.bounds.min)) + } else + h = y, + x = m, + 1 !== e.options.pixelRatio && e.context.setTransform(e.options.pixelRatio, 0, 0, e.options.pixelRatio, 0, 0); + !v.wireframes || n.enableSleeping && v.showSleeping ? i.bodies(e, x, p) : (v.showConvexHulls && i.bodyConvexHulls(e, x, p), + i.bodyWireframes(e, x, p)), + v.showBounds && i.bodyBounds(e, x, p), + (v.showAxes || v.showAngleIndicator) && i.bodyAxes(e, x, p), + v.showPositions && i.bodyPositions(e, x, p), + v.showVelocity && i.bodyVelocity(e, x, p), + v.showIds && i.bodyIds(e, x, p), + v.showSeparations && i.separations(e, n.pairs.list, p), + v.showCollisions && i.collisions(e, n.pairs.list, p), + v.showVertexNumbers && i.vertexNumbers(e, x, p), + v.showMousePosition && i.mousePosition(e, e.mouse, p), + i.constraints(h, p), + v.showBroadphase && n.broadphase.controller === l && i.grid(e, n.broadphase, p), + v.showDebug && i.debug(e, p), + v.hasBounds && i.endViewTransform(e), + a.trigger(e, "afterRender", b) + } + , + i.debug = function(e, t) { + var n = t + , i = e.engine + , o = i.world + , s = i.metrics + , a = e.options + , c = r.allBodies(o); + if (i.timing.timestamp - (e.debugTimestamp || 0) >= 500) { + var d = ""; + s.timing && (d += "fps: " + Math.round(s.timing.fps) + " "), + s.extended && (s.timing && (d += "delta: " + s.timing.delta.toFixed(3) + " ", + d += "correction: " + s.timing.correction.toFixed(3) + " "), + d += "bodies: " + c.length + " ", + i.broadphase.controller === l && (d += "buckets: " + s.buckets + " "), + d += "\n", + d += "collisions: " + s.collisions + " ", + d += "pairs: " + i.pairs.list.length + " ", + d += "broad: " + s.broadEff + " ", + d += "mid: " + s.midEff + " ", + d += "narrow: " + s.narrowEff + " "), + e.debugString = d, + e.debugTimestamp = i.timing.timestamp + } + if (e.debugString) { + n.font = "12px Arial", + a.wireframes ? n.fillStyle = "rgba(255,255,255,0.5)" : n.fillStyle = "rgba(0,0,0,0.5)"; + for (var u = e.debugString.split("\n"), p = 0; p < u.length; p++) + n.fillText(u[p], 50, 50 + 18 * p) + } + } + , + i.constraints = function(e, t) { + for (var n = t, i = 0; i < e.length; i++) { + var r = e[i]; + if (r.render.visible && r.pointA && r.pointB) { + var s, a, l = r.bodyA, d = r.bodyB; + if (s = l ? c.add(l.position, r.pointA) : r.pointA, + "pin" === r.render.type) + n.beginPath(), + n.arc(s.x, s.y, 3, 0, 2 * Math.PI), + n.closePath(); + else { + if (a = d ? c.add(d.position, r.pointB) : r.pointB, + n.beginPath(), + n.moveTo(s.x, s.y), + "spring" === r.render.type) + for (var u, p = c.sub(a, s), f = c.perp(c.normalise(p)), v = Math.ceil(o.clamp(r.length / 5, 12, 20)), m = 1; m < v; m += 1) + u = m % 2 == 0 ? 1 : -1, + n.lineTo(s.x + p.x * (m / v) + f.x * u * 4, s.y + p.y * (m / v) + f.y * u * 4); + n.lineTo(a.x, a.y) + } + r.render.lineWidth && (n.lineWidth = r.render.lineWidth, + n.strokeStyle = r.render.strokeStyle, + n.stroke()), + r.render.anchors && (n.fillStyle = r.render.strokeStyle, + n.beginPath(), + n.arc(s.x, s.y, 3, 0, 2 * Math.PI), + n.arc(a.x, a.y, 3, 0, 2 * Math.PI), + n.closePath(), + n.fill()) + } + } + } + , + i.bodyShadows = function(e, t, n) { + for (var i = n, o = (e.engine, + 0); o < t.length; o++) { + var r = t[o]; + if (r.render.visible) { + if (r.circleRadius) + i.beginPath(), + i.arc(r.position.x, r.position.y, r.circleRadius, 0, 2 * Math.PI), + i.closePath(); + else { + i.beginPath(), + i.moveTo(r.vertices[0].x, r.vertices[0].y); + for (var s = 1; s < r.vertices.length; s++) + i.lineTo(r.vertices[s].x, r.vertices[s].y); + i.closePath() + } + var a = r.position.x - .5 * e.options.width + , l = r.position.y - .2 * e.options.height + , c = Math.abs(a) + Math.abs(l); + i.shadowColor = "rgba(0,0,0,0.15)", + i.shadowOffsetX = .05 * a, + i.shadowOffsetY = .05 * l, + i.shadowBlur = 1 + 12 * Math.min(1, c / 1e3), + i.fill(), + i.shadowColor = null, + i.shadowOffsetX = null, + i.shadowOffsetY = null, + i.shadowBlur = null + } + } + } + , + i.bodies = function(e, t, n) { + var i, o, r, s, a = n, l = (e.engine, + e.options), c = l.showInternalEdges || !l.wireframes; + for (r = 0; r < t.length; r++) + if ((i = t[r]).render.visible) + for (s = i.parts.length > 1 ? 1 : 0; s < i.parts.length; s++) + if ((o = i.parts[s]).render.visible) { + if (l.showSleeping && i.isSleeping ? a.globalAlpha = .5 * o.render.opacity : 1 !== o.render.opacity && (a.globalAlpha = o.render.opacity), + o.render.sprite && o.render.sprite.texture && !l.wireframes) { + var d = o.render.sprite + , u = p(e, d.texture); + a.translate(o.position.x, o.position.y), + a.rotate(o.angle), + a.drawImage(u, u.width * -d.xOffset * d.xScale, u.height * -d.yOffset * d.yScale, u.width * d.xScale, u.height * d.yScale), + a.rotate(-o.angle), + a.translate(-o.position.x, -o.position.y) + } else { + if (o.circleRadius) + a.beginPath(), + a.arc(o.position.x, o.position.y, o.circleRadius, 0, 2 * Math.PI); + else { + a.beginPath(), + a.moveTo(o.vertices[0].x, o.vertices[0].y); + for (var f = 1; f < o.vertices.length; f++) + !o.vertices[f - 1].isInternal || c ? a.lineTo(o.vertices[f].x, o.vertices[f].y) : a.moveTo(o.vertices[f].x, o.vertices[f].y), + o.vertices[f].isInternal && !c && a.moveTo(o.vertices[(f + 1) % o.vertices.length].x, o.vertices[(f + 1) % o.vertices.length].y); + a.lineTo(o.vertices[0].x, o.vertices[0].y), + a.closePath() + } + l.wireframes ? (a.lineWidth = 1, + a.strokeStyle = "#bbb", + a.stroke()) : (a.fillStyle = o.render.fillStyle, + o.render.lineWidth && (a.lineWidth = o.render.lineWidth, + a.strokeStyle = o.render.strokeStyle, + a.stroke()), + a.fill()) + } + a.globalAlpha = 1 + } + } + , + i.bodyWireframes = function(e, t, n) { + var i, o, r, s, a, l = n, c = e.options.showInternalEdges; + for (l.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).render.visible) + for (a = i.parts.length > 1 ? 1 : 0; a < i.parts.length; a++) { + for (o = i.parts[a], + l.moveTo(o.vertices[0].x, o.vertices[0].y), + s = 1; s < o.vertices.length; s++) + !o.vertices[s - 1].isInternal || c ? l.lineTo(o.vertices[s].x, o.vertices[s].y) : l.moveTo(o.vertices[s].x, o.vertices[s].y), + o.vertices[s].isInternal && !c && l.moveTo(o.vertices[(s + 1) % o.vertices.length].x, o.vertices[(s + 1) % o.vertices.length].y); + l.lineTo(o.vertices[0].x, o.vertices[0].y) + } + l.lineWidth = 1, + l.strokeStyle = "#bbb", + l.stroke() + } + , + i.bodyConvexHulls = function(e, t, n) { + var i, o, r, s = n; + for (s.beginPath(), + o = 0; o < t.length; o++) + if ((i = t[o]).render.visible && 1 !== i.parts.length) { + for (s.moveTo(i.vertices[0].x, i.vertices[0].y), + r = 1; r < i.vertices.length; r++) + s.lineTo(i.vertices[r].x, i.vertices[r].y); + s.lineTo(i.vertices[0].x, i.vertices[0].y) + } + s.lineWidth = 1, + s.strokeStyle = "rgba(255,255,255,0.2)", + s.stroke() + } + , + i.vertexNumbers = function(e, t, n) { + var i, o, r, s = n; + for (i = 0; i < t.length; i++) { + var a = t[i].parts; + for (r = a.length > 1 ? 1 : 0; r < a.length; r++) { + var l = a[r]; + for (o = 0; o < l.vertices.length; o++) + s.fillStyle = "rgba(255,255,255,0.2)", + s.fillText(i + "_" + o, l.position.x + .8 * (l.vertices[o].x - l.position.x), l.position.y + .8 * (l.vertices[o].y - l.position.y)) + } + } + } + , + i.mousePosition = function(e, t, n) { + var i = n; + i.fillStyle = "rgba(255,255,255,0.8)", + i.fillText(t.position.x + " " + t.position.y, t.position.x + 5, t.position.y - 5) + } + , + i.bodyBounds = function(e, t, n) { + var i = n + , o = (e.engine, + e.options); + i.beginPath(); + for (var r = 0; r < t.length; r++) { + if (t[r].render.visible) + for (var s = t[r].parts, a = s.length > 1 ? 1 : 0; a < s.length; a++) { + var l = s[a]; + i.rect(l.bounds.min.x, l.bounds.min.y, l.bounds.max.x - l.bounds.min.x, l.bounds.max.y - l.bounds.min.y) + } + } + o.wireframes ? i.strokeStyle = "rgba(255,255,255,0.08)" : i.strokeStyle = "rgba(0,0,0,0.1)", + i.lineWidth = 1, + i.stroke() + } + , + i.bodyAxes = function(e, t, n) { + var i, o, r, s, a = n, l = (e.engine, + e.options); + for (a.beginPath(), + o = 0; o < t.length; o++) { + var c = t[o] + , d = c.parts; + if (c.render.visible) + if (l.showAxes) + for (r = d.length > 1 ? 1 : 0; r < d.length; r++) + for (i = d[r], + s = 0; s < i.axes.length; s++) { + var u = i.axes[s]; + a.moveTo(i.position.x, i.position.y), + a.lineTo(i.position.x + 20 * u.x, i.position.y + 20 * u.y) + } + else + for (r = d.length > 1 ? 1 : 0; r < d.length; r++) + for (i = d[r], + s = 0; s < i.axes.length; s++) + a.moveTo(i.position.x, i.position.y), + a.lineTo((i.vertices[0].x + i.vertices[i.vertices.length - 1].x) / 2, (i.vertices[0].y + i.vertices[i.vertices.length - 1].y) / 2) + } + l.wireframes ? (a.strokeStyle = "indianred", + a.lineWidth = 1) : (a.strokeStyle = "rgba(255, 255, 255, 0.4)", + a.globalCompositeOperation = "overlay", + a.lineWidth = 2), + a.stroke(), + a.globalCompositeOperation = "source-over" + } + , + i.bodyPositions = function(e, t, n) { + var i, o, r, s, a = n, l = (e.engine, + e.options); + for (a.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).render.visible) + for (s = 0; s < i.parts.length; s++) + o = i.parts[s], + a.arc(o.position.x, o.position.y, 3, 0, 2 * Math.PI, !1), + a.closePath(); + for (l.wireframes ? a.fillStyle = "indianred" : a.fillStyle = "rgba(0,0,0,0.5)", + a.fill(), + a.beginPath(), + r = 0; r < t.length; r++) + (i = t[r]).render.visible && (a.arc(i.positionPrev.x, i.positionPrev.y, 2, 0, 2 * Math.PI, !1), + a.closePath()); + a.fillStyle = "rgba(255,165,0,0.8)", + a.fill() + } + , + i.bodyVelocity = function(e, t, n) { + var i = n; + i.beginPath(); + for (var o = 0; o < t.length; o++) { + var r = t[o]; + r.render.visible && (i.moveTo(r.position.x, r.position.y), + i.lineTo(r.position.x + 2 * (r.position.x - r.positionPrev.x), r.position.y + 2 * (r.position.y - r.positionPrev.y))) + } + i.lineWidth = 3, + i.strokeStyle = "cornflowerblue", + i.stroke() + } + , + i.bodyIds = function(e, t, n) { + var i, o, r = n; + for (i = 0; i < t.length; i++) + if (t[i].render.visible) { + var s = t[i].parts; + for (o = s.length > 1 ? 1 : 0; o < s.length; o++) { + var a = s[o]; + r.font = "12px Arial", + r.fillStyle = "rgba(255,255,255,0.5)", + r.fillText(a.id, a.position.x + 10, a.position.y - 10) + } + } + } + , + i.collisions = function(e, t, n) { + var i, o, r, s, a = n, l = e.options; + for (a.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).isActive) + for (o = i.collision, + s = 0; s < i.activeContacts.length; s++) { + var c = i.activeContacts[s].vertex; + a.rect(c.x - 1.5, c.y - 1.5, 3.5, 3.5) + } + for (l.wireframes ? a.fillStyle = "rgba(255,255,255,0.7)" : a.fillStyle = "orange", + a.fill(), + a.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).isActive && (o = i.collision, + i.activeContacts.length > 0)) { + var d = i.activeContacts[0].vertex.x + , u = i.activeContacts[0].vertex.y; + 2 === i.activeContacts.length && (d = (i.activeContacts[0].vertex.x + i.activeContacts[1].vertex.x) / 2, + u = (i.activeContacts[0].vertex.y + i.activeContacts[1].vertex.y) / 2), + o.bodyB === o.supports[0].body || !0 === o.bodyA.isStatic ? a.moveTo(d - 8 * o.normal.x, u - 8 * o.normal.y) : a.moveTo(d + 8 * o.normal.x, u + 8 * o.normal.y), + a.lineTo(d, u) + } + l.wireframes ? a.strokeStyle = "rgba(255,165,0,0.7)" : a.strokeStyle = "orange", + a.lineWidth = 1, + a.stroke() + } + , + i.separations = function(e, t, n) { + var i, o, r, s, a, l = n, c = e.options; + for (l.beginPath(), + a = 0; a < t.length; a++) + if ((i = t[a]).isActive) { + r = (o = i.collision).bodyA; + var d = 1; + (s = o.bodyB).isStatic || r.isStatic || (d = .5), + s.isStatic && (d = 0), + l.moveTo(s.position.x, s.position.y), + l.lineTo(s.position.x - o.penetration.x * d, s.position.y - o.penetration.y * d), + d = 1, + s.isStatic || r.isStatic || (d = .5), + r.isStatic && (d = 0), + l.moveTo(r.position.x, r.position.y), + l.lineTo(r.position.x + o.penetration.x * d, r.position.y + o.penetration.y * d) + } + c.wireframes ? l.strokeStyle = "rgba(255,165,0,0.5)" : l.strokeStyle = "orange", + l.stroke() + } + , + i.grid = function(e, t, n) { + var i = n; + e.options.wireframes ? i.strokeStyle = "rgba(255,180,0,0.1)" : i.strokeStyle = "rgba(255,180,0,0.5)", + i.beginPath(); + for (var r = o.keys(t.buckets), s = 0; s < r.length; s++) { + var a = r[s]; + if (!(t.buckets[a].length < 2)) { + var l = a.split(/C|R/); + i.rect(.5 + parseInt(l[1], 10) * t.bucketWidth, .5 + parseInt(l[2], 10) * t.bucketHeight, t.bucketWidth, t.bucketHeight) + } + } + i.lineWidth = 1, + i.stroke() + } + , + i.inspector = function(e, t) { + e.engine; + var n, i = e.selected, o = e.render, r = o.options; + if (r.hasBounds) { + var s = o.bounds.max.x - o.bounds.min.x + , a = o.bounds.max.y - o.bounds.min.y + , l = s / o.options.width + , c = a / o.options.height; + t.scale(1 / l, 1 / c), + t.translate(-o.bounds.min.x, -o.bounds.min.y) + } + for (var d = 0; d < i.length; d++) { + var u = i[d].data; + switch (t.translate(.5, .5), + t.lineWidth = 1, + t.strokeStyle = "rgba(255,165,0,0.9)", + t.setLineDash([1, 2]), + u.type) { + case "body": + n = u.bounds, + t.beginPath(), + t.rect(Math.floor(n.min.x - 3), Math.floor(n.min.y - 3), Math.floor(n.max.x - n.min.x + 6), Math.floor(n.max.y - n.min.y + 6)), + t.closePath(), + t.stroke(); + break; + case "constraint": + var p = u.pointA; + u.bodyA && (p = u.pointB), + t.beginPath(), + t.arc(p.x, p.y, 10, 0, 2 * Math.PI), + t.closePath(), + t.stroke(); + } + t.setLineDash([]), + t.translate(-.5, -.5) + } + null !== e.selectStart && (t.translate(.5, .5), + t.lineWidth = 1, + t.strokeStyle = "rgba(255,165,0,0.6)", + t.fillStyle = "rgba(255,165,0,0.1)", + n = e.selectBounds, + t.beginPath(), + t.rect(Math.floor(n.min.x), Math.floor(n.min.y), Math.floor(n.max.x - n.min.x), Math.floor(n.max.y - n.min.y)), + t.closePath(), + t.stroke(), + t.fill(), + t.translate(-.5, -.5)), + r.hasBounds && t.setTransform(1, 0, 0, 1, 0, 0) + } + ; + var n = function(e, t) { + var n = document.createElement("canvas"); + return n.width = e, + n.height = t, + n.oncontextmenu = function() { + return !1 + } + , + n.onselectstart = function() { + return !1 + } + , + n + } + , u = function(e) { + var t = e.getContext("2d"); + return (window.devicePixelRatio || 1) / (t.webkitBackingStorePixelRatio || t.mozBackingStorePixelRatio || t.msBackingStorePixelRatio || t.oBackingStorePixelRatio || t.backingStorePixelRatio || 1) + } + , p = function(e, t) { + var n = e.textures[t]; + return n || ((n = e.textures[t] = new Image).src = t, + n) + } + , f = function(e, t) { + var n = t; + /(jpg|gif|png)$/.test(t) && (n = "url(" + t + ")"), + e.canvas.style.background = n, + e.canvas.style.backgroundSize = "contain", + e.currentBackground = t + } + }() + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(9) + , r = n(12) + , s = n(0); + i.create = function(e) { + var t = { + controller: i, + detector: r.collisions, + buckets: {}, + pairs: {}, + pairsList: [], + bucketWidth: 48, + bucketHeight: 48 + }; + return s.extend(t, e) + } + , + i.update = function(e, t, n, o) { + var r, s, a, l, c, d = n.world, u = e.buckets, p = !1, f = n.metrics; + for (f.broadphaseTests = 0, + r = 0; r < t.length; r++) { + var v = t[r]; + if ((!v.isSleeping || o) && !(v.bounds.max.x < d.bounds.min.x || v.bounds.min.x > d.bounds.max.x || v.bounds.max.y < d.bounds.min.y || v.bounds.min.y > d.bounds.max.y)) { + var m = i._getRegion(e, v); + if (!v.region || m.id !== v.region.id || o) { + f.broadphaseTests += 1, + v.region && !o || (v.region = m); + var y = i._regionUnion(m, v.region); + for (s = y.startCol; s <= y.endCol; s++) + for (a = y.startRow; a <= y.endRow; a++) { + l = u[c = i._getBucketId(s, a)]; + var g = s >= m.startCol && s <= m.endCol && a >= m.startRow && a <= m.endRow + , x = s >= v.region.startCol && s <= v.region.endCol && a >= v.region.startRow && a <= v.region.endRow; + !g && x && x && l && i._bucketRemoveBody(e, l, v), + (v.region === m || g && !x || o) && (l || (l = i._createBucket(u, c)), + i._bucketAddBody(e, l, v)) + } + v.region = m, + p = !0 + } + } + } + p && (e.pairsList = i._createActivePairsList(e)) + } + , + i.clear = function(e) { + e.buckets = {}, + e.pairs = {}, + e.pairsList = [] + } + , + i._regionUnion = function(e, t) { + var n = Math.min(e.startCol, t.startCol) + , o = Math.max(e.endCol, t.endCol) + , r = Math.min(e.startRow, t.startRow) + , s = Math.max(e.endRow, t.endRow); + return i._createRegion(n, o, r, s) + } + , + i._getRegion = function(e, t) { + var n = t.bounds + , o = Math.floor(n.min.x / e.bucketWidth) + , r = Math.floor(n.max.x / e.bucketWidth) + , s = Math.floor(n.min.y / e.bucketHeight) + , a = Math.floor(n.max.y / e.bucketHeight); + return i._createRegion(o, r, s, a) + } + , + i._createRegion = function(e, t, n, i) { + return { + id: e + "," + t + "," + n + "," + i, + startCol: e, + endCol: t, + startRow: n, + endRow: i + } + } + , + i._getBucketId = function(e, t) { + return "C" + e + "R" + t + } + , + i._createBucket = function(e, t) { + return e[t] = [] + } + , + i._bucketAddBody = function(e, t, n) { + for (var i = 0; i < t.length; i++) { + var r = t[i]; + if (!(n.id === r.id || n.isStatic && r.isStatic)) { + var s = o.id(n, r) + , a = e.pairs[s]; + a ? a[2] += 1 : e.pairs[s] = [n, r, 1] + } + } + t.push(n) + } + , + i._bucketRemoveBody = function(e, t, n) { + t.splice(s.indexOf(t, n), 1); + for (var i = 0; i < t.length; i++) { + var r = t[i] + , a = o.id(n, r) + , l = e.pairs[a]; + l && (l[2] -= 1) + } + } + , + i._createActivePairsList = function(e) { + var t, n, i = []; + t = s.keys(e.pairs); + for (var o = 0; o < t.length; o++) + (n = e.pairs[t[o]])[2] > 0 ? i.push(n) : delete e.pairs[t[o]]; + return i + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(13) + , r = n(9) + , s = n(1); + i.collisions = function(e, t) { + for (var n = [], a = t.pairs.table, l = t.metrics, c = 0; c < e.length; c++) { + var d = e[c][0] + , u = e[c][1]; + if ((!d.isStatic && !d.isSleeping || !u.isStatic && !u.isSleeping) && i.canCollide(d.collisionFilter, u.collisionFilter) && (l.midphaseTests += 1, + s.overlaps(d.bounds, u.bounds))) + for (var p = d.parts.length > 1 ? 1 : 0; p < d.parts.length; p++) + for (var f = d.parts[p], v = u.parts.length > 1 ? 1 : 0; v < u.parts.length; v++) { + var m = u.parts[v]; + if (f === d && m === u || s.overlaps(f.bounds, m.bounds)) { + var y, g = a[r.id(f, m)]; + y = g && g.isActive ? g.collision : null; + var x = o.collides(f, m, y); + l.narrowphaseTests += 1, + x.reused && (l.narrowReuseCount += 1), + x.collided && (n.push(x), + l.narrowDetections += 1) + } + } + } + return n + } + , + i.canCollide = function(e, t) { + return e.group === t.group && 0 !== e.group ? e.group > 0 : 0 != (e.mask & t.category) && 0 != (t.mask & e.category) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2); + i.collides = function(e, t, n) { + var s, a, l, c, d = !1; + if (n) { + var u = e.parent + , p = t.parent + , f = u.speed * u.speed + u.angularSpeed * u.angularSpeed + p.speed * p.speed + p.angularSpeed * p.angularSpeed; + d = n && n.collided && f < .2, + c = n + } else + c = { + collided: !1, + bodyA: e, + bodyB: t + }; + if (n && d) { + var v = c.axisBody + , m = v === e ? t : e + , y = [v.axes[n.axisNumber]]; + if (l = i._overlapAxes(v.vertices, m.vertices, y), + c.reused = !0, + l.overlap <= 0) + return c.collided = !1, + c + } else { + if ((s = i._overlapAxes(e.vertices, t.vertices, e.axes)).overlap <= 0) + return c.collided = !1, + c; + if ((a = i._overlapAxes(t.vertices, e.vertices, t.axes)).overlap <= 0) + return c.collided = !1, + c; + s.overlap < a.overlap ? (l = s, + c.axisBody = e) : (l = a, + c.axisBody = t), + c.axisNumber = l.axisNumber + } + c.bodyA = e.id < t.id ? e : t, + c.bodyB = e.id < t.id ? t : e, + c.collided = !0, + c.depth = l.overlap, + c.parentA = c.bodyA.parent, + c.parentB = c.bodyB.parent, + e = c.bodyA, + t = c.bodyB, + r.dot(l.axis, r.sub(t.position, e.position)) < 0 ? c.normal = { + x: l.axis.x, + y: l.axis.y + } : c.normal = { + x: -l.axis.x, + y: -l.axis.y + }, + c.tangent = r.perp(c.normal), + c.penetration = c.penetration || {}, + c.penetration.x = c.normal.x * c.depth, + c.penetration.y = c.normal.y * c.depth; + var g = i._findSupports(e, t, c.normal) + , x = []; + if (o.contains(e.vertices, g[0]) && x.push(g[0]), + o.contains(e.vertices, g[1]) && x.push(g[1]), + x.length < 2) { + var h = i._findSupports(t, e, r.neg(c.normal)); + o.contains(t.vertices, h[0]) && x.push(h[0]), + x.length < 2 && o.contains(t.vertices, h[1]) && x.push(h[1]) + } + return x.length < 1 && (x = [g[0]]), + c.supports = x, + c + } + , + i._overlapAxes = function(e, t, n) { + for (var o, s, a = r._temp[0], l = r._temp[1], c = { + overlap: Number.MAX_VALUE + }, d = 0; d < n.length; d++) { + if (s = n[d], + i._projectToAxis(a, e, s), + i._projectToAxis(l, t, s), + (o = Math.min(a.max - l.min, l.max - a.min)) <= 0) + return c.overlap = o, + c; + o < c.overlap && (c.overlap = o, + c.axis = s, + c.axisNumber = d) + } + return c + } + , + i._projectToAxis = function(e, t, n) { + for (var i = r.dot(t[0], n), o = i, s = 1; s < t.length; s += 1) { + var a = r.dot(t[s], n); + a > o ? o = a : a < i && (i = a) + } + e.min = i, + e.max = o + } + , + i._findSupports = function(e, t, n) { + for (var i, o, s, a, l = Number.MAX_VALUE, c = r._temp[0], d = t.vertices, u = e.position, p = 0; p < d.length; p++) + o = d[p], + c.x = o.x - u.x, + c.y = o.y - u.y, + (i = -r.dot(n, c)) < l && (l = i, + s = o); + return o = d[s.index - 1 >= 0 ? s.index - 1 : d.length - 1], + c.x = o.x - u.x, + c.y = o.y - u.y, + l = -r.dot(n, c), + a = o, + o = d[(s.index + 1) % d.length], + c.x = o.x - u.x, + c.y = o.y - u.y, + (i = -r.dot(n, c)) < l && (a = o), + [s, a] + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0); + i.create = function(e) { + var t = {}; + return e || o.log("Mouse.create: element was undefined, defaulting to document.body", "warn"), + t.element = e || document.body, + t.absolute = { + x: 0, + y: 0 + }, + t.position = { + x: 0, + y: 0 + }, + t.mousedownPosition = { + x: 0, + y: 0 + }, + t.mouseupPosition = { + x: 0, + y: 0 + }, + t.offset = { + x: 0, + y: 0 + }, + t.scale = { + x: 1, + y: 1 + }, + t.wheelDelta = 0, + t.button = -1, + t.pixelRatio = parseInt(t.element.getAttribute("data-pixel-ratio"), 10) || 1, + t.sourceEvents = { + mousemove: null, + mousedown: null, + mouseup: null, + mousewheel: null + }, + t.mousemove = function(e) { + var n = i._getRelativeMousePosition(e, t.element, t.pixelRatio); + e.changedTouches && (t.button = 0, + e.preventDefault()), + t.absolute.x = n.x, + t.absolute.y = n.y, + t.position.x = t.absolute.x * t.scale.x + t.offset.x, + t.position.y = t.absolute.y * t.scale.y + t.offset.y, + t.sourceEvents.mousemove = e + } + , + t.mousedown = function(e) { + var n = i._getRelativeMousePosition(e, t.element, t.pixelRatio); + e.changedTouches ? (t.button = 0, + e.preventDefault()) : t.button = e.button, + t.absolute.x = n.x, + t.absolute.y = n.y, + t.position.x = t.absolute.x * t.scale.x + t.offset.x, + t.position.y = t.absolute.y * t.scale.y + t.offset.y, + t.mousedownPosition.x = t.position.x, + t.mousedownPosition.y = t.position.y, + t.sourceEvents.mousedown = e + } + , + t.mouseup = function(e) { + var n = i._getRelativeMousePosition(e, t.element, t.pixelRatio); + e.changedTouches && e.preventDefault(), + t.button = -1, + t.absolute.x = n.x, + t.absolute.y = n.y, + t.position.x = t.absolute.x * t.scale.x + t.offset.x, + t.position.y = t.absolute.y * t.scale.y + t.offset.y, + t.mouseupPosition.x = t.position.x, + t.mouseupPosition.y = t.position.y, + t.sourceEvents.mouseup = e + } + , + t.mousewheel = function(e) { + t.wheelDelta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail)), + e.preventDefault() + } + , + i.setElement(t, t.element), + t + } + , + i.setElement = function(e, t) { + e.element = t, + t.addEventListener("mousemove", e.mousemove), + t.addEventListener("mousedown", e.mousedown), + t.addEventListener("mouseup", e.mouseup), + t.addEventListener("mousewheel", e.mousewheel), + t.addEventListener("DOMMouseScroll", e.mousewheel), + t.addEventListener("touchmove", e.mousemove), + t.addEventListener("touchstart", e.mousedown), + t.addEventListener("touchend", e.mouseup) + } + , + i.clearSourceEvents = function(e) { + e.sourceEvents.mousemove = null, + e.sourceEvents.mousedown = null, + e.sourceEvents.mouseup = null, + e.sourceEvents.mousewheel = null, + e.wheelDelta = 0 + } + , + i.setOffset = function(e, t) { + e.offset.x = t.x, + e.offset.y = t.y, + e.position.x = e.absolute.x * e.scale.x + e.offset.x, + e.position.y = e.absolute.y * e.scale.y + e.offset.y + } + , + i.setScale = function(e, t) { + e.scale.x = t.x, + e.scale.y = t.y, + e.position.x = e.absolute.x * e.scale.x + e.offset.x, + e.position.y = e.absolute.y * e.scale.y + e.offset.y + } + , + i._getRelativeMousePosition = function(e, t, n) { + var i, o, r = t.getBoundingClientRect(), s = document.documentElement || document.body.parentNode || document.body, a = void 0 !== window.pageXOffset ? window.pageXOffset : s.scrollLeft, l = void 0 !== window.pageYOffset ? window.pageYOffset : s.scrollTop, c = e.changedTouches; + return c ? (i = c[0].pageX - r.left - a, + o = c[0].pageY - r.top - l) : (i = e.pageX - r.left - a, + o = e.pageY - r.top - l), + { + x: i / (t.clientWidth / (t.width || t.clientWidth) * n), + y: o / (t.clientHeight / (t.height || t.clientHeight) * n) + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(2) + , r = n(0); + i.fromVertices = function(e) { + for (var t = {}, n = 0; n < e.length; n++) { + var i = (n + 1) % e.length + , s = o.normalise({ + x: e[i].y - e[n].y, + y: e[n].x - e[i].x + }) + , a = 0 === s.y ? 1 / 0 : s.x / s.y; + t[a = a.toFixed(3).toString()] = s + } + return r.values(t) + } + , + i.rotate = function(e, t) { + if (0 !== t) + for (var n = Math.cos(t), i = Math.sin(t), o = 0; o < e.length; o++) { + var r, s = e[o]; + r = s.x * n - s.y * i, + s.y = s.x * i + s.y * n, + s.x = r + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(0) + , s = n(6) + , a = n(1) + , l = n(2); + i._decompWarned = !1, + i.rectangle = function(e, t, n, i, a) { + a = a || {}; + var l = { + label: "Rectangle Body", + position: { + x: e, + y: t + }, + vertices: o.fromPath("L 0 0 L " + n + " 0 L " + n + " " + i + " L 0 " + i) + }; + if (a.chamfer) { + var c = a.chamfer; + l.vertices = o.chamfer(l.vertices, c.radius, c.quality, c.qualityMin, c.qualityMax), + delete a.chamfer + } + return s.create(r.extend({}, l, a)) + } + , + i.trapezoid = function(e, t, n, i, a, l) { + l = l || {}; + var c, d = n * (a *= .5), u = d + (1 - 2 * a) * n, p = u + d; + c = a < .5 ? "L 0 0 L " + d + " " + -i + " L " + u + " " + -i + " L " + p + " 0" : "L 0 0 L " + u + " " + -i + " L " + p + " 0"; + var f = { + label: "Trapezoid Body", + position: { + x: e, + y: t + }, + vertices: o.fromPath(c) + }; + if (l.chamfer) { + var v = l.chamfer; + f.vertices = o.chamfer(f.vertices, v.radius, v.quality, v.qualityMin, v.qualityMax), + delete l.chamfer + } + return s.create(r.extend({}, f, l)) + } + , + i.circle = function(e, t, n, o, s) { + o = o || {}; + var a = { + label: "Circle Body", + circleRadius: n + }; + s = s || 25; + var l = Math.ceil(Math.max(10, Math.min(s, n))); + return l % 2 == 1 && (l += 1), + i.polygon(e, t, l, n, r.extend({}, a, o)) + } + , + i.polygon = function(e, t, n, a, l) { + if (l = l || {}, + n < 3) + return i.circle(e, t, a, l); + for (var c = 2 * Math.PI / n, d = "", u = .5 * c, p = 0; p < n; p += 1) { + var f = u + p * c + , v = Math.cos(f) * a + , m = Math.sin(f) * a; + d += "L " + v.toFixed(3) + " " + m.toFixed(3) + " " + } + var y = { + label: "Polygon Body", + position: { + x: e, + y: t + }, + vertices: o.fromPath(d) + }; + if (l.chamfer) { + var g = l.chamfer; + y.vertices = o.chamfer(y.vertices, g.radius, g.quality, g.qualityMin, g.qualityMax), + delete l.chamfer + } + return s.create(r.extend({}, y, l)) + } + , + i.fromVertices = function(e, t, c, d, u, p, f, v) { + var m, y, g, x, h, b, w, S, A, P, C; + try { + m = n(27) + } catch (E) { + m = null + } + for (y = Boolean(m && m.quickDecomp), + d = d || {}, + x = [], + u = void 0 !== u && u, + p = void 0 !== p ? p : .01, + f = void 0 !== f ? f : 10, + v = void 0 !== v ? v : .01, + r.isArray(c[0]) || (c = [c]), + P = 0; P < c.length; P += 1) + if (b = c[P], + !!(h = o.isConvex(b)) || y || i._decompWarned || (r.warn("Could not resolve the expected 'poly-decomp' package for concave vertices in 'Bodies.fromVertices'"), + r.warn("Try 'npm install poly-decomp --save' or as a global e.g. 'window.decomp'"), + i._decompWarned = !0), + h || !y) + b = h ? o.clockwiseSort(b) : o.hull(b), + x.push({ + position: { + x: e, + y: t + }, + vertices: b + }); + else { + var M = b.map(function(e) { + return [e.x, e.y] + }); + m.makeCCW(M), + !1 !== p && m.removeCollinearPoints(M, p), + !1 !== v && m.removeDuplicatePoints && m.removeDuplicatePoints(M, v); + var k = m.quickDecomp(M); + for (w = 0; w < k.length; w++) { + var B = k[w].map(function(e) { + return { + x: e[0], + y: e[1] + } + }); + f > 0 && o.area(B) < f || x.push({ + position: o.centre(B), + vertices: B + }) + } + } + for (w = 0; w < x.length; w++) + x[w] = s.create(r.extend(x[w], d)); + if (u) + for (w = 0; w < x.length; w++) { + var I = x[w]; + for (S = w + 1; S < x.length; S++) { + var _ = x[S]; + if (a.overlaps(I.bounds, _.bounds)) { + var T = I.vertices + , R = _.vertices; + for (A = 0; A < I.vertices.length; A++) + for (C = 0; C < _.vertices.length; C++) { + var L = l.magnitudeSquared(l.sub(T[(A + 1) % T.length], R[C])) + , O = l.magnitudeSquared(l.sub(T[A], R[(C + 1) % R.length])); + L < 5 && O < 5 && (T[A].isInternal = !0, + R[C].isInternal = !0) + } + } + } + } + return x.length > 1 ? (g = s.create(r.extend({ + parts: x.slice(0) + }, d)), + s.setPosition(g, { + x: e, + y: t + }), + g) : x[0] + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0); + i._registry = {}, + i.register = function(e) { + if (i.isPlugin(e) || o.warn("Plugin.register:", i.toString(e), "does not implement all required fields."), + e.name in i._registry) { + var t = i._registry[e.name] + , n = i.versionParse(e.version).number + , r = i.versionParse(t.version).number; + n > r ? (o.warn("Plugin.register:", i.toString(t), "was upgraded to", i.toString(e)), + i._registry[e.name] = e) : n < r ? o.warn("Plugin.register:", i.toString(t), "can not be downgraded to", i.toString(e)) : e !== t && o.warn("Plugin.register:", i.toString(e), "is already registered to different plugin object") + } else + i._registry[e.name] = e; + return e + } + , + i.resolve = function(e) { + return i._registry[i.dependencyParse(e).name] + } + , + i.toString = function(e) { + return "string" == typeof e ? e : (e.name || "anonymous") + "@" + (e.version || e.range || "0.0.0") + } + , + i.isPlugin = function(e) { + return e && e.name && e.version && e.install + } + , + i.isUsed = function(e, t) { + return e.used.indexOf(t) > -1 + } + , + i.isFor = function(e, t) { + var n = e.for && i.dependencyParse(e.for); + return !e.for || t.name === n.name && i.versionSatisfies(t.version, n.range) + } + , + i.use = function(e, t) { + if (e.uses = (e.uses || []).concat(t || []), + 0 !== e.uses.length) { + for (var n = i.dependencies(e), r = o.topologicalSort(n), s = [], a = 0; a < r.length; a += 1) + if (r[a] !== e.name) { + var l = i.resolve(r[a]); + l ? i.isUsed(e, l.name) || (i.isFor(l, e) || (o.warn("Plugin.use:", i.toString(l), "is for", l.for, "but installed on", i.toString(e) + "."), + l._warned = !0), + l.install ? l.install(e) : (o.warn("Plugin.use:", i.toString(l), "does not specify an install function."), + l._warned = !0), + l._warned ? (s.push("\uD83D\uDD36 " + i.toString(l)), + delete l._warned) : s.push("\u2705 " + i.toString(l)), + e.used.push(l.name)) : s.push("\u274C " + r[a]) + } + s.length > 0 && o.info(s.join(" ")) + } else + o.warn("Plugin.use:", i.toString(e), "does not specify any dependencies to install.") + } + , + i.dependencies = function(e, t) { + var n = i.dependencyParse(e) + , r = n.name; + if (!(r in (t = t || {}))) { + e = i.resolve(e) || e, + t[r] = o.map(e.uses || [], function(t) { + i.isPlugin(t) && i.register(t); + var r = i.dependencyParse(t) + , s = i.resolve(t); + return s && !i.versionSatisfies(s.version, r.range) ? (o.warn("Plugin.dependencies:", i.toString(s), "does not satisfy", i.toString(r), "used by", i.toString(n) + "."), + s._warned = !0, + e._warned = !0) : s || (o.warn("Plugin.dependencies:", i.toString(t), "used by", i.toString(n), "could not be resolved."), + e._warned = !0), + r.name + }); + for (var s = 0; s < t[r].length; s += 1) + i.dependencies(t[r][s], t); + return t + } + } + , + i.dependencyParse = function(e) { + return o.isString(e) ? (/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(e) || o.warn("Plugin.dependencyParse:", e, "is not a valid dependency string."), + { + name: e.split("@")[0], + range: e.split("@")[1] || "*" + }) : { + name: e.name, + range: e.range || e.version + } + } + , + i.versionParse = function(e) { + var t = /^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-]+)?$/; + t.test(e) || o.warn("Plugin.versionParse:", e, "is not a valid version or range."); + var n = t.exec(e) + , i = Number(n[4]) + , r = Number(n[5]) + , s = Number(n[6]); + return { + isRange: Boolean(n[1] || n[2]), + version: n[3], + range: e, + operator: n[1] || n[2] || "", + major: i, + minor: r, + patch: s, + parts: [i, r, s], + prerelease: n[7], + number: 1e8 * i + 1e4 * r + s + } + } + , + i.versionSatisfies = function(e, t) { + t = t || "*"; + var n = i.versionParse(t) + , o = i.versionParse(e); + if (n.isRange) { + if ("*" === n.operator || "*" === e) + return !0; + if (">" === n.operator) + return o.number > n.number; + if (">=" === n.operator) + return o.number >= n.number; + if ("~" === n.operator) + return o.major === n.major && o.minor === n.minor && o.patch >= n.patch; + if ("^" === n.operator) + return n.major > 0 ? o.major === n.major && o.number >= n.number : n.minor > 0 ? o.minor === n.minor && o.patch >= n.patch : o.patch === n.patch + } + return e === t || "*" === e + } + } + , function(e, t) { + var n = {}; + e.exports = n, + n.create = function(e) { + return { + id: n.id(e), + vertex: e, + normalImpulse: 0, + tangentImpulse: 0 + } + } + , + n.id = function(e) { + return e.body.id + "_" + e.index + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(5) + , r = (n(8), + n(0)); + i.create = function(e) { + var t = o.create() + , n = { + label: "World", + gravity: { + x: 0, + y: 1, + scale: .001 + }, + bounds: { + min: { + x: -1 / 0, + y: -1 / 0 + }, + max: { + x: 1 / 0, + y: 1 / 0 + } + } + }; + return r.extend(t, n, e) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(9) + , r = n(0); + i._pairMaxIdleLife = 1e3, + i.create = function(e) { + return r.extend({ + table: {}, + list: [], + collisionStart: [], + collisionActive: [], + collisionEnd: [] + }, e) + } + , + i.update = function(e, t, n) { + var i, r, s, a, l = e.list, c = e.table, d = e.collisionStart, u = e.collisionEnd, p = e.collisionActive; + for (d.length = 0, + u.length = 0, + p.length = 0, + a = 0; a < l.length; a++) + l[a].confirmedActive = !1; + for (a = 0; a < t.length; a++) + (i = t[a]).collided && ((s = c[r = o.id(i.bodyA, i.bodyB)]) ? (s.isActive ? p.push(s) : d.push(s), + o.update(s, i, n), + s.confirmedActive = !0) : (s = o.create(i, n), + c[r] = s, + d.push(s), + l.push(s))); + for (a = 0; a < l.length; a++) + (s = l[a]).isActive && !s.confirmedActive && (o.setActive(s, !1, n), + u.push(s)) + } + , + i.removeOld = function(e, t) { + var n, o, r, s, a = e.list, l = e.table, c = []; + for (s = 0; s < a.length; s++) + (o = (n = a[s]).collision).bodyA.isSleeping || o.bodyB.isSleeping ? n.timeUpdated = t : t - n.timeUpdated > i._pairMaxIdleLife && c.push(s); + for (s = 0; s < c.length; s++) + delete l[(n = a[r = c[s] - s]).id], + a.splice(r, 1) + } + , + i.clear = function(e) { + return e.table = {}, + e.list.length = 0, + e.collisionStart.length = 0, + e.collisionActive.length = 0, + e.collisionEnd.length = 0, + e + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2) + , s = n(0) + , a = n(1); + i._restingThresh = 4, + i._restingThreshTangent = 6, + i._positionDampen = .9, + i._positionWarming = .8, + i._frictionNormalMultiplier = 5, + i.preSolvePosition = function(e) { + var t, n, i; + for (t = 0; t < e.length; t++) + (n = e[t]).isActive && (i = n.activeContacts.length, + n.collision.parentA.totalContacts += i, + n.collision.parentB.totalContacts += i) + } + , + i.solvePosition = function(e, t) { + var n, o, s, a, l, c, d, u, p, f = r._temp[0], v = r._temp[1], m = r._temp[2], y = r._temp[3]; + for (n = 0; n < e.length; n++) + (o = e[n]).isActive && !o.isSensor && (a = (s = o.collision).parentA, + l = s.parentB, + c = s.normal, + d = r.sub(r.add(l.positionImpulse, l.position, f), r.add(a.positionImpulse, r.sub(l.position, s.penetration, v), m), y), + o.separation = r.dot(c, d)); + for (n = 0; n < e.length; n++) + (o = e[n]).isActive && !o.isSensor && (a = (s = o.collision).parentA, + l = s.parentB, + c = s.normal, + p = (o.separation - o.slop) * t, + (a.isStatic || l.isStatic) && (p *= 2), + a.isStatic || a.isSleeping || (u = i._positionDampen / a.totalContacts, + a.positionImpulse.x += c.x * p * u, + a.positionImpulse.y += c.y * p * u), + l.isStatic || l.isSleeping || (u = i._positionDampen / l.totalContacts, + l.positionImpulse.x -= c.x * p * u, + l.positionImpulse.y -= c.y * p * u)) + } + , + i.postSolvePosition = function(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t]; + if (n.totalContacts = 0, + 0 !== n.positionImpulse.x || 0 !== n.positionImpulse.y) { + for (var s = 0; s < n.parts.length; s++) { + var l = n.parts[s]; + o.translate(l.vertices, n.positionImpulse), + a.update(l.bounds, l.vertices, n.velocity), + l.position.x += n.positionImpulse.x, + l.position.y += n.positionImpulse.y + } + n.positionPrev.x += n.positionImpulse.x, + n.positionPrev.y += n.positionImpulse.y, + r.dot(n.positionImpulse, n.velocity) < 0 ? (n.positionImpulse.x = 0, + n.positionImpulse.y = 0) : (n.positionImpulse.x *= i._positionWarming, + n.positionImpulse.y *= i._positionWarming) + } + } + } + , + i.preSolveVelocity = function(e) { + var t, n, i, o, s, a, l, c, d, u, p, f, v, m, y = r._temp[0], g = r._temp[1]; + for (t = 0; t < e.length; t++) + if ((i = e[t]).isActive && !i.isSensor) + for (o = i.activeContacts, + a = (s = i.collision).parentA, + l = s.parentB, + c = s.normal, + d = s.tangent, + n = 0; n < o.length; n++) + p = (u = o[n]).vertex, + f = u.normalImpulse, + v = u.tangentImpulse, + 0 === f && 0 === v || (y.x = c.x * f + d.x * v, + y.y = c.y * f + d.y * v, + a.isStatic || a.isSleeping || (m = r.sub(p, a.position, g), + a.positionPrev.x += y.x * a.inverseMass, + a.positionPrev.y += y.y * a.inverseMass, + a.anglePrev += r.cross(m, y) * a.inverseInertia), + l.isStatic || l.isSleeping || (m = r.sub(p, l.position, g), + l.positionPrev.x -= y.x * l.inverseMass, + l.positionPrev.y -= y.y * l.inverseMass, + l.anglePrev -= r.cross(m, y) * l.inverseInertia)) + } + , + i.solveVelocity = function(e, t) { + for (var n = t * t, o = r._temp[0], a = r._temp[1], l = r._temp[2], c = r._temp[3], d = r._temp[4], u = r._temp[5], p = 0; p < e.length; p++) { + var f = e[p]; + if (f.isActive && !f.isSensor) { + var v = f.collision + , m = v.parentA + , y = v.parentB + , g = v.normal + , x = v.tangent + , h = f.activeContacts + , b = 1 / h.length; + m.velocity.x = m.position.x - m.positionPrev.x, + m.velocity.y = m.position.y - m.positionPrev.y, + y.velocity.x = y.position.x - y.positionPrev.x, + y.velocity.y = y.position.y - y.positionPrev.y, + m.angularVelocity = m.angle - m.anglePrev, + y.angularVelocity = y.angle - y.anglePrev; + for (var w = 0; w < h.length; w++) { + var S = h[w] + , A = S.vertex + , P = r.sub(A, m.position, a) + , C = r.sub(A, y.position, l) + , M = r.add(m.velocity, r.mult(r.perp(P), m.angularVelocity), c) + , k = r.add(y.velocity, r.mult(r.perp(C), y.angularVelocity), d) + , B = r.sub(M, k, u) + , I = r.dot(g, B) + , _ = r.dot(x, B) + , T = Math.abs(_) + , R = s.sign(_) + , L = (1 + f.restitution) * I + , O = s.clamp(f.separation + I, 0, 1) * i._frictionNormalMultiplier + , E = _ + , V = 1 / 0; + T > f.friction * f.frictionStatic * O * n && (V = T, + E = s.clamp(f.friction * R * n, -V, V)); + var F = r.cross(P, g) + , D = r.cross(C, g) + , W = b / (m.inverseMass + y.inverseMass + m.inverseInertia * F * F + y.inverseInertia * D * D); + if (L *= W, + E *= W, + I < 0 && I * I > i._restingThresh * n) + S.normalImpulse = 0; + else { + var q = S.normalImpulse; + S.normalImpulse = Math.min(S.normalImpulse + L, 0), + L = S.normalImpulse - q + } + if (_ * _ > i._restingThreshTangent * n) + S.tangentImpulse = 0; + else { + var j = S.tangentImpulse; + S.tangentImpulse = s.clamp(S.tangentImpulse + E, -V, V), + E = S.tangentImpulse - j + } + o.x = g.x * L + x.x * E, + o.y = g.y * L + x.y * E, + m.isStatic || m.isSleeping || (m.positionPrev.x += o.x * m.inverseMass, + m.positionPrev.y += o.y * m.inverseMass, + m.anglePrev += r.cross(P, o) * m.inverseInertia), + y.isStatic || y.isSleeping || (y.positionPrev.x -= o.x * y.inverseMass, + y.positionPrev.y -= o.y * y.inverseMass, + y.anglePrev -= r.cross(C, o) * y.inverseInertia) + } + } + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(19) + , r = n(7) + , s = n(21) + , a = n(10) + , l = n(20) + , c = n(23) + , d = n(11) + , u = n(4) + , p = n(5) + , f = n(8) + , v = n(0) + , m = n(6); + i.create = function(e, t) { + t = (t = v.isElement(e) ? t : e) || {}, + ((e = v.isElement(e) ? e : null) || t.render) && v.warn("Engine.create: engine.render is deprecated (see docs)"); + var n = { + positionIterations: 6, + velocityIterations: 4, + constraintIterations: 2, + enableSleeping: !1, + events: [], + plugin: {}, + timing: { + timestamp: 0, + timeScale: 1 + }, + broadphase: { + controller: d + } + } + , i = v.extend(n, t); + if (e || i.render) { + var r = { + element: e, + controller: a + }; + i.render = v.extend(r, i.render) + } + return i.render && i.render.controller && (i.render = i.render.controller.create(i.render)), + i.render && (i.render.engine = i), + i.world = t.world || o.create(i.world), + i.pairs = l.create(), + i.broadphase = i.broadphase.controller.create(i.broadphase), + i.metrics = i.metrics || { + extended: !1 + }, + i.metrics = c.create(i.metrics), + i + } + , + i.update = function(e, t, n) { + t = t || 1e3 / 60, + n = n || 1; + var o, a = e.world, d = e.timing, v = e.broadphase, m = []; + d.timestamp += t * d.timeScale; + var y = { + timestamp: d.timestamp + }; + u.trigger(e, "beforeUpdate", y); + var g = p.allBodies(a) + , x = p.allConstraints(a); + for (c.reset(e.metrics), + e.enableSleeping && r.update(g, d.timeScale), + i._bodiesApplyGravity(g, a.gravity), + i._bodiesUpdate(g, t, d.timeScale, n, a.bounds), + f.preSolveAll(g), + o = 0; o < e.constraintIterations; o++) + f.solveAll(x, d.timeScale); + f.postSolveAll(g), + v.controller ? (a.isModified && v.controller.clear(v), + v.controller.update(v, g, e, a.isModified), + m = v.pairsList) : m = g, + a.isModified && p.setModified(a, !1, !1, !0); + var h = v.detector(m, e) + , b = e.pairs + , w = d.timestamp; + for (l.update(b, h, w), + l.removeOld(b, w), + e.enableSleeping && r.afterCollisions(b.list, d.timeScale), + b.collisionStart.length > 0 && u.trigger(e, "collisionStart", { + pairs: b.collisionStart + }), + s.preSolvePosition(b.list), + o = 0; o < e.positionIterations; o++) + s.solvePosition(b.list, d.timeScale); + for (s.postSolvePosition(g), + f.preSolveAll(g), + o = 0; o < e.constraintIterations; o++) + f.solveAll(x, d.timeScale); + for (f.postSolveAll(g), + s.preSolveVelocity(b.list), + o = 0; o < e.velocityIterations; o++) + s.solveVelocity(b.list, d.timeScale); + return b.collisionActive.length > 0 && u.trigger(e, "collisionActive", { + pairs: b.collisionActive + }), + b.collisionEnd.length > 0 && u.trigger(e, "collisionEnd", { + pairs: b.collisionEnd + }), + c.update(e.metrics, e), + i._bodiesClearForces(g), + u.trigger(e, "afterUpdate", y), + e + } + , + i.merge = function(e, t) { + if (v.extend(e, t), + t.world) { + e.world = t.world, + i.clear(e); + for (var n = p.allBodies(e.world), o = 0; o < n.length; o++) { + var s = n[o]; + r.set(s, !1), + s.id = v.nextId() + } + } + } + , + i.clear = function(e) { + var t = e.world; + l.clear(e.pairs); + var n = e.broadphase; + if (n.controller) { + var i = p.allBodies(t); + n.controller.clear(n), + n.controller.update(n, i, e, !0) + } + } + , + i._bodiesClearForces = function(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t]; + n.force.x = 0, + n.force.y = 0, + n.torque = 0 + } + } + , + i._bodiesApplyGravity = function(e, t) { + var n = void 0 !== t.scale ? t.scale : .001; + if ((0 !== t.x || 0 !== t.y) && 0 !== n) + for (var i = 0; i < e.length; i++) { + var o = e[i]; + o.isStatic || o.isSleeping || (o.force.y += o.mass * t.y * n, + o.force.x += o.mass * t.x * n) + } + } + , + i._bodiesUpdate = function(e, t, n, i, o) { + for (var r = 0; r < e.length; r++) { + var s = e[r]; + s.isStatic || s.isSleeping || m.update(s, t, n, i) + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(5) + , r = n(0); + i.create = function(e) { + return r.extend({ + extended: !1, + narrowDetections: 0, + narrowphaseTests: 0, + narrowReuse: 0, + narrowReuseCount: 0, + midphaseTests: 0, + broadphaseTests: 0, + narrowEff: 1e-4, + midEff: 1e-4, + broadEff: 1e-4, + collisions: 0, + buckets: 0, + bodies: 0, + pairs: 0 + }, !1, e) + } + , + i.reset = function(e) { + e.extended && (e.narrowDetections = 0, + e.narrowphaseTests = 0, + e.narrowReuse = 0, + e.narrowReuseCount = 0, + e.midphaseTests = 0, + e.broadphaseTests = 0, + e.narrowEff = 0, + e.midEff = 0, + e.broadEff = 0, + e.collisions = 0, + e.buckets = 0, + e.pairs = 0, + e.bodies = 0) + } + , + i.update = function(e, t) { + if (e.extended) { + var n = t.world + , i = o.allBodies(n); + e.collisions = e.narrowDetections, + e.pairs = t.pairs.list.length, + e.bodies = i.length, + e.midEff = (e.narrowDetections / (e.midphaseTests || 1)).toFixed(2), + e.narrowEff = (e.narrowDetections / (e.narrowphaseTests || 1)).toFixed(2), + e.broadEff = (1 - e.broadphaseTests / (i.length || 1)).toFixed(2), + e.narrowReuse = (e.narrowReuseCount / (e.narrowphaseTests || 1)).toFixed(2) + } + } + } + , function(e, t, n) { + var i = e.exports = n(25); + i.Body = n(6), + i.Composite = n(5), + i.World = n(19), + i.Contact = n(18), + i.Detector = n(12), + i.Grid = n(11), + i.Pairs = n(20), + i.Pair = n(9), + i.Query = n(26), + i.Resolver = n(21), + i.SAT = n(13), + i.Constraint = n(8), + i.MouseConstraint = n(28), + i.Common = n(0), + i.Engine = n(22), + i.Events = n(4), + i.Mouse = n(14), + i.Runner = n(29), + i.Sleeping = n(7), + i.Plugin = n(17), + i.Metrics = n(23), + i.Bodies = n(16), + i.Composites = n(30), + i.Axes = n(15), + i.Bounds = n(1), + i.Svg = n(31), + i.Vector = n(2), + i.Vertices = n(3), + i.Render = n(10), + i.RenderPixi = n(32), + i.World.add = i.Composite.add, + i.World.remove = i.Composite.remove, + i.World.addComposite = i.Composite.addComposite, + i.World.addBody = i.Composite.addBody, + i.World.addConstraint = i.Composite.addConstraint, + i.World.clear = i.Composite.clear, + i.Engine.run = i.Runner.run + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(17) + , r = n(0); + i.name = "matter-js", + i.version = "0.16.1", + i.uses = [], + i.used = [], + i.use = function() { + o.use(i, Array.prototype.slice.call(arguments)) + } + , + i.before = function(e, t) { + return e = e.replace(/^Matter./, ""), + r.chainPathBefore(i, e, t) + } + , + i.after = function(e, t) { + return e = e.replace(/^Matter./, ""), + r.chainPathAfter(i, e, t) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(2) + , r = n(13) + , s = n(1) + , a = n(16) + , l = n(3); + i.collides = function(e, t) { + for (var n = [], i = 0; i < t.length; i++) { + var o = t[i]; + if (s.overlaps(o.bounds, e.bounds)) + for (var a = 1 === o.parts.length ? 0 : 1; a < o.parts.length; a++) { + var l = o.parts[a]; + if (s.overlaps(l.bounds, e.bounds)) { + var c = r.collides(l, e); + if (c.collided) { + n.push(c); + break + } + } + } + } + return n + } + , + i.ray = function(e, t, n, r) { + r = r || 1e-100; + for (var s = o.angle(t, n), l = o.magnitude(o.sub(t, n)), c = .5 * (n.x + t.x), d = .5 * (n.y + t.y), u = a.rectangle(c, d, l, r, { + angle: s + }), p = i.collides(u, e), f = 0; f < p.length; f += 1) { + var v = p[f]; + v.body = v.bodyB = v.bodyA + } + return p + } + , + i.region = function(e, t, n) { + for (var i = [], o = 0; o < e.length; o++) { + var r = e[o] + , a = s.overlaps(r.bounds, t); + (a && !n || !a && n) && i.push(r) + } + return i + } + , + i.point = function(e, t) { + for (var n = [], i = 0; i < e.length; i++) { + var o = e[i]; + if (s.contains(o.bounds, t)) + for (var r = 1 === o.parts.length ? 0 : 1; r < o.parts.length; r++) { + var a = o.parts[r]; + if (s.contains(a.bounds, t) && l.contains(a.vertices, t)) { + n.push(o); + break + } + } + } + return n + } + } + , function(t, n) { + if (void 0 === e) { + var i = new Error("Cannot find module 'undefined'"); + throw i.code = "MODULE_NOT_FOUND", + i + } + t.exports = e + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(7) + , s = n(14) + , a = n(4) + , l = n(12) + , c = n(8) + , d = n(5) + , u = n(0) + , p = n(1); + i.create = function(e, t) { + var n = (e ? e.mouse : null) || (t ? t.mouse : null); + n || (e && e.render && e.render.canvas ? n = s.create(e.render.canvas) : t && t.element ? n = s.create(t.element) : (n = s.create(), + u.warn("MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected"))); + var o = { + type: "mouseConstraint", + mouse: n, + element: null, + body: null, + constraint: c.create({ + label: "Mouse Constraint", + pointA: n.position, + pointB: { + x: 0, + y: 0 + }, + length: .01, + stiffness: .1, + angularStiffness: 1, + render: { + strokeStyle: "#90EE90", + lineWidth: 3 + } + }), + collisionFilter: { + category: 1, + mask: 4294967295, + group: 0 + } + } + , r = u.extend(o, t); + return a.on(e, "beforeUpdate", function() { + var t = d.allBodies(e.world); + i.update(r, t), + i._triggerEvents(r) + }), + r + } + , + i.update = function(e, t) { + var n = e.mouse + , i = e.constraint + , s = e.body; + if (0 === n.button) { + if (i.bodyB) + r.set(i.bodyB, !1), + i.pointA = n.position; + else + for (var c = 0; c < t.length; c++) + if (s = t[c], + p.contains(s.bounds, n.position) && l.canCollide(s.collisionFilter, e.collisionFilter)) + for (var d = s.parts.length > 1 ? 1 : 0; d < s.parts.length; d++) { + var u = s.parts[d]; + if (o.contains(u.vertices, n.position)) { + i.pointA = n.position, + i.bodyB = e.body = s, + i.pointB = { + x: n.position.x - s.position.x, + y: n.position.y - s.position.y + }, + i.angleB = s.angle, + r.set(s, !1), + a.trigger(e, "startdrag", { + mouse: n, + body: s + }); + break + } + } + } else + i.bodyB = e.body = null, + i.pointB = null, + s && a.trigger(e, "enddrag", { + mouse: n, + body: s + }) + } + , + i._triggerEvents = function(e) { + var t = e.mouse + , n = t.sourceEvents; + n.mousemove && a.trigger(e, "mousemove", { + mouse: t + }), + n.mousedown && a.trigger(e, "mousedown", { + mouse: t + }), + n.mouseup && a.trigger(e, "mouseup", { + mouse: t + }), + s.clearSourceEvents(t) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(4) + , r = n(22) + , s = n(0); + !function() { + var e, t, n; + ("undefined" != typeof window && (e = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame, + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame), + e) || (e = function(e) { + n = setTimeout(function() { + e(s.now()) + }, 1e3 / 60) + } + , + t = function() { + clearTimeout(n) + } + ); + i.create = function(e) { + var t = s.extend({ + fps: 60, + correction: 1, + deltaSampleSize: 60, + counterTimestamp: 0, + frameCounter: 0, + deltaHistory: [], + timePrev: null, + timeScalePrev: 1, + frameRequestId: null, + isFixed: !1, + enabled: !0 + }, e); + return t.delta = t.delta || 1e3 / t.fps, + t.deltaMin = t.deltaMin || 1e3 / t.fps, + t.deltaMax = t.deltaMax || 1e3 / (.5 * t.fps), + t.fps = 1e3 / t.delta, + t + } + , + i.run = function(t, n) { + return void 0 !== t.positionIterations && (n = t, + t = i.create()), + function o(r) { + t.frameRequestId = e(o), + r && t.enabled && i.tick(t, n, r) + }(), + t + } + , + i.tick = function(e, t, n) { + var i, s = t.timing, a = 1, l = { + timestamp: s.timestamp + }; + o.trigger(e, "beforeTick", l), + o.trigger(t, "beforeTick", l), + e.isFixed ? i = e.delta : (i = n - e.timePrev || e.delta, + e.timePrev = n, + e.deltaHistory.push(i), + e.deltaHistory = e.deltaHistory.slice(-e.deltaSampleSize), + a = (i = (i = (i = Math.min.apply(null, e.deltaHistory)) < e.deltaMin ? e.deltaMin : i) > e.deltaMax ? e.deltaMax : i) / e.delta, + e.delta = i), + 0 !== e.timeScalePrev && (a *= s.timeScale / e.timeScalePrev), + 0 === s.timeScale && (a = 0), + e.timeScalePrev = s.timeScale, + e.correction = a, + e.frameCounter += 1, + n - e.counterTimestamp >= 1e3 && (e.fps = e.frameCounter * ((n - e.counterTimestamp) / 1e3), + e.counterTimestamp = n, + e.frameCounter = 0), + o.trigger(e, "tick", l), + o.trigger(t, "tick", l), + t.world.isModified && t.render && t.render.controller && t.render.controller.clear && t.render.controller.clear(t.render), + o.trigger(e, "beforeUpdate", l), + r.update(t, i, a), + o.trigger(e, "afterUpdate", l), + t.render && t.render.controller && (o.trigger(e, "beforeRender", l), + o.trigger(t, "beforeRender", l), + t.render.controller.world(t.render), + o.trigger(e, "afterRender", l), + o.trigger(t, "afterRender", l)), + o.trigger(e, "afterTick", l), + o.trigger(t, "afterTick", l) + } + , + i.stop = function(e) { + t(e.frameRequestId) + } + , + i.start = function(e, t) { + i.run(e, t) + } + }() + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(5) + , r = n(8) + , s = n(0) + , a = n(6) + , l = n(16); + i.stack = function(e, t, n, i, r, s, l) { + for (var c, d = o.create({ + label: "Stack" + }), u = e, p = t, f = 0, v = 0; v < i; v++) { + for (var m = 0, y = 0; y < n; y++) { + var g = l(u, p, y, v, c, f); + if (g) { + var x = g.bounds.max.y - g.bounds.min.y + , h = g.bounds.max.x - g.bounds.min.x; + x > m && (m = x), + a.translate(g, { + x: .5 * h, + y: .5 * x + }), + u = g.bounds.max.x + r, + o.addBody(d, g), + c = g, + f += 1 + } else + u += r + } + p += m + s, + u = e + } + return d + } + , + i.chain = function(e, t, n, i, a, l) { + for (var c = e.bodies, d = 1; d < c.length; d++) { + var u = c[d - 1] + , p = c[d] + , f = u.bounds.max.y - u.bounds.min.y + , v = u.bounds.max.x - u.bounds.min.x + , m = p.bounds.max.y - p.bounds.min.y + , y = { + bodyA: u, + pointA: { + x: v * t, + y: f * n + }, + bodyB: p, + pointB: { + x: (p.bounds.max.x - p.bounds.min.x) * i, + y: m * a + } + } + , g = s.extend(y, l); + o.addConstraint(e, r.create(g)) + } + return e.label += " Chain", + e + } + , + i.mesh = function(e, t, n, i, a) { + var l, c, d, u, p, f = e.bodies; + for (l = 0; l < n; l++) { + for (c = 1; c < t; c++) + d = f[c - 1 + l * t], + u = f[c + l * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: d, + bodyB: u + }, a))); + if (l > 0) + for (c = 0; c < t; c++) + d = f[c + (l - 1) * t], + u = f[c + l * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: d, + bodyB: u + }, a))), + i && c > 0 && (p = f[c - 1 + (l - 1) * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: p, + bodyB: u + }, a)))), + i && c < t - 1 && (p = f[c + 1 + (l - 1) * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: p, + bodyB: u + }, a)))) + } + return e.label += " Mesh", + e + } + , + i.pyramid = function(e, t, n, o, r, s, l) { + return i.stack(e, t, n, o, r, s, function(t, i, s, c, d, u) { + var p = Math.min(o, Math.ceil(n / 2)) + , f = d ? d.bounds.max.x - d.bounds.min.x : 0; + if (!(c > p || s < (c = p - c) || s > n - 1 - c)) + return 1 === u && a.translate(d, { + x: (s + (n % 2 == 1 ? 1 : -1)) * f, + y: 0 + }), + l(e + (d ? s * f : 0) + s * r, i, s, c, d, u) + }) + } + , + i.newtonsCradle = function(e, t, n, i, s) { + for (var a = o.create({ + label: "Newtons Cradle" + }), c = 0; c < n; c++) { + var d = l.circle(e + c * (1.9 * i), t + s, i, { + inertia: 1 / 0, + restitution: 1, + friction: 0, + frictionAir: 1e-4, + slop: 1 + }) + , u = r.create({ + pointA: { + x: e + c * (1.9 * i), + y: t + }, + bodyB: d + }); + o.addBody(a, d), + o.addConstraint(a, u) + } + return a + } + , + i.car = function(e, t, n, i, s) { + var c = a.nextGroup(!0) + , d = .5 * -n + 20 + , u = .5 * n - 20 + , p = o.create({ + label: "Car" + }) + , f = l.rectangle(e, t, n, i, { + collisionFilter: { + group: c + }, + chamfer: { + radius: .5 * i + }, + density: 2e-4 + }) + , v = l.circle(e + d, t + 0, s, { + collisionFilter: { + group: c + }, + friction: .8 + }) + , m = l.circle(e + u, t + 0, s, { + collisionFilter: { + group: c + }, + friction: .8 + }) + , y = r.create({ + bodyB: f, + pointB: { + x: d, + y: 0 + }, + bodyA: v, + stiffness: 1, + length: 0 + }) + , g = r.create({ + bodyB: f, + pointB: { + x: u, + y: 0 + }, + bodyA: m, + stiffness: 1, + length: 0 + }); + return o.addBody(p, f), + o.addBody(p, v), + o.addBody(p, m), + o.addConstraint(p, y), + o.addConstraint(p, g), + p + } + , + i.softBody = function(e, t, n, o, r, a, c, d, u, p) { + u = s.extend({ + inertia: 1 / 0 + }, u), + p = s.extend({ + stiffness: .2, + render: { + type: "line", + anchors: !1 + } + }, p); + var f = i.stack(e, t, n, o, r, a, function(e, t) { + return l.circle(e, t, d, u) + }); + return i.mesh(f, n, o, c, p), + f.label = "Soft Body", + f + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + n(1); + var o = n(0); + i.pathToVertices = function(e, t) { + "undefined" == typeof window || "SVGPathSeg"in window || o.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required."); + var n, r, s, a, l, c, d, u, p, f, v, m = [], y = 0, g = 0, x = 0; + t = t || 15; + var h = function(e, t, n) { + var i = n % 2 == 1 && n > 1; + if (!p || e != p.x || t != p.y) { + p && i ? (f = p.x, + v = p.y) : (f = 0, + v = 0); + var o = { + x: f + e, + y: v + t + }; + !i && p || (p = o), + m.push(o), + g = f + e, + x = v + t + } + } + , b = function(e) { + var t = e.pathSegTypeAsLetter.toUpperCase(); + if ("Z" !== t) { + switch (t) { + case "M": + case "L": + case "T": + case "C": + case "S": + case "Q": + g = e.x, + x = e.y; + break; + case "H": + g = e.x; + break; + case "V": + x = e.y; + } + h(g, x, e.pathSegType) + } + }; + for (i._svgPathToAbsolute(e), + s = e.getTotalLength(), + c = [], + n = 0; n < e.pathSegList.numberOfItems; n += 1) + c.push(e.pathSegList.getItem(n)); + for (d = c.concat(); y < s; ) { + if ((l = c[e.getPathSegAtLength(y)]) != u) { + for (; d.length && d[0] != l; ) + b(d.shift()); + u = l + } + switch (l.pathSegTypeAsLetter.toUpperCase()) { + case "C": + case "T": + case "S": + case "Q": + case "A": + a = e.getPointAtLength(y), + h(a.x, a.y, 0); + } + y += t + } + for (n = 0, + r = d.length; n < r; ++n) + b(d[n]); + return m + } + , + i._svgPathToAbsolute = function(e) { + for (var t, n, i, o, r, s, a = e.pathSegList, l = 0, c = 0, d = a.numberOfItems, u = 0; u < d; ++u) { + var p = a.getItem(u) + , f = p.pathSegTypeAsLetter; + if (/[MLHVCSQTA]/.test(f)) + "x"in p && (l = p.x), + "y"in p && (c = p.y); + else + switch ("x1"in p && (i = l + p.x1), + "x2"in p && (r = l + p.x2), + "y1"in p && (o = c + p.y1), + "y2"in p && (s = c + p.y2), + "x"in p && (l += p.x), + "y"in p && (c += p.y), + f) { + case "m": + a.replaceItem(e.createSVGPathSegMovetoAbs(l, c), u); + break; + case "l": + a.replaceItem(e.createSVGPathSegLinetoAbs(l, c), u); + break; + case "h": + a.replaceItem(e.createSVGPathSegLinetoHorizontalAbs(l), u); + break; + case "v": + a.replaceItem(e.createSVGPathSegLinetoVerticalAbs(c), u); + break; + case "c": + a.replaceItem(e.createSVGPathSegCurvetoCubicAbs(l, c, i, o, r, s), u); + break; + case "s": + a.replaceItem(e.createSVGPathSegCurvetoCubicSmoothAbs(l, c, r, s), u); + break; + case "q": + a.replaceItem(e.createSVGPathSegCurvetoQuadraticAbs(l, c, i, o), u); + break; + case "t": + a.replaceItem(e.createSVGPathSegCurvetoQuadraticSmoothAbs(l, c), u); + break; + case "a": + a.replaceItem(e.createSVGPathSegArcAbs(l, c, p.r1, p.r2, p.angle, p.largeArcFlag, p.sweepFlag), u); + break; + case "z": + case "Z": + l = t, + c = n; + } + "M" != f && "m" != f || (t = l, + n = c) + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(1) + , r = n(5) + , s = n(0) + , a = n(4) + , l = n(2); + !function() { + var e, t; + "undefined" != typeof window && (e = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(e) { + window.setTimeout(function() { + e(s.now()) + }, 1e3 / 60) + } + , + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame), + i.create = function(e) { + s.warn("RenderPixi.create: Matter.RenderPixi is deprecated (see docs)"); + var t = { + controller: i, + engine: null, + element: null, + frameRequestId: null, + canvas: null, + renderer: null, + container: null, + spriteContainer: null, + pixiOptions: null, + options: { + width: 800, + height: 600, + background: "#fafafa", + wireframeBackground: "#222", + hasBounds: !1, + enabled: !0, + wireframes: !0, + showSleeping: !0, + showDebug: !1, + showBroadphase: !1, + showBounds: !1, + showVelocity: !1, + showCollisions: !1, + showAxes: !1, + showPositions: !1, + showAngleIndicator: !1, + showIds: !1, + showShadows: !1 + } + } + , n = s.extend(t, e) + , o = !n.options.wireframes && "transparent" === n.options.background; + return n.pixiOptions = n.pixiOptions || { + view: n.canvas, + transparent: o, + antialias: !0, + backgroundColor: e.background + }, + n.mouse = e.mouse, + n.engine = e.engine, + n.renderer = n.renderer || new PIXI.WebGLRenderer(n.options.width,n.options.height,n.pixiOptions), + n.container = n.container || new PIXI.Container, + n.spriteContainer = n.spriteContainer || new PIXI.Container, + n.canvas = n.canvas || n.renderer.view, + n.bounds = n.bounds || { + min: { + x: 0, + y: 0 + }, + max: { + x: n.options.width, + y: n.options.height + } + }, + a.on(n.engine, "beforeUpdate", function() { + i.clear(n) + }), + n.textures = {}, + n.sprites = {}, + n.primitives = {}, + n.container.addChild(n.spriteContainer), + s.isElement(n.element) ? n.element.appendChild(n.canvas) : s.warn("No \"render.element\" passed, \"render.canvas\" was not inserted into document."), + n.canvas.oncontextmenu = function() { + return !1 + } + , + n.canvas.onselectstart = function() { + return !1 + } + , + n + } + , + i.run = function(t) { + !function n(o) { + t.frameRequestId = e(n), + i.world(t) + }() + } + , + i.stop = function(e) { + t(e.frameRequestId) + } + , + i.clear = function(e) { + for (var t = e.container, n = e.spriteContainer; t.children[0]; ) + t.removeChild(t.children[0]); + for (; n.children[0]; ) + n.removeChild(n.children[0]); + var i = e.sprites["bg-0"]; + e.textures = {}, + e.sprites = {}, + e.primitives = {}, + e.sprites["bg-0"] = i, + i && t.addChildAt(i, 0), + e.container.addChild(e.spriteContainer), + e.currentBackground = null, + t.scale.set(1, 1), + t.position.set(0, 0) + } + , + i.setBackground = function(e, t) { + if (e.currentBackground !== t) { + var n = t.indexOf && -1 !== t.indexOf("#") + , i = e.sprites["bg-0"]; + if (n) { + var o = s.colorToNumber(t); + e.renderer.backgroundColor = o, + i && e.container.removeChild(i) + } else if (!i) { + var r = d(e, t); + (i = e.sprites["bg-0"] = new PIXI.Sprite(r)).position.x = 0, + i.position.y = 0, + e.container.addChildAt(i, 0) + } + e.currentBackground = t + } + } + , + i.world = function(e) { + var t, n = e.engine.world, s = e.renderer, a = e.container, c = e.options, d = r.allBodies(n), u = r.allConstraints(n), p = []; + c.wireframes ? i.setBackground(e, c.wireframeBackground) : i.setBackground(e, c.background); + var f = e.bounds.max.x - e.bounds.min.x + , v = e.bounds.max.y - e.bounds.min.y + , m = f / e.options.width + , y = v / e.options.height; + if (c.hasBounds) { + for (t = 0; t < d.length; t++) { + var g = d[t]; + g.render.sprite.visible = o.overlaps(g.bounds, e.bounds) + } + for (t = 0; t < u.length; t++) { + var x = u[t] + , h = x.bodyA + , b = x.bodyB + , w = x.pointA + , S = x.pointB; + h && (w = l.add(h.position, x.pointA)), + b && (S = l.add(b.position, x.pointB)), + w && S && (o.contains(e.bounds, w) || o.contains(e.bounds, S)) && p.push(x) + } + a.scale.set(1 / m, 1 / y), + a.position.set(-e.bounds.min.x * (1 / m), -e.bounds.min.y * (1 / y)) + } else + p = u; + for (t = 0; t < d.length; t++) + i.body(e, d[t]); + for (t = 0; t < p.length; t++) + i.constraint(e, p[t]); + s.render(a) + } + , + i.constraint = function(e, t) { + e.engine; + var n = t.bodyA + , i = t.bodyB + , o = t.pointA + , r = t.pointB + , a = e.container + , l = t.render + , c = "c-" + t.id + , d = e.primitives[c]; + d || (d = e.primitives[c] = new PIXI.Graphics), + l.visible && t.pointA && t.pointB ? (-1 === s.indexOf(a.children, d) && a.addChild(d), + d.clear(), + d.beginFill(0, 0), + d.lineStyle(l.lineWidth, s.colorToNumber(l.strokeStyle), 1), + n ? d.moveTo(n.position.x + o.x, n.position.y + o.y) : d.moveTo(o.x, o.y), + i ? d.lineTo(i.position.x + r.x, i.position.y + r.y) : d.lineTo(r.x, r.y), + d.endFill()) : d.clear() + } + , + i.body = function(e, t) { + e.engine; + var i = t.render; + if (i.visible) + if (i.sprite && i.sprite.texture) { + var o = "b-" + t.id + , r = e.sprites[o] + , a = e.spriteContainer; + r || (r = e.sprites[o] = n(e, t)), + -1 === s.indexOf(a.children, r) && a.addChild(r), + r.position.x = t.position.x, + r.position.y = t.position.y, + r.rotation = t.angle, + r.scale.x = i.sprite.xScale || 1, + r.scale.y = i.sprite.yScale || 1 + } else { + var l = "b-" + t.id + , d = e.primitives[l] + , u = e.container; + d || ((d = e.primitives[l] = c(e, t)).initialAngle = t.angle), + -1 === s.indexOf(u.children, d) && u.addChild(d), + d.position.x = t.position.x, + d.position.y = t.position.y, + d.rotation = t.angle - d.initialAngle + } + } + ; + var n = function(e, t) { + var n = t.render.sprite.texture + , i = d(e, n) + , o = new PIXI.Sprite(i); + return o.anchor.x = t.render.sprite.xOffset, + o.anchor.y = t.render.sprite.yOffset, + o + } + , c = function(e, t) { + var n, i = t.render, o = e.options, r = new PIXI.Graphics, a = s.colorToNumber(i.fillStyle), l = s.colorToNumber(i.strokeStyle), c = s.colorToNumber(i.strokeStyle), d = s.colorToNumber("#bbb"), u = s.colorToNumber("#CD5C5C"); + r.clear(); + for (var p = t.parts.length > 1 ? 1 : 0; p < t.parts.length; p++) { + n = t.parts[p], + o.wireframes ? (r.beginFill(0, 0), + r.lineStyle(1, d, 1)) : (r.beginFill(a, 1), + r.lineStyle(i.lineWidth, l, 1)), + r.moveTo(n.vertices[0].x - t.position.x, n.vertices[0].y - t.position.y); + for (var f = 1; f < n.vertices.length; f++) + r.lineTo(n.vertices[f].x - t.position.x, n.vertices[f].y - t.position.y); + r.lineTo(n.vertices[0].x - t.position.x, n.vertices[0].y - t.position.y), + r.endFill(), + (o.showAngleIndicator || o.showAxes) && (r.beginFill(0, 0), + o.wireframes ? r.lineStyle(1, u, 1) : r.lineStyle(1, c), + r.moveTo(n.position.x - t.position.x, n.position.y - t.position.y), + r.lineTo((n.vertices[0].x + n.vertices[n.vertices.length - 1].x) / 2 - t.position.x, (n.vertices[0].y + n.vertices[n.vertices.length - 1].y) / 2 - t.position.y), + r.endFill()) + } + return r + } + , d = function(e, t) { + var n = e.textures[t]; + return n || (n = e.textures[t] = PIXI.Texture.fromImage(t)), + n + } + }() + } + ]) + }); + var a = function() { + function e(e) { + this._engine = ha.Engine.create(), + this._pixiObjects = [], + ha.Engine.run(this.engine); + var t = ha.MouseConstraint.create(this.engine, { + mouse: ha.Mouse.create(e.stage) + }); + ha.World.add(this.engine.world, t) + } + return Object.defineProperty(e.prototype, "engine", { + get: function() { + return this._engine + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "pixiObjects", { + get: function() { + return this._pixiObjects + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.update = function() { + this._pixiObjects.forEach(function(e) { + return e.update() + }) + } + , + e.prototype.addToWorld = function() { + for (var e = this, t = [], i = 0; i < arguments.length; i++) + t[i] = arguments[i]; + t.forEach(function(t) { + return ha.World.addBody(e.engine.world, t.body) + }), + this._pixiObjects = this._pixiObjects.concat(t) + } + , + e.prototype.removeFromWorld = function() { + for (var e = this, t = [], i = 0; i < arguments.length; i++) + t[i] = arguments[i]; + t.forEach(function(t) { + return ha.World.remove(e.engine.world, t.body) + }), + this._pixiObjects = this._pixiObjects.filter(function(e) { + return !t.includes(e) + }) + } + , + e + }(); + var b = function() { + function i(i, t, e) { + void 0 === t && (t = {}); + var o = i.x + , s = i.y + , r = i.width + , p = i.height; + i.texture; + this._sprite = i, + this._update = e, + this.physicsOptions = t, + t.isCircle ? this._body = ha.Bodies.circle(o, s, r / 2, t) : this._body = ha.Bodies.rectangle(o, s, r, p, t) + } + return Object.defineProperty(i.prototype, "body", { + get: function() { + return this._body + }, + enumerable: !1, + configurable: !0 + }), + i.prototype.update = function() { + this._update ? this._update({ + position: this._body.position, + rotation: this._body.angle + }) : (this._sprite.position = this._body.position, + this._sprite.rotation = this._body.angle) + } + , + i + }(); + var Nb = {}; + var ue, ve, Fa, Ga; + var Ob = /iPhone/i + , Ic = /iPod/i + , Jc = /iPad/i + , Kc = /\biOS-universal(?:.+)Mac\b/i + , Pb = /\bAndroid(?:.+)Mobile\b/i + , Lc = /Android/i + , Ra = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i + , ib = /Silk/i + , wa = /Windows Phone/i + , Mc = /\bWindows(?:.+)ARM\b/i + , Nc = /BlackBerry/i + , Oc = /BB10/i + , Pc = /Opera Mini/i + , Qc = /\b(CriOS|Chrome)(?:.+)Mobile/i + , Rc = /Mobile(?:.+)Firefox\b/i + , Sc = function($) { + return void 0 !== $ && "MacIntel" === $.platform && "number" == typeof $.maxTouchPoints && $.maxTouchPoints > 1 && "undefined" == typeof MSStream + }; + function we($) { + return function(a) { + return a.test($) + } + } + function xe($) { + var a = { + userAgent: "", + platform: "", + maxTouchPoints: 0 + }; + $ || "undefined" == typeof navigator ? "string" == typeof $ ? a.userAgent = $ : $ && $.userAgent && (a = { + userAgent: $.userAgent, + platform: $.platform, + maxTouchPoints: $.maxTouchPoints || 0 + }) : a = { + userAgent: navigator.userAgent, + platform: navigator.platform, + maxTouchPoints: navigator.maxTouchPoints || 0 + }; + var e = a.userAgent + , r = e.split("[FBAN"); + void 0 !== r[1] && (e = r[0]), + void 0 !== (r = e.split("Twitter"))[1] && (e = r[0]); + var o = we(e) + , v = { + apple: { + phone: o(Ob) && !o(wa), + ipod: o(Ic), + tablet: !o(Ob) && (o(Jc) || Sc(a)) && !o(wa), + universal: o(Kc), + device: (o(Ob) || o(Ic) || o(Jc) || o(Kc) || Sc(a)) && !o(wa) + }, + amazon: { + phone: o(Ra), + tablet: !o(Ra) && o(ib), + device: o(Ra) || o(ib) + }, + android: { + phone: !o(wa) && o(Ra) || !o(wa) && o(Pb), + tablet: !o(wa) && !o(Ra) && !o(Pb) && (o(ib) || o(Lc)), + device: !o(wa) && (o(Ra) || o(ib) || o(Pb) || o(Lc)) || o(/\bokhttp\b/i) + }, + windows: { + phone: o(wa), + tablet: o(Mc), + device: o(wa) || o(Mc) + }, + other: { + blackberry: o(Nc), + blackberry10: o(Oc), + opera: o(Pc), + firefox: o(Rc), + chrome: o(Qc), + device: o(Nc) || o(Oc) || o(Pc) || o(Rc) || o(Qc) + }, + any: !1, + phone: !1, + tablet: !1 + }; + return v.any = v.apple.device || v.android.device || v.windows.device || v.other.device, + v.phone = v.apple.phone || v.android.phone || v.windows.phone, + v.tablet = v.apple.tablet || v.android.tablet || v.windows.tablet, + v + } + var Ha = xe(self.navigator); + function ye(e) { + var i = !0; + if (Ha.tablet || Ha.phone) { + var r; + if (Ha.apple.device) + if (r = navigator.userAgent.match(/OS (\d+)_(\d+)?/)) + parseInt(r[1], 10) < 11 && (i = !1); + if (Ha.android.device) + if (r = navigator.userAgent.match(/Android\s([0-9.]*)/)) + parseInt(r[1], 10) < 7 && (i = !1) + } + return i ? e : 4 + } + function ze() { + return !Ha.apple.device + } + var aa = { + MIPMAP_TEXTURES: 1, + ANISOTROPIC_LEVEL: 0, + RESOLUTION: 1, + FILTER_RESOLUTION: 1, + SPRITE_MAX_TEXTURES: ye(32), + SPRITE_BATCH_SIZE: 4096, + RENDER_OPTIONS: { + view: null, + antialias: !1, + autoDensity: !1, + backgroundColor: 0, + backgroundAlpha: 1, + useContextAlpha: !0, + clearBeforeRender: !0, + preserveDrawingBuffer: !1, + width: 800, + height: 600, + legacy: !1 + }, + GC_MODE: 0, + GC_MAX_IDLE: 3600, + GC_MAX_CHECK_COUNT: 600, + WRAP_MODE: 33071, + SCALE_MODE: 1, + PRECISION_VERTEX: "highp", + PRECISION_FRAGMENT: Ha.apple.device ? "highp" : "mediump", + CAN_UPLOAD_SAME_BUFFER: ze(), + CREATE_IMAGE_BITMAP: !1, + ROUND_PIXELS: !1 + }; + var Ae, Be, Ce, De, Ee, Fe, Ge, He, Ie, Je, Ke, Le, Me, Ne, Oe, Pe, Qe, Aa, jb, Qb, K, Ba, kb, Sa, ua, Ca, Rb, $a, Ia, Ja, Tc, xa, qa, _a; + !function(E) { + E[E.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", + E[E.WEBGL = 1] = "WEBGL", + E[E.WEBGL2 = 2] = "WEBGL2" + }(Aa || (Fe = Aa = {}, + Fe)), + function(E) { + E[E.UNKNOWN = 0] = "UNKNOWN", + E[E.WEBGL = 1] = "WEBGL", + E[E.CANVAS = 2] = "CANVAS" + }(jb || (Me = jb = {}, + Me)), + function(E) { + E[E.COLOR = 16384] = "COLOR", + E[E.DEPTH = 256] = "DEPTH", + E[E.STENCIL = 1024] = "STENCIL" + }(Qb || (Ce = Qb = {}, + Ce)), + function(E) { + E[E.NORMAL = 0] = "NORMAL", + E[E.ADD = 1] = "ADD", + E[E.MULTIPLY = 2] = "MULTIPLY", + E[E.SCREEN = 3] = "SCREEN", + E[E.OVERLAY = 4] = "OVERLAY", + E[E.DARKEN = 5] = "DARKEN", + E[E.LIGHTEN = 6] = "LIGHTEN", + E[E.COLOR_DODGE = 7] = "COLOR_DODGE", + E[E.COLOR_BURN = 8] = "COLOR_BURN", + E[E.HARD_LIGHT = 9] = "HARD_LIGHT", + E[E.SOFT_LIGHT = 10] = "SOFT_LIGHT", + E[E.DIFFERENCE = 11] = "DIFFERENCE", + E[E.EXCLUSION = 12] = "EXCLUSION", + E[E.HUE = 13] = "HUE", + E[E.SATURATION = 14] = "SATURATION", + E[E.COLOR = 15] = "COLOR", + E[E.LUMINOSITY = 16] = "LUMINOSITY", + E[E.NORMAL_NPM = 17] = "NORMAL_NPM", + E[E.ADD_NPM = 18] = "ADD_NPM", + E[E.SCREEN_NPM = 19] = "SCREEN_NPM", + E[E.NONE = 20] = "NONE", + E[E.SRC_OVER = 0] = "SRC_OVER", + E[E.SRC_IN = 21] = "SRC_IN", + E[E.SRC_OUT = 22] = "SRC_OUT", + E[E.SRC_ATOP = 23] = "SRC_ATOP", + E[E.DST_OVER = 24] = "DST_OVER", + E[E.DST_IN = 25] = "DST_IN", + E[E.DST_OUT = 26] = "DST_OUT", + E[E.DST_ATOP = 27] = "DST_ATOP", + E[E.ERASE = 26] = "ERASE", + E[E.SUBTRACT = 28] = "SUBTRACT", + E[E.XOR = 29] = "XOR" + }(K || (Be = K = {}, + Be)), + function(E) { + E[E.POINTS = 0] = "POINTS", + E[E.LINES = 1] = "LINES", + E[E.LINE_LOOP = 2] = "LINE_LOOP", + E[E.LINE_STRIP = 3] = "LINE_STRIP", + E[E.TRIANGLES = 4] = "TRIANGLES", + E[E.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", + E[E.TRIANGLE_FAN = 6] = "TRIANGLE_FAN" + }(Ba || (Ee = Ba = {}, + Ee)), + function(E) { + E[E.RGBA = 6408] = "RGBA", + E[E.RGB = 6407] = "RGB", + E[E.ALPHA = 6406] = "ALPHA", + E[E.LUMINANCE = 6409] = "LUMINANCE", + E[E.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", + E[E.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", + E[E.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL" + }(kb || (Ge = kb = {}, + Ge)), + function(E) { + E[E.TEXTURE_2D = 3553] = "TEXTURE_2D", + E[E.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", + E[E.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", + E[E.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", + E[E.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", + E[E.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", + E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", + E[E.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", + E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z" + }(Sa || (Oe = Sa = {}, + Oe)), + function(E) { + E[E.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", + E[E.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", + E[E.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", + E[E.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", + E[E.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", + E[E.FLOAT = 5126] = "FLOAT", + E[E.HALF_FLOAT = 36193] = "HALF_FLOAT" + }(ua || (Pe = ua = {}, + Pe)), + function(E) { + E[E.NEAREST = 0] = "NEAREST", + E[E.LINEAR = 1] = "LINEAR" + }(Ca || (Ne = Ca = {}, + Ne)), + function(E) { + E[E.CLAMP = 33071] = "CLAMP", + E[E.REPEAT = 10497] = "REPEAT", + E[E.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT" + }(Rb || (Qe = Rb = {}, + Qe)), + function(E) { + E[E.OFF = 0] = "OFF", + E[E.POW2 = 1] = "POW2", + E[E.ON = 2] = "ON", + E[E.ON_MANUAL = 3] = "ON_MANUAL" + }($a || (Je = $a = {}, + Je)), + function(E) { + E[E.NPM = 0] = "NPM", + E[E.UNPACK = 1] = "UNPACK", + E[E.PMA = 2] = "PMA", + E[E.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", + E[E.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", + E[E.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA" + }(Ia || (Ae = Ia = {}, + Ae)), + function(E) { + E[E.NO = 0] = "NO", + E[E.YES = 1] = "YES", + E[E.AUTO = 2] = "AUTO", + E[E.BLEND = 0] = "BLEND", + E[E.CLEAR = 1] = "CLEAR", + E[E.BLIT = 2] = "BLIT" + }(Ja || (De = Ja = {}, + De)), + function(E) { + E[E.AUTO = 0] = "AUTO", + E[E.MANUAL = 1] = "MANUAL" + }(Tc || (He = Tc = {}, + He)), + function(E) { + E.LOW = "lowp", + E.MEDIUM = "mediump", + E.HIGH = "highp" + }(xa || (Le = xa = {}, + Le)), + function(E) { + E[E.NONE = 0] = "NONE", + E[E.SCISSOR = 1] = "SCISSOR", + E[E.STENCIL = 2] = "STENCIL", + E[E.SPRITE = 3] = "SPRITE" + }(qa || (Ie = qa = {}, + Ie)), + function(E) { + E[E.NONE = 0] = "NONE", + E[E.LOW = 2] = "LOW", + E[E.MEDIUM = 4] = "MEDIUM", + E[E.HIGH = 8] = "HIGH" + }(_a || (Ke = _a = {}, + Ke)); + var Re = {} + , Se = Object.prototype.hasOwnProperty + , na = "~"; + function ab() {} + function Te(e, t, r) { + this.fn = e, + this.context = t, + this.once = r || !1 + } + function Uc(e, t, r, n, $) { + if ("function" != typeof r) + throw new TypeError("The listener must be a function"); + var v = new Te(r,n || e,$) + , a = na ? na + t : t; + return e._events[a] ? e._events[a].fn ? e._events[a] = [e._events[a], v] : e._events[a].push(v) : (e._events[a] = v, + e._eventsCount++), + e + } + function lb(e, t) { + 0 == --e._eventsCount ? e._events = new ab : delete e._events[t] + } + function ja() { + this._events = new ab, + this._eventsCount = 0 + } + Object.create && (ab.prototype = Object.create(null), + new ab().__proto__ || (na = !1)), + ja.prototype.eventNames = function() { + var e, t, r = []; + if (0 === this._eventsCount) + return r; + for (t in e = this._events) + Se.call(e, t) && r.push(na ? t.slice(1) : t); + return Object.getOwnPropertySymbols ? r.concat(Object.getOwnPropertySymbols(e)) : r + } + , + ja.prototype.listeners = function(e) { + var t = na ? na + e : e + , r = this._events[t]; + if (!r) + return []; + if (r.fn) + return [r.fn]; + for (var n = 0, $ = r.length, v = new Array($); n < $; n++) + v[n] = r[n].fn; + return v + } + , + ja.prototype.listenerCount = function(e) { + var t = na ? na + e : e + , r = this._events[t]; + return r ? r.fn ? 1 : r.length : 0 + } + , + ja.prototype.emit = function(e, t, r, n, $, v) { + var a = na ? na + e : e; + if (!this._events[a]) + return !1; + var i, J, l = this._events[a], s = arguments.length; + if (l.fn) { + switch (l.once && this.removeListener(e, l.fn, void 0, !0), + s) { + case 1: + return l.fn.call(l.context), + !0; + case 2: + return l.fn.call(l.context, t), + !0; + case 3: + return l.fn.call(l.context, t, r), + !0; + case 4: + return l.fn.call(l.context, t, r, n), + !0; + case 5: + return l.fn.call(l.context, t, r, n, $), + !0; + case 6: + return l.fn.call(l.context, t, r, n, $, v), + !0; + } + for (J = 1, + i = new Array(s - 1); J < s; J++) + i[J - 1] = arguments[J]; + l.fn.apply(l.context, i) + } else { + var o, f = l.length; + for (J = 0; J < f; J++) + switch (l[J].once && this.removeListener(e, l[J].fn, void 0, !0), + s) { + case 1: + l[J].fn.call(l[J].context); + break; + case 2: + l[J].fn.call(l[J].context, t); + break; + case 3: + l[J].fn.call(l[J].context, t, r); + break; + case 4: + l[J].fn.call(l[J].context, t, r, n); + break; + default: + if (!i) + for (o = 1, + i = new Array(s - 1); o < s; o++) + i[o - 1] = arguments[o]; + l[J].fn.apply(l[J].context, i); + } + } + return !0 + } + , + ja.prototype.on = function(e, t, r) { + return Uc(this, e, t, r, !1) + } + , + ja.prototype.once = function(e, t, r) { + return Uc(this, e, t, r, !0) + } + , + ja.prototype.removeListener = function(e, t, r, n) { + var $ = na ? na + e : e; + if (!this._events[$]) + return this; + if (!t) + return lb(this, $), + this; + var v = this._events[$]; + if (v.fn) + v.fn !== t || n && !v.once || r && v.context !== r || lb(this, $); + else { + for (var a = 0, i = [], J = v.length; a < J; a++) + (v[a].fn !== t || n && !v[a].once || r && v[a].context !== r) && i.push(v[a]); + i.length ? this._events[$] = 1 === i.length ? i[0] : i : lb(this, $) + } + return this + } + , + ja.prototype.removeAllListeners = function(e) { + var t; + return e ? (t = na ? na + e : e, + this._events[t] && lb(this, t)) : (this._events = new ab, + this._eventsCount = 0), + this + } + , + ja.prototype.off = ja.prototype.removeListener, + ja.prototype.addListener = ja.prototype.on, + ja.prefixed = na, + ja.EventEmitter = ja, + Re = ja; + var Ue = {}; + function mb(v, r, e) { + e = e || 2; + var $, n, t, a, i, h, x, o = r && r.length, w = o ? r[0] * e : v.length, l = Vc(v, 0, w, e, !0), u = []; + if (!l || l.next === l.prev) + return u; + if (o && (l = Ze(v, r, l, e)), + v.length > 80 * e) { + $ = t = v[0], + n = a = v[1]; + for (var s = e; s < w; s += e) + (i = v[s]) < $ && ($ = i), + (h = v[s + 1]) < n && (n = h), + i > t && (t = i), + h > a && (a = h); + x = 0 !== (x = Math.max(t - $, a - n)) ? 1 / x : 0 + } + return bb(l, u, e, $, n, x), + u + } + function Vc(v, r, e, $, n) { + var t, a; + if (n === Ub(v, r, e, $) > 0) + for (t = r; t < e; t += $) + a = Yc(t, v[t], v[t + 1], a); + else + for (t = e - $; t >= r; t -= $) + a = Yc(t, v[t], v[t + 1], a); + return a && nb(a, a.next) && (db(a), + a = a.next), + a + } + function Da(v, r) { + if (!v) + return v; + r || (r = v); + var e, $ = v; + do { + if (e = !1, + $.steiner || !nb($, $.next) && 0 !== ca($.prev, $, $.next)) + $ = $.next; + else { + if (db($), + ($ = r = $.prev) === $.next) + break; + e = !0 + } + } while (e || $ !== r); + return r + } + function bb(v, r, e, $, n, t, a) { + if (v) { + !a && t && cf(v, $, n, t); + for (var i, h, x = v; v.prev !== v.next; ) + if (i = v.prev, + h = v.next, + t ? We(v, $, n, t) : Ve(v)) + r.push(i.i / e), + r.push(v.i / e), + r.push(h.i / e), + db(v), + v = h.next, + x = h.next; + else if ((v = h) === x) { + a ? 1 === a ? bb(v = Xe(Da(v), r, e), r, e, $, n, t, 2) : 2 === a && Ye(v, r, e, $, n, t) : bb(Da(v), r, e, $, n, t, 1); + break + } + } + } + function Ve(v) { + var r = v.prev + , e = v + , $ = v.next; + if (ca(r, e, $) >= 0) + return !1; + for (var n = v.next.next; n !== v.prev; ) { + if (Ta(r.x, r.y, e.x, e.y, $.x, $.y, n.x, n.y) && ca(n.prev, n, n.next) >= 0) + return !1; + n = n.next + } + return !0 + } + function We(v, r, e, $) { + var n = v.prev + , t = v + , a = v.next; + if (ca(n, t, a) >= 0) + return !1; + for (var i = n.x < t.x ? n.x < a.x ? n.x : a.x : t.x < a.x ? t.x : a.x, h = n.y < t.y ? n.y < a.y ? n.y : a.y : t.y < a.y ? t.y : a.y, x = n.x > t.x ? n.x > a.x ? n.x : a.x : t.x > a.x ? t.x : a.x, o = n.y > t.y ? n.y > a.y ? n.y : a.y : t.y > a.y ? t.y : a.y, w = Sb(i, h, r, e, $), l = Sb(x, o, r, e, $), u = v.prevZ, s = v.nextZ; u && u.z >= w && s && s.z <= l; ) { + if (u !== v.prev && u !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, u.x, u.y) && ca(u.prev, u, u.next) >= 0) + return !1; + if (u = u.prevZ, + s !== v.prev && s !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, s.x, s.y) && ca(s.prev, s, s.next) >= 0) + return !1; + s = s.nextZ + } + for (; u && u.z >= w; ) { + if (u !== v.prev && u !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, u.x, u.y) && ca(u.prev, u, u.next) >= 0) + return !1; + u = u.prevZ + } + for (; s && s.z <= l; ) { + if (s !== v.prev && s !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, s.x, s.y) && ca(s.prev, s, s.next) >= 0) + return !1; + s = s.nextZ + } + return !0 + } + function Xe(v, r, e) { + var $ = v; + do { + var n = $.prev + , t = $.next.next; + !nb(n, t) && Wc(n, $, $.next, t) && cb(n, t) && cb(t, n) && (r.push(n.i / e), + r.push($.i / e), + r.push(t.i / e), + db($), + db($.next), + $ = v = t), + $ = $.next + } while ($ !== v); + return Da($) + } + function Ye(v, r, e, $, n, t) { + var a = v; + do { + for (var i = a.next.next; i !== a.prev; ) { + if (a.i !== i.i && ff(a, i)) { + var h = Xc(a, i); + return a = Da(a, a.next), + h = Da(h, h.next), + bb(a, r, e, $, n, t), + void bb(h, r, e, $, n, t) + } + i = i.next + } + a = a.next + } while (a !== v) + } + function Ze(v, r, e, $) { + var n, t, a, i = []; + for (n = 0, + t = r.length; n < t; n++) + (a = Vc(v, r[n] * $, n < t - 1 ? r[n + 1] * $ : v.length, $, !1)) === a.next && (a.steiner = !0), + i.push(ef(a)); + for (i.sort($e), + n = 0; n < i.length; n++) + _e(i[n], e), + e = Da(e, e.next); + return e + } + function $e(v, r) { + return v.x - r.x + } + function _e(v, r) { + if (r = af(v, r)) { + var e = Xc(r, v); + Da(r, r.next), + Da(e, e.next) + } + } + function af(v, r) { + var e, $ = r, n = v.x, t = v.y, a = -1 / 0; + do { + if (t <= $.y && t >= $.next.y && $.next.y !== $.y) { + var i = $.x + (t - $.y) * ($.next.x - $.x) / ($.next.y - $.y); + if (i <= n && i > a) { + if (a = i, + i === n) { + if (t === $.y) + return $; + if (t === $.next.y) + return $.next + } + e = $.x < $.next.x ? $ : $.next + } + } + $ = $.next + } while ($ !== r); + if (!e) + return null; + if (n === a) + return e; + var h, x = e, o = e.x, w = e.y, l = 1 / 0; + $ = e; + do { + n >= $.x && $.x >= o && n !== $.x && Ta(t < w ? n : a, t, o, w, t < w ? a : n, t, $.x, $.y) && (h = Math.abs(t - $.y) / (n - $.x), + cb($, v) && (h < l || h === l && ($.x > e.x || $.x === e.x && bf(e, $))) && (e = $, + l = h)), + $ = $.next + } while ($ !== x); + return e + } + function bf(v, r) { + return ca(v.prev, v, r.prev) < 0 && ca(r.next, v, v.next) < 0 + } + function cf(v, r, e, $) { + var n = v; + do { + null === n.z && (n.z = Sb(n.x, n.y, r, e, $)), + n.prevZ = n.prev, + n.nextZ = n.next, + n = n.next + } while (n !== v); + n.prevZ.nextZ = null, + n.prevZ = null, + df(n) + } + function df(v) { + var r, e, $, n, t, a, i, h, x = 1; + do { + for (e = v, + v = null, + t = null, + a = 0; e; ) { + for (a++, + $ = e, + i = 0, + r = 0; r < x && (i++, + $ = $.nextZ); r++) + ; + for (h = x; i > 0 || h > 0 && $; ) + 0 !== i && (0 === h || !$ || e.z <= $.z) ? (n = e, + e = e.nextZ, + i--) : (n = $, + $ = $.nextZ, + h--), + t ? t.nextZ = n : v = n, + n.prevZ = t, + t = n; + e = $ + } + t.nextZ = null, + x *= 2 + } while (a > 1); + return v + } + function Sb(v, r, e, $, n) { + return (v = 1431655765 & ((v = 858993459 & ((v = 252645135 & ((v = 16711935 & ((v = 32767 * (v - e) * n) | v << 8)) | v << 4)) | v << 2)) | v << 1)) | (r = 1431655765 & ((r = 858993459 & ((r = 252645135 & ((r = 16711935 & ((r = 32767 * (r - $) * n) | r << 8)) | r << 4)) | r << 2)) | r << 1)) << 1 + } + function ef(v) { + var r = v + , e = v; + do { + (r.x < e.x || r.x === e.x && r.y < e.y) && (e = r), + r = r.next + } while (r !== v); + return e + } + function Ta(v, r, e, $, n, t, a, i) { + return (n - a) * (r - i) - (v - a) * (t - i) >= 0 && (v - a) * ($ - i) - (e - a) * (r - i) >= 0 && (e - a) * (t - i) - (n - a) * ($ - i) >= 0 + } + function ff(v, r) { + return v.next.i !== r.i && v.prev.i !== r.i && !gf(v, r) && (cb(v, r) && cb(r, v) && hf(v, r) && (ca(v.prev, v, r.prev) || ca(v, r.prev, r)) || nb(v, r) && ca(v.prev, v, v.next) > 0 && ca(r.prev, r, r.next) > 0) + } + function ca(v, r, e) { + return (r.y - v.y) * (e.x - r.x) - (r.x - v.x) * (e.y - r.y) + } + function nb(v, r) { + return v.x === r.x && v.y === r.y + } + function Wc(v, r, e, $) { + var n = pb(ca(v, r, e)) + , t = pb(ca(v, r, $)) + , a = pb(ca(e, $, v)) + , i = pb(ca(e, $, r)); + return n !== t && a !== i || !(0 !== n || !ob(v, e, r)) || !(0 !== t || !ob(v, $, r)) || !(0 !== a || !ob(e, v, $)) || !(0 !== i || !ob(e, r, $)) + } + function ob(v, r, e) { + return r.x <= Math.max(v.x, e.x) && r.x >= Math.min(v.x, e.x) && r.y <= Math.max(v.y, e.y) && r.y >= Math.min(v.y, e.y) + } + function pb(v) { + return v > 0 ? 1 : v < 0 ? -1 : 0 + } + function gf(v, r) { + var e = v; + do { + if (e.i !== v.i && e.next.i !== v.i && e.i !== r.i && e.next.i !== r.i && Wc(e, e.next, v, r)) + return !0; + e = e.next + } while (e !== v); + return !1 + } + function cb(v, r) { + return ca(v.prev, v, v.next) < 0 ? ca(v, r, v.next) >= 0 && ca(v, v.prev, r) >= 0 : ca(v, r, v.prev) < 0 || ca(v, v.next, r) < 0 + } + function hf(v, r) { + var e = v + , $ = !1 + , n = (v.x + r.x) / 2 + , t = (v.y + r.y) / 2; + do { + e.y > t != e.next.y > t && e.next.y !== e.y && n < (e.next.x - e.x) * (t - e.y) / (e.next.y - e.y) + e.x && ($ = !$), + e = e.next + } while (e !== v); + return $ + } + function Xc(v, r) { + var e = new Tb(v.i,v.x,v.y) + , $ = new Tb(r.i,r.x,r.y) + , n = v.next + , t = r.prev; + return v.next = r, + r.prev = v, + e.next = n, + n.prev = e, + $.next = e, + e.prev = $, + t.next = $, + $.prev = t, + $ + } + function Yc(v, r, e, $) { + var n = new Tb(v,r,e); + return $ ? (n.next = $.next, + n.prev = $, + $.next.prev = n, + $.next = n) : (n.prev = n, + n.next = n), + n + } + function db(v) { + v.next.prev = v.prev, + v.prev.next = v.next, + v.prevZ && (v.prevZ.nextZ = v.nextZ), + v.nextZ && (v.nextZ.prevZ = v.prevZ) + } + function Tb(v, r, e) { + this.i = v, + this.x = r, + this.y = e, + this.prev = null, + this.next = null, + this.z = null, + this.prevZ = null, + this.nextZ = null, + this.steiner = !1 + } + function Ub(v, r, e, $) { + for (var n = 0, t = r, a = e - $; t < e; t += $) + n += (v[a] - v[t]) * (v[t + 1] + v[a + 1]), + a = t; + return n + } + (Ue = mb).default = mb, + mb.deviation = function(v, r, e, $) { + var n = r && r.length + , t = n ? r[0] * e : v.length + , a = Math.abs(Ub(v, 0, t, e)); + if (n) + for (var i = 0, h = r.length; i < h; i++) { + var x = r[i] * e + , o = i < h - 1 ? r[i + 1] * e : v.length; + a -= Math.abs(Ub(v, x, o, e)) + } + var w = 0; + for (i = 0; i < $.length; i += 3) { + var l = $[i] * e + , u = $[i + 1] * e + , s = $[i + 2] * e; + w += Math.abs((v[l] - v[s]) * (v[u + 1] - v[l + 1]) - (v[l] - v[u]) * (v[s + 1] - v[l + 1])) + } + return 0 === a && 0 === w ? 0 : Math.abs((w - a) / a) + } + , + mb.flatten = function(v) { + for (var r = v[0][0].length, e = { + vertices: [], + holes: [], + dimensions: r + }, $ = 0, n = 0; n < v.length; n++) { + for (var t = 0; t < v[n].length; t++) + for (var a = 0; a < r; a++) + e.vertices.push(v[n][t][a]); + n > 0 && ($ += v[n - 1].length, + e.holes.push($)) + } + return e + } + ; + var jf = function() { + var o = this + , e = { + exports: this + }; + return function(n) { + var r = "object" == typeof o && o && !o.nodeType && o + , t = "object" == typeof e && e && !e.nodeType && e + , i = "object" == typeof Hc && Hc; + i.global !== i && i.window !== i && i.self !== i || (n = i); + var u, f, c = 2147483647, l = 36, s = 1, a = 26, p = 38, h = 700, d = 72, v = 128, g = "-", w = /^xn--/, x = /[^\x20-\x7E]/, b = /[\x2E\u3002\uFF0E\uFF61]/g, C = { + overflow: "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }, y = l - s, j = Math.floor, A = String.fromCharCode; + function $(o) { + throw new RangeError(C[o]) + } + function I(o, e) { + for (var n = o.length, r = []; n--; ) + r[n] = e(o[n]); + return r + } + function E(o, e) { + var n = o.split("@") + , r = ""; + return n.length > 1 && (r = n[0] + "@", + o = n[1]), + r + I((o = o.replace(b, ".")).split("."), e).join(".") + } + function F(o) { + for (var e, n, r = [], t = 0, i = o.length; t < i; ) + (e = o.charCodeAt(t++)) >= 55296 && e <= 56319 && t < i ? 56320 == (64512 & (n = o.charCodeAt(t++))) ? r.push(((1023 & e) << 10) + (1023 & n) + 65536) : (r.push(e), + t--) : r.push(e); + return r + } + function O(o) { + return I(o, function(o) { + var e = ""; + return o > 65535 && (e += A((o -= 65536) >>> 10 & 1023 | 55296), + o = 56320 | 1023 & o), + e += A(o) + }).join("") + } + function S(o, e) { + return o + 22 + 75 * (o < 26) - ((0 != e) << 5) + } + function T(o, e, n) { + var r = 0; + for (o = n ? j(o / h) : o >> 1, + o += j(o / e); o > y * a >> 1; r += l) + o = j(o / y); + return j(r + (y + 1) * o / (o + p)) + } + function m(o) { + var e, n, r, t, i, u, f, p, h, w, x, b = [], C = o.length, y = 0, A = v, I = d; + for ((n = o.lastIndexOf(g)) < 0 && (n = 0), + r = 0; r < n; ++r) + o.charCodeAt(r) >= 128 && $("not-basic"), + b.push(o.charCodeAt(r)); + for (t = n > 0 ? n + 1 : 0; t < C; ) { + for (i = y, + u = 1, + f = l; t >= C && $("invalid-input"), + ((p = (x = o.charCodeAt(t++)) - 48 < 10 ? x - 22 : x - 65 < 26 ? x - 65 : x - 97 < 26 ? x - 97 : l) >= l || p > j((c - y) / u)) && $("overflow"), + y += p * u, + !(p < (h = f <= I ? s : f >= I + a ? a : f - I)); f += l) + u > j(c / (w = l - h)) && $("overflow"), + u *= w; + I = T(y - i, e = b.length + 1, 0 == i), + j(y / e) > c - A && $("overflow"), + A += j(y / e), + y %= e, + b.splice(y++, 0, A) + } + return O(b) + } + function L(o) { + var e, n, r, t, i, u, f, p, h, w, x, b, C, y, I, E = []; + for (b = (o = F(o)).length, + e = v, + n = 0, + i = d, + u = 0; u < b; ++u) + (x = o[u]) < 128 && E.push(A(x)); + for (r = t = E.length, + t && E.push(g); r < b; ) { + for (f = c, + u = 0; u < b; ++u) + (x = o[u]) >= e && x < f && (f = x); + for (f - e > j((c - n) / (C = r + 1)) && $("overflow"), + n += (f - e) * C, + e = f, + u = 0; u < b; ++u) + if ((x = o[u]) < e && ++n > c && $("overflow"), + x == e) { + for (p = n, + h = l; !(p < (w = h <= i ? s : h >= i + a ? a : h - i)); h += l) + I = p - w, + y = l - w, + E.push(A(S(w + I % y, 0))), + p = j(I / y); + E.push(A(S(p, 0))), + i = T(n, C, r == t), + n = 0, + ++r + } + ++n, + ++e + } + return E.join("") + } + if (u = { + version: "1.4.1", + ucs2: { + decode: F, + encode: O + }, + decode: m, + encode: L, + toASCII: function(o) { + return E(o, function(o) { + return x.test(o) ? "xn--" + L(o) : o + }) + }, + toUnicode: function(o) { + return E(o, function(o) { + return w.test(o) ? m(o.slice(4).toLowerCase()) : o + }) + } + }, + r && t) { + if (e.exports == r) + t.exports = u; + else + for (f in u) + u.hasOwnProperty(f) && (r[f] = u[f]); + } else + n.punycode = u + }(this), + e.exports + } + .call({}); + var va = {}; + va = { + isString: function(n) { + return "string" == typeof n + }, + isObject: function(n) { + return "object" == typeof n && null !== n + }, + isNull: function(n) { + return null === n + }, + isNullOrUndefined: function(n) { + return null == n + } + }; + var kf, lf, mf = false; + function nf(r, e) { + return Object.prototype.hasOwnProperty.call(r, e) + } + function of() { + if (mf) + return; + mf = true; + kf = {}; + kf = function(r, e, t, a) { + e = e || "&", + t = t || "="; + var n = {}; + if ("string" != typeof r || 0 === r.length) + return n; + var o = /\+/g; + r = r.split(e); + var s = 1e3; + a && "number" == typeof a.maxKeys && (s = a.maxKeys); + var p = r.length; + s > 0 && p > s && (p = s); + for (var $ = 0; $ < p; ++$) { + var y, v, c, i, u = r[$].replace(o, "%20"), f = u.indexOf(t); + f >= 0 ? (y = u.substr(0, f), + v = u.substr(f + 1)) : (y = u, + v = ""), + c = decodeURIComponent(y), + i = decodeURIComponent(v), + nf(n, c) ? lf(n[c]) ? n[c].push(i) : n[c] = [n[c], i] : n[c] = i + } + return n + } + ; + lf = Array.isArray || function(r) { + return "[object Array]" === Object.prototype.toString.call(r) + } + } + var pf, eb, qf, rf, sf = false; + function Zc(r, e) { + if (r.map) + return r.map(e); + for (var t = [], n = 0; n < r.length; n++) + t.push(e(r[n], n)); + return t + } + function tf() { + if (sf) + return; + sf = true; + pf = {}; + eb = function(r) { + switch (typeof r) { + case "string": + return r; + case "boolean": + return r ? "true" : "false"; + case "number": + return isFinite(r) ? r : ""; + default: + return ""; + } + } + ; + pf = function(r, e, t, n) { + return e = e || "&", + t = t || "=", + null === r && (r = void 0), + "object" == typeof r ? Zc(rf(r), function(n) { + var i = encodeURIComponent(eb(n)) + t; + return qf(r[n]) ? Zc(r[n], function(r) { + return i + encodeURIComponent(eb(r)) + }).join(e) : i + encodeURIComponent(eb(r[n])) + }).join(e) : n ? encodeURIComponent(eb(n)) + t + encodeURIComponent(eb(r)) : "" + } + ; + qf = Array.isArray || function(r) { + return "[object Array]" === Object.prototype.toString.call(r) + } + ; + rf = Object.keys || function(r) { + var e = []; + for (var t in r) + Object.prototype.hasOwnProperty.call(r, t) && e.push(t); + return e + } + } + var $c, uf, c = ($c = (of(), + kf)); + var d = (uf = (tf(), + pf)); + var vf = qb; + var wf = Hf; + var xf = Gf; + function sa() { + this.protocol = null, + this.slashes = null, + this.auth = null, + this.host = null, + this.port = null, + this.hostname = null, + this.hash = null, + this.search = null, + this.query = null, + this.pathname = null, + this.path = null, + this.href = null + } + var yf = /^([a-z0-9.+-]+:)/i + , zf = /:[0-9]*$/ + , Af = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/ + , Bf = ["<", ">", "\"", "`", " ", "\r", "\n", "\t"] + , Cf = ["{", "}", "|", "\\", "^", "`"].concat(Bf) + , Vb = ["'"].concat(Cf) + , _c = ["%", "/", "?", ";", "#"].concat(Vb) + , ad = ["/", "?", "#"] + , Df = 255 + , bd = /^[+a-z0-9A-Z_-]{0,63}$/ + , Ef = /^([+a-z0-9A-Z_-]{0,63})(.*)$/ + , Ff = { + javascript: !0, + "javascript:": !0 + } + , Wb = { + javascript: !0, + "javascript:": !0 + } + , Ua = { + http: !0, + https: !0, + ftp: !0, + gopher: !0, + file: !0, + "http:": !0, + "https:": !0, + "ftp:": !0, + "gopher:": !0, + "file:": !0 + }; + function qb(t, h, r) { + if (t && va.isObject(t) && t instanceof sa) + return t; + var s = new sa; + return s.parse(t, h, r), + s + } + function Gf(t) { + return va.isString(t) && (t = qb(t)), + t instanceof sa ? t.format() : sa.prototype.format.call(t) + } + function Hf(t, h) { + return qb(t, !1, !0).resolve(h) + } + sa.prototype.parse = function(t, h, r) { + if (!va.isString(t)) + throw new TypeError("Parameter 'url' must be a string, not " + typeof t); + var s = t.indexOf("?") + , a = -1 !== s && s < t.indexOf("#") ? "?" : "#" + , e = t.split(a); + e[0] = e[0].replace(/\\/g, "/"); + var o = t = e.join(a); + if (o = o.trim(), + !r && 1 === t.split("#").length) { + var $ = Af.exec(o); + if ($) + return this.path = o, + this.href = o, + this.pathname = $[1], + $[2] ? (this.search = $[2], + this.query = h ? $c(this.search.substr(1)) : this.search.substr(1)) : h && (this.search = "", + this.query = {}), + this + } + var n = yf.exec(o); + if (n) { + var i = (n = n[0]).toLowerCase(); + this.protocol = i, + o = o.substr(n.length) + } + if (r || n || o.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var l = "//" === o.substr(0, 2); + !l || n && Wb[n] || (o = o.substr(2), + this.slashes = !0) + } + if (!Wb[n] && (l || n && !Ua[n])) { + for (var p, u, c = -1, v = 0; v < ad.length; v++) { + -1 !== (d = o.indexOf(ad[v])) && (-1 === c || d < c) && (c = d) + } + -1 !== (u = -1 === c ? o.lastIndexOf("@") : o.lastIndexOf("@", c)) && (p = o.slice(0, u), + o = o.slice(u + 1), + this.auth = decodeURIComponent(p)), + c = -1; + for (v = 0; v < _c.length; v++) { + var d; + -1 !== (d = o.indexOf(_c[v])) && (-1 === c || d < c) && (c = d) + } + -1 === c && (c = o.length), + this.host = o.slice(0, c), + o = o.slice(c), + this.parseHost(), + this.hostname = this.hostname || ""; + var f = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1]; + if (!f) + for (var m = this.hostname.split(/\./), F = (v = 0, + m.length); v < F; v++) { + var Z = m[v]; + if (Z && !Z.match(bd)) { + for (var g = "", y = 0, P = Z.length; y < P; y++) + Z.charCodeAt(y) > 127 ? g += "x" : g += Z[y]; + if (!g.match(bd)) { + var x = m.slice(0, v) + , b = m.slice(v + 1) + , q = Z.match(Ef); + q && (x.push(q[1]), + b.unshift(q[2])), + b.length && (o = "/" + b.join(".") + o), + this.hostname = x.join("."); + break + } + } + } + this.hostname.length > Df ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), + f || (this.hostname = jf.toASCII(this.hostname)); + var O = this.port ? ":" + this.port : "" + , j = this.hostname || ""; + this.host = j + O, + this.href += this.host, + f && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), + "/" !== o[0] && (o = "/" + o)) + } + if (!Ff[i]) + for (v = 0, + F = Vb.length; v < F; v++) { + var U = Vb[v]; + if (-1 !== o.indexOf(U)) { + var C = encodeURIComponent(U); + C === U && (C = escape(U)), + o = o.split(U).join(C) + } + } + var A = o.indexOf("#"); + -1 !== A && (this.hash = o.substr(A), + o = o.slice(0, A)); + var w = o.indexOf("?"); + if (-1 !== w ? (this.search = o.substr(w), + this.query = o.substr(w + 1), + h && (this.query = $c(this.query)), + o = o.slice(0, w)) : h && (this.search = "", + this.query = {}), + o && (this.pathname = o), + Ua[i] && this.hostname && !this.pathname && (this.pathname = "/"), + this.pathname || this.search) { + O = this.pathname || ""; + var E = this.search || ""; + this.path = O + E + } + return this.href = this.format(), + this + } + , + sa.prototype.format = function() { + var t = this.auth || ""; + t && (t = (t = encodeURIComponent(t)).replace(/%3A/i, ":"), + t += "@"); + var h = this.protocol || "" + , r = this.pathname || "" + , s = this.hash || "" + , a = !1 + , e = ""; + this.host ? a = t + this.host : this.hostname && (a = t + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), + this.port && (a += ":" + this.port)), + this.query && va.isObject(this.query) && Object.keys(this.query).length && (e = uf(this.query)); + var o = this.search || e && "?" + e || ""; + return h && ":" !== h.substr(-1) && (h += ":"), + this.slashes || (!h || Ua[h]) && !1 !== a ? (a = "//" + (a || ""), + r && "/" !== r.charAt(0) && (r = "/" + r)) : a || (a = ""), + s && "#" !== s.charAt(0) && (s = "#" + s), + o && "?" !== o.charAt(0) && (o = "?" + o), + h + a + (r = r.replace(/[?#]/g, function(t) { + return encodeURIComponent(t) + })) + (o = o.replace("#", "%23")) + s + } + , + sa.prototype.resolve = function(t) { + return this.resolveObject(qb(t, !1, !0)).format() + } + , + sa.prototype.resolveObject = function(t) { + if (va.isString(t)) { + var h = new sa; + h.parse(t, !1, !0), + t = h + } + for (var r = new sa, s = Object.keys(this), a = 0; a < s.length; a++) { + var e = s[a]; + r[e] = this[e] + } + if (r.hash = t.hash, + "" === t.href) + return r.href = r.format(), + r; + if (t.slashes && !t.protocol) { + for (var o = Object.keys(t), $ = 0; $ < o.length; $++) { + var n = o[$]; + "protocol" !== n && (r[n] = t[n]) + } + return Ua[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = "/"), + r.href = r.format(), + r + } + if (t.protocol && t.protocol !== r.protocol) { + if (!Ua[t.protocol]) { + for (var i = Object.keys(t), l = 0; l < i.length; l++) { + var p = i[l]; + r[p] = t[p] + } + return r.href = r.format(), + r + } + if (r.protocol = t.protocol, + t.host || Wb[t.protocol]) + r.pathname = t.pathname; + else { + for (var u = (t.pathname || "").split("/"); u.length && !(t.host = u.shift()); ) + ; + t.host || (t.host = ""), + t.hostname || (t.hostname = ""), + "" !== u[0] && u.unshift(""), + u.length < 2 && u.unshift(""), + r.pathname = u.join("/") + } + if (r.search = t.search, + r.query = t.query, + r.host = t.host || "", + r.auth = t.auth, + r.hostname = t.hostname || t.host, + r.port = t.port, + r.pathname || r.search) { + var c = r.pathname || "" + , v = r.search || ""; + r.path = c + v + } + return r.slashes = r.slashes || t.slashes, + r.href = r.format(), + r + } + var d = r.pathname && "/" === r.pathname.charAt(0) + , f = t.host || t.pathname && "/" === t.pathname.charAt(0) + , m = f || d || r.host && t.pathname + , F = m + , Z = r.pathname && r.pathname.split("/") || [] + , g = (u = t.pathname && t.pathname.split("/") || [], + r.protocol && !Ua[r.protocol]); + if (g && (r.hostname = "", + r.port = null, + r.host && ("" === Z[0] ? Z[0] = r.host : Z.unshift(r.host)), + r.host = "", + t.protocol && (t.hostname = null, + t.port = null, + t.host && ("" === u[0] ? u[0] = t.host : u.unshift(t.host)), + t.host = null), + m = m && ("" === u[0] || "" === Z[0])), + f) + r.host = t.host || "" === t.host ? t.host : r.host, + r.hostname = t.hostname || "" === t.hostname ? t.hostname : r.hostname, + r.search = t.search, + r.query = t.query, + Z = u; + else if (u.length) + Z || (Z = []), + Z.pop(), + Z = Z.concat(u), + r.search = t.search, + r.query = t.query; + else if (!va.isNullOrUndefined(t.search)) { + if (g) + r.hostname = r.host = Z.shift(), + (q = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = q.shift(), + r.host = r.hostname = q.shift()); + return r.search = t.search, + r.query = t.query, + va.isNull(r.pathname) && va.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), + r.href = r.format(), + r + } + if (!Z.length) + return r.pathname = null, + r.search ? r.path = "/" + r.search : r.path = null, + r.href = r.format(), + r; + for (var y = Z.slice(-1)[0], P = (r.host || t.host || Z.length > 1) && ("." === y || ".." === y) || "" === y, x = 0, b = Z.length; b >= 0; b--) + "." === (y = Z[b]) ? Z.splice(b, 1) : ".." === y ? (Z.splice(b, 1), + x++) : x && (Z.splice(b, 1), + x--); + if (!m && !F) + for (; x--; x) + Z.unshift(".."); + !m || "" === Z[0] || Z[0] && "/" === Z[0].charAt(0) || Z.unshift(""), + P && "/" !== Z.join("/").substr(-1) && Z.push(""); + var q, O = "" === Z[0] || Z[0] && "/" === Z[0].charAt(0); + g && (r.hostname = r.host = O ? "" : Z.length ? Z.shift() : "", + (q = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = q.shift(), + r.host = r.hostname = q.shift())); + return (m = m || r.host && Z.length) && !O && Z.unshift(""), + Z.length ? r.pathname = Z.join("/") : (r.pathname = null, + r.path = null), + va.isNull(r.pathname) && va.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), + r.auth = t.auth || r.auth, + r.slashes = r.slashes || t.slashes, + r.href = r.format(), + r + } + , + sa.prototype.parseHost = function() { + var t = this.host + , h = zf.exec(t); + h && (":" !== (h = h[0]) && (this.port = h.substr(1)), + t = t.substr(0, t.length - h.length)), + t && (this.hostname = t) + } + ; + var rb = Kb(Re); + var cd = Kb(Ue); + var If = { + parse: vf, + format: xf, + resolve: wf + }; + aa.RETINA_PREFIX = /@([0-9\.]+)x/, + aa.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1; + var dd, Jf = !1, ed = "6.0.1"; + function Kf($) { + var e; + if (!Jf) { + if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) { + var r = ["\n %c %c %c PixiJS " + ed + " - \u2730 " + $ + " \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n", "background: #ff66a5; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff66a5; background: #030307; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "background: #ffc3dc; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;"]; + (e = self.console).log.apply(e, r) + } else + self.console && self.console.log("PixiJS " + ed + " - " + $ + " - http://www.pixijs.com/"); + Jf = !0 + } + } + function Lf() { + return void 0 === dd && (dd = function() { + var $ = { + stencil: !0, + failIfMajorPerformanceCaveat: aa.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT + }; + try { + if (!self.WebGLRenderingContext) + return !1; + var e = document.createElement("canvas") + , r = e.getContext("webgl", $) || e.getContext("experimental-webgl", $) + , a = !(!r || !r.getContextAttributes().stencil); + if (r) { + var v = r.getExtension("WEBGL_lose_context"); + v && v.loseContext() + } + return r = null, + a + } catch (g) { + return !1 + } + }()), + dd + } + function Xb($, e) { + return void 0 === e && (e = []), + e[0] = ($ >> 16 & 255) / 255, + e[1] = ($ >> 8 & 255) / 255, + e[2] = (255 & $) / 255, + e + } + function Mf($) { + var e = $.toString(16); + return "#" + (e = "000000".substr(0, 6 - e.length) + e) + } + function Nf() { + for (var $ = [], e = [], r = 0; r < 32; r++) + $[r] = r, + e[r] = r; + $[K.NORMAL_NPM] = K.NORMAL, + $[K.ADD_NPM] = K.ADD, + $[K.SCREEN_NPM] = K.SCREEN, + e[K.NORMAL] = K.NORMAL_NPM, + e[K.ADD] = K.ADD_NPM, + e[K.SCREEN] = K.SCREEN_NPM; + var a = []; + return a.push(e), + a.push($), + a + } + var Of = Nf(); + function fd($, e) { + if (1 === e) + return (255 * e << 24) + $; + if (0 === e) + return 0; + var r = $ >> 16 & 255 + , a = $ >> 8 & 255 + , v = 255 & $; + return (255 * e << 24) + ((r = r * e + .5 | 0) << 16) + ((a = a * e + .5 | 0) << 8) + (v = v * e + .5 | 0) + } + var e = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array + }; + function sb($) { + return $ += 0 === $ ? 1 : 0, + --$, + $ |= $ >>> 1, + $ |= $ >>> 2, + $ |= $ >>> 4, + $ |= $ >>> 8, + ($ |= $ >>> 16) + 1 + } + function gd($) { + return !($ & $ - 1 || !$) + } + function hd($) { + var e = ($ > 65535 ? 1 : 0) << 4 + , r = (($ >>>= e) > 255 ? 1 : 0) << 3; + return e |= r, + e |= r = (($ >>>= r) > 15 ? 1 : 0) << 2, + (e |= r = (($ >>>= r) > 3 ? 1 : 0) << 1) | ($ >>>= r) >> 1 + } + function tb($, e, r) { + var a, v = $.length; + if (!(e >= v || 0 === r)) { + var g = v - (r = e + r > v ? v - e : r); + for (a = e; a < g; ++a) + $[a] = $[a + r]; + $.length = g + } + } + var Pf = 0; + function ub() { + return ++Pf + } + var id = {}; + function Va($, e, r) { + if (void 0 === r && (r = 3), + !id[e]) { + var a = new Error().stack; + void 0 === a ? console.warn("PixiJS Deprecation Warning: ", e + "\nDeprecated since v" + $) : (a = a.split("\n").splice(r).join("\n"), + console.groupCollapsed ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", e + "\nDeprecated since v" + $), + console.warn(a), + console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", e + "\nDeprecated since v" + $), + console.warn(a))), + id[e] = !0 + } + } + var jd = {} + , ya = Object.create(null) + , Ka = Object.create(null); + var f = function() { + function $($, e, r) { + this.canvas = document.createElement("canvas"), + this.context = this.canvas.getContext("2d"), + this.resolution = r || aa.RESOLUTION, + this.resize($, e) + } + return $.prototype.clear = function() { + this.context.setTransform(1, 0, 0, 1, 0, 0), + this.context.clearRect(0, 0, this.canvas.width, this.canvas.height) + } + , + $.prototype.resize = function($, e) { + this.canvas.width = $ * this.resolution, + this.canvas.height = e * this.resolution + } + , + $.prototype.destroy = function() { + this.context = null, + this.canvas = null + } + , + Object.defineProperty($.prototype, "width", { + get: function() { + return this.canvas.width + }, + set: function($) { + this.canvas.width = $ + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty($.prototype, "height", { + get: function() { + return this.canvas.height + }, + set: function($) { + this.canvas.height = $ + }, + enumerable: !1, + configurable: !0 + }), + $ + }(); + var Yb; + function Qf($, e) { + if (void 0 === e && (e = self.location), + 0 === $.indexOf("data:")) + return ""; + e = e || self.location, + Yb || (Yb = document.createElement("a")), + Yb.href = $; + var r = If.parse(Yb.href) + , a = !r.port && "" === e.port || r.port === e.port; + return r.hostname === e.hostname && a && r.protocol === e.protocol ? "" : "anonymous" + } + function kd($, e) { + var r = aa.RETINA_PREFIX.exec($); + return r ? parseFloat(r[1]) : void 0 !== e ? e : 1 + } + var ka = function() { + function t(t) { + this.items = [], + this._name = t, + this._aliasCount = 0 + } + return t.prototype.emit = function(t, e, n, i, r, s, o, u) { + if (arguments.length > 8) + throw new Error("max arguments reached"); + var h = this.name + , p = this.items; + this._aliasCount++; + for (var a = 0, m = p.length; a < m; a++) + p[a][h](t, e, n, i, r, s, o, u); + return p === this.items && this._aliasCount--, + this + } + , + t.prototype.ensureNonAliasedItems = function() { + this._aliasCount > 0 && this.items.length > 1 && (this._aliasCount = 0, + this.items = this.items.slice(0)) + } + , + t.prototype.add = function(t) { + return t[this._name] && (this.ensureNonAliasedItems(), + this.remove(t), + this.items.push(t)), + this + } + , + t.prototype.remove = function(t) { + var e = this.items.indexOf(t); + return -1 !== e && (this.ensureNonAliasedItems(), + this.items.splice(e, 1)), + this + } + , + t.prototype.contains = function(t) { + return -1 !== this.items.indexOf(t) + } + , + t.prototype.removeAll = function() { + return this.ensureNonAliasedItems(), + this.items.length = 0, + this + } + , + t.prototype.destroy = function() { + this.removeAll(), + this.items = null, + this._name = null + } + , + Object.defineProperty(t.prototype, "empty", { + get: function() { + return 0 === this.items.length + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "name", { + get: function() { + return this._name + }, + enumerable: !1, + configurable: !0 + }), + t + }(); + Object.defineProperties(ka.prototype, { + dispatch: { + value: ka.prototype.emit + }, + run: { + value: ka.prototype.emit + } + }); + var Rf, vb; + aa.TARGET_FPMS = .06, + function(t) { + t[t.INTERACTION = 50] = "INTERACTION", + t[t.HIGH = 25] = "HIGH", + t[t.NORMAL = 0] = "NORMAL", + t[t.LOW = -25] = "LOW", + t[t.UTILITY = -50] = "UTILITY" + }(vb || (Rf = vb = {}, + Rf)); + var Zb = function() { + function t(t, e, i, s) { + void 0 === e && (e = null), + void 0 === i && (i = 0), + void 0 === s && (s = !1), + this.next = null, + this.previous = null, + this._destroyed = !1, + this.fn = t, + this.context = e, + this.priority = i, + this.once = s + } + return t.prototype.match = function(t, e) { + return void 0 === e && (e = null), + this.fn === t && this.context === e + } + , + t.prototype.emit = function(t) { + this.fn && (this.context ? this.fn.call(this.context, t) : this.fn(t)); + var e = this.next; + return this.once && this.destroy(!0), + this._destroyed && (this.next = null), + e + } + , + t.prototype.connect = function(t) { + this.previous = t, + t.next && (t.next.previous = this), + this.next = t.next, + t.next = this + } + , + t.prototype.destroy = function(t) { + void 0 === t && (t = !1), + this._destroyed = !0, + this.fn = null, + this.context = null, + this.previous && (this.previous.next = this.next), + this.next && (this.next.previous = this.previous); + var e = this.next; + return this.next = t ? null : e, + this.previous = null, + e + } + , + t + }() + , Ea = function() { + function t() { + var t = this; + this.autoStart = !1, + this.deltaTime = 1, + this.lastTime = -1, + this.speed = 1, + this.started = !1, + this._requestId = null, + this._maxElapsedMS = 100, + this._minElapsedMS = 0, + this._protected = !1, + this._lastFrame = -1, + this._head = new Zb(null,null,1 / 0), + this.deltaMS = 1 / aa.TARGET_FPMS, + this.elapsedMS = 1 / aa.TARGET_FPMS, + this._tick = function(e) { + t._requestId = null, + t.started && (t.update(e), + t.started && null === t._requestId && t._head.next && (t._requestId = requestAnimationFrame(t._tick))) + } + } + return t.prototype._requestIfNeeded = function() { + null === this._requestId && this._head.next && (this.lastTime = performance.now(), + this._lastFrame = this.lastTime, + this._requestId = requestAnimationFrame(this._tick)) + } + , + t.prototype._cancelIfNeeded = function() { + null !== this._requestId && (cancelAnimationFrame(this._requestId), + this._requestId = null) + } + , + t.prototype._startIfPossible = function() { + this.started ? this._requestIfNeeded() : this.autoStart && this.start() + } + , + t.prototype.add = function(t, e, i) { + return void 0 === i && (i = vb.NORMAL), + this._addListener(new Zb(t,e,i)) + } + , + t.prototype.addOnce = function(t, e, i) { + return void 0 === i && (i = vb.NORMAL), + this._addListener(new Zb(t,e,i,!0)) + } + , + t.prototype._addListener = function(t) { + var e = this._head.next + , i = this._head; + if (e) { + for (; e; ) { + if (t.priority > e.priority) { + t.connect(i); + break + } + i = e, + e = e.next + } + t.previous || t.connect(i) + } else + t.connect(i); + return this._startIfPossible(), + this + } + , + t.prototype.remove = function(t, e) { + for (var i = this._head.next; i; ) + i = i.match(t, e) ? i.destroy() : i.next; + return this._head.next || this._cancelIfNeeded(), + this + } + , + Object.defineProperty(t.prototype, "count", { + get: function() { + if (!this._head) + return 0; + for (var t = 0, e = this._head; e = e.next; ) + t++; + return t + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.start = function() { + this.started || (this.started = !0, + this._requestIfNeeded()) + } + , + t.prototype.stop = function() { + this.started && (this.started = !1, + this._cancelIfNeeded()) + } + , + t.prototype.destroy = function() { + if (!this._protected) { + this.stop(); + for (var t = this._head.next; t; ) + t = t.destroy(!0); + this._head.destroy(), + this._head = null + } + } + , + t.prototype.update = function(t) { + var e; + if (void 0 === t && (t = performance.now()), + t > this.lastTime) { + if ((e = this.elapsedMS = t - this.lastTime) > this._maxElapsedMS && (e = this._maxElapsedMS), + e *= this.speed, + this._minElapsedMS) { + var i = t - this._lastFrame | 0; + if (i < this._minElapsedMS) + return; + this._lastFrame = t - i % this._minElapsedMS + } + this.deltaMS = e, + this.deltaTime = this.deltaMS * aa.TARGET_FPMS; + for (var s = this._head, r = s.next; r; ) + r = r.emit(this.deltaTime); + s.next || this._cancelIfNeeded() + } else + this.deltaTime = this.deltaMS = this.elapsedMS = 0; + this.lastTime = t + } + , + Object.defineProperty(t.prototype, "FPS", { + get: function() { + return 1e3 / this.elapsedMS + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "minFPS", { + get: function() { + return 1e3 / this._maxElapsedMS + }, + set: function(t) { + var e = Math.min(this.maxFPS, t) + , i = Math.min(Math.max(0, e) / 1e3, aa.TARGET_FPMS); + this._maxElapsedMS = 1 / i + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "maxFPS", { + get: function() { + return this._minElapsedMS ? Math.round(1e3 / this._minElapsedMS) : 0 + }, + set: function(t) { + if (0 === t) + this._minElapsedMS = 0; + else { + var e = Math.max(this.minFPS, t); + this._minElapsedMS = 1 / (e / 1e3) + } + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "shared", { + get: function() { + if (!t._shared) { + var e = t._shared = new t; + e.autoStart = !0, + e._protected = !0 + } + return t._shared + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "system", { + get: function() { + if (!t._system) { + var e = t._system = new t; + e.autoStart = !0, + e._protected = !0 + } + return t._system + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , g = function() { + function t() {} + return t.init = function(t) { + var e = this; + t = Object.assign({ + autoStart: !0, + sharedTicker: !1 + }, t), + Object.defineProperty(this, "ticker", { + set: function(t) { + this._ticker && this._ticker.remove(this.render, this), + this._ticker = t, + t && t.add(this.render, this, vb.LOW) + }, + get: function() { + return this._ticker + } + }), + this.stop = function() { + e._ticker.stop() + } + , + this.start = function() { + e._ticker.start() + } + , + this._ticker = null, + this.ticker = t.sharedTicker ? Ea.shared : new Ea, + t.autoStart && this.start() + } + , + t.destroy = function() { + if (this._ticker) { + var t = this._ticker; + this.ticker = null, + t.destroy() + } + } + , + t + }(); + var Sf, fa, wb = 2 * Math.PI, Tf = 180 / Math.PI, Uf = Math.PI / 180; + !function(t) { + t[t.POLY = 0] = "POLY", + t[t.RECT = 1] = "RECT", + t[t.CIRC = 2] = "CIRC", + t[t.ELIP = 3] = "ELIP", + t[t.RREC = 4] = "RREC" + }(fa || (Sf = fa = {}, + Sf)); + var da = function() { + function t(t, i, s, o) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + this.x = Number(t), + this.y = Number(i), + this.width = Number(s), + this.height = Number(o), + this.type = fa.RECT + } + return Object.defineProperty(t.prototype, "left", { + get: function() { + return this.x + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "right", { + get: function() { + return this.x + this.width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "top", { + get: function() { + return this.y + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "bottom", { + get: function() { + return this.y + this.height + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "EMPTY", { + get: function() { + return new t(0,0,0,0) + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.clone = function() { + return new t(this.x,this.y,this.width,this.height) + } + , + t.prototype.copyFrom = function(t) { + return this.x = t.x, + this.y = t.y, + this.width = t.width, + this.height = t.height, + this + } + , + t.prototype.copyTo = function(t) { + return t.x = this.x, + t.y = this.y, + t.width = this.width, + t.height = this.height, + t + } + , + t.prototype.contains = function(t, i) { + return !(this.width <= 0 || this.height <= 0) && t >= this.x && t < this.x + this.width && i >= this.y && i < this.y + this.height + } + , + t.prototype.pad = function(t, i) { + return void 0 === t && (t = 0), + void 0 === i && (i = t), + this.x -= t, + this.y -= i, + this.width += 2 * t, + this.height += 2 * i, + this + } + , + t.prototype.fit = function(t) { + var i = Math.max(this.x, t.x) + , s = Math.min(this.x + this.width, t.x + t.width) + , o = Math.max(this.y, t.y) + , h = Math.min(this.y + this.height, t.y + t.height); + return this.x = i, + this.width = Math.max(s - i, 0), + this.y = o, + this.height = Math.max(h - o, 0), + this + } + , + t.prototype.ceil = function(t, i) { + void 0 === t && (t = 1), + void 0 === i && (i = .001); + var s = Math.ceil((this.x + this.width - i) * t) / t + , o = Math.ceil((this.y + this.height - i) * t) / t; + return this.x = Math.floor((this.x + i) * t) / t, + this.y = Math.floor((this.y + i) * t) / t, + this.width = s - this.x, + this.height = o - this.y, + this + } + , + t.prototype.enlarge = function(t) { + var i = Math.min(this.x, t.x) + , s = Math.max(this.x + this.width, t.x + t.width) + , o = Math.min(this.y, t.y) + , h = Math.max(this.y + this.height, t.y + t.height); + return this.x = i, + this.width = s - i, + this.y = o, + this.height = h - o, + this + } + , + t.prototype.toString = function() { + return "[@pixi/math:Rectangle x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]" + } + , + t + }() + , Vf = function() { + function t(t, i, s) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + this.x = t, + this.y = i, + this.radius = s, + this.type = fa.CIRC + } + return t.prototype.clone = function() { + return new t(this.x,this.y,this.radius) + } + , + t.prototype.contains = function(t, i) { + if (this.radius <= 0) + return !1; + var s = this.radius * this.radius + , o = this.x - t + , h = this.y - i; + return (o *= o) + (h *= h) <= s + } + , + t.prototype.getBounds = function() { + return new da(this.x - this.radius,this.y - this.radius,2 * this.radius,2 * this.radius) + } + , + t.prototype.toString = function() { + return "[@pixi/math:Circle x=" + this.x + " y=" + this.y + " radius=" + this.radius + "]" + } + , + t + }() + , Wf = function() { + function t(t, i, s, o) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + this.x = t, + this.y = i, + this.width = s, + this.height = o, + this.type = fa.ELIP + } + return t.prototype.clone = function() { + return new t(this.x,this.y,this.width,this.height) + } + , + t.prototype.contains = function(t, i) { + if (this.width <= 0 || this.height <= 0) + return !1; + var s = (t - this.x) / this.width + , o = (i - this.y) / this.height; + return (s *= s) + (o *= o) <= 1 + } + , + t.prototype.getBounds = function() { + return new da(this.x - this.width,this.y - this.height,this.width,this.height) + } + , + t.prototype.toString = function() { + return "[@pixi/math:Ellipse x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]" + } + , + t + }() + , $b = function() { + function t() { + for (var t = arguments, i = [], s = 0; s < arguments.length; s++) + i[s] = t[s]; + var o = Array.isArray(i[0]) ? i[0] : i; + if ("number" != typeof o[0]) { + for (var h = [], r = 0, e = o.length; r < e; r++) + h.push(o[r].x, o[r].y); + o = h + } + this.points = o, + this.type = fa.POLY, + this.closeStroke = !0 + } + return t.prototype.clone = function() { + var i = new t(this.points.slice()); + return i.closeStroke = this.closeStroke, + i + } + , + t.prototype.contains = function(t, i) { + for (var s = !1, o = this.points.length / 2, h = 0, r = o - 1; h < o; r = h++) { + var e = this.points[2 * h] + , n = this.points[2 * h + 1] + , a = this.points[2 * r] + , $ = this.points[2 * r + 1]; + n > i != $ > i && t < (i - n) / ($ - n) * (a - e) + e && (s = !s) + } + return s + } + , + t.prototype.toString = function() { + return "[@pixi/math:PolygoncloseStroke=" + this.closeStroke + "points=" + this.points.reduce(function(t, i) { + return t + ", " + i + }, "") + "]" + } + , + t + }() + , Xf = function() { + function t(t, i, s, o, h) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + void 0 === h && (h = 20), + this.x = t, + this.y = i, + this.width = s, + this.height = o, + this.radius = h, + this.type = fa.RREC + } + return t.prototype.clone = function() { + return new t(this.x,this.y,this.width,this.height,this.radius) + } + , + t.prototype.contains = function(t, i) { + if (this.width <= 0 || this.height <= 0) + return !1; + if (t >= this.x && t <= this.x + this.width && i >= this.y && i <= this.y + this.height) { + if (i >= this.y + this.radius && i <= this.y + this.height - this.radius || t >= this.x + this.radius && t <= this.x + this.width - this.radius) + return !0; + var s = t - (this.x + this.radius) + , o = i - (this.y + this.radius) + , h = this.radius * this.radius; + if (s * s + o * o <= h) + return !0; + if ((s = t - (this.x + this.width - this.radius)) * s + o * o <= h) + return !0; + if (s * s + (o = i - (this.y + this.height - this.radius)) * o <= h) + return !0; + if ((s = t - (this.x + this.radius)) * s + o * o <= h) + return !0 + } + return !1 + } + , + t.prototype.toString = function() { + return "[@pixi/math:RoundedRectangle x=" + this.x + " y=" + this.y + "width=" + this.width + " height=" + this.height + " radius=" + this.radius + "]" + } + , + t + }() + , ra = function() { + function t(t, i) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + this.x = t, + this.y = i + } + return t.prototype.clone = function() { + return new t(this.x,this.y) + } + , + t.prototype.copyFrom = function(t) { + return this.set(t.x, t.y), + this + } + , + t.prototype.copyTo = function(t) { + return t.set(this.x, this.y), + t + } + , + t.prototype.equals = function(t) { + return t.x === this.x && t.y === this.y + } + , + t.prototype.set = function(t, i) { + return void 0 === t && (t = 0), + void 0 === i && (i = t), + this.x = t, + this.y = i, + this + } + , + t.prototype.toString = function() { + return "[@pixi/math:Point x=" + this.x + " y=" + this.y + "]" + } + , + t + }() + , xb = function() { + function t(t, i, s, o) { + void 0 === s && (s = 0), + void 0 === o && (o = 0), + this._x = s, + this._y = o, + this.cb = t, + this.scope = i + } + return t.prototype.clone = function(i, s) { + return void 0 === i && (i = this.cb), + void 0 === s && (s = this.scope), + new t(i,s,this._x,this._y) + } + , + t.prototype.set = function(t, i) { + return void 0 === t && (t = 0), + void 0 === i && (i = t), + this._x === t && this._y === i || (this._x = t, + this._y = i, + this.cb.call(this.scope)), + this + } + , + t.prototype.copyFrom = function(t) { + return this._x === t.x && this._y === t.y || (this._x = t.x, + this._y = t.y, + this.cb.call(this.scope)), + this + } + , + t.prototype.copyTo = function(t) { + return t.set(this._x, this._y), + t + } + , + t.prototype.equals = function(t) { + return t.x === this._x && t.y === this._y + } + , + t.prototype.toString = function() { + return "[@pixi/math:ObservablePoint x=0 y=0 scope=" + this.scope + "]" + } + , + Object.defineProperty(t.prototype, "x", { + get: function() { + return this._x + }, + set: function(t) { + this._x !== t && (this._x = t, + this.cb.call(this.scope)) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "y", { + get: function() { + return this._y + }, + set: function(t) { + this._y !== t && (this._y = t, + this.cb.call(this.scope)) + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , la = function() { + function t(t, i, s, o, h, r) { + void 0 === t && (t = 1), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 1), + void 0 === h && (h = 0), + void 0 === r && (r = 0), + this.array = null, + this.a = t, + this.b = i, + this.c = s, + this.d = o, + this.tx = h, + this.ty = r + } + return t.prototype.fromArray = function(t) { + this.a = t[0], + this.b = t[1], + this.c = t[3], + this.d = t[4], + this.tx = t[2], + this.ty = t[5] + } + , + t.prototype.set = function(t, i, s, o, h, r) { + return this.a = t, + this.b = i, + this.c = s, + this.d = o, + this.tx = h, + this.ty = r, + this + } + , + t.prototype.toArray = function(t, i) { + this.array || (this.array = new Float32Array(9)); + var s = i || this.array; + return t ? (s[0] = this.a, + s[1] = this.b, + s[2] = 0, + s[3] = this.c, + s[4] = this.d, + s[5] = 0, + s[6] = this.tx, + s[7] = this.ty, + s[8] = 1) : (s[0] = this.a, + s[1] = this.c, + s[2] = this.tx, + s[3] = this.b, + s[4] = this.d, + s[5] = this.ty, + s[6] = 0, + s[7] = 0, + s[8] = 1), + s + } + , + t.prototype.apply = function(t, i) { + i = i || new ra; + var s = t.x + , o = t.y; + return i.x = this.a * s + this.c * o + this.tx, + i.y = this.b * s + this.d * o + this.ty, + i + } + , + t.prototype.applyInverse = function(t, i) { + i = i || new ra; + var s = 1 / (this.a * this.d + this.c * -this.b) + , o = t.x + , h = t.y; + return i.x = this.d * s * o + -this.c * s * h + (this.ty * this.c - this.tx * this.d) * s, + i.y = this.a * s * h + -this.b * s * o + (-this.ty * this.a + this.tx * this.b) * s, + i + } + , + t.prototype.translate = function(t, i) { + return this.tx += t, + this.ty += i, + this + } + , + t.prototype.scale = function(t, i) { + return this.a *= t, + this.d *= i, + this.c *= t, + this.b *= i, + this.tx *= t, + this.ty *= i, + this + } + , + t.prototype.rotate = function(t) { + var i = Math.cos(t) + , s = Math.sin(t) + , o = this.a + , h = this.c + , r = this.tx; + return this.a = o * i - this.b * s, + this.b = o * s + this.b * i, + this.c = h * i - this.d * s, + this.d = h * s + this.d * i, + this.tx = r * i - this.ty * s, + this.ty = r * s + this.ty * i, + this + } + , + t.prototype.append = function(t) { + var i = this.a + , s = this.b + , o = this.c + , h = this.d; + return this.a = t.a * i + t.b * o, + this.b = t.a * s + t.b * h, + this.c = t.c * i + t.d * o, + this.d = t.c * s + t.d * h, + this.tx = t.tx * i + t.ty * o + this.tx, + this.ty = t.tx * s + t.ty * h + this.ty, + this + } + , + t.prototype.setTransform = function(t, i, s, o, h, r, e, n, a) { + return this.a = Math.cos(e + a) * h, + this.b = Math.sin(e + a) * h, + this.c = -Math.sin(e - n) * r, + this.d = Math.cos(e - n) * r, + this.tx = t - (s * this.a + o * this.c), + this.ty = i - (s * this.b + o * this.d), + this + } + , + t.prototype.prepend = function(t) { + var i = this.tx; + if (1 !== t.a || 0 !== t.b || 0 !== t.c || 1 !== t.d) { + var s = this.a + , o = this.c; + this.a = s * t.a + this.b * t.c, + this.b = s * t.b + this.b * t.d, + this.c = o * t.a + this.d * t.c, + this.d = o * t.b + this.d * t.d + } + return this.tx = i * t.a + this.ty * t.c + t.tx, + this.ty = i * t.b + this.ty * t.d + t.ty, + this + } + , + t.prototype.decompose = function(t) { + var i = this.a + , s = this.b + , o = this.c + , h = this.d + , r = t.pivot + , e = -Math.atan2(-o, h) + , n = Math.atan2(s, i) + , a = Math.abs(e + n); + return a < 1e-5 || Math.abs(wb - a) < 1e-5 ? (t.rotation = n, + t.skew.x = t.skew.y = 0) : (t.rotation = 0, + t.skew.x = e, + t.skew.y = n), + t.scale.x = Math.sqrt(i * i + s * s), + t.scale.y = Math.sqrt(o * o + h * h), + t.position.x = this.tx + (r.x * i + r.y * o), + t.position.y = this.ty + (r.x * s + r.y * h), + t + } + , + t.prototype.invert = function() { + var t = this.a + , i = this.b + , s = this.c + , o = this.d + , h = this.tx + , r = t * o - i * s; + return this.a = o / r, + this.b = -i / r, + this.c = -s / r, + this.d = t / r, + this.tx = (s * this.ty - o * h) / r, + this.ty = -(t * this.ty - i * h) / r, + this + } + , + t.prototype.identity = function() { + return this.a = 1, + this.b = 0, + this.c = 0, + this.d = 1, + this.tx = 0, + this.ty = 0, + this + } + , + t.prototype.clone = function() { + var i = new t; + return i.a = this.a, + i.b = this.b, + i.c = this.c, + i.d = this.d, + i.tx = this.tx, + i.ty = this.ty, + i + } + , + t.prototype.copyTo = function(t) { + return t.a = this.a, + t.b = this.b, + t.c = this.c, + t.d = this.d, + t.tx = this.tx, + t.ty = this.ty, + t + } + , + t.prototype.copyFrom = function(t) { + return this.a = t.a, + this.b = t.b, + this.c = t.c, + this.d = t.d, + this.tx = t.tx, + this.ty = t.ty, + this + } + , + t.prototype.toString = function() { + return "[@pixi/math:Matrix a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + "]" + } + , + Object.defineProperty(t, "IDENTITY", { + get: function() { + return new t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "TEMP_MATRIX", { + get: function() { + return new t + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , La = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1] + , Ma = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1] + , Na = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1] + , Oa = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1] + , _b = [] + , ld = [] + , yb = Math.sign; + function Yf() { + for (var t = 0; t < 16; t++) { + var i = []; + _b.push(i); + for (var s = 0; s < 16; s++) + for (var o = yb(La[t] * La[s] + Na[t] * Ma[s]), h = yb(Ma[t] * La[s] + Oa[t] * Ma[s]), r = yb(La[t] * Na[s] + Na[t] * Oa[s]), e = yb(Ma[t] * Na[s] + Oa[t] * Oa[s]), n = 0; n < 16; n++) + if (La[n] === o && Ma[n] === h && Na[n] === r && Oa[n] === e) { + i.push(n); + break + } + } + for (t = 0; t < 16; t++) { + var a = new la; + a.set(La[t], Ma[t], Na[t], Oa[t], 0, 0), + ld.push(a) + } + } + Yf(); + var ea = { + E: 0, + SE: 1, + S: 2, + SW: 3, + W: 4, + NW: 5, + N: 6, + NE: 7, + MIRROR_VERTICAL: 8, + MAIN_DIAGONAL: 10, + MIRROR_HORIZONTAL: 12, + REVERSE_DIAGONAL: 14, + uX: function(t) { + return La[t] + }, + uY: function(t) { + return Ma[t] + }, + vX: function(t) { + return Na[t] + }, + vY: function(t) { + return Oa[t] + }, + inv: function(t) { + return 8 & t ? 15 & t : 7 & -t + }, + add: function(t, i) { + return _b[t][i] + }, + sub: function(t, i) { + return _b[t][ea.inv(i)] + }, + rotate180: function(t) { + return 4 ^ t + }, + isVertical: function(t) { + return 2 == (3 & t) + }, + byDirection: function(t, i) { + return 2 * Math.abs(t) <= Math.abs(i) ? i >= 0 ? ea.S : ea.N : 2 * Math.abs(i) <= Math.abs(t) ? t > 0 ? ea.E : ea.W : i > 0 ? t > 0 ? ea.SE : ea.SW : t > 0 ? ea.NE : ea.NW + }, + matrixAppendRotationInv: function(t, i, s, o) { + void 0 === s && (s = 0), + void 0 === o && (o = 0); + var h = ld[ea.inv(i)]; + h.tx = s, + h.ty = o, + t.append(h) + } + } + , Zf = function() { + function t() { + this.worldTransform = new la, + this.localTransform = new la, + this.position = new xb(this.onChange,this,0,0), + this.scale = new xb(this.onChange,this,1,1), + this.pivot = new xb(this.onChange,this,0,0), + this.skew = new xb(this.updateSkew,this,0,0), + this._rotation = 0, + this._cx = 1, + this._sx = 0, + this._cy = 0, + this._sy = 1, + this._localID = 0, + this._currentLocalID = 0, + this._worldID = 0, + this._parentID = 0 + } + return t.prototype.onChange = function() { + this._localID++ + } + , + t.prototype.updateSkew = function() { + this._cx = Math.cos(this._rotation + this.skew.y), + this._sx = Math.sin(this._rotation + this.skew.y), + this._cy = -Math.sin(this._rotation - this.skew.x), + this._sy = Math.cos(this._rotation - this.skew.x), + this._localID++ + } + , + t.prototype.toString = function() { + return "[@pixi/math:Transform position=(" + this.position.x + ", " + this.position.y + ") rotation=" + this.rotation + " scale=(" + this.scale.x + ", " + this.scale.y + ") skew=(" + this.skew.x + ", " + this.skew.y + ") ]" + } + , + t.prototype.updateLocalTransform = function() { + var t = this.localTransform; + this._localID !== this._currentLocalID && (t.a = this._cx * this.scale.x, + t.b = this._sx * this.scale.x, + t.c = this._cy * this.scale.y, + t.d = this._sy * this.scale.y, + t.tx = this.position.x - (this.pivot.x * t.a + this.pivot.y * t.c), + t.ty = this.position.y - (this.pivot.x * t.b + this.pivot.y * t.d), + this._currentLocalID = this._localID, + this._parentID = -1) + } + , + t.prototype.updateTransform = function(t) { + var i = this.localTransform; + if (this._localID !== this._currentLocalID && (i.a = this._cx * this.scale.x, + i.b = this._sx * this.scale.x, + i.c = this._cy * this.scale.y, + i.d = this._sy * this.scale.y, + i.tx = this.position.x - (this.pivot.x * i.a + this.pivot.y * i.c), + i.ty = this.position.y - (this.pivot.x * i.b + this.pivot.y * i.d), + this._currentLocalID = this._localID, + this._parentID = -1), + this._parentID !== t._worldID) { + var s = t.worldTransform + , o = this.worldTransform; + o.a = i.a * s.a + i.b * s.c, + o.b = i.a * s.b + i.b * s.d, + o.c = i.c * s.a + i.d * s.c, + o.d = i.c * s.b + i.d * s.d, + o.tx = i.tx * s.a + i.ty * s.c + s.tx, + o.ty = i.tx * s.b + i.ty * s.d + s.ty, + this._parentID = t._worldID, + this._worldID++ + } + } + , + t.prototype.setFromMatrix = function(t) { + t.decompose(this), + this._localID++ + } + , + Object.defineProperty(t.prototype, "rotation", { + get: function() { + return this._rotation + }, + set: function(t) { + this._rotation !== t && (this._rotation = t, + this.updateSkew()) + }, + enumerable: !1, + configurable: !0 + }), + t.IDENTITY = new t, + t + }(); + aa.PREFER_ENV = Ha.any ? Aa.WEBGL : Aa.WEBGL2, + aa.STRICT_TEXTURE_CACHE = !1; + var zb = []; + function ac(t, e) { + if (!t) + return null; + var r = ""; + if ("string" == typeof t) { + var i = /\.(\w{3,4})(?:$|\?|#)/i.exec(t); + i && (r = i[1].toLowerCase()) + } + for (var o = zb.length - 1; o >= 0; --o) { + var n = zb[o]; + if (n.test && n.test(t, r)) + return new n(t,e) + } + throw new Error("Unrecognized source type to auto-detect Resource") + } + var $f = function(t, e) { + return ($f = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, e) { + t.__proto__ = e + } + || function(t, e) { + for (var r in e) + e.hasOwnProperty(r) && (t[r] = e[r]) + } + )(t, e) + }; + function ba(t, e) { + function r() { + this.constructor = t + } + $f(t, e), + t.prototype = null === e ? Object.create(e) : (r.prototype = e.prototype, + new r) + } + var Wa = function() { + function t(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = 0), + this._width = t, + this._height = e, + this.destroyed = !1, + this.internal = !1, + this.onResize = new ka("setRealSize"), + this.onUpdate = new ka("update"), + this.onError = new ka("onError") + } + return t.prototype.bind = function(t) { + this.onResize.add(t), + this.onUpdate.add(t), + this.onError.add(t), + (this._width || this._height) && this.onResize.emit(this._width, this._height) + } + , + t.prototype.unbind = function(t) { + this.onResize.remove(t), + this.onUpdate.remove(t), + this.onError.remove(t) + } + , + t.prototype.resize = function(t, e) { + t === this._width && e === this._height || (this._width = t, + this._height = e, + this.onResize.emit(t, e)) + } + , + Object.defineProperty(t.prototype, "valid", { + get: function() { + return !!this._width && !!this._height + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.update = function() { + this.destroyed || this.onUpdate.emit() + } + , + t.prototype.load = function() { + return Promise.resolve(this) + } + , + Object.defineProperty(t.prototype, "width", { + get: function() { + return this._width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "height", { + get: function() { + return this._height + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.style = function(t, e, r) { + return !1 + } + , + t.prototype.dispose = function() {} + , + t.prototype.destroy = function() { + this.destroyed || (this.destroyed = !0, + this.dispose(), + this.onError.removeAll(), + this.onError = null, + this.onResize.removeAll(), + this.onResize = null, + this.onUpdate.removeAll(), + this.onUpdate = null) + } + , + t.test = function(t, e) { + return !1 + } + , + t + }() + , Ab = function(t) { + function e(e, r) { + var i = this + , o = r || {} + , n = o.width + , s = o.height; + if (!n || !s) + throw new Error("BufferResource width or height invalid"); + return (i = t.call(this, n, s) || this).data = e, + i + } + return ba(e, t), + e.prototype.upload = function(t, e, r) { + var i = t.gl; + return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.alphaMode === Ia.UNPACK), + r.width === e.width && r.height === e.height ? i.texSubImage2D(e.target, 0, 0, 0, e.width, e.height, e.format, e.type, this.data) : (r.width = e.width, + r.height = e.height, + i.texImage2D(e.target, 0, r.internalFormat, e.width, e.height, 0, e.format, r.type, this.data)), + !0 + } + , + e.prototype.dispose = function() { + this.data = null + } + , + e.test = function(t) { + return t instanceof Float32Array || t instanceof Uint8Array || t instanceof Uint32Array + } + , + e + }(Wa) + , _f = { + scaleMode: Ca.NEAREST, + format: kb.RGBA, + alphaMode: Ia.NPM + } + , ia = function(t) { + function e(e, r) { + void 0 === e && (e = null), + void 0 === r && (r = null); + var i = t.call(this) || this + , o = (r = r || {}).alphaMode + , n = r.mipmap + , s = r.anisotropicLevel + , a = r.scaleMode + , u = r.width + , h = r.height + , $ = r.wrapMode + , p = r.format + , l = r.type + , c = r.target + , d = r.resolution + , f = r.resourceOptions; + return !e || e instanceof Wa || ((e = ac(e, f)).internal = !0), + i.width = u || 0, + i.height = h || 0, + i.resolution = d || aa.RESOLUTION, + i.mipmap = void 0 !== n ? n : aa.MIPMAP_TEXTURES, + i.anisotropicLevel = void 0 !== s ? s : aa.ANISOTROPIC_LEVEL, + i.wrapMode = $ || aa.WRAP_MODE, + i.scaleMode = void 0 !== a ? a : aa.SCALE_MODE, + i.format = p || kb.RGBA, + i.type = l || ua.UNSIGNED_BYTE, + i.target = c || Sa.TEXTURE_2D, + i.alphaMode = void 0 !== o ? o : Ia.UNPACK, + i.uid = ub(), + i.touched = 0, + i.isPowerOfTwo = !1, + i._refreshPOT(), + i._glTextures = {}, + i.dirtyId = 0, + i.dirtyStyleId = 0, + i.cacheId = null, + i.valid = u > 0 && h > 0, + i.textureCacheIds = [], + i.destroyed = !1, + i.resource = null, + i._batchEnabled = 0, + i._batchLocation = 0, + i.parentTextureArray = null, + i.setResource(e), + i + } + return ba(e, t), + Object.defineProperty(e.prototype, "realWidth", { + get: function() { + return Math.ceil(this.width * this.resolution - 1e-4) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "realHeight", { + get: function() { + return Math.ceil(this.height * this.resolution - 1e-4) + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.setStyle = function(t, e) { + var r; + return void 0 !== t && t !== this.scaleMode && (this.scaleMode = t, + r = !0), + void 0 !== e && e !== this.mipmap && (this.mipmap = e, + r = !0), + r && this.dirtyStyleId++, + this + } + , + e.prototype.setSize = function(t, e, r) { + return this.resolution = r || this.resolution, + this.width = t, + this.height = e, + this._refreshPOT(), + this.update(), + this + } + , + e.prototype.setRealSize = function(t, e, r) { + return this.resolution = r || this.resolution, + this.width = t / this.resolution, + this.height = e / this.resolution, + this._refreshPOT(), + this.update(), + this + } + , + e.prototype._refreshPOT = function() { + this.isPowerOfTwo = gd(this.realWidth) && gd(this.realHeight) + } + , + e.prototype.setResolution = function(t) { + var e = this.resolution; + return e === t ? this : (this.resolution = t, + this.valid && (this.width = this.width * e / t, + this.height = this.height * e / t, + this.emit("update", this)), + this._refreshPOT(), + this) + } + , + e.prototype.setResource = function(t) { + if (this.resource === t) + return this; + if (this.resource) + throw new Error("Resource can be set only once"); + return t.bind(this), + this.resource = t, + this + } + , + e.prototype.update = function() { + this.valid ? (this.dirtyId++, + this.dirtyStyleId++, + this.emit("update", this)) : this.width > 0 && this.height > 0 && (this.valid = !0, + this.emit("loaded", this), + this.emit("update", this)) + } + , + e.prototype.onError = function(t) { + this.emit("error", this, t) + } + , + e.prototype.destroy = function() { + this.resource && (this.resource.unbind(this), + this.resource.internal && this.resource.destroy(), + this.resource = null), + this.cacheId && (delete Ka[this.cacheId], + delete ya[this.cacheId], + this.cacheId = null), + this.dispose(), + e.removeFromCache(this), + this.textureCacheIds = null, + this.destroyed = !0 + } + , + e.prototype.dispose = function() { + this.emit("dispose", this) + } + , + e.prototype.castToBaseTexture = function() { + return this + } + , + e.from = function(t, r, i) { + void 0 === i && (i = aa.STRICT_TEXTURE_CACHE); + var o = "string" == typeof t + , n = null; + if (o) + n = t; + else { + if (!t._pixiId) { + var s = r && r.pixiIdPrefix || "pixiid"; + t._pixiId = s + "_" + ub() + } + n = t._pixiId + } + var a = Ka[n]; + if (o && i && !a) + throw new Error("The cacheId \"" + n + "\" does not exist in BaseTextureCache."); + return a || ((a = new e(t,r)).cacheId = n, + e.addToCache(a, n)), + a + } + , + e.fromBuffer = function(t, r, i, o) { + t = t || new Float32Array(r * i * 4); + var n = new Ab(t,{ + width: r, + height: i + }) + , s = t instanceof Float32Array ? ua.FLOAT : ua.UNSIGNED_BYTE; + return new e(n,Object.assign(_f, o || { + width: r, + height: i, + type: s + })) + } + , + e.addToCache = function(t, e) { + e && (-1 === t.textureCacheIds.indexOf(e) && t.textureCacheIds.push(e), + Ka[e] && console.warn("BaseTexture added to the cache with an id [" + e + "] that already had an entry"), + Ka[e] = t) + } + , + e.removeFromCache = function(t) { + if ("string" == typeof t) { + var e = Ka[t]; + if (e) { + var r = e.textureCacheIds.indexOf(t); + return r > -1 && e.textureCacheIds.splice(r, 1), + delete Ka[t], + e + } + } else if (t && t.textureCacheIds) { + for (var i = 0; i < t.textureCacheIds.length; ++i) + delete Ka[t.textureCacheIds[i]]; + return t.textureCacheIds.length = 0, + t + } + return null + } + , + e._globalBatch = 0, + e + }(rb.d) + , bc = function(t) { + function e(e, r) { + var i = this + , o = r || {} + , n = o.width + , s = o.height; + (i = t.call(this, n, s) || this).items = [], + i.itemDirtyIds = []; + for (var a = 0; a < e; a++) { + var u = new ia; + i.items.push(u), + i.itemDirtyIds.push(-2) + } + return i.length = e, + i._load = null, + i.baseTexture = null, + i + } + return ba(e, t), + e.prototype.initFromArray = function(t, e) { + for (var r = 0; r < this.length; r++) + t[r] && (t[r].castToBaseTexture ? this.addBaseTextureAt(t[r].castToBaseTexture(), r) : t[r]instanceof Wa ? this.addResourceAt(t[r], r) : this.addResourceAt(ac(t[r], e), r)) + } + , + e.prototype.dispose = function() { + for (var t = 0, e = this.length; t < e; t++) + this.items[t].destroy(); + this.items = null, + this.itemDirtyIds = null, + this._load = null + } + , + e.prototype.addResourceAt = function(t, e) { + if (!this.items[e]) + throw new Error("Index " + e + " is out of bounds"); + return t.valid && !this.valid && this.resize(t.width, t.height), + this.items[e].setResource(t), + this + } + , + e.prototype.bind = function(e) { + if (null !== this.baseTexture) + throw new Error("Only one base texture per TextureArray is allowed"); + t.prototype.bind.call(this, e); + for (var r = 0; r < this.length; r++) + this.items[r].parentTextureArray = e, + this.items[r].on("update", e.update, e) + } + , + e.prototype.unbind = function(e) { + t.prototype.unbind.call(this, e); + for (var r = 0; r < this.length; r++) + this.items[r].parentTextureArray = null, + this.items[r].off("update", e.update, e) + } + , + e.prototype.load = function() { + var t = this; + if (this._load) + return this._load; + var e = this.items.map(function(t) { + return t.resource + }).filter(function(t) { + return t + }).map(function(t) { + return t.load() + }); + return this._load = Promise.all(e).then(function() { + var e = t.items[0] + , r = e.realWidth + , i = e.realHeight; + return t.resize(r, i), + Promise.resolve(t) + }), + this._load + } + , + e + }(Wa) + , md = function(t) { + function e(e, r) { + var i, o, n = this, s = r || {}, a = s.width, u = s.height; + return Array.isArray(e) ? (i = e, + o = e.length) : o = e, + n = t.call(this, o, { + width: a, + height: u + }) || this, + i && n.initFromArray(i, r), + n + } + return ba(e, t), + e.prototype.addBaseTextureAt = function(t, e) { + if (!t.resource) + throw new Error("ArrayResource does not support RenderTexture"); + return this.addResourceAt(t.resource, e), + this + } + , + e.prototype.bind = function(e) { + t.prototype.bind.call(this, e), + e.target = Sa.TEXTURE_2D_ARRAY + } + , + e.prototype.upload = function(t, e, r) { + var i = this.length + , o = this.itemDirtyIds + , n = this.items + , s = t.gl; + r.dirtyId < 0 && s.texImage3D(s.TEXTURE_2D_ARRAY, 0, e.format, this._width, this._height, i, 0, e.format, e.type, null); + for (var a = 0; a < i; a++) { + var u = n[a]; + o[a] < u.dirtyId && (o[a] = u.dirtyId, + u.valid && s.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, a, u.resource.width, u.resource.height, 1, e.format, e.type, u.resource.source)) + } + return !0 + } + , + e + }(bc) + , za = function(t) { + function e(e) { + var r = this + , i = e + , o = i.naturalWidth || i.videoWidth || i.width + , n = i.naturalHeight || i.videoHeight || i.height; + return (r = t.call(this, o, n) || this).source = e, + r.noSubImage = !1, + r + } + return ba(e, t), + e.crossOrigin = function(t, e, r) { + void 0 === r && 0 !== e.indexOf("data:") ? t.crossOrigin = Qf(e) : !1 !== r && (t.crossOrigin = "string" == typeof r ? r : "anonymous") + } + , + e.prototype.upload = function(t, e, r, i) { + var o = t.gl + , n = e.realWidth + , s = e.realHeight; + return i = i || this.source, + o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.alphaMode === Ia.UNPACK), + this.noSubImage || e.target !== o.TEXTURE_2D || r.width !== n || r.height !== s ? (r.width = n, + r.height = s, + o.texImage2D(e.target, 0, e.format, e.format, e.type, i)) : o.texSubImage2D(o.TEXTURE_2D, 0, 0, 0, e.format, e.type, i), + !0 + } + , + e.prototype.update = function() { + if (!this.destroyed) { + var e = this.source + , r = e.naturalWidth || e.videoWidth || e.width + , i = e.naturalHeight || e.videoHeight || e.height; + this.resize(r, i), + t.prototype.update.call(this) + } + } + , + e.prototype.dispose = function() { + this.source = null + } + , + e + }(Wa) + , cc = function(t) { + function e(e) { + return t.call(this, e) || this + } + return ba(e, t), + e.test = function(t) { + var e = self.OffscreenCanvas; + return !!(e && t instanceof e) || self.HTMLCanvasElement && t instanceof HTMLCanvasElement + } + , + e + }(za) + , nd = function(t) { + function e(r, i) { + var o = this + , n = i || {} + , s = n.width + , a = n.height + , u = n.autoLoad + , h = n.linkBaseTexture; + if (r && r.length !== e.SIDES) + throw new Error("Invalid length. Got " + r.length + ", expected 6"); + o = t.call(this, 6, { + width: s, + height: a + }) || this; + for (var $ = 0; $ < e.SIDES; $++) + o.items[$].target = Sa.TEXTURE_CUBE_MAP_POSITIVE_X + $; + return o.linkBaseTexture = !1 !== h, + r && o.initFromArray(r, i), + !1 !== u && o.load(), + o + } + return ba(e, t), + e.prototype.bind = function(e) { + t.prototype.bind.call(this, e), + e.target = Sa.TEXTURE_CUBE_MAP + } + , + e.prototype.addBaseTextureAt = function(t, e, r) { + if (void 0 === r && (r = this.linkBaseTexture), + !this.items[e]) + throw new Error("Index " + e + " is out of bounds"); + if (!this.linkBaseTexture || t.parentTextureArray || Object.keys(t._glTextures).length > 0) { + if (!t.resource) + throw new Error("CubeResource does not support copying of renderTexture."); + this.addResourceAt(t.resource, e) + } else + t.target = Sa.TEXTURE_CUBE_MAP_POSITIVE_X + e, + t.parentTextureArray = this.baseTexture, + this.items[e] = t; + return t.valid && !this.valid && this.resize(t.realWidth, t.realHeight), + this.items[e] = t, + this + } + , + e.prototype.upload = function(t, r, i) { + for (var o = this.itemDirtyIds, n = 0; n < e.SIDES; n++) { + var s = this.items[n]; + o[n] < s.dirtyId && (s.valid && s.resource ? (s.resource.upload(t, s, i), + o[n] = s.dirtyId) : o[n] < -1 && (t.gl.texImage2D(s.target, 0, i.internalFormat, r.realWidth, r.realHeight, 0, r.format, i.type, null), + o[n] = -1)) + } + return !0 + } + , + e.test = function(t) { + return Array.isArray(t) && t.length === e.SIDES + } + , + e.SIDES = 6, + e + }(bc) + , dc = function(t) { + function e(e, r) { + var i = this; + if (r = r || {}, + !(e instanceof HTMLImageElement)) { + var o = new Image; + za.crossOrigin(o, e, r.crossorigin), + o.src = e, + e = o + } + return i = t.call(this, e) || this, + !e.complete && i._width && i._height && (i._width = 0, + i._height = 0), + i.url = e.src, + i._process = null, + i.preserveBitmap = !1, + i.createBitmap = (void 0 !== r.createBitmap ? r.createBitmap : aa.CREATE_IMAGE_BITMAP) && !!self.createImageBitmap, + i.alphaMode = "number" == typeof r.alphaMode ? r.alphaMode : null, + i.bitmap = null, + i._load = null, + !1 !== r.autoLoad && i.load(), + i + } + return ba(e, t), + e.prototype.load = function(t) { + var e = this; + return this._load ? this._load : (void 0 !== t && (this.createBitmap = t), + this._load = new Promise(function(t, r) { + var i = e.source; + e.url = i.src; + var o = function() { + e.destroyed || (i.onload = null, + i.onerror = null, + e.resize(i.width, i.height), + e._load = null, + e.createBitmap ? t(e.process()) : t(e)) + }; + i.complete && i.src ? o() : (i.onload = o, + i.onerror = function(t) { + r(t), + e.onError.emit(t) + } + ) + } + ), + this._load) + } + , + e.prototype.process = function() { + var t = this + , e = this.source; + return null !== this._process ? this._process : null === this.bitmap && self.createImageBitmap ? (this._process = self.createImageBitmap(e, 0, 0, e.width, e.height, { + premultiplyAlpha: this.alphaMode === Ia.UNPACK ? "premultiply" : "none" + }).then(function(e) { + return t.destroyed ? Promise.reject() : (t.bitmap = e, + t.update(), + t._process = null, + Promise.resolve(t)) + }), + this._process) : Promise.resolve(this) + } + , + e.prototype.upload = function(e, r, i) { + if ("number" == typeof this.alphaMode && (r.alphaMode = this.alphaMode), + !this.createBitmap) + return t.prototype.upload.call(this, e, r, i); + if (!this.bitmap && (this.process(), + !this.bitmap)) + return !1; + if (t.prototype.upload.call(this, e, r, i, this.bitmap), + !this.preserveBitmap) { + var o = !0 + , n = r._glTextures; + for (var s in n) { + var a = n[s]; + if (a !== i && a.dirtyId !== r.dirtyId) { + o = !1; + break + } + } + o && (this.bitmap.close && this.bitmap.close(), + this.bitmap = null) + } + return !0 + } + , + e.prototype.dispose = function() { + this.source.onload = null, + this.source.onerror = null, + t.prototype.dispose.call(this), + this.bitmap && (this.bitmap.close(), + this.bitmap = null), + this._process = null, + this._load = null + } + , + e.test = function(t) { + return "string" == typeof t || t instanceof HTMLImageElement + } + , + e + }(za) + , od = function(t) { + function e(e, r) { + var i = this; + return r = r || {}, + (i = t.call(this, document.createElement("canvas")) || this)._width = 0, + i._height = 0, + i.svg = e, + i.scale = r.scale || 1, + i._overrideWidth = r.width, + i._overrideHeight = r.height, + i._resolve = null, + i._crossorigin = r.crossorigin, + i._load = null, + !1 !== r.autoLoad && i.load(), + i + } + return ba(e, t), + e.prototype.load = function() { + var t = this; + return this._load ? this._load : (this._load = new Promise(function(e) { + if (t._resolve = function() { + t.resize(t.source.width, t.source.height), + e(t) + } + , + /^\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i, + e + }(za) + , pd = function(t) { + function e(r, i) { + var o = this; + if (i = i || {}, + !(r instanceof HTMLVideoElement)) { + var n = document.createElement("video"); + n.setAttribute("preload", "auto"), + n.setAttribute("webkit-playsinline", ""), + n.setAttribute("playsinline", ""), + "string" == typeof r && (r = [r]); + var s = r[0].src || r[0]; + za.crossOrigin(n, s, i.crossorigin); + for (var a = 0; a < r.length; ++a) { + var u = document.createElement("source") + , h = r[a] + , $ = h.src + , p = h.mime + , l = ($ = $ || r[a]).split("?").shift().toLowerCase() + , c = l.substr(l.lastIndexOf(".") + 1); + p = p || e.MIME_TYPES[c] || "video/" + c, + u.src = $, + u.type = p, + n.appendChild(u) + } + r = n + } + return (o = t.call(this, r) || this).noSubImage = !0, + o._autoUpdate = !0, + o._isConnectedToTicker = !1, + o._updateFPS = i.updateFPS || 0, + o._msToNextUpdate = 0, + o.autoPlay = !1 !== i.autoPlay, + o._load = null, + o._resolve = null, + o._onCanPlay = o._onCanPlay.bind(o), + o._onError = o._onError.bind(o), + !1 !== i.autoLoad && o.load(), + o + } + return ba(e, t), + e.prototype.update = function(e) { + if (!this.destroyed) { + var r = Ea.shared.elapsedMS * this.source.playbackRate; + this._msToNextUpdate = Math.floor(this._msToNextUpdate - r), + (!this._updateFPS || this._msToNextUpdate <= 0) && (t.prototype.update.call(this), + this._msToNextUpdate = this._updateFPS ? Math.floor(1e3 / this._updateFPS) : 0) + } + } + , + e.prototype.load = function() { + var t = this; + if (this._load) + return this._load; + var e = this.source; + return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0), + e.addEventListener("play", this._onPlayStart.bind(this)), + e.addEventListener("pause", this._onPlayStop.bind(this)), + this._isSourceReady() ? this._onCanPlay() : (e.addEventListener("canplay", this._onCanPlay), + e.addEventListener("canplaythrough", this._onCanPlay), + e.addEventListener("error", this._onError, !0)), + this._load = new Promise(function(r) { + t.valid ? r(t) : (t._resolve = r, + e.load()) + } + ), + this._load + } + , + e.prototype._onError = function(t) { + this.source.removeEventListener("error", this._onError, !0), + this.onError.emit(t) + } + , + e.prototype._isSourcePlaying = function() { + var t = this.source; + return t.currentTime > 0 && !1 === t.paused && !1 === t.ended && t.readyState > 2 + } + , + e.prototype._isSourceReady = function() { + var t = this.source; + return 3 === t.readyState || 4 === t.readyState + } + , + e.prototype._onPlayStart = function() { + this.valid || this._onCanPlay(), + this.autoUpdate && !this._isConnectedToTicker && (Ea.shared.add(this.update, this), + this._isConnectedToTicker = !0) + } + , + e.prototype._onPlayStop = function() { + this._isConnectedToTicker && (Ea.shared.remove(this.update, this), + this._isConnectedToTicker = !1) + } + , + e.prototype._onCanPlay = function() { + var t = this.source; + t.removeEventListener("canplay", this._onCanPlay), + t.removeEventListener("canplaythrough", this._onCanPlay); + var e = this.valid; + this.resize(t.videoWidth, t.videoHeight), + !e && this._resolve && (this._resolve(this), + this._resolve = null), + this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && t.play() + } + , + e.prototype.dispose = function() { + this._isConnectedToTicker && Ea.shared.remove(this.update, this); + var e = this.source; + e && (e.removeEventListener("error", this._onError, !0), + e.pause(), + e.src = "", + e.load()), + t.prototype.dispose.call(this) + } + , + Object.defineProperty(e.prototype, "autoUpdate", { + get: function() { + return this._autoUpdate + }, + set: function(t) { + t !== this._autoUpdate && (this._autoUpdate = t, + !this._autoUpdate && this._isConnectedToTicker ? (Ea.shared.remove(this.update, this), + this._isConnectedToTicker = !1) : this._autoUpdate && !this._isConnectedToTicker && this._isSourcePlaying() && (Ea.shared.add(this.update, this), + this._isConnectedToTicker = !0)) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "updateFPS", { + get: function() { + return this._updateFPS + }, + set: function(t) { + t !== this._updateFPS && (this._updateFPS = t) + }, + enumerable: !1, + configurable: !0 + }), + e.test = function(t, r) { + return self.HTMLVideoElement && t instanceof HTMLVideoElement || e.TYPES.indexOf(r) > -1 + } + , + e.TYPES = ["mp4", "m4v", "webm", "ogg", "ogv", "h264", "avi", "mov"], + e.MIME_TYPES = { + ogv: "video/ogg", + mov: "video/quicktime", + m4v: "video/mp4" + }, + e + }(za) + , qd = function(t) { + function e(e) { + return t.call(this, e) || this + } + return ba(e, t), + e.test = function(t) { + return !!self.createImageBitmap && t instanceof ImageBitmap + } + , + e + }(za); + zb.push(dc, qd, cc, pd, od, Ab, nd, md); + var rd = { + __proto__: null, + Resource: Wa, + BaseImageResource: za, + INSTALLED: zb, + autoDetectResource: ac, + AbstractMultiResource: bc, + ArrayResource: md, + BufferResource: Ab, + CanvasResource: cc, + CubeResource: nd, + ImageResource: dc, + SVGResource: od, + VideoResource: pd, + ImageBitmapResource: qd + } + , pa = function() { + function t(t) { + this.renderer = t + } + return t.prototype.destroy = function() { + this.renderer = null + } + , + t + }() + , ag = function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return ba(e, t), + e.prototype.upload = function(t, e, r) { + var i = t.gl; + return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.alphaMode === Ia.UNPACK), + r.width === e.width && r.height === e.height ? i.texSubImage2D(e.target, 0, 0, 0, e.width, e.height, e.format, e.type, this.data) : (r.width = e.width, + r.height = e.height, + i.texImage2D(e.target, 0, 1 === t.context.webGLVersion ? i.DEPTH_COMPONENT : i.DEPTH_COMPONENT16, e.width, e.height, 0, e.format, e.type, this.data)), + !0 + } + , + e + }(Ab) + , ec = function() { + function t(t, e) { + this.width = Math.ceil(t || 100), + this.height = Math.ceil(e || 100), + this.stencil = !1, + this.depth = !1, + this.dirtyId = 0, + this.dirtyFormat = 0, + this.dirtySize = 0, + this.depthTexture = null, + this.colorTextures = [], + this.glFramebuffers = {}, + this.disposeRunner = new ka("disposeFramebuffer"), + this.multisample = _a.NONE + } + return Object.defineProperty(t.prototype, "colorTexture", { + get: function() { + return this.colorTextures[0] + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.addColorTexture = function(t, e) { + return void 0 === t && (t = 0), + this.colorTextures[t] = e || new ia(null,{ + scaleMode: Ca.NEAREST, + resolution: 1, + mipmap: $a.OFF, + width: this.width, + height: this.height + }), + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.addDepthTexture = function(t) { + return this.depthTexture = t || new ia(new ag(null,{ + width: this.width, + height: this.height + }),{ + scaleMode: Ca.NEAREST, + resolution: 1, + width: this.width, + height: this.height, + mipmap: $a.OFF, + format: kb.DEPTH_COMPONENT, + type: ua.UNSIGNED_SHORT + }), + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.enableDepth = function() { + return this.depth = !0, + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.enableStencil = function() { + return this.stencil = !0, + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.resize = function(t, e) { + if (t = Math.ceil(t), + e = Math.ceil(e), + t !== this.width || e !== this.height) { + this.width = t, + this.height = e, + this.dirtyId++, + this.dirtySize++; + for (var r = 0; r < this.colorTextures.length; r++) { + var i = this.colorTextures[r] + , o = i.resolution; + i.setSize(t / o, e / o) + } + if (this.depthTexture) { + o = this.depthTexture.resolution; + this.depthTexture.setSize(t / o, e / o) + } + } + } + , + t.prototype.dispose = function() { + this.disposeRunner.emit(this, !1) + } + , + t.prototype.destroyDepthTexture = function() { + this.depthTexture && (this.depthTexture.destroy(), + this.depthTexture = null, + ++this.dirtyId, + ++this.dirtyFormat) + } + , + t + }() + , sd = function(t) { + function e(e) { + var r = this; + "number" == typeof e && (e = { + width: arguments[0], + height: arguments[1], + scaleMode: arguments[2], + resolution: arguments[3] + }); + r = t.call(this, null, e) || this; + var i = e || {} + , o = i.width + , n = i.height; + return r.mipmap = 0, + r.width = Math.ceil(o) || 100, + r.height = Math.ceil(n) || 100, + r.valid = !0, + r.clearColor = [0, 0, 0, 0], + r.framebuffer = new ec(r.width * r.resolution,r.height * r.resolution).addColorTexture(0, r), + r.maskStack = [], + r.filterStack = [{}], + r + } + return ba(e, t), + e.prototype.resize = function(t, e) { + t = Math.ceil(t), + e = Math.ceil(e), + this.framebuffer.resize(t * this.resolution, e * this.resolution) + } + , + e.prototype.dispose = function() { + this.framebuffer.dispose(), + t.prototype.dispose.call(this) + } + , + e.prototype.destroy = function() { + t.prototype.destroy.call(this), + this.framebuffer.destroyDepthTexture(), + this.framebuffer = null + } + , + e + }(ia) + , td = function() { + function t() { + this.x0 = 0, + this.y0 = 0, + this.x1 = 1, + this.y1 = 0, + this.x2 = 1, + this.y2 = 1, + this.x3 = 0, + this.y3 = 1, + this.uvsFloat32 = new Float32Array(8) + } + return t.prototype.set = function(t, e, r) { + var i = e.width + , o = e.height; + if (r) { + var n = t.width / 2 / i + , s = t.height / 2 / o + , a = t.x / i + n + , u = t.y / o + s; + r = ea.add(r, ea.NW), + this.x0 = a + n * ea.uX(r), + this.y0 = u + s * ea.uY(r), + r = ea.add(r, 2), + this.x1 = a + n * ea.uX(r), + this.y1 = u + s * ea.uY(r), + r = ea.add(r, 2), + this.x2 = a + n * ea.uX(r), + this.y2 = u + s * ea.uY(r), + r = ea.add(r, 2), + this.x3 = a + n * ea.uX(r), + this.y3 = u + s * ea.uY(r) + } else + this.x0 = t.x / i, + this.y0 = t.y / o, + this.x1 = (t.x + t.width) / i, + this.y1 = t.y / o, + this.x2 = (t.x + t.width) / i, + this.y2 = (t.y + t.height) / o, + this.x3 = t.x / i, + this.y3 = (t.y + t.height) / o; + this.uvsFloat32[0] = this.x0, + this.uvsFloat32[1] = this.y0, + this.uvsFloat32[2] = this.x1, + this.uvsFloat32[3] = this.y1, + this.uvsFloat32[4] = this.x2, + this.uvsFloat32[5] = this.y2, + this.uvsFloat32[6] = this.x3, + this.uvsFloat32[7] = this.y3 + } + , + t.prototype.toString = function() { + return "[@pixi/core:TextureUvs x0=" + this.x0 + " y0=" + this.y0 + " x1=" + this.x1 + " y1=" + this.y1 + " x2=" + this.x2 + " y2=" + this.y2 + " x3=" + this.x3 + " y3=" + this.y3 + "]" + } + , + t + }() + , ud = new td + , oa = function(t) { + function e(r, i, o, n, s, a) { + var u = t.call(this) || this; + if (u.noFrame = !1, + i || (u.noFrame = !0, + i = new da(0,0,1,1)), + r instanceof e && (r = r.baseTexture), + u.baseTexture = r, + u._frame = i, + u.trim = n, + u.valid = !1, + u._uvs = ud, + u.uvMatrix = null, + u.orig = o || i, + u._rotate = Number(s || 0), + !0 === s) + u._rotate = 2; + else if (u._rotate % 2 != 0) + throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually"); + return u.defaultAnchor = a ? new ra(a.x,a.y) : new ra(0,0), + u._updateID = 0, + u.textureCacheIds = [], + r.valid ? u.noFrame ? r.valid && u.onBaseTextureUpdated(r) : u.frame = i : r.once("loaded", u.onBaseTextureUpdated, u), + u.noFrame && r.on("update", u.onBaseTextureUpdated, u), + u + } + return ba(e, t), + e.prototype.update = function() { + this.baseTexture.resource && this.baseTexture.resource.update() + } + , + e.prototype.onBaseTextureUpdated = function(t) { + if (this.noFrame) { + if (!this.baseTexture.valid) + return; + this._frame.width = t.width, + this._frame.height = t.height, + this.valid = !0, + this.updateUvs() + } else + this.frame = this._frame; + this.emit("update", this) + } + , + e.prototype.destroy = function(t) { + if (this.baseTexture) { + if (t) { + var r = this.baseTexture.resource; + r && r.url && ya[r.url] && e.removeFromCache(r.url), + this.baseTexture.destroy() + } + this.baseTexture.off("loaded", this.onBaseTextureUpdated, this), + this.baseTexture.off("update", this.onBaseTextureUpdated, this), + this.baseTexture = null + } + this._frame = null, + this._uvs = null, + this.trim = null, + this.orig = null, + this.valid = !1, + e.removeFromCache(this), + this.textureCacheIds = null + } + , + e.prototype.clone = function() { + return new e(this.baseTexture,this.frame.clone(),this.orig.clone(),this.trim && this.trim.clone(),this.rotate,this.defaultAnchor) + } + , + e.prototype.updateUvs = function() { + this._uvs === ud && (this._uvs = new td), + this._uvs.set(this._frame, this.baseTexture, this.rotate), + this._updateID++ + } + , + e.from = function(t, r, i) { + void 0 === r && (r = {}), + void 0 === i && (i = aa.STRICT_TEXTURE_CACHE); + var o = "string" == typeof t + , n = null; + if (o) + n = t; + else { + if (!t._pixiId) { + var s = r && r.pixiIdPrefix || "pixiid"; + t._pixiId = s + "_" + ub() + } + n = t._pixiId + } + var a = ya[n]; + if (o && i && !a) + throw new Error("The cacheId \"" + n + "\" does not exist in TextureCache."); + return a || (r.resolution || (r.resolution = kd(t)), + (a = new e(new ia(t,r))).baseTexture.cacheId = n, + ia.addToCache(a.baseTexture, n), + e.addToCache(a, n)), + a + } + , + e.fromURL = function(t, r) { + var i = Object.assign({ + autoLoad: !1 + }, null == r ? void 0 : r.resourceOptions) + , o = e.from(t, Object.assign({ + resourceOptions: i + }, r), !1) + , n = o.baseTexture.resource; + return o.baseTexture.valid ? Promise.resolve(o) : n.load().then(function() { + return Promise.resolve(o) + }) + } + , + e.fromBuffer = function(t, r, i, o) { + return new e(ia.fromBuffer(t, r, i, o)) + } + , + e.fromLoader = function(t, r, i, o) { + var n = new ia(t,Object.assign({ + scaleMode: aa.SCALE_MODE, + resolution: kd(r) + }, o)) + , s = n.resource; + s instanceof dc && (s.url = r); + var a = new e(n); + return i || (i = r), + ia.addToCache(a.baseTexture, i), + e.addToCache(a, i), + i !== r && (ia.addToCache(a.baseTexture, r), + e.addToCache(a, r)), + a.baseTexture.valid ? Promise.resolve(a) : new Promise(function(t) { + a.baseTexture.once("loaded", function() { + return t(a) + }) + } + ) + } + , + e.addToCache = function(t, e) { + e && (-1 === t.textureCacheIds.indexOf(e) && t.textureCacheIds.push(e), + ya[e] && console.warn("Texture added to the cache with an id [" + e + "] that already had an entry"), + ya[e] = t) + } + , + e.removeFromCache = function(t) { + if ("string" == typeof t) { + var e = ya[t]; + if (e) { + var r = e.textureCacheIds.indexOf(t); + return r > -1 && e.textureCacheIds.splice(r, 1), + delete ya[t], + e + } + } else if (t && t.textureCacheIds) { + for (var i = 0; i < t.textureCacheIds.length; ++i) + ya[t.textureCacheIds[i]] === t && delete ya[t.textureCacheIds[i]]; + return t.textureCacheIds.length = 0, + t + } + return null + } + , + Object.defineProperty(e.prototype, "resolution", { + get: function() { + return this.baseTexture.resolution + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "frame", { + get: function() { + return this._frame + }, + set: function(t) { + this._frame = t, + this.noFrame = !1; + var e = t.x + , r = t.y + , i = t.width + , o = t.height + , n = e + i > this.baseTexture.width + , s = r + o > this.baseTexture.height; + if (n || s) { + var a = n && s ? "and" : "or" + , u = "X: " + e + " + " + i + " = " + (e + i) + " > " + this.baseTexture.width + , h = "Y: " + r + " + " + o + " = " + (r + o) + " > " + this.baseTexture.height; + throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: " + u + " " + a + " " + h) + } + this.valid = i && o && this.baseTexture.valid, + this.trim || this.rotate || (this.orig = t), + this.valid && this.updateUvs() + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "rotate", { + get: function() { + return this._rotate + }, + set: function(t) { + this._rotate = t, + this.valid && this.updateUvs() + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "width", { + get: function() { + return this.orig.width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "height", { + get: function() { + return this.orig.height + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.castToBaseTexture = function() { + return this.baseTexture + } + , + e + }(rb.d); + function bg() { + var t = document.createElement("canvas"); + t.width = 16, + t.height = 16; + var e = t.getContext("2d"); + return e.fillStyle = "white", + e.fillRect(0, 0, 16, 16), + new oa(new ia(new cc(t))) + } + function Bb(t) { + t.destroy = function() {} + , + t.on = function() {} + , + t.once = function() {} + , + t.emit = function() {} + } + oa.EMPTY = new oa(new ia()), + Bb(oa.EMPTY), + Bb(oa.EMPTY.baseTexture), + oa.WHITE = bg(), + Bb(oa.WHITE), + Bb(oa.WHITE.baseTexture); + var fc = function(t) { + function e(e, r) { + var i = t.call(this, e, r) || this; + return i.valid = !0, + i.filterFrame = null, + i.filterPoolKey = null, + i.updateUvs(), + i + } + return ba(e, t), + Object.defineProperty(e.prototype, "framebuffer", { + get: function() { + return this.baseTexture.framebuffer + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.resize = function(t, e, r) { + void 0 === r && (r = !0), + t = Math.ceil(t), + e = Math.ceil(e), + this.valid = t > 0 && e > 0, + this._frame.width = this.orig.width = t, + this._frame.height = this.orig.height = e, + r && this.baseTexture.resize(t, e), + this.updateUvs() + } + , + e.prototype.setResolution = function(t) { + var e = this.baseTexture; + e.resolution !== t && (e.setResolution(t), + this.resize(e.width, e.height, !1)) + } + , + e.create = function(t) { + for (var r = arguments, i = [], o = 1; o < arguments.length; o++) + i[o - 1] = r[o]; + return "number" == typeof t && (Va("6.0.0", "Arguments (width, height, scaleMode, resolution) have been deprecated."), + t = { + width: t, + height: i[0], + scaleMode: i[1], + resolution: i[2] + }), + new e(new sd(t)) + } + , + e + }(oa) + , cg = function() { + function t(t) { + this.texturePool = {}, + this.textureOptions = t || {}, + this.enableFullScreen = !1, + this._pixelsWidth = 0, + this._pixelsHeight = 0 + } + return t.prototype.createTexture = function(t, e) { + var r = new sd(Object.assign({ + width: t, + height: e, + resolution: 1 + }, this.textureOptions)); + return new fc(r) + } + , + t.prototype.getOptimalTexture = function(e, r, i) { + void 0 === i && (i = 1); + var o = t.SCREEN_KEY; + e *= i, + r *= i, + this.enableFullScreen && e === this._pixelsWidth && r === this._pixelsHeight || (o = (65535 & (e = sb(e))) << 16 | 65535 & (r = sb(r))), + this.texturePool[o] || (this.texturePool[o] = []); + var n = this.texturePool[o].pop(); + return n || (n = this.createTexture(e, r)), + n.filterPoolKey = o, + n.setResolution(i), + n + } + , + t.prototype.getFilterTexture = function(t, e) { + var r = this.getOptimalTexture(t.width, t.height, e || t.resolution); + return r.filterFrame = t.filterFrame, + r + } + , + t.prototype.returnTexture = function(t) { + var e = t.filterPoolKey; + t.filterFrame = null, + this.texturePool[e].push(t) + } + , + t.prototype.returnFilterTexture = function(t) { + this.returnTexture(t) + } + , + t.prototype.clear = function(t) { + if (t = !1 !== t) + for (var e in this.texturePool) { + var r = this.texturePool[e]; + if (r) + for (var i = 0; i < r.length; i++) + r[i].destroy(!0) + } + this.texturePool = {} + } + , + t.prototype.setScreenSize = function(e) { + if (e.width !== this._pixelsWidth || e.height !== this._pixelsHeight) { + var r = t.SCREEN_KEY + , i = this.texturePool[r]; + if (this.enableFullScreen = e.width > 0 && e.height > 0, + i) + for (var o = 0; o < i.length; o++) + i[o].destroy(!0); + this.texturePool[r] = [], + this._pixelsWidth = e.width, + this._pixelsHeight = e.height + } + } + , + t.SCREEN_KEY = "screen", + t + }() + , vd = function() { + function t(t, e, r, i, o, n, s) { + void 0 === e && (e = 0), + void 0 === r && (r = !1), + void 0 === i && (i = 5126), + this.buffer = t, + this.size = e, + this.normalized = r, + this.type = i, + this.stride = o, + this.start = n, + this.instance = s + } + return t.prototype.destroy = function() { + this.buffer = null + } + , + t.from = function(e, r, i, o, n) { + return new t(e,r,i,o,n) + } + , + t + }() + , dg = 0 + , ta = function() { + function t(t, e, r) { + void 0 === e && (e = !0), + void 0 === r && (r = !1), + this.data = t || new Float32Array(1), + this._glBuffers = {}, + this._updateID = 0, + this.index = r, + this.static = e, + this.id = dg++, + this.disposeRunner = new ka("disposeBuffer") + } + return t.prototype.update = function(t) { + this.data = t || this.data, + this._updateID++ + } + , + t.prototype.dispose = function() { + this.disposeRunner.emit(this, !1) + } + , + t.prototype.destroy = function() { + this.dispose(), + this.data = null + } + , + t.from = function(e) { + return e instanceof Array && (e = new Float32Array(e)), + new t(e) + } + , + t + }(); + function wd(t) { + if (4 === t.BYTES_PER_ELEMENT) + return t instanceof Float32Array ? "Float32Array" : t instanceof Uint32Array ? "Uint32Array" : "Int32Array"; + if (2 === t.BYTES_PER_ELEMENT) { + if (t instanceof Uint16Array) + return "Uint16Array" + } else if (1 === t.BYTES_PER_ELEMENT && t instanceof Uint8Array) + return "Uint8Array"; + return null + } + var eg = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array + }; + function fg(t, e) { + for (var r = 0, i = 0, o = {}, n = 0; n < t.length; n++) + i += e[n], + r += t[n].length; + var s = new ArrayBuffer(4 * r) + , a = null + , u = 0; + for (n = 0; n < t.length; n++) { + var h = e[n] + , $ = t[n] + , p = wd($); + o[p] || (o[p] = new eg[p](s)), + a = o[p]; + for (var l = 0; l < $.length; l++) { + a[(l / h | 0) * i + u + l % h] = $[l] + } + u += h + } + return new Float32Array(s) + } + var xd = { + 5126: 4, + 5123: 2, + 5121: 1 + } + , gg = 0 + , hg = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array, + Uint16Array: Uint16Array + } + , gc = function() { + function t(t, e) { + void 0 === t && (t = []), + void 0 === e && (e = {}), + this.buffers = t, + this.indexBuffer = null, + this.attributes = e, + this.glVertexArrayObjects = {}, + this.id = gg++, + this.instanced = !1, + this.instanceCount = 1, + this.disposeRunner = new ka("disposeGeometry"), + this.refCount = 0 + } + return t.prototype.addAttribute = function(t, e, r, i, o, n, s, a) { + if (void 0 === r && (r = 0), + void 0 === i && (i = !1), + void 0 === a && (a = !1), + !e) + throw new Error("You must pass a buffer when creating an attribute"); + e instanceof ta || (e instanceof Array && (e = new Float32Array(e)), + e = new ta(e)); + var u = t.split("|"); + if (u.length > 1) { + for (var h = 0; h < u.length; h++) + this.addAttribute(u[h], e, r, i, o); + return this + } + var $ = this.buffers.indexOf(e); + return -1 === $ && (this.buffers.push(e), + $ = this.buffers.length - 1), + this.attributes[t] = new vd($,r,i,o,n,s,a), + this.instanced = this.instanced || a, + this + } + , + t.prototype.getAttribute = function(t) { + return this.attributes[t] + } + , + t.prototype.getBuffer = function(t) { + return this.buffers[this.getAttribute(t).buffer] + } + , + t.prototype.addIndex = function(t) { + return t instanceof ta || (t instanceof Array && (t = new Uint16Array(t)), + t = new ta(t)), + t.index = !0, + this.indexBuffer = t, + -1 === this.buffers.indexOf(t) && this.buffers.push(t), + this + } + , + t.prototype.getIndex = function() { + return this.indexBuffer + } + , + t.prototype.interleave = function() { + if (1 === this.buffers.length || 2 === this.buffers.length && this.indexBuffer) + return this; + var t, e = [], r = [], i = new ta; + for (t in this.attributes) { + var o = this.attributes[t] + , n = this.buffers[o.buffer]; + e.push(n.data), + r.push(o.size * xd[o.type] / 4), + o.buffer = 0 + } + for (i.data = fg(e, r), + t = 0; t < this.buffers.length; t++) + this.buffers[t] !== this.indexBuffer && this.buffers[t].destroy(); + return this.buffers = [i], + this.indexBuffer && this.buffers.push(this.indexBuffer), + this + } + , + t.prototype.getSize = function() { + for (var t in this.attributes) { + var e = this.attributes[t]; + return this.buffers[e.buffer].data.length / (e.stride / 4 || e.size) + } + return 0 + } + , + t.prototype.dispose = function() { + this.disposeRunner.emit(this, !1) + } + , + t.prototype.destroy = function() { + this.dispose(), + this.buffers = null, + this.indexBuffer = null, + this.attributes = null + } + , + t.prototype.clone = function() { + for (var e = new t, r = 0; r < this.buffers.length; r++) + e.buffers[r] = new ta(this.buffers[r].data.slice(0)); + for (var r in this.attributes) { + var i = this.attributes[r]; + e.attributes[r] = new vd(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance) + } + return this.indexBuffer && (e.indexBuffer = e.buffers[this.buffers.indexOf(this.indexBuffer)], + e.indexBuffer.index = !0), + e + } + , + t.merge = function(e) { + for (var r, i = new t, o = [], n = [], s = [], a = 0; a < e.length; a++) { + r = e[a]; + for (var u = 0; u < r.buffers.length; u++) + n[u] = n[u] || 0, + n[u] += r.buffers[u].data.length, + s[u] = 0 + } + for (a = 0; a < r.buffers.length; a++) + o[a] = new hg[wd(r.buffers[a].data)](n[a]), + i.buffers[a] = new ta(o[a]); + for (a = 0; a < e.length; a++) { + r = e[a]; + for (u = 0; u < r.buffers.length; u++) + o[u].set(r.buffers[u].data, s[u]), + s[u] += r.buffers[u].data.length + } + if (i.attributes = r.attributes, + r.indexBuffer) { + i.indexBuffer = i.buffers[r.buffers.indexOf(r.indexBuffer)], + i.indexBuffer.index = !0; + var h = 0 + , $ = 0 + , p = 0 + , l = 0; + for (a = 0; a < r.buffers.length; a++) + if (r.buffers[a] !== r.indexBuffer) { + l = a; + break + } + for (var a in r.attributes) { + var c = r.attributes[a]; + (0 | c.buffer) === l && ($ += c.size * xd[c.type] / 4) + } + for (a = 0; a < e.length; a++) { + var d = e[a].indexBuffer.data; + for (u = 0; u < d.length; u++) + i.indexBuffer.data[u + p] += h; + h += r.buffers[l].data.length / $, + p += d.length + } + } + return i + } + , + t + }() + , ig = function(t) { + function e() { + var e = t.call(this) || this; + return e.addAttribute("aVertexPosition", new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])).addIndex([0, 1, 3, 2]), + e + } + return ba(e, t), + e + }(gc) + , jg = function(t) { + function e() { + var e = t.call(this) || this; + return e.vertices = new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]), + e.uvs = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), + e.vertexBuffer = new ta(e.vertices), + e.uvBuffer = new ta(e.uvs), + e.addAttribute("aVertexPosition", e.vertexBuffer).addAttribute("aTextureCoord", e.uvBuffer).addIndex([0, 1, 2, 0, 2, 3]), + e + } + return ba(e, t), + e.prototype.map = function(t, e) { + var r = 0 + , i = 0; + return this.uvs[0] = r, + this.uvs[1] = i, + this.uvs[2] = r + e.width / t.width, + this.uvs[3] = i, + this.uvs[4] = r + e.width / t.width, + this.uvs[5] = i + e.height / t.height, + this.uvs[6] = r, + this.uvs[7] = i + e.height / t.height, + r = e.x, + i = e.y, + this.vertices[0] = r, + this.vertices[1] = i, + this.vertices[2] = r + e.width, + this.vertices[3] = i, + this.vertices[4] = r + e.width, + this.vertices[5] = i + e.height, + this.vertices[6] = r, + this.vertices[7] = i + e.height, + this.invalidate(), + this + } + , + e.prototype.invalidate = function() { + return this.vertexBuffer._updateID++, + this.uvBuffer._updateID++, + this + } + , + e + }(gc) + , kg = 0 + , Pa = function() { + function t(t, e) { + this.uniforms = t, + this.group = !0, + this.syncUniforms = {}, + this.dirtyId = 0, + this.id = kg++, + this.static = !!e + } + return t.prototype.update = function() { + this.dirtyId++ + } + , + t.prototype.add = function(e, r, i) { + this.uniforms[e] = new t(r,i) + } + , + t.from = function(e, r) { + return new t(e,r) + } + , + t + }() + , lg = function() { + function t() { + this.renderTexture = null, + this.target = null, + this.legacy = !1, + this.resolution = 1, + this.sourceFrame = new da, + this.destinationFrame = new da, + this.bindingSourceFrame = new da, + this.bindingDestinationFrame = new da, + this.filters = [], + this.transform = null + } + return t.prototype.clear = function() { + this.target = null, + this.filters = null, + this.renderTexture = null + } + , + t + }() + , Cb = [new ra, new ra, new ra, new ra] + , hc = new la + , yd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.defaultFilterStack = [{}], + r.texturePool = new cg, + r.texturePool.setScreenSize(e.view), + r.statePool = [], + r.quad = new ig, + r.quadUv = new jg, + r.tempRect = new da, + r.activeState = {}, + r.globalUniforms = new Pa({ + outputFrame: new da, + inputSize: new Float32Array(4), + inputPixel: new Float32Array(4), + inputClamp: new Float32Array(4), + resolution: 1, + filterArea: new Float32Array(4), + filterClamp: new Float32Array(4) + },!0), + r.forceClear = !1, + r.useMaxPadding = !1, + r + } + return ba(e, t), + e.prototype.push = function(t, e) { + for (var r = this.renderer, i = this.defaultFilterStack, o = this.statePool.pop() || new lg, n = this.renderer.renderTexture, s = e[0].resolution, a = e[0].padding, u = e[0].autoFit, h = e[0].legacy, $ = 1; $ < e.length; $++) { + var p = e[$]; + s = Math.min(s, p.resolution), + a = this.useMaxPadding ? Math.max(a, p.padding) : a + p.padding, + u = u && p.autoFit, + h = h || p.legacy + } + if (1 === i.length && (this.defaultFilterStack[0].renderTexture = n.current), + i.push(o), + o.resolution = s, + o.legacy = h, + o.target = t, + o.sourceFrame.copyFrom(t.filterArea || t.getBounds(!0)), + o.sourceFrame.pad(a), + u) { + var l = this.tempRect.copyFrom(n.sourceFrame); + r.projection.transform && this.transformAABB(hc.copyFrom(r.projection.transform).invert(), l), + o.sourceFrame.fit(l) + } + this.roundFrame(o.sourceFrame, n.current ? n.current.resolution : r.resolution, n.sourceFrame, n.destinationFrame, r.projection.transform), + o.renderTexture = this.getOptimalFilterTexture(o.sourceFrame.width, o.sourceFrame.height, s), + o.filters = e, + o.destinationFrame.width = o.renderTexture.width, + o.destinationFrame.height = o.renderTexture.height; + var c = this.tempRect; + c.x = 0, + c.y = 0, + c.width = o.sourceFrame.width, + c.height = o.sourceFrame.height, + o.renderTexture.filterFrame = o.sourceFrame, + o.bindingSourceFrame.copyFrom(n.sourceFrame), + o.bindingDestinationFrame.copyFrom(n.destinationFrame), + o.transform = r.projection.transform, + r.projection.transform = null, + n.bind(o.renderTexture, o.sourceFrame, c), + r.framebuffer.clear(0, 0, 0, 0) + } + , + e.prototype.pop = function() { + var t = this.defaultFilterStack + , e = t.pop() + , r = e.filters; + this.activeState = e; + var i = this.globalUniforms.uniforms; + i.outputFrame = e.sourceFrame, + i.resolution = e.resolution; + var o = i.inputSize + , n = i.inputPixel + , s = i.inputClamp; + if (o[0] = e.destinationFrame.width, + o[1] = e.destinationFrame.height, + o[2] = 1 / o[0], + o[3] = 1 / o[1], + n[0] = o[0] * e.resolution, + n[1] = o[1] * e.resolution, + n[2] = 1 / n[0], + n[3] = 1 / n[1], + s[0] = .5 * n[2], + s[1] = .5 * n[3], + s[2] = e.sourceFrame.width * o[2] - .5 * n[2], + s[3] = e.sourceFrame.height * o[3] - .5 * n[3], + e.legacy) { + var a = i.filterArea; + a[0] = e.destinationFrame.width, + a[1] = e.destinationFrame.height, + a[2] = e.sourceFrame.x, + a[3] = e.sourceFrame.y, + i.filterClamp = i.inputClamp + } + this.globalUniforms.update(); + var u = t[t.length - 1]; + if (e.renderTexture.framebuffer.multisample > 1 && this.renderer.framebuffer.blit(), + 1 === r.length) + r[0].apply(this, e.renderTexture, u.renderTexture, Ja.BLEND, e), + this.returnFilterTexture(e.renderTexture); + else { + var h = e.renderTexture + , $ = this.getOptimalFilterTexture(h.width, h.height, e.resolution); + $.filterFrame = h.filterFrame; + var p = 0; + for (p = 0; p < r.length - 1; ++p) { + r[p].apply(this, h, $, Ja.CLEAR, e); + var l = h; + h = $, + $ = l + } + r[p].apply(this, h, u.renderTexture, Ja.BLEND, e), + this.returnFilterTexture(h), + this.returnFilterTexture($) + } + e.clear(), + this.statePool.push(e) + } + , + e.prototype.bindAndClear = function(t, e) { + void 0 === e && (e = Ja.CLEAR); + var r = this.renderer + , i = r.renderTexture + , o = r.state; + if (t === this.defaultFilterStack[this.defaultFilterStack.length - 1].renderTexture ? this.renderer.projection.transform = this.activeState.transform : this.renderer.projection.transform = null, + t && t.filterFrame) { + var n = this.tempRect; + n.x = 0, + n.y = 0, + n.width = t.filterFrame.width, + n.height = t.filterFrame.height, + i.bind(t, t.filterFrame, n) + } else + t !== this.defaultFilterStack[this.defaultFilterStack.length - 1].renderTexture ? i.bind(t) : this.renderer.renderTexture.bind(t, this.activeState.bindingSourceFrame, this.activeState.bindingDestinationFrame); + var s = 1 & o.stateId || this.forceClear; + (e === Ja.CLEAR || e === Ja.BLIT && s) && this.renderer.framebuffer.clear(0, 0, 0, 0) + } + , + e.prototype.applyFilter = function(t, e, r, i) { + var o = this.renderer; + o.state.set(t.state), + this.bindAndClear(r, i), + t.uniforms.uSampler = e, + t.uniforms.filterGlobals = this.globalUniforms, + o.shader.bind(t), + t.legacy ? (this.quadUv.map(e._frame, e.filterFrame), + o.geometry.bind(this.quadUv), + o.geometry.draw(Ba.TRIANGLES)) : (o.geometry.bind(this.quad), + o.geometry.draw(Ba.TRIANGLE_STRIP)) + } + , + e.prototype.calculateSpriteMatrix = function(t, e) { + var r = this.activeState + , i = r.sourceFrame + , o = r.destinationFrame + , n = e._texture.orig + , s = t.set(o.width, 0, 0, o.height, i.x, i.y) + , a = e.worldTransform.copyTo(la.TEMP_MATRIX); + return a.invert(), + s.prepend(a), + s.scale(1 / n.width, 1 / n.height), + s.translate(e.anchor.x, e.anchor.y), + s + } + , + e.prototype.destroy = function() { + this.texturePool.clear(!1) + } + , + e.prototype.getOptimalFilterTexture = function(t, e, r) { + return void 0 === r && (r = 1), + this.texturePool.getOptimalTexture(t, e, r) + } + , + e.prototype.getFilterTexture = function(t, e) { + if ("number" == typeof t) { + var r = t; + t = e, + e = r + } + t = t || this.activeState.renderTexture; + var i = this.texturePool.getOptimalTexture(t.width, t.height, e || t.resolution); + return i.filterFrame = t.filterFrame, + i + } + , + e.prototype.returnFilterTexture = function(t) { + this.texturePool.returnTexture(t) + } + , + e.prototype.emptyPool = function() { + this.texturePool.clear(!0) + } + , + e.prototype.resize = function() { + this.texturePool.setScreenSize(this.renderer.view) + } + , + e.prototype.transformAABB = function(t, e) { + var r = Cb[0] + , i = Cb[1] + , o = Cb[2] + , n = Cb[3]; + r.set(e.left, e.top), + i.set(e.left, e.bottom), + o.set(e.right, e.top), + n.set(e.right, e.bottom), + t.apply(r, r), + t.apply(i, i), + t.apply(o, o), + t.apply(n, n); + var s = Math.min(r.x, i.x, o.x, n.x) + , a = Math.min(r.y, i.y, o.y, n.y) + , u = Math.max(r.x, i.x, o.x, n.x) + , h = Math.max(r.y, i.y, o.y, n.y); + e.x = s, + e.y = a, + e.width = u - s, + e.height = h - a + } + , + e.prototype.roundFrame = function(t, e, r, i, o) { + if (o) { + var n = o.a + , s = o.b + , a = o.c + , u = o.d; + if (!(0 === s && 0 === a || 0 === n && 0 === u)) + return + } + (o = o ? hc.copyFrom(o) : hc.identity()).translate(-r.x, -r.y).scale(i.width / r.width, i.height / r.height).translate(i.x, i.y), + this.transformAABB(o, t), + t.ceil(e), + this.transformAABB(o.invert(), t) + } + , + e + }(pa) + , zd = function() { + function t(t) { + this.renderer = t + } + return t.prototype.flush = function() {} + , + t.prototype.destroy = function() { + this.renderer = null + } + , + t.prototype.start = function() {} + , + t.prototype.stop = function() { + this.flush() + } + , + t.prototype.render = function(t) {} + , + t + }() + , Ad = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.emptyRenderer = new zd(e), + r.currentRenderer = r.emptyRenderer, + r + } + return ba(e, t), + e.prototype.setObjectRenderer = function(t) { + this.currentRenderer !== t && (this.currentRenderer.stop(), + this.currentRenderer = t, + this.currentRenderer.start()) + } + , + e.prototype.flush = function() { + this.setObjectRenderer(this.emptyRenderer) + } + , + e.prototype.reset = function() { + this.setObjectRenderer(this.emptyRenderer) + } + , + e.prototype.copyBoundTextures = function(t, e) { + for (var r = this.renderer.texture.boundTextures, i = e - 1; i >= 0; --i) + t[i] = r[i] || null, + t[i] && (t[i]._batchLocation = i) + } + , + e.prototype.boundArray = function(t, e, r, i) { + for (var o = t.elements, n = t.ids, s = t.count, a = 0, u = 0; u < s; u++) { + var h = o[u] + , $ = h._batchLocation; + if ($ >= 0 && $ < i && e[$] === h) + n[u] = $; + else + for (; a < i; ) { + var p = e[a]; + if (!p || p._batchEnabled !== r || p._batchLocation !== a) { + n[u] = a, + h._batchLocation = a, + e[a] = h; + break + } + a++ + } + } + } + , + e + }(pa) + , Bd = 0 + , Cd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.webGLVersion = 1, + r.extensions = {}, + r.supports = { + uint32Indices: !1 + }, + r.handleContextLost = r.handleContextLost.bind(r), + r.handleContextRestored = r.handleContextRestored.bind(r), + e.view.addEventListener("webglcontextlost", r.handleContextLost, !1), + e.view.addEventListener("webglcontextrestored", r.handleContextRestored, !1), + r + } + return ba(e, t), + Object.defineProperty(e.prototype, "isLost", { + get: function() { + return !this.gl || this.gl.isContextLost() + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.contextChange = function(t) { + this.gl = t, + this.renderer.gl = t, + this.renderer.CONTEXT_UID = Bd++, + t.isContextLost() && t.getExtension("WEBGL_lose_context") && t.getExtension("WEBGL_lose_context").restoreContext() + } + , + e.prototype.initFromContext = function(t) { + this.gl = t, + this.validateContext(t), + this.renderer.gl = t, + this.renderer.CONTEXT_UID = Bd++, + this.renderer.runners.contextChange.emit(t) + } + , + e.prototype.initFromOptions = function(t) { + var e = this.createContext(this.renderer.view, t); + this.initFromContext(e) + } + , + e.prototype.createContext = function(t, e) { + var r; + if (aa.PREFER_ENV >= Aa.WEBGL2 && (r = t.getContext("webgl2", e)), + r) + this.webGLVersion = 2; + else if (this.webGLVersion = 1, + !(r = t.getContext("webgl", e) || t.getContext("experimental-webgl", e))) + throw new Error("This browser does not support WebGL. Try using the canvas renderer"); + return this.gl = r, + this.getExtensions(), + this.gl + } + , + e.prototype.getExtensions = function() { + var t = this.gl + , e = { + anisotropicFiltering: t.getExtension("EXT_texture_filter_anisotropic"), + floatTextureLinear: t.getExtension("OES_texture_float_linear"), + s3tc: t.getExtension("WEBGL_compressed_texture_s3tc"), + s3tc_sRGB: t.getExtension("WEBGL_compressed_texture_s3tc_srgb"), + etc: t.getExtension("WEBGL_compressed_texture_etc"), + etc1: t.getExtension("WEBGL_compressed_texture_etc1"), + pvrtc: t.getExtension("WEBGL_compressed_texture_pvrtc") || t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"), + atc: t.getExtension("WEBGL_compressed_texture_atc"), + astc: t.getExtension("WEBGL_compressed_texture_astc") + }; + 1 === this.webGLVersion ? Object.assign(this.extensions, e, { + drawBuffers: t.getExtension("WEBGL_draw_buffers"), + depthTexture: t.getExtension("WEBGL_depth_texture"), + loseContext: t.getExtension("WEBGL_lose_context"), + vertexArrayObject: t.getExtension("OES_vertex_array_object") || t.getExtension("MOZ_OES_vertex_array_object") || t.getExtension("WEBKIT_OES_vertex_array_object"), + uint32ElementIndex: t.getExtension("OES_element_index_uint"), + floatTexture: t.getExtension("OES_texture_float"), + floatTextureLinear: t.getExtension("OES_texture_float_linear"), + textureHalfFloat: t.getExtension("OES_texture_half_float"), + textureHalfFloatLinear: t.getExtension("OES_texture_half_float_linear") + }) : 2 === this.webGLVersion && Object.assign(this.extensions, e, { + colorBufferFloat: t.getExtension("EXT_color_buffer_float") + }) + } + , + e.prototype.handleContextLost = function(t) { + t.preventDefault() + } + , + e.prototype.handleContextRestored = function() { + this.renderer.runners.contextChange.emit(this.gl) + } + , + e.prototype.destroy = function() { + var t = this.renderer.view; + t.removeEventListener("webglcontextlost", this.handleContextLost), + t.removeEventListener("webglcontextrestored", this.handleContextRestored), + this.gl.useProgram(null), + this.extensions.loseContext && this.extensions.loseContext.loseContext() + } + , + e.prototype.postrender = function() { + this.renderer.renderingToScreen && this.gl.flush() + } + , + e.prototype.validateContext = function(t) { + var e = t.getContextAttributes() + , r = "WebGL2RenderingContext"in self && t instanceof self.WebGL2RenderingContext; + r && (this.webGLVersion = 2), + e.stencil || console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly"); + var i = r || !!t.getExtension("OES_element_index_uint"); + this.supports.uint32Indices = i, + i || console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly") + } + , + e + }(pa) + , mg = function() { + return function(t) { + this.framebuffer = t, + this.stencil = null, + this.dirtyId = 0, + this.dirtyFormat = 0, + this.dirtySize = 0, + this.multisample = _a.NONE, + this.msaaBuffer = null, + this.blitFramebuffer = null + } + }() + , ng = new da + , Dd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.managedFramebuffers = [], + r.unknownFramebuffer = new ec(10,10), + r.msaaSamples = null, + r + } + return ba(e, t), + e.prototype.contextChange = function() { + var t = this.gl = this.renderer.gl; + if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, + this.current = this.unknownFramebuffer, + this.viewport = new da, + this.hasMRT = !0, + this.writeDepthTexture = !0, + this.disposeAll(!0), + 1 === this.renderer.context.webGLVersion) { + var e = this.renderer.context.extensions.drawBuffers + , r = this.renderer.context.extensions.depthTexture; + aa.PREFER_ENV === Aa.WEBGL_LEGACY && (e = null, + r = null), + e ? t.drawBuffers = function(t) { + return e.drawBuffersWEBGL(t) + } + : (this.hasMRT = !1, + t.drawBuffers = function() {} + ), + r || (this.writeDepthTexture = !1) + } else + this.msaaSamples = t.getInternalformatParameter(t.RENDERBUFFER, t.RGBA8, t.SAMPLES) + } + , + e.prototype.bind = function(t, e) { + var r = this.gl; + if (t) { + var i = t.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(t); + this.current !== t && (this.current = t, + r.bindFramebuffer(r.FRAMEBUFFER, i.framebuffer)), + i.dirtyId !== t.dirtyId && (i.dirtyId = t.dirtyId, + i.dirtyFormat !== t.dirtyFormat ? (i.dirtyFormat = t.dirtyFormat, + this.updateFramebuffer(t)) : i.dirtySize !== t.dirtySize && (i.dirtySize = t.dirtySize, + this.resizeFramebuffer(t))); + for (var o = 0; o < t.colorTextures.length; o++) { + var n = t.colorTextures[o]; + this.renderer.texture.unbind(n.parentTextureArray || n) + } + t.depthTexture && this.renderer.texture.unbind(t.depthTexture), + e ? this.setViewport(e.x, e.y, e.width, e.height) : this.setViewport(0, 0, t.width, t.height) + } else + this.current && (this.current = null, + r.bindFramebuffer(r.FRAMEBUFFER, null)), + e ? this.setViewport(e.x, e.y, e.width, e.height) : this.setViewport(0, 0, this.renderer.width, this.renderer.height) + } + , + e.prototype.setViewport = function(t, e, r, i) { + var o = this.viewport; + o.width === r && o.height === i && o.x === t && o.y === e || (o.x = t, + o.y = e, + o.width = r, + o.height = i, + this.gl.viewport(t, e, r, i)) + } + , + Object.defineProperty(e.prototype, "size", { + get: function() { + return this.current ? { + x: 0, + y: 0, + width: this.current.width, + height: this.current.height + } : { + x: 0, + y: 0, + width: this.renderer.width, + height: this.renderer.height + } + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.clear = function(t, e, r, i, o) { + void 0 === o && (o = Qb.COLOR | Qb.DEPTH); + var n = this.gl; + n.clearColor(t, e, r, i), + n.clear(o) + } + , + e.prototype.initFramebuffer = function(t) { + var e = this.gl + , r = new mg(e.createFramebuffer()); + return r.multisample = this.detectSamples(t.multisample), + t.glFramebuffers[this.CONTEXT_UID] = r, + this.managedFramebuffers.push(t), + t.disposeRunner.add(this), + r + } + , + e.prototype.resizeFramebuffer = function(t) { + var e = this.gl + , r = t.glFramebuffers[this.CONTEXT_UID]; + r.stencil && (e.bindRenderbuffer(e.RENDERBUFFER, r.stencil), + e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, t.width, t.height)); + for (var i = t.colorTextures, o = 0; o < i.length; o++) + this.renderer.texture.bind(i[o], 0); + t.depthTexture && this.renderer.texture.bind(t.depthTexture, 0) + } + , + e.prototype.updateFramebuffer = function(t) { + var e = this.gl + , r = t.glFramebuffers[this.CONTEXT_UID] + , i = t.colorTextures.length; + e.drawBuffers || (i = Math.min(i, 1)), + r.multisample > 1 && (r.msaaBuffer = e.createRenderbuffer(), + e.bindRenderbuffer(e.RENDERBUFFER, r.msaaBuffer), + e.renderbufferStorageMultisample(e.RENDERBUFFER, r.multisample, e.RGBA8, t.width, t.height), + e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.RENDERBUFFER, r.msaaBuffer)); + for (var o = [], n = 0; n < i; n++) + if (!(0 === n && r.multisample > 1)) { + var s = t.colorTextures[n] + , a = s.parentTextureArray || s; + this.renderer.texture.bind(a, 0), + e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + n, s.target, a._glTextures[this.CONTEXT_UID].texture, 0), + o.push(e.COLOR_ATTACHMENT0 + n) + } + if ((o.length > 1 && e.drawBuffers(o), + t.depthTexture) && this.writeDepthTexture) { + var u = t.depthTexture; + this.renderer.texture.bind(u, 0), + e.framebufferTexture2D(e.FRAMEBUFFER, e.DEPTH_ATTACHMENT, e.TEXTURE_2D, u._glTextures[this.CONTEXT_UID].texture, 0) + } + r.stencil || !t.stencil && !t.depth || (r.stencil = e.createRenderbuffer(), + e.bindRenderbuffer(e.RENDERBUFFER, r.stencil), + e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, t.width, t.height), + t.depthTexture || e.framebufferRenderbuffer(e.FRAMEBUFFER, e.DEPTH_STENCIL_ATTACHMENT, e.RENDERBUFFER, r.stencil)) + } + , + e.prototype.detectSamples = function(t) { + var e = this.msaaSamples + , r = _a.NONE; + if (t <= 1 || null === e) + return r; + for (var i = 0; i < e.length; i++) + if (e[i] <= t) { + r = e[i]; + break + } + return 1 === r && (r = _a.NONE), + r + } + , + e.prototype.blit = function(t, e, r) { + var i = this.current + , o = this.renderer + , n = this.gl + , s = this.CONTEXT_UID; + if (2 === o.context.webGLVersion && i) { + var a = i.glFramebuffers[s]; + if (a) { + if (!t) { + if (a.multisample <= 1) + return; + a.blitFramebuffer || (a.blitFramebuffer = new ec(i.width,i.height), + a.blitFramebuffer.addColorTexture(0, i.colorTextures[0])), + (t = a.blitFramebuffer).width = i.width, + t.height = i.height + } + e || ((e = ng).width = i.width, + e.height = i.height), + r || (r = e); + var u = e.width === r.width && e.height === r.height; + this.bind(t), + n.bindFramebuffer(n.READ_FRAMEBUFFER, a.framebuffer), + n.blitFramebuffer(e.x, e.y, e.width, e.height, r.x, r.y, r.width, r.height, n.COLOR_BUFFER_BIT, u ? n.NEAREST : n.LINEAR) + } + } + } + , + e.prototype.disposeFramebuffer = function(t, e) { + var r = t.glFramebuffers[this.CONTEXT_UID] + , i = this.gl; + if (r) { + delete t.glFramebuffers[this.CONTEXT_UID]; + var o = this.managedFramebuffers.indexOf(t); + o >= 0 && this.managedFramebuffers.splice(o, 1), + t.disposeRunner.remove(this), + e || (i.deleteFramebuffer(r.framebuffer), + r.stencil && i.deleteRenderbuffer(r.stencil)) + } + } + , + e.prototype.disposeAll = function(t) { + var e = this.managedFramebuffers; + this.managedFramebuffers = []; + for (var r = 0; r < e.length; r++) + this.disposeFramebuffer(e[r], t) + } + , + e.prototype.forceStencil = function() { + var t = this.current; + if (t) { + var e = t.glFramebuffers[this.CONTEXT_UID]; + if (e && !e.stencil) { + t.enableStencil(); + var r = t.width + , i = t.height + , o = this.gl + , n = o.createRenderbuffer(); + o.bindRenderbuffer(o.RENDERBUFFER, n), + o.renderbufferStorage(o.RENDERBUFFER, o.DEPTH_STENCIL, r, i), + e.stencil = n, + o.framebufferRenderbuffer(o.FRAMEBUFFER, o.DEPTH_STENCIL_ATTACHMENT, o.RENDERBUFFER, n) + } + } + } + , + e.prototype.reset = function() { + this.current = this.unknownFramebuffer, + this.viewport = new da + } + , + e + }(pa) + , og = function() { + return function(t) { + this.buffer = t || null, + this.updateID = -1, + this.byteLength = -1, + this.refCount = 0 + } + }() + , ic = { + 5126: 4, + 5123: 2, + 5121: 1 + } + , Ed = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r._activeGeometry = null, + r._activeVao = null, + r.hasVao = !0, + r.hasInstance = !0, + r.canUseUInt32ElementIndex = !1, + r.managedGeometries = {}, + r.managedBuffers = {}, + r + } + return ba(e, t), + e.prototype.contextChange = function() { + this.disposeAll(!0); + var t = this.gl = this.renderer.gl + , e = this.renderer.context; + if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, + 2 !== e.webGLVersion) { + var r = this.renderer.context.extensions.vertexArrayObject; + aa.PREFER_ENV === Aa.WEBGL_LEGACY && (r = null), + r ? (t.createVertexArray = function() { + return r.createVertexArrayOES() + } + , + t.bindVertexArray = function(t) { + return r.bindVertexArrayOES(t) + } + , + t.deleteVertexArray = function(t) { + return r.deleteVertexArrayOES(t) + } + ) : (this.hasVao = !1, + t.createVertexArray = function() { + return null + } + , + t.bindVertexArray = function() { + return null + } + , + t.deleteVertexArray = function() { + return null + } + ) + } + if (2 !== e.webGLVersion) { + var i = t.getExtension("ANGLE_instanced_arrays"); + i ? (t.vertexAttribDivisor = function(t, e) { + return i.vertexAttribDivisorANGLE(t, e) + } + , + t.drawElementsInstanced = function(t, e, r, o, n) { + return i.drawElementsInstancedANGLE(t, e, r, o, n) + } + , + t.drawArraysInstanced = function(t, e, r, o) { + return i.drawArraysInstancedANGLE(t, e, r, o) + } + ) : this.hasInstance = !1 + } + this.canUseUInt32ElementIndex = 2 === e.webGLVersion || !!e.extensions.uint32ElementIndex + } + , + e.prototype.bind = function(t, e) { + e = e || this.renderer.shader.shader; + var r = this.gl + , i = t.glVertexArrayObjects[this.CONTEXT_UID] + , o = !1; + i || (this.managedGeometries[t.id] = t, + t.disposeRunner.add(this), + t.glVertexArrayObjects[this.CONTEXT_UID] = i = {}, + o = !0); + var n = i[e.program.id] || this.initGeometryVao(t, e.program, o); + this._activeGeometry = t, + this._activeVao !== n && (this._activeVao = n, + this.hasVao ? r.bindVertexArray(n) : this.activateVao(t, e.program)), + this.updateBuffers() + } + , + e.prototype.reset = function() { + this.unbind() + } + , + e.prototype.updateBuffers = function() { + for (var t = this._activeGeometry, e = this.gl, r = 0; r < t.buffers.length; r++) { + var i = t.buffers[r] + , o = i._glBuffers[this.CONTEXT_UID]; + if (i._updateID !== o.updateID) { + o.updateID = i._updateID; + var n = i.index ? e.ELEMENT_ARRAY_BUFFER : e.ARRAY_BUFFER; + if (e.bindBuffer(n, o.buffer), + this._boundBuffer = o, + o.byteLength >= i.data.byteLength) + e.bufferSubData(n, 0, i.data); + else { + var s = i.static ? e.STATIC_DRAW : e.DYNAMIC_DRAW; + o.byteLength = i.data.byteLength, + e.bufferData(n, i.data, s) + } + } + } + } + , + e.prototype.checkCompatibility = function(t, e) { + var r = t.attributes + , i = e.attributeData; + for (var o in i) + if (!r[o]) + throw new Error("shader and geometry incompatible, geometry missing the \"" + o + "\" attribute") + } + , + e.prototype.getSignature = function(t, e) { + var r = t.attributes + , i = e.attributeData + , o = ["g", t.id]; + for (var n in r) + i[n] && o.push(n); + return o.join("-") + } + , + e.prototype.initGeometryVao = function(t, e, r) { + void 0 === r && (r = !0), + this.checkCompatibility(t, e); + var i = this.gl + , o = this.CONTEXT_UID + , n = this.getSignature(t, e) + , s = t.glVertexArrayObjects[this.CONTEXT_UID] + , a = s[n]; + if (a) + return s[e.id] = a, + a; + var u = t.buffers + , h = t.attributes + , $ = {} + , p = {}; + for (var l in u) + $[l] = 0, + p[l] = 0; + for (var l in h) + !h[l].size && e.attributeData[l] ? h[l].size = e.attributeData[l].size : h[l].size || console.warn("PIXI Geometry attribute '" + l + "' size cannot be determined (likely the bound shader does not have the attribute)"), + $[h[l].buffer] += h[l].size * ic[h[l].type]; + for (var l in h) { + var c = h[l] + , d = c.size; + void 0 === c.stride && ($[c.buffer] === d * ic[c.type] ? c.stride = 0 : c.stride = $[c.buffer]), + void 0 === c.start && (c.start = p[c.buffer], + p[c.buffer] += d * ic[c.type]) + } + a = i.createVertexArray(), + i.bindVertexArray(a); + for (var f = 0; f < u.length; f++) { + var m = u[f]; + m._glBuffers[o] || (m._glBuffers[o] = new og(i.createBuffer()), + this.managedBuffers[m.id] = m, + m.disposeRunner.add(this)), + r && m._glBuffers[o].refCount++ + } + return this.activateVao(t, e), + this._activeVao = a, + s[e.id] = a, + s[n] = a, + a + } + , + e.prototype.disposeBuffer = function(t, e) { + if (this.managedBuffers[t.id]) { + delete this.managedBuffers[t.id]; + var r = t._glBuffers[this.CONTEXT_UID] + , i = this.gl; + t.disposeRunner.remove(this), + r && (e || i.deleteBuffer(r.buffer), + delete t._glBuffers[this.CONTEXT_UID]) + } + } + , + e.prototype.disposeGeometry = function(t, e) { + if (this.managedGeometries[t.id]) { + delete this.managedGeometries[t.id]; + var r = t.glVertexArrayObjects[this.CONTEXT_UID] + , i = this.gl + , o = t.buffers; + if (t.disposeRunner.remove(this), + r) { + for (var n = 0; n < o.length; n++) { + var s = o[n]._glBuffers[this.CONTEXT_UID]; + s.refCount--, + 0 !== s.refCount || e || this.disposeBuffer(o[n], e) + } + if (!e) + for (var a in r) + if ("g" === a[0]) { + var u = r[a]; + this._activeVao === u && this.unbind(), + i.deleteVertexArray(u) + } + delete t.glVertexArrayObjects[this.CONTEXT_UID] + } + } + } + , + e.prototype.disposeAll = function(t) { + for (var e = Object.keys(this.managedGeometries), r = 0; r < e.length; r++) + this.disposeGeometry(this.managedGeometries[e[r]], t); + e = Object.keys(this.managedBuffers); + for (r = 0; r < e.length; r++) + this.disposeBuffer(this.managedBuffers[e[r]], t) + } + , + e.prototype.activateVao = function(t, e) { + var r = this.gl + , i = this.CONTEXT_UID + , o = t.buffers + , n = t.attributes; + t.indexBuffer && r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, t.indexBuffer._glBuffers[i].buffer); + var s = null; + for (var a in n) { + var u = n[a] + , h = o[u.buffer]._glBuffers[i]; + if (e.attributeData[a]) { + s !== h && (r.bindBuffer(r.ARRAY_BUFFER, h.buffer), + s = h); + var $ = e.attributeData[a].location; + if (r.enableVertexAttribArray($), + r.vertexAttribPointer($, u.size, u.type || r.FLOAT, u.normalized, u.stride, u.start), + u.instance) { + if (!this.hasInstance) + throw new Error("geometry error, GPU Instancing is not supported on this device"); + r.vertexAttribDivisor($, 1) + } + } + } + } + , + e.prototype.draw = function(t, e, r, i) { + var o = this.gl + , n = this._activeGeometry; + if (n.indexBuffer) { + var s = n.indexBuffer.data.BYTES_PER_ELEMENT + , a = 2 === s ? o.UNSIGNED_SHORT : o.UNSIGNED_INT; + 2 === s || 4 === s && this.canUseUInt32ElementIndex ? n.instanced ? o.drawElementsInstanced(t, e || n.indexBuffer.data.length, a, (r || 0) * s, i || 1) : o.drawElements(t, e || n.indexBuffer.data.length, a, (r || 0) * s) : console.warn("unsupported index buffer type: uint32") + } else + n.instanced ? o.drawArraysInstanced(t, r, e || n.getSize(), i || 1) : o.drawArrays(t, r, e || n.getSize()); + return this + } + , + e.prototype.unbind = function() { + this.gl.bindVertexArray(null), + this._activeVao = null, + this._activeGeometry = null + } + , + e + }(pa) + , pg = function() { + function t(t) { + void 0 === t && (t = null), + this.type = qa.NONE, + this.autoDetect = !0, + this.maskObject = t || null, + this.pooled = !1, + this.isMaskData = !0, + this._stencilCounter = 0, + this._scissorCounter = 0, + this._scissorRect = null, + this._target = null + } + return t.prototype.reset = function() { + this.pooled && (this.maskObject = null, + this.type = qa.NONE, + this.autoDetect = !0), + this._target = null + } + , + t.prototype.copyCountersOrReset = function(t) { + t ? (this._stencilCounter = t._stencilCounter, + this._scissorCounter = t._scissorCounter, + this._scissorRect = t._scissorRect) : (this._stencilCounter = 0, + this._scissorCounter = 0, + this._scissorRect = null) + } + , + t + }(); + function Fd(t, e, r) { + var i = t.createShader(e); + return t.shaderSource(i, r), + t.compileShader(i), + i + } + function Gd(t, e, r, i) { + var o = Fd(t, t.VERTEX_SHADER, e) + , n = Fd(t, t.FRAGMENT_SHADER, r) + , s = t.createProgram(); + if (t.attachShader(s, o), + t.attachShader(s, n), + i) + for (var a in i) + t.bindAttribLocation(s, i[a], a); + return t.linkProgram(s), + t.getProgramParameter(s, t.LINK_STATUS) || (t.getShaderParameter(o, t.COMPILE_STATUS) || (console.warn(e), + console.error(t.getShaderInfoLog(o))), + t.getShaderParameter(n, t.COMPILE_STATUS) || (console.warn(r), + console.error(t.getShaderInfoLog(n))), + console.error("Pixi.js Error: Could not initialize shader."), + console.error("gl.VALIDATE_STATUS", t.getProgramParameter(s, t.VALIDATE_STATUS)), + console.error("gl.getError()", t.getError()), + "" !== t.getProgramInfoLog(s) && console.warn("Pixi.js Warning: gl.getProgramInfoLog()", t.getProgramInfoLog(s)), + t.deleteProgram(s), + s = null), + t.deleteShader(o), + t.deleteShader(n), + s + } + function jc(t) { + for (var e = new Array(t), r = 0; r < e.length; r++) + e[r] = !1; + return e + } + function Hd(t, e) { + switch (t) { + case "float": + return 0; + case "vec2": + return new Float32Array(2 * e); + case "vec3": + return new Float32Array(3 * e); + case "vec4": + return new Float32Array(4 * e); + case "int": + case "uint": + case "sampler2D": + case "sampler2DArray": + return 0; + case "ivec2": + return new Int32Array(2 * e); + case "ivec3": + return new Int32Array(3 * e); + case "ivec4": + return new Int32Array(4 * e); + case "uvec2": + return new Uint32Array(2 * e); + case "uvec3": + return new Uint32Array(3 * e); + case "uvec4": + return new Uint32Array(4 * e); + case "bool": + return !1; + case "bvec2": + return jc(2 * e); + case "bvec3": + return jc(3 * e); + case "bvec4": + return jc(4 * e); + case "mat2": + return new Float32Array([1, 0, 0, 1]); + case "mat3": + return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); + case "mat4": + return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]); + } + return null + } + var Id, Jd = {}, Db = Jd; + function Kd() { + if (Db === Jd || Db && Db.isContextLost()) { + var t = document.createElement("canvas") + , e = void 0; + aa.PREFER_ENV >= Aa.WEBGL2 && (e = t.getContext("webgl2", {})), + e || ((e = t.getContext("webgl", {}) || t.getContext("experimental-webgl", {})) ? e.getExtension("WEBGL_draw_buffers") : e = null), + Db = e + } + return Db + } + function qg() { + if (!Id) { + Id = xa.MEDIUM; + var t = Kd(); + if (t && t.getShaderPrecisionFormat) { + var e = t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT); + Id = e.precision ? xa.HIGH : xa.MEDIUM + } + } + return Id + } + function Ld(t, e, r) { + if ("precision" !== t.substring(0, 9)) { + var i = e; + return e === xa.HIGH && r !== xa.HIGH && (i = xa.MEDIUM), + "precision " + i + " float;\n" + t + } + return r !== xa.HIGH && "precision highp" === t.substring(0, 15) ? t.replace("precision highp", "precision mediump") : t + } + var rg = { + float: 1, + vec2: 2, + vec3: 3, + vec4: 4, + int: 1, + ivec2: 2, + ivec3: 3, + ivec4: 4, + uint: 1, + uvec2: 2, + uvec3: 3, + uvec4: 4, + bool: 1, + bvec2: 2, + bvec3: 3, + bvec4: 4, + mat2: 4, + mat3: 9, + mat4: 16, + sampler2D: 1 + }; + function sg(t) { + return rg[t] + } + var kc = null + , Md = { + FLOAT: "float", + FLOAT_VEC2: "vec2", + FLOAT_VEC3: "vec3", + FLOAT_VEC4: "vec4", + INT: "int", + INT_VEC2: "ivec2", + INT_VEC3: "ivec3", + INT_VEC4: "ivec4", + UNSIGNED_INT: "uint", + UNSIGNED_INT_VEC2: "uvec2", + UNSIGNED_INT_VEC3: "uvec3", + UNSIGNED_INT_VEC4: "uvec4", + BOOL: "bool", + BOOL_VEC2: "bvec2", + BOOL_VEC3: "bvec3", + BOOL_VEC4: "bvec4", + FLOAT_MAT2: "mat2", + FLOAT_MAT3: "mat3", + FLOAT_MAT4: "mat4", + SAMPLER_2D: "sampler2D", + INT_SAMPLER_2D: "sampler2D", + UNSIGNED_INT_SAMPLER_2D: "sampler2D", + SAMPLER_CUBE: "samplerCube", + INT_SAMPLER_CUBE: "samplerCube", + UNSIGNED_INT_SAMPLER_CUBE: "samplerCube", + SAMPLER_2D_ARRAY: "sampler2DArray", + INT_SAMPLER_2D_ARRAY: "sampler2DArray", + UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray" + }; + function Nd(t, e) { + if (!kc) { + var r = Object.keys(Md); + kc = {}; + for (var i = 0; i < r.length; ++i) { + var o = r[i]; + kc[t[o]] = Md[o] + } + } + return kc[e] + } + var lc = [{ + test: function(t) { + return "float" === t.type && 1 === t.size + }, + code: function(t) { + return "\n if(uv[\"" + t + "\"] !== ud[\"" + t + "\"].value)\n {\n ud[\"" + t + "\"].value = uv[\"" + t + "\"]\n gl.uniform1f(ud[\"" + t + "\"].location, uv[\"" + t + "\"])\n }\n " + } + }, { + test: function(t) { + return ("sampler2D" === t.type || "samplerCube" === t.type || "sampler2DArray" === t.type) && 1 === t.size && !t.isArray + }, + code: function(t) { + return "t = syncData.textureCount++;\n\n renderer.texture.bind(uv[\"" + t + "\"], t);\n\n if(ud[\"" + t + "\"].value !== t)\n {\n ud[\"" + t + "\"].value = t;\n gl.uniform1i(ud[\"" + t + "\"].location, t);\n; // eslint-disable-line max-len\n }" + } + }, { + test: function(t, e) { + return "mat3" === t.type && 1 === t.size && void 0 !== e.a + }, + code: function(t) { + return "\n gl.uniformMatrix3fv(ud[\"" + t + "\"].location, false, uv[\"" + t + "\"].toArray(true));\n " + } + }, { + test: function(t, e) { + return "vec2" === t.type && 1 === t.size && void 0 !== e.x + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[\"" + t + "\"].location, v.x, v.y);\n }" + } + }, { + test: function(t) { + return "vec2" === t.type && 1 === t.size + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud[\"" + t + "\"].location, v[0], v[1]);\n }\n " + } + }, { + test: function(t, e) { + return "vec4" === t.type && 1 === t.size && void 0 !== e.width + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[\"" + t + "\"].location, v.x, v.y, v.width, v.height)\n }" + } + }, { + test: function(t) { + return "vec4" === t.type && 1 === t.size + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud[\"" + t + "\"].location, v[0], v[1], v[2], v[3])\n }" + } + }] + , tg = { + float: "\n if(cv !== v)\n {\n cv.v = v;\n gl.uniform1f(location, v)\n }", + vec2: "\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1])\n }", + vec3: "\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }", + vec4: "gl.uniform4f(location, v[0], v[1], v[2], v[3])", + int: "gl.uniform1i(location, v)", + ivec2: "gl.uniform2i(location, v[0], v[1])", + ivec3: "gl.uniform3i(location, v[0], v[1], v[2])", + ivec4: "gl.uniform4i(location, v[0], v[1], v[2], v[3])", + uint: "gl.uniform1ui(location, v)", + uvec2: "gl.uniform2ui(location, v[0], v[1])", + uvec3: "gl.uniform3ui(location, v[0], v[1], v[2])", + uvec4: "gl.uniform4ui(location, v[0], v[1], v[2], v[3])", + bool: "gl.uniform1i(location, v)", + bvec2: "gl.uniform2i(location, v[0], v[1])", + bvec3: "gl.uniform3i(location, v[0], v[1], v[2])", + bvec4: "gl.uniform4i(location, v[0], v[1], v[2], v[3])", + mat2: "gl.uniformMatrix2fv(location, false, v)", + mat3: "gl.uniformMatrix3fv(location, false, v)", + mat4: "gl.uniformMatrix4fv(location, false, v)", + sampler2D: "gl.uniform1i(location, v)", + samplerCube: "gl.uniform1i(location, v)", + sampler2DArray: "gl.uniform1i(location, v)" + } + , ug = { + float: "gl.uniform1fv(location, v)", + vec2: "gl.uniform2fv(location, v)", + vec3: "gl.uniform3fv(location, v)", + vec4: "gl.uniform4fv(location, v)", + mat4: "gl.uniformMatrix4fv(location, false, v)", + mat3: "gl.uniformMatrix3fv(location, false, v)", + mat2: "gl.uniformMatrix2fv(location, false, v)", + int: "gl.uniform1iv(location, v)", + ivec2: "gl.uniform2iv(location, v)", + ivec3: "gl.uniform3iv(location, v)", + ivec4: "gl.uniform4iv(location, v)", + uint: "gl.uniform1uiv(location, v)", + uvec2: "gl.uniform2uiv(location, v)", + uvec3: "gl.uniform3uiv(location, v)", + uvec4: "gl.uniform4uiv(location, v)", + bool: "gl.uniform1iv(location, v)", + bvec2: "gl.uniform2iv(location, v)", + bvec3: "gl.uniform3iv(location, v)", + bvec4: "gl.uniform4iv(location, v)", + sampler2D: "gl.uniform1iv(location, v)", + samplerCube: "gl.uniform1iv(location, v)", + sampler2DArray: "gl.uniform1iv(location, v)" + }; + function vg(t, e) { + var r = ["\n var v = null;\n var cv = null\n var t = 0;\n var gl = renderer.gl\n "]; + for (var i in t.uniforms) { + var o = e[i]; + if (o) { + for (var n = t.uniforms[i], s = !1, a = 0; a < lc.length; a++) + if (lc[a].test(o, n)) { + r.push(lc[a].code(i, n)), + s = !0; + break + } + if (!s) { + var u = (1 === o.size ? tg : ug)[o.type].replace("location", "ud[\"" + i + "\"].location"); + r.push("\n cv = ud[\"" + i + "\"].value;\n v = uv[\"" + i + "\"];\n " + u + ";") + } + } else + t.uniforms[i].group && r.push("\n renderer.shader.syncUniformGroup(uv[\"" + i + "\"], syncData);\n ") + } + return new Function("ud","uv","renderer","syncData",r.join("\n")) + } + var mc, wg = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join("\n"); + function xg(t) { + for (var e = "", r = 0; r < t; ++r) + r > 0 && (e += "\nelse "), + r < t - 1 && (e += "if(test == " + r + ".0){}"); + return e + } + function yg(t, e) { + if (0 === t) + throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`"); + for (var r = e.createShader(e.FRAGMENT_SHADER); ; ) { + var i = wg.replace(/%forloop%/gi, xg(t)); + if (e.shaderSource(r, i), + e.compileShader(r), + e.getShaderParameter(r, e.COMPILE_STATUS)) + break; + t = t / 2 | 0 + } + return t + } + function zg() { + if ("boolean" == typeof mc) + return mc; + try { + var t = new Function("param1","param2","param3","return param1[param2] === param3;"); + mc = !0 === t({ + a: "b" + }, "a", "b") + } catch (e) { + mc = !1 + } + return mc + } + var Ag = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}" + , Bg = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n" + , Cg = 0 + , Eb = {} + , nc = function() { + function t(e, r, i) { + void 0 === i && (i = "pixi-shader"), + this.id = Cg++, + this.vertexSrc = e || t.defaultVertexSrc, + this.fragmentSrc = r || t.defaultFragmentSrc, + this.vertexSrc = this.vertexSrc.trim(), + this.fragmentSrc = this.fragmentSrc.trim(), + "#version" !== this.vertexSrc.substring(0, 8) && (i = i.replace(/\s+/g, "-"), + Eb[i] ? (Eb[i]++, + i += "-" + Eb[i]) : Eb[i] = 1, + this.vertexSrc = "#define SHADER_NAME " + i + "\n" + this.vertexSrc, + this.fragmentSrc = "#define SHADER_NAME " + i + "\n" + this.fragmentSrc, + this.vertexSrc = Ld(this.vertexSrc, aa.PRECISION_VERTEX, xa.HIGH), + this.fragmentSrc = Ld(this.fragmentSrc, aa.PRECISION_FRAGMENT, qg())), + this.extractData(this.vertexSrc, this.fragmentSrc), + this.glPrograms = {}, + this.syncUniforms = null + } + return t.prototype.extractData = function(t, e) { + var r = Kd(); + if (r) { + var i = Gd(r, t, e); + this.attributeData = this.getAttributeData(i, r), + this.uniformData = this.getUniformData(i, r), + r.deleteProgram(i) + } else + this.uniformData = {}, + this.attributeData = {} + } + , + t.prototype.getAttributeData = function(t, e) { + for (var r = {}, i = [], o = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES), n = 0; n < o; n++) { + var s = e.getActiveAttrib(t, n) + , a = Nd(e, s.type) + , u = { + type: a, + name: s.name, + size: sg(a), + location: 0 + }; + r[s.name] = u, + i.push(u) + } + i.sort(function(t, e) { + return t.name > e.name ? 1 : -1 + }); + for (n = 0; n < i.length; n++) + i[n].location = n; + return r + } + , + t.prototype.getUniformData = function(t, e) { + for (var r = {}, i = e.getProgramParameter(t, e.ACTIVE_UNIFORMS), o = 0; o < i; o++) { + var n = e.getActiveUniform(t, o) + , s = n.name.replace(/\[.*?\]$/, "") + , a = n.name.match(/\[.*?\]$/) + , u = Nd(e, n.type); + r[s] = { + type: u, + size: n.size, + isArray: a, + value: Hd(u, n.size) + } + } + return r + } + , + Object.defineProperty(t, "defaultVertexSrc", { + get: function() { + return Bg + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "defaultFragmentSrc", { + get: function() { + return Ag + }, + enumerable: !1, + configurable: !0 + }), + t.from = function(e, r, i) { + var o = e + r + , n = jd[o]; + return n || (jd[o] = n = new t(e,r,i)), + n + } + , + t + }() + , oc = function() { + function t(t, e) { + for (var r in this.program = t, + this.uniformGroup = e ? e instanceof Pa ? e : new Pa(e) : new Pa({}), + t.uniformData) + this.uniformGroup.uniforms[r]instanceof Array && (this.uniformGroup.uniforms[r] = new Float32Array(this.uniformGroup.uniforms[r])) + } + return t.prototype.checkUniformExists = function(t, e) { + if (e.uniforms[t]) + return !0; + for (var r in e.uniforms) { + var i = e.uniforms[r]; + if (i.group && this.checkUniformExists(t, i)) + return !0 + } + return !1 + } + , + t.prototype.destroy = function() { + this.uniformGroup = null + } + , + Object.defineProperty(t.prototype, "uniforms", { + get: function() { + return this.uniformGroup.uniforms + }, + enumerable: !1, + configurable: !0 + }), + t.from = function(e, r, i) { + return new t(nc.from(e, r),i) + } + , + t + }() + , pc = 0 + , qc = 1 + , rc = 2 + , sc = 3 + , tc = 4 + , uc = 5 + , Fb = function() { + function t() { + this.data = 0, + this.blendMode = K.NORMAL, + this.polygonOffset = 0, + this.blend = !0, + this.depthMask = !0 + } + return Object.defineProperty(t.prototype, "blend", { + get: function() { + return !!(this.data & 1 << pc) + }, + set: function(t) { + !!(this.data & 1 << pc) !== t && (this.data ^= 1 << pc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "offsets", { + get: function() { + return !!(this.data & 1 << qc) + }, + set: function(t) { + !!(this.data & 1 << qc) !== t && (this.data ^= 1 << qc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "culling", { + get: function() { + return !!(this.data & 1 << rc) + }, + set: function(t) { + !!(this.data & 1 << rc) !== t && (this.data ^= 1 << rc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "depthTest", { + get: function() { + return !!(this.data & 1 << sc) + }, + set: function(t) { + !!(this.data & 1 << sc) !== t && (this.data ^= 1 << sc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "depthMask", { + get: function() { + return !!(this.data & 1 << uc) + }, + set: function(t) { + !!(this.data & 1 << uc) !== t && (this.data ^= 1 << uc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "clockwiseFrontFace", { + get: function() { + return !!(this.data & 1 << tc) + }, + set: function(t) { + !!(this.data & 1 << tc) !== t && (this.data ^= 1 << tc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "blendMode", { + get: function() { + return this._blendMode + }, + set: function(t) { + this.blend = t !== K.NONE, + this._blendMode = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "polygonOffset", { + get: function() { + return this._polygonOffset + }, + set: function(t) { + this.offsets = !!t, + this._polygonOffset = t + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.toString = function() { + return "[@pixi/core:State blendMode=" + this.blendMode + " clockwiseFrontFace=" + this.clockwiseFrontFace + " culling=" + this.culling + " depthMask=" + this.depthMask + " polygonOffset=" + this.polygonOffset + "]" + } + , + t.for2d = function() { + var e = new t; + return e.depthTest = !1, + e.blend = !0, + e + } + , + t + }() + , Dg = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n" + , Eg = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n" + , Fg = function(t) { + function e(r, i, o) { + var n = this + , s = nc.from(r || e.defaultVertexSrc, i || e.defaultFragmentSrc); + return (n = t.call(this, s, o) || this).padding = 0, + n.resolution = aa.FILTER_RESOLUTION, + n.enabled = !0, + n.autoFit = !0, + n.legacy = !!n.program.attributeData.aTextureCoord, + n.state = new Fb, + n + } + return ba(e, t), + e.prototype.apply = function(t, e, r, i, o) { + t.applyFilter(this, e, r, i) + } + , + Object.defineProperty(e.prototype, "blendMode", { + get: function() { + return this.state.blendMode + }, + set: function(t) { + this.state.blendMode = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e, "defaultVertexSrc", { + get: function() { + return Dg + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e, "defaultFragmentSrc", { + get: function() { + return Eg + }, + enumerable: !1, + configurable: !0 + }), + e + }(oc) + , Gg = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n" + , Hg = "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n" + , Od = new la + , Ig = function() { + function t(t, e) { + this._texture = t, + this.mapCoord = new la, + this.uClampFrame = new Float32Array(4), + this.uClampOffset = new Float32Array(2), + this._textureID = -1, + this._updateID = 0, + this.clampOffset = 0, + this.clampMargin = void 0 === e ? .5 : e, + this.isSimple = !1 + } + return Object.defineProperty(t.prototype, "texture", { + get: function() { + return this._texture + }, + set: function(t) { + this._texture = t, + this._textureID = -1 + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.multiplyUvs = function(t, e) { + void 0 === e && (e = t); + for (var r = this.mapCoord, i = 0; i < t.length; i += 2) { + var o = t[i] + , n = t[i + 1]; + e[i] = o * r.a + n * r.c + r.tx, + e[i + 1] = o * r.b + n * r.d + r.ty + } + return e + } + , + t.prototype.update = function(t) { + var e = this._texture; + if (!e || !e.valid) + return !1; + if (!t && this._textureID === e._updateID) + return !1; + this._textureID = e._updateID, + this._updateID++; + var r = e._uvs; + this.mapCoord.set(r.x1 - r.x0, r.y1 - r.y0, r.x3 - r.x0, r.y3 - r.y0, r.x0, r.y0); + var i = e.orig + , o = e.trim; + o && (Od.set(i.width / o.width, 0, 0, i.height / o.height, -o.x / o.width, -o.y / o.height), + this.mapCoord.append(Od)); + var n = e.baseTexture + , s = this.uClampFrame + , a = this.clampMargin / n.resolution + , u = this.clampOffset; + return s[0] = (e._frame.x + a + u) / n.width, + s[1] = (e._frame.y + a + u) / n.height, + s[2] = (e._frame.x + e._frame.width - a + u) / n.width, + s[3] = (e._frame.y + e._frame.height - a + u) / n.height, + this.uClampOffset[0] = u / n.realWidth, + this.uClampOffset[1] = u / n.realHeight, + this.isSimple = e._frame.width === n.width && e._frame.height === n.height && 0 === e.rotate, + !0 + } + , + t + }() + , Jg = function(t) { + function e(e) { + var r = this + , i = new la; + return r = t.call(this, Gg, Hg) || this, + e.renderable = !1, + r.maskSprite = e, + r.maskMatrix = i, + r + } + return ba(e, t), + e.prototype.apply = function(t, e, r, i) { + var o = this.maskSprite + , n = o._texture; + n.valid && (n.uvMatrix || (n.uvMatrix = new Ig(n,0)), + n.uvMatrix.update(), + this.uniforms.npmAlpha = n.baseTexture.alphaMode ? 0 : 1, + this.uniforms.mask = n, + this.uniforms.otherMatrix = t.calculateSpriteMatrix(this.maskMatrix, o).prepend(n.uvMatrix.mapCoord), + this.uniforms.alpha = o.worldAlpha, + this.uniforms.maskClamp = n.uvMatrix.uClampFrame, + t.applyFilter(this, e, r, i)) + } + , + e + }(Fg) + , Pd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.enableScissor = !0, + r.alphaMaskPool = [], + r.maskDataPool = [], + r.maskStack = [], + r.alphaMaskIndex = 0, + r + } + return ba(e, t), + e.prototype.setMaskStack = function(t) { + this.maskStack = t, + this.renderer.scissor.setMaskStack(t), + this.renderer.stencil.setMaskStack(t) + } + , + e.prototype.push = function(t, e) { + var r = e; + if (!r.isMaskData) { + var i = this.maskDataPool.pop() || new pg; + i.pooled = !0, + i.maskObject = e, + r = i + } + switch (r.autoDetect && this.detect(r), + r.copyCountersOrReset(this.maskStack[this.maskStack.length - 1]), + r._target = t, + r.type) { + case qa.SCISSOR: + this.maskStack.push(r), + this.renderer.scissor.push(r); + break; + case qa.STENCIL: + this.maskStack.push(r), + this.renderer.stencil.push(r); + break; + case qa.SPRITE: + r.copyCountersOrReset(null), + this.pushSpriteMask(r), + this.maskStack.push(r); + } + } + , + e.prototype.pop = function(t) { + var e = this.maskStack.pop(); + if (e && e._target === t) { + switch (e.type) { + case qa.SCISSOR: + this.renderer.scissor.pop(); + break; + case qa.STENCIL: + this.renderer.stencil.pop(e.maskObject); + break; + case qa.SPRITE: + this.popSpriteMask(); + } + e.reset(), + e.pooled && this.maskDataPool.push(e) + } + } + , + e.prototype.detect = function(t) { + var e = t.maskObject; + if (e.isSprite) + t.type = qa.SPRITE; + else if (t.type = qa.STENCIL, + this.enableScissor && e.isFastRect && e.isFastRect()) { + var r = e.worldTransform + , i = Math.atan2(r.b, r.a) + , o = Math.atan2(r.d, r.c); + i = Math.round(i * (180 / Math.PI) * 100), + o = ((o = Math.round(o * (180 / Math.PI) * 100) - i) % 18e3 + 18e3) % 18e3, + 0 === (i = (i % 9e3 + 9e3) % 9e3) && 9e3 === o && (t.type = qa.SCISSOR) + } + } + , + e.prototype.pushSpriteMask = function(t) { + var e = t.maskObject + , r = t._target + , i = this.alphaMaskPool[this.alphaMaskIndex]; + i || (i = this.alphaMaskPool[this.alphaMaskIndex] = [new Jg(e)]), + i[0].resolution = this.renderer.resolution, + i[0].maskSprite = e; + var o = r.filterArea; + r.filterArea = e.getBounds(!0), + this.renderer.filter.push(r, i), + r.filterArea = o, + this.alphaMaskIndex++ + } + , + e.prototype.popSpriteMask = function() { + this.renderer.filter.pop(), + this.alphaMaskIndex-- + } + , + e + }(pa) + , Qd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.maskStack = [], + r.glConst = 0, + r + } + return ba(e, t), + e.prototype.getStackLength = function() { + return this.maskStack.length + } + , + e.prototype.setMaskStack = function(t) { + var e = this.renderer.gl + , r = this.getStackLength(); + this.maskStack = t; + var i = this.getStackLength(); + i !== r && (0 === i ? e.disable(this.glConst) : (e.enable(this.glConst), + this._useCurrent())) + } + , + e.prototype._useCurrent = function() {} + , + e.prototype.destroy = function() { + t.prototype.destroy.call(this), + this.maskStack = null + } + , + e + }(pa) + , Rd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.glConst = WebGLRenderingContext.SCISSOR_TEST, + r + } + return ba(e, t), + e.prototype.getStackLength = function() { + var t = this.maskStack[this.maskStack.length - 1]; + return t ? t._scissorCounter : 0 + } + , + e.prototype.push = function(t) { + var e = t.maskObject; + e.renderable = !0; + var r = t._scissorRect + , i = e.getBounds(!0) + , o = this.renderer.gl; + e.renderable = !1, + r ? i.fit(r) : o.enable(o.SCISSOR_TEST), + t._scissorCounter++, + t._scissorRect = i, + this._useCurrent() + } + , + e.prototype.pop = function() { + var t = this.renderer.gl; + this.getStackLength() > 0 ? this._useCurrent() : t.disable(t.SCISSOR_TEST) + } + , + e.prototype._useCurrent = function() { + var t = this.maskStack[this.maskStack.length - 1]._scissorRect + , e = this.renderer.renderTexture.current + , r = this.renderer.projection + , i = r.transform + , o = r.sourceFrame + , n = r.destinationFrame + , s = e ? e.resolution : this.renderer.resolution + , a = n.width / o.width + , u = n.height / o.height + , h = ((t.x - o.x) * a + n.x) * s + , $ = ((t.y - o.y) * u + n.y) * s + , p = t.width * a * s + , l = t.height * u * s; + i && (h += i.tx * s, + $ += i.ty * s), + e || ($ = this.renderer.height - l - $), + this.renderer.gl.scissor(h, $, p, l) + } + , + e + }(Qd) + , Sd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.glConst = WebGLRenderingContext.STENCIL_TEST, + r + } + return ba(e, t), + e.prototype.getStackLength = function() { + var t = this.maskStack[this.maskStack.length - 1]; + return t ? t._stencilCounter : 0 + } + , + e.prototype.push = function(t) { + var e = t.maskObject + , r = this.renderer.gl + , i = t._stencilCounter; + 0 === i && (this.renderer.framebuffer.forceStencil(), + r.enable(r.STENCIL_TEST)), + t._stencilCounter++, + r.colorMask(!1, !1, !1, !1), + r.stencilFunc(r.EQUAL, i, this._getBitwiseMask()), + r.stencilOp(r.KEEP, r.KEEP, r.INCR), + e.renderable = !0, + e.render(this.renderer), + this.renderer.batch.flush(), + this.renderer.framebuffer.blit(), + e.renderable = !1, + this._useCurrent() + } + , + e.prototype.pop = function(t) { + var e = this.renderer.gl; + 0 === this.getStackLength() ? (e.disable(e.STENCIL_TEST), + e.clear(e.STENCIL_BUFFER_BIT), + e.clearStencil(0)) : (e.colorMask(!1, !1, !1, !1), + e.stencilOp(e.KEEP, e.KEEP, e.DECR), + t.renderable = !0, + t.render(this.renderer), + this.renderer.batch.flush(), + t.renderable = !1, + this._useCurrent()) + } + , + e.prototype._useCurrent = function() { + var t = this.renderer.gl; + t.colorMask(!0, !0, !0, !0), + t.stencilFunc(t.EQUAL, this.getStackLength(), this._getBitwiseMask()), + t.stencilOp(t.KEEP, t.KEEP, t.KEEP) + } + , + e.prototype._getBitwiseMask = function() { + return (1 << this.getStackLength()) - 1 + } + , + e + }(Qd) + , Td = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.destinationFrame = null, + r.sourceFrame = null, + r.defaultFrame = null, + r.projectionMatrix = new la, + r.transform = null, + r + } + return ba(e, t), + e.prototype.update = function(t, e, r, i) { + this.destinationFrame = t || this.destinationFrame || this.defaultFrame, + this.sourceFrame = e || this.sourceFrame || t, + this.calculateProjection(this.destinationFrame, this.sourceFrame, r, i), + this.transform && this.projectionMatrix.append(this.transform); + var o = this.renderer; + o.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix, + o.globalUniforms.update(), + o.shader.shader && o.shader.syncUniformGroup(o.shader.shader.uniforms.globals) + } + , + e.prototype.calculateProjection = function(t, e, r, i) { + var o = this.projectionMatrix + , n = i ? -1 : 1; + o.identity(), + o.a = 1 / e.width * 2, + o.d = n * (1 / e.height * 2), + o.tx = -1 - e.x * o.a, + o.ty = -n - e.y * o.d + } + , + e.prototype.setTransform = function(t) {} + , + e + }(pa) + , Qa = new da + , fb = new da + , Ud = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.clearColor = e._backgroundColorRgba, + r.defaultMaskStack = [], + r.current = null, + r.sourceFrame = new da, + r.destinationFrame = new da, + r.viewportFrame = new da, + r + } + return ba(e, t), + e.prototype.bind = function(t, e, r) { + void 0 === t && (t = null); + var i, o, n, s = this.renderer; + this.current = t, + t ? (n = (i = t.baseTexture).resolution, + e || (Qa.width = t.frame.width, + Qa.height = t.frame.height, + e = Qa), + r || (fb.x = t.frame.x, + fb.y = t.frame.y, + fb.width = e.width, + fb.height = e.height, + r = fb), + o = i.framebuffer) : (n = s.resolution, + e || (Qa.width = s.screen.width, + Qa.height = s.screen.height, + e = Qa), + r || ((r = Qa).width = e.width, + r.height = e.height)); + var a = this.viewportFrame; + a.x = r.x * n, + a.y = r.y * n, + a.width = r.width * n, + a.height = r.height * n, + t || (a.y = s.view.height - (a.y + a.height)), + this.renderer.framebuffer.bind(o, a), + this.renderer.projection.update(r, e, n, !o), + t ? this.renderer.mask.setMaskStack(i.maskStack) : this.renderer.mask.setMaskStack(this.defaultMaskStack), + this.sourceFrame.copyFrom(e), + this.destinationFrame.copyFrom(r) + } + , + e.prototype.clear = function(t, e) { + t = this.current ? t || this.current.baseTexture.clearColor : t || this.clearColor; + var r = this.destinationFrame + , i = this.current ? this.current.baseTexture : this.renderer.screen + , o = r.width !== i.width || r.height !== i.height; + if (o) { + var n = this.viewportFrame + , s = n.x + , a = n.y + , u = n.width + , h = n.height; + this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST), + this.renderer.gl.scissor(s, a, u, h) + } + this.renderer.framebuffer.clear(t[0], t[1], t[2], t[3], e), + o && this.renderer.scissor.pop() + } + , + e.prototype.resize = function() { + this.bind(null) + } + , + e.prototype.reset = function() { + this.bind(null) + } + , + e + }(pa) + , h = function() { + return function() {} + }() + , Kg = function() { + function t(t, e) { + this.program = t, + this.uniformData = e, + this.uniformGroups = {} + } + return t.prototype.destroy = function() { + this.uniformData = null, + this.uniformGroups = null, + this.program = null + } + , + t + }() + , Lg = 0 + , Vd = { + textureCount: 0 + } + , Wd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.destroyed = !1, + r.systemCheck(), + r.gl = null, + r.shader = null, + r.program = null, + r.cache = {}, + r.id = Lg++, + r + } + return ba(e, t), + e.prototype.systemCheck = function() { + if (!zg()) + throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.") + } + , + e.prototype.contextChange = function(t) { + this.gl = t, + this.reset() + } + , + e.prototype.bind = function(t, e) { + t.uniforms.globals = this.renderer.globalUniforms; + var r = t.program + , i = r.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(t); + return this.shader = t, + this.program !== r && (this.program = r, + this.gl.useProgram(i.program)), + e || (Vd.textureCount = 0, + this.syncUniformGroup(t.uniformGroup, Vd)), + i + } + , + e.prototype.setUniforms = function(t) { + var e = this.shader.program + , r = e.glPrograms[this.renderer.CONTEXT_UID]; + e.syncUniforms(r.uniformData, t, this.renderer) + } + , + e.prototype.syncUniformGroup = function(t, e) { + var r = this.getglProgram(); + t.static && t.dirtyId === r.uniformGroups[t.id] || (r.uniformGroups[t.id] = t.dirtyId, + this.syncUniforms(t, r, e)) + } + , + e.prototype.syncUniforms = function(t, e, r) { + (t.syncUniforms[this.shader.program.id] || this.createSyncGroups(t))(e.uniformData, t.uniforms, this.renderer, r) + } + , + e.prototype.createSyncGroups = function(t) { + var e = this.getSignature(t, this.shader.program.uniformData); + return this.cache[e] || (this.cache[e] = vg(t, this.shader.program.uniformData)), + t.syncUniforms[this.shader.program.id] = this.cache[e], + t.syncUniforms[this.shader.program.id] + } + , + e.prototype.getSignature = function(t, e) { + var r = t.uniforms + , i = []; + for (var o in r) + i.push(o), + e[o] && i.push(e[o].type); + return i.join("-") + } + , + e.prototype.getglProgram = function() { + return this.shader ? this.shader.program.glPrograms[this.renderer.CONTEXT_UID] : null + } + , + e.prototype.generateShader = function(t) { + var e = this.gl + , r = t.program + , i = {}; + for (var o in r.attributeData) + i[o] = r.attributeData[o].location; + var n = Gd(e, r.vertexSrc, r.fragmentSrc, i) + , s = {}; + for (var o in r.uniformData) { + var a = r.uniformData[o]; + s[o] = { + location: e.getUniformLocation(n, o), + value: Hd(a.type, a.size) + } + } + var u = new Kg(n,s); + return r.glPrograms[this.renderer.CONTEXT_UID] = u, + u + } + , + e.prototype.reset = function() { + this.program = null, + this.shader = null + } + , + e.prototype.destroy = function() { + this.destroyed = !0 + } + , + e + }(pa); + function Mg(t, e) { + return void 0 === e && (e = []), + e[K.NORMAL] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.ADD] = [t.ONE, t.ONE], + e[K.MULTIPLY] = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SCREEN] = [t.ONE, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.OVERLAY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.DARKEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.LIGHTEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.COLOR_DODGE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.COLOR_BURN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.HARD_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SOFT_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.DIFFERENCE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.EXCLUSION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.HUE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SATURATION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.COLOR] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.LUMINOSITY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.NONE] = [0, 0], + e[K.NORMAL_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.ADD_NPM] = [t.SRC_ALPHA, t.ONE, t.ONE, t.ONE], + e[K.SCREEN_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SRC_IN] = [t.DST_ALPHA, t.ZERO], + e[K.SRC_OUT] = [t.ONE_MINUS_DST_ALPHA, t.ZERO], + e[K.SRC_ATOP] = [t.DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], + e[K.DST_OVER] = [t.ONE_MINUS_DST_ALPHA, t.ONE], + e[K.DST_IN] = [t.ZERO, t.SRC_ALPHA], + e[K.DST_OUT] = [t.ZERO, t.ONE_MINUS_SRC_ALPHA], + e[K.DST_ATOP] = [t.ONE_MINUS_DST_ALPHA, t.SRC_ALPHA], + e[K.XOR] = [t.ONE_MINUS_DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], + e[K.SUBTRACT] = [t.ONE, t.ONE, t.ONE, t.ONE, t.FUNC_REVERSE_SUBTRACT, t.FUNC_ADD], + e + } + var Xd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.gl = null, + r.stateId = 0, + r.polygonOffset = 0, + r.blendMode = K.NONE, + r._blendEq = !1, + r.map = [], + r.checks = [], + r.defaultState = new Fb, + r.defaultState.blend = !0, + r + } + return ba(e, t), + e.prototype.contextChange = function(t) { + this.gl = t, + this.blendModes = Mg(t), + this.set(this.defaultState), + this.reset() + } + , + e.prototype.set = function(t) { + if (t = t || this.defaultState, + this.stateId !== t.data) { + for (var e = this.stateId ^ t.data, r = 0; e; ) + 1 & e && this.map[r].call(this, !!(t.data & 1 << r)), + e >>= 1, + r++; + this.stateId = t.data + } + for (r = 0; r < this.checks.length; r++) + this.checks[r](this, t) + } + , + e.prototype.forceState = function(t) { + t = t || this.defaultState; + for (var e = 0; e < this.map.length; e++) + this.map[e].call(this, !!(t.data & 1 << e)); + for (e = 0; e < this.checks.length; e++) + this.checks[e](this, t); + this.stateId = t.data + } + , + e.prototype.setBlend = function(t) { + this.updateCheck(e.checkBlendMode, t), + this.gl[t ? "enable" : "disable"](this.gl.BLEND) + } + , + e.prototype.setOffset = function(t) { + this.updateCheck(e.checkPolygonOffset, t), + this.gl[t ? "enable" : "disable"](this.gl.POLYGON_OFFSET_FILL) + } + , + e.prototype.setDepthTest = function(t) { + this.gl[t ? "enable" : "disable"](this.gl.DEPTH_TEST) + } + , + e.prototype.setDepthMask = function(t) { + this.gl.depthMask(t) + } + , + e.prototype.setCullFace = function(t) { + this.gl[t ? "enable" : "disable"](this.gl.CULL_FACE) + } + , + e.prototype.setFrontFace = function(t) { + this.gl.frontFace(this.gl[t ? "CW" : "CCW"]) + } + , + e.prototype.setBlendMode = function(t) { + if (t !== this.blendMode) { + this.blendMode = t; + var e = this.blendModes[t] + , r = this.gl; + 2 === e.length ? r.blendFunc(e[0], e[1]) : r.blendFuncSeparate(e[0], e[1], e[2], e[3]), + 6 === e.length ? (this._blendEq = !0, + r.blendEquationSeparate(e[4], e[5])) : this._blendEq && (this._blendEq = !1, + r.blendEquationSeparate(r.FUNC_ADD, r.FUNC_ADD)) + } + } + , + e.prototype.setPolygonOffset = function(t, e) { + this.gl.polygonOffset(t, e) + } + , + e.prototype.reset = function() { + this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1), + this.forceState(this.defaultState), + this._blendEq = !0, + this.blendMode = -1, + this.setBlendMode(0) + } + , + e.prototype.updateCheck = function(t, e) { + var r = this.checks.indexOf(t); + e && -1 === r ? this.checks.push(t) : e || -1 === r || this.checks.splice(r, 1) + } + , + e.checkBlendMode = function(t, e) { + t.setBlendMode(e.blendMode) + } + , + e.checkPolygonOffset = function(t, e) { + t.setPolygonOffset(1, e.polygonOffset) + } + , + e + }(pa) + , Yd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.count = 0, + r.checkCount = 0, + r.maxIdle = aa.GC_MAX_IDLE, + r.checkCountMax = aa.GC_MAX_CHECK_COUNT, + r.mode = aa.GC_MODE, + r + } + return ba(e, t), + e.prototype.postrender = function() { + this.renderer.renderingToScreen && (this.count++, + this.mode !== Tc.MANUAL && (this.checkCount++, + this.checkCount > this.checkCountMax && (this.checkCount = 0, + this.run()))) + } + , + e.prototype.run = function() { + for (var t = this.renderer.texture, e = t.managedTextures, r = !1, i = 0; i < e.length; i++) { + var o = e[i]; + !o.framebuffer && this.count - o.touched > this.maxIdle && (t.destroyTexture(o, !0), + e[i] = null, + r = !0) + } + if (r) { + var n = 0; + for (i = 0; i < e.length; i++) + null !== e[i] && (e[n++] = e[i]); + e.length = n + } + } + , + e.prototype.unload = function(t) { + var e = this.renderer.texture + , r = t._texture; + r && !r.framebuffer && e.destroyTexture(r); + for (var i = t.children.length - 1; i >= 0; i--) + this.unload(t.children[i]) + } + , + e + }(pa) + , vc = function() { + return function(t) { + this.texture = t, + this.width = -1, + this.height = -1, + this.dirtyId = -1, + this.dirtyStyleId = -1, + this.mipmap = !1, + this.wrapMode = 33071, + this.type = 6408, + this.internalFormat = 5121 + } + }() + , Zd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.boundTextures = [], + r.currentLocation = -1, + r.managedTextures = [], + r._unknownBoundTextures = !1, + r.unknownTexture = new ia, + r + } + return ba(e, t), + e.prototype.contextChange = function() { + var t = this.gl = this.renderer.gl; + this.CONTEXT_UID = this.renderer.CONTEXT_UID, + this.webGLVersion = this.renderer.context.webGLVersion; + var e = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS); + this.boundTextures.length = e; + for (var r = 0; r < e; r++) + this.boundTextures[r] = null; + this.emptyTextures = {}; + var i = new vc(t.createTexture()); + t.bindTexture(t.TEXTURE_2D, i.texture), + t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, new Uint8Array(4)), + this.emptyTextures[t.TEXTURE_2D] = i, + this.emptyTextures[t.TEXTURE_CUBE_MAP] = new vc(t.createTexture()), + t.bindTexture(t.TEXTURE_CUBE_MAP, this.emptyTextures[t.TEXTURE_CUBE_MAP].texture); + for (r = 0; r < 6; r++) + t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + r, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, null); + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MAG_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MIN_FILTER, t.LINEAR); + for (r = 0; r < this.boundTextures.length; r++) + this.bind(null, r) + } + , + e.prototype.bind = function(t, e) { + void 0 === e && (e = 0); + var r = this.gl; + if (t) { + if ((t = t.castToBaseTexture()).parentTextureArray) + return; + if (t.valid) { + t.touched = this.renderer.textureGC.count; + var i = t._glTextures[this.CONTEXT_UID] || this.initTexture(t); + this.boundTextures[e] !== t && (this.currentLocation !== e && (this.currentLocation = e, + r.activeTexture(r.TEXTURE0 + e)), + r.bindTexture(t.target, i.texture)), + i.dirtyId !== t.dirtyId && (this.currentLocation !== e && (this.currentLocation = e, + r.activeTexture(r.TEXTURE0 + e)), + this.updateTexture(t)), + this.boundTextures[e] = t + } + } else + this.currentLocation !== e && (this.currentLocation = e, + r.activeTexture(r.TEXTURE0 + e)), + r.bindTexture(r.TEXTURE_2D, this.emptyTextures[r.TEXTURE_2D].texture), + this.boundTextures[e] = null + } + , + e.prototype.reset = function() { + this._unknownBoundTextures = !0, + this.currentLocation = -1; + for (var t = 0; t < this.boundTextures.length; t++) + this.boundTextures[t] = this.unknownTexture + } + , + e.prototype.unbind = function(t) { + var e = this.gl + , r = this.boundTextures; + if (this._unknownBoundTextures) { + this._unknownBoundTextures = !1; + for (var i = 0; i < r.length; i++) + r[i] === this.unknownTexture && this.bind(null, i) + } + for (i = 0; i < r.length; i++) + r[i] === t && (this.currentLocation !== i && (e.activeTexture(e.TEXTURE0 + i), + this.currentLocation = i), + e.bindTexture(t.target, this.emptyTextures[t.target].texture), + r[i] = null) + } + , + e.prototype.initTexture = function(t) { + var e = new vc(this.gl.createTexture()); + return e.dirtyId = -1, + t._glTextures[this.CONTEXT_UID] = e, + this.managedTextures.push(t), + t.on("dispose", this.destroyTexture, this), + e + } + , + e.prototype.initTextureType = function(t, e) { + if (e.internalFormat = t.format, + e.type = t.type, + 2 === this.webGLVersion) { + var r = this.renderer.gl; + t.type === r.FLOAT && t.format === r.RGBA && (e.internalFormat = r.RGBA32F), + t.type === ua.HALF_FLOAT && (e.type = r.HALF_FLOAT), + e.type === r.HALF_FLOAT && t.format === r.RGBA && (e.internalFormat = r.RGBA16F) + } + } + , + e.prototype.updateTexture = function(t) { + var e = t._glTextures[this.CONTEXT_UID]; + if (e) { + var r = this.renderer; + if (this.initTextureType(t, e), + t.resource && t.resource.upload(r, t, e)) + ; + else { + var i = t.realWidth + , o = t.realHeight + , n = r.gl; + (e.width !== i || e.height !== o || e.dirtyId < 0) && (e.width = i, + e.height = o, + n.texImage2D(t.target, 0, e.internalFormat, i, o, 0, t.format, e.type, null)) + } + t.dirtyStyleId !== e.dirtyStyleId && this.updateTextureStyle(t), + e.dirtyId = t.dirtyId + } + } + , + e.prototype.destroyTexture = function(t, e) { + var r = this.gl; + if ((t = t.castToBaseTexture())._glTextures[this.CONTEXT_UID] && (this.unbind(t), + r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture), + t.off("dispose", this.destroyTexture, this), + delete t._glTextures[this.CONTEXT_UID], + !e)) { + var i = this.managedTextures.indexOf(t); + -1 !== i && tb(this.managedTextures, i, 1) + } + } + , + e.prototype.updateTextureStyle = function(t) { + var e = t._glTextures[this.CONTEXT_UID]; + e && (t.mipmap !== $a.POW2 && 2 === this.webGLVersion || t.isPowerOfTwo ? e.mipmap = t.mipmap >= 1 : e.mipmap = !1, + 2 === this.webGLVersion || t.isPowerOfTwo ? e.wrapMode = t.wrapMode : e.wrapMode = Rb.CLAMP, + t.resource && t.resource.style(this.renderer, t, e) || this.setStyle(t, e), + e.dirtyStyleId = t.dirtyStyleId) + } + , + e.prototype.setStyle = function(t, e) { + var r = this.gl; + if (e.mipmap && t.mipmap !== $a.ON_MANUAL && r.generateMipmap(t.target), + r.texParameteri(t.target, r.TEXTURE_WRAP_S, e.wrapMode), + r.texParameteri(t.target, r.TEXTURE_WRAP_T, e.wrapMode), + e.mipmap) { + r.texParameteri(t.target, r.TEXTURE_MIN_FILTER, t.scaleMode === Ca.LINEAR ? r.LINEAR_MIPMAP_LINEAR : r.NEAREST_MIPMAP_NEAREST); + var i = this.renderer.context.extensions.anisotropicFiltering; + if (i && t.anisotropicLevel > 0 && t.scaleMode === Ca.LINEAR) { + var o = Math.min(t.anisotropicLevel, r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)); + r.texParameterf(t.target, i.TEXTURE_MAX_ANISOTROPY_EXT, o) + } + } else + r.texParameteri(t.target, r.TEXTURE_MIN_FILTER, t.scaleMode === Ca.LINEAR ? r.LINEAR : r.NEAREST); + r.texParameteri(t.target, r.TEXTURE_MAG_FILTER, t.scaleMode === Ca.LINEAR ? r.LINEAR : r.NEAREST) + } + , + e + }(pa) + , $d = { + __proto__: null, + FilterSystem: yd, + BatchSystem: Ad, + ContextSystem: Cd, + FramebufferSystem: Dd, + GeometrySystem: Ed, + MaskSystem: Pd, + ScissorSystem: Rd, + StencilSystem: Sd, + ProjectionSystem: Td, + RenderTextureSystem: Ud, + ShaderSystem: Wd, + StateSystem: Xd, + TextureGCSystem: Yd, + TextureSystem: Zd + } + , wc = new la + , Ng = function(t) { + function e(e, r) { + void 0 === e && (e = jb.UNKNOWN); + var i = t.call(this) || this; + return r = Object.assign({}, aa.RENDER_OPTIONS, r), + i.options = r, + i.type = e, + i.screen = new da(0,0,r.width,r.height), + i.view = r.view || document.createElement("canvas"), + i.resolution = r.resolution || aa.RESOLUTION, + i.useContextAlpha = r.useContextAlpha, + i.autoDensity = !!r.autoDensity, + i.preserveDrawingBuffer = r.preserveDrawingBuffer, + i.clearBeforeRender = r.clearBeforeRender, + i._backgroundColor = 0, + i._backgroundColorRgba = [0, 0, 0, 1], + i._backgroundColorString = "#000000", + i.backgroundColor = r.backgroundColor || i._backgroundColor, + i.backgroundAlpha = r.backgroundAlpha, + void 0 !== r.transparent && (Va("6.0.0", "Option transparent is deprecated, please use backgroundAlpha instead."), + i.useContextAlpha = r.transparent, + i.backgroundAlpha = r.transparent ? 0 : 1), + i._lastObjectRendered = null, + i.plugins = {}, + i + } + return ba(e, t), + e.prototype.initPlugins = function(t) { + for (var e in t) + this.plugins[e] = new t[e](this) + } + , + Object.defineProperty(e.prototype, "width", { + get: function() { + return this.view.width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "height", { + get: function() { + return this.view.height + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.resize = function(t, e) { + this.screen.width = t, + this.screen.height = e, + this.view.width = t * this.resolution, + this.view.height = e * this.resolution, + this.autoDensity && (this.view.style.width = t + "px", + this.view.style.height = e + "px"), + this.emit("resize", t, e) + } + , + e.prototype.generateTexture = function(t, e, r, i) { + 0 === (i = i || t.getLocalBounds(null, !0)).width && (i.width = 1), + 0 === i.height && (i.height = 1); + var o = fc.create({ + width: 0 | i.width, + height: 0 | i.height, + scaleMode: e, + resolution: r + }); + return wc.tx = -i.x, + wc.ty = -i.y, + this.render(t, { + renderTexture: o, + clear: !1, + transform: wc, + skipUpdateTransform: !!t.parent + }), + o + } + , + e.prototype.destroy = function(t) { + for (var e in this.plugins) + this.plugins[e].destroy(), + this.plugins[e] = null; + t && this.view.parentNode && this.view.parentNode.removeChild(this.view); + this.plugins = null, + this.type = jb.UNKNOWN, + this.view = null, + this.screen = null, + this._tempDisplayObjectParent = null, + this.options = null, + this._backgroundColorRgba = null, + this._backgroundColorString = null, + this._lastObjectRendered = null + } + , + Object.defineProperty(e.prototype, "backgroundColor", { + get: function() { + return this._backgroundColor + }, + set: function(t) { + this._backgroundColor = t, + this._backgroundColorString = Mf(t), + Xb(t, this._backgroundColorRgba) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "backgroundAlpha", { + get: function() { + return this._backgroundColorRgba[3] + }, + set: function(t) { + this._backgroundColorRgba[3] = t + }, + enumerable: !1, + configurable: !0 + }), + e + }(rb.d) + , i = function(t) { + function e(r) { + var i = t.call(this, jb.WEBGL, r) || this; + return r = i.options, + i.gl = null, + i.CONTEXT_UID = 0, + i.runners = { + destroy: new ka("destroy"), + contextChange: new ka("contextChange"), + reset: new ka("reset"), + update: new ka("update"), + postrender: new ka("postrender"), + prerender: new ka("prerender"), + resize: new ka("resize") + }, + i.globalUniforms = new Pa({ + projectionMatrix: new la + },!0), + i.addSystem(Pd, "mask").addSystem(Cd, "context").addSystem(Xd, "state").addSystem(Wd, "shader").addSystem(Zd, "texture").addSystem(Ed, "geometry").addSystem(Dd, "framebuffer").addSystem(Rd, "scissor").addSystem(Sd, "stencil").addSystem(Td, "projection").addSystem(Yd, "textureGC").addSystem(yd, "filter").addSystem(Ud, "renderTexture").addSystem(Ad, "batch"), + i.initPlugins(e.__plugins), + r.context ? i.context.initFromContext(r.context) : i.context.initFromOptions({ + alpha: !!i.useContextAlpha, + antialias: r.antialias, + premultipliedAlpha: i.useContextAlpha && "notMultiplied" !== i.useContextAlpha, + stencil: !0, + preserveDrawingBuffer: r.preserveDrawingBuffer, + powerPreference: i.options.powerPreference + }), + i.renderingToScreen = !0, + Kf(2 === i.context.webGLVersion ? "WebGL 2" : "WebGL 1"), + i.resize(i.options.width, i.options.height), + i + } + return ba(e, t), + e.create = function(t) { + if (Lf()) + return new e(t); + throw new Error("WebGL unsupported in this browser, use \"pixi.js-legacy\" for fallback canvas2d support.") + } + , + e.prototype.addSystem = function(t, e) { + e || (e = t.name); + var r = new t(this); + if (this[e]) + throw new Error("Whoops! The name \"" + e + "\" is already in use"); + for (var i in this[e] = r, + this.runners) + this.runners[i].add(r); + return this + } + , + e.prototype.render = function(t, e) { + var r, i, o, n; + if (e && (e instanceof fc ? (Va("6.0.0", "Renderer#render arguments changed, use options instead."), + r = e, + i = arguments[2], + o = arguments[3], + n = arguments[4]) : (r = e.renderTexture, + i = e.clear, + o = e.transform, + n = e.skipUpdateTransform)), + this.renderingToScreen = !r, + this.runners.prerender.emit(), + this.emit("prerender"), + this.projection.transform = o, + !this.context.isLost) { + if (r || (this._lastObjectRendered = t), + !n) { + var s = t.enableTempParent(); + t.updateTransform(), + t.disableTempParent(s) + } + this.renderTexture.bind(r), + this.batch.currentRenderer.start(), + (void 0 !== i ? i : this.clearBeforeRender) && this.renderTexture.clear(), + t.render(this), + this.batch.currentRenderer.flush(), + r && r.baseTexture.update(), + this.runners.postrender.emit(), + this.projection.transform = null, + this.emit("postrender") + } + } + , + e.prototype.resize = function(e, r) { + t.prototype.resize.call(this, e, r), + this.runners.resize.emit(e, r) + } + , + e.prototype.reset = function() { + return this.runners.reset.emit(), + this + } + , + e.prototype.clear = function() { + this.renderTexture.bind(), + this.renderTexture.clear() + } + , + e.prototype.destroy = function(e) { + for (var r in this.runners.destroy.emit(), + this.runners) + this.runners[r].destroy(); + t.prototype.destroy.call(this, e), + this.gl = null + } + , + Object.defineProperty(e.prototype, "extract", { + get: function() { + return Va("6.0.0", "Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."), + this.plugins.extract + }, + enumerable: !1, + configurable: !0 + }), + e.registerPlugin = function(t, r) { + e.__plugins = e.__plugins || {}, + e.__plugins[t] = r + } + , + e + }(Ng); + var xc = function() { + return function() { + this.texArray = null, + this.blend = 0, + this.type = Ba.TRIANGLES, + this.start = 0, + this.size = 0, + this.data = null + } + }() + , yc = function() { + function t() { + this.elements = [], + this.ids = [], + this.count = 0 + } + return t.prototype.clear = function() { + for (var t = 0; t < this.count; t++) + this.elements[t] = null; + this.count = 0 + } + , + t + }() + , Og = function() { + function t(t) { + "number" == typeof t ? this.rawBinaryData = new ArrayBuffer(t) : t instanceof Uint8Array ? this.rawBinaryData = t.buffer : this.rawBinaryData = t, + this.uint32View = new Uint32Array(this.rawBinaryData), + this.float32View = new Float32Array(this.rawBinaryData) + } + return Object.defineProperty(t.prototype, "int8View", { + get: function() { + return this._int8View || (this._int8View = new Int8Array(this.rawBinaryData)), + this._int8View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "uint8View", { + get: function() { + return this._uint8View || (this._uint8View = new Uint8Array(this.rawBinaryData)), + this._uint8View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "int16View", { + get: function() { + return this._int16View || (this._int16View = new Int16Array(this.rawBinaryData)), + this._int16View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "uint16View", { + get: function() { + return this._uint16View || (this._uint16View = new Uint16Array(this.rawBinaryData)), + this._uint16View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "int32View", { + get: function() { + return this._int32View || (this._int32View = new Int32Array(this.rawBinaryData)), + this._int32View + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.view = function(t) { + return this[t + "View"] + } + , + t.prototype.destroy = function() { + this.rawBinaryData = null, + this._int8View = null, + this._uint8View = null, + this._int16View = null, + this._uint16View = null, + this._int32View = null, + this.uint32View = null, + this.float32View = null + } + , + t.sizeOf = function(t) { + switch (t) { + case "int8": + case "uint8": + return 1; + case "int16": + case "uint16": + return 2; + case "int32": + case "uint32": + case "float32": + return 4; + default: + throw new Error(t + " isn't a valid view type"); + } + } + , + t + }() + , Pg = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.shaderGenerator = null, + r.geometryClass = null, + r.vertexSize = null, + r.state = Fb.for2d(), + r.size = 4 * aa.SPRITE_BATCH_SIZE, + r._vertexCount = 0, + r._indexCount = 0, + r._bufferedElements = [], + r._bufferedTextures = [], + r._bufferSize = 0, + r._shader = null, + r._packedGeometries = [], + r._packedGeometryPoolSize = 2, + r._flushId = 0, + r._aBuffers = {}, + r._iBuffers = {}, + r.MAX_TEXTURES = 1, + r.renderer.on("prerender", r.onPrerender, r), + e.runners.contextChange.add(r), + r._dcIndex = 0, + r._aIndex = 0, + r._iIndex = 0, + r._attributeBuffer = null, + r._indexBuffer = null, + r._tempBoundTextures = [], + r + } + return ba(e, t), + e.prototype.contextChange = function() { + var t = this.renderer.gl; + aa.PREFER_ENV === Aa.WEBGL_LEGACY ? this.MAX_TEXTURES = 1 : (this.MAX_TEXTURES = Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), aa.SPRITE_MAX_TEXTURES), + this.MAX_TEXTURES = yg(this.MAX_TEXTURES, t)), + this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES); + for (var e = 0; e < this._packedGeometryPoolSize; e++) + this._packedGeometries[e] = new this.geometryClass; + this.initFlushBuffers() + } + , + e.prototype.initFlushBuffers = function() { + for (var t = e._drawCallPool, r = e._textureArrayPool, i = this.size / 4, o = Math.floor(i / this.MAX_TEXTURES) + 1; t.length < i; ) + t.push(new xc); + for (; r.length < o; ) + r.push(new yc); + for (var n = 0; n < this.MAX_TEXTURES; n++) + this._tempBoundTextures[n] = null + } + , + e.prototype.onPrerender = function() { + this._flushId = 0 + } + , + e.prototype.render = function(t) { + t._texture.valid && (this._vertexCount + t.vertexData.length / 2 > this.size && this.flush(), + this._vertexCount += t.vertexData.length / 2, + this._indexCount += t.indices.length, + this._bufferedTextures[this._bufferSize] = t._texture.baseTexture, + this._bufferedElements[this._bufferSize++] = t) + } + , + e.prototype.buildTexturesAndDrawCalls = function() { + var t = this._bufferedTextures + , r = this.MAX_TEXTURES + , i = e._textureArrayPool + , o = this.renderer.batch + , n = this._tempBoundTextures + , s = this.renderer.textureGC.count + , a = ++ia._globalBatch + , u = 0 + , h = i[0] + , $ = 0; + o.copyBoundTextures(n, r); + for (var p = 0; p < this._bufferSize; ++p) { + var l = t[p]; + t[p] = null, + l._batchEnabled !== a && (h.count >= r && (o.boundArray(h, n, a, r), + this.buildDrawCalls(h, $, p), + $ = p, + h = i[++u], + ++a), + l._batchEnabled = a, + l.touched = s, + h.elements[h.count++] = l) + } + h.count > 0 && (o.boundArray(h, n, a, r), + this.buildDrawCalls(h, $, this._bufferSize), + ++u, + ++a); + for (p = 0; p < n.length; p++) + n[p] = null; + ia._globalBatch = a + } + , + e.prototype.buildDrawCalls = function(t, r, i) { + var o = this._bufferedElements + , n = this._attributeBuffer + , s = this._indexBuffer + , a = this.vertexSize + , u = e._drawCallPool + , h = this._dcIndex + , $ = this._aIndex + , p = this._iIndex + , l = u[h]; + l.start = this._iIndex, + l.texArray = t; + for (var c = r; c < i; ++c) { + var d = o[c] + , f = d._texture.baseTexture + , m = Of[f.alphaMode ? 1 : 0][d.blendMode]; + o[c] = null, + r < c && l.blend !== m && (l.size = p - l.start, + r = c, + (l = u[++h]).texArray = t, + l.start = p), + this.packInterleavedGeometry(d, n, s, $, p), + $ += d.vertexData.length / 2 * a, + p += d.indices.length, + l.blend = m + } + r < i && (l.size = p - l.start, + ++h), + this._dcIndex = h, + this._aIndex = $, + this._iIndex = p + } + , + e.prototype.bindAndClearTexArray = function(t) { + for (var e = this.renderer.texture, r = 0; r < t.count; r++) + e.bind(t.elements[r], t.ids[r]), + t.elements[r] = null; + t.count = 0 + } + , + e.prototype.updateGeometry = function() { + var t = this._packedGeometries + , e = this._attributeBuffer + , r = this._indexBuffer; + aa.CAN_UPLOAD_SAME_BUFFER ? (t[this._flushId]._buffer.update(e.rawBinaryData), + t[this._flushId]._indexBuffer.update(r), + this.renderer.geometry.updateBuffers()) : (this._packedGeometryPoolSize <= this._flushId && (this._packedGeometryPoolSize++, + t[this._flushId] = new this.geometryClass), + t[this._flushId]._buffer.update(e.rawBinaryData), + t[this._flushId]._indexBuffer.update(r), + this.renderer.geometry.bind(t[this._flushId]), + this.renderer.geometry.updateBuffers(), + this._flushId++) + } + , + e.prototype.drawBatches = function() { + for (var t = this._dcIndex, r = this.renderer, i = r.gl, o = r.state, n = e._drawCallPool, s = null, a = 0; a < t; a++) { + var u = n[a] + , h = u.texArray + , $ = u.type + , p = u.size + , l = u.start + , c = u.blend; + s !== h && (s = h, + this.bindAndClearTexArray(h)), + this.state.blendMode = c, + o.set(this.state), + i.drawElements($, p, i.UNSIGNED_SHORT, 2 * l) + } + } + , + e.prototype.flush = function() { + 0 !== this._vertexCount && (this._attributeBuffer = this.getAttributeBuffer(this._vertexCount), + this._indexBuffer = this.getIndexBuffer(this._indexCount), + this._aIndex = 0, + this._iIndex = 0, + this._dcIndex = 0, + this.buildTexturesAndDrawCalls(), + this.updateGeometry(), + this.drawBatches(), + this._bufferSize = 0, + this._vertexCount = 0, + this._indexCount = 0) + } + , + e.prototype.start = function() { + this.renderer.state.set(this.state), + this.renderer.shader.bind(this._shader), + aa.CAN_UPLOAD_SAME_BUFFER && this.renderer.geometry.bind(this._packedGeometries[this._flushId]) + } + , + e.prototype.stop = function() { + this.flush() + } + , + e.prototype.destroy = function() { + for (var e = 0; e < this._packedGeometryPoolSize; e++) + this._packedGeometries[e] && this._packedGeometries[e].destroy(); + this.renderer.off("prerender", this.onPrerender, this), + this._aBuffers = null, + this._iBuffers = null, + this._packedGeometries = null, + this._attributeBuffer = null, + this._indexBuffer = null, + this._shader && (this._shader.destroy(), + this._shader = null), + t.prototype.destroy.call(this) + } + , + e.prototype.getAttributeBuffer = function(t) { + var e = sb(Math.ceil(t / 8)) + , r = hd(e) + , i = 8 * e; + this._aBuffers.length <= r && (this._iBuffers.length = r + 1); + var o = this._aBuffers[i]; + return o || (this._aBuffers[i] = o = new Og(i * this.vertexSize * 4)), + o + } + , + e.prototype.getIndexBuffer = function(t) { + var e = sb(Math.ceil(t / 12)) + , r = hd(e) + , i = 12 * e; + this._iBuffers.length <= r && (this._iBuffers.length = r + 1); + var o = this._iBuffers[r]; + return o || (this._iBuffers[r] = o = new Uint16Array(i)), + o + } + , + e.prototype.packInterleavedGeometry = function(t, e, r, i, o) { + for (var n = e.uint32View, s = e.float32View, a = i / this.vertexSize, u = t.uvs, h = t.indices, $ = t.vertexData, p = t._texture.baseTexture._batchLocation, l = Math.min(t.worldAlpha, 1), c = l < 1 && t._texture.baseTexture.alphaMode ? fd(t._tintRGB, l) : t._tintRGB + (255 * l << 24), d = 0; d < $.length; d += 2) + s[i++] = $[d], + s[i++] = $[d + 1], + s[i++] = u[d], + s[i++] = u[d + 1], + n[i++] = c, + s[i++] = p; + for (d = 0; d < h.length; d++) + r[o++] = a + h[d] + } + , + e._drawCallPool = [], + e._textureArrayPool = [], + e + }(zd) + , Qg = function() { + function t(t, e) { + if (this.vertexSrc = t, + this.fragTemplate = e, + this.programCache = {}, + this.defaultGroupCache = {}, + e.indexOf("%count%") < 0) + throw new Error("Fragment template must contain \"%count%\"."); + if (e.indexOf("%forloop%") < 0) + throw new Error("Fragment template must contain \"%forloop%\".") + } + return t.prototype.generateShader = function(t) { + if (!this.programCache[t]) { + for (var e = new Int32Array(t), r = 0; r < t; r++) + e[r] = r; + this.defaultGroupCache[t] = Pa.from({ + uSamplers: e + }, !0); + var i = this.fragTemplate; + i = (i = i.replace(/%count%/gi, "" + t)).replace(/%forloop%/gi, this.generateSampleSrc(t)), + this.programCache[t] = new nc(this.vertexSrc,i) + } + var o = { + tint: new Float32Array([1, 1, 1, 1]), + translationMatrix: new la, + default: this.defaultGroupCache[t] + }; + return new oc(this.programCache[t],o) + } + , + t.prototype.generateSampleSrc = function(t) { + var e = ""; + e += "\n", + e += "\n"; + for (var r = 0; r < t; r++) + r > 0 && (e += "\nelse "), + r < t - 1 && (e += "if(vTextureId < " + r + ".5)"), + e += "\n{", + e += "\n\tcolor = texture2D(uSamplers[" + r + "], vTextureCoord);", + e += "\n}"; + return e += "\n", + e += "\n" + } + , + t + }() + , _d = function(t) { + function e(e) { + void 0 === e && (e = !1); + var r = t.call(this) || this; + return r._buffer = new ta(null,e,!1), + r._indexBuffer = new ta(null,e,!0), + r.addAttribute("aVertexPosition", r._buffer, 2, !1, ua.FLOAT).addAttribute("aTextureCoord", r._buffer, 2, !1, ua.FLOAT).addAttribute("aColor", r._buffer, 4, !0, ua.UNSIGNED_BYTE).addAttribute("aTextureId", r._buffer, 1, !0, ua.FLOAT).addIndex(r._indexBuffer), + r + } + return ba(e, t), + e + }(gc) + , ae = "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n" + , be = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n" + , Rg = function() { + function t() {} + return t.create = function(t) { + var e = Object.assign({ + vertex: ae, + fragment: be, + geometryClass: _d, + vertexSize: 6 + }, t) + , r = e.vertex + , i = e.fragment + , o = e.vertexSize + , n = e.geometryClass; + return function(t) { + function e(e) { + var s = t.call(this, e) || this; + return s.shaderGenerator = new Qg(r,i), + s.geometryClass = n, + s.vertexSize = o, + s + } + return ba(e, t), + e + }(Pg) + } + , + Object.defineProperty(t, "defaultVertexSrc", { + get: function() { + return ae + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "defaultFragmentTemplate", { + get: function() { + return be + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , j = Rg.create() + , Sg = {} + , Tg = function(t) { + Object.defineProperty(Sg, t, { + get: function() { + return Va("6.0.0", "PIXI.systems." + t + " has moved to PIXI." + t), + rd[t] + } + }) + }; + for (var ce in rd) + Tg(ce); + var Ug = {} + , Vg = function(t) { + Object.defineProperty(Ug, t, { + get: function() { + return Va("6.0.0", "PIXI.resources." + t + " has moved to PIXI." + t), + $d[t] + } + }) + }; + for (var ce in $d) + Vg(ce); + aa.SORTABLE_CHILDREN = !1; + var Gb = function() { + function t() { + this.minX = 1 / 0, + this.minY = 1 / 0, + this.maxX = -1 / 0, + this.maxY = -1 / 0, + this.rect = null, + this.updateID = -1 + } + return t.prototype.isEmpty = function() { + return this.minX > this.maxX || this.minY > this.maxY + } + , + t.prototype.clear = function() { + this.minX = 1 / 0, + this.minY = 1 / 0, + this.maxX = -1 / 0, + this.maxY = -1 / 0 + } + , + t.prototype.getRectangle = function(t) { + return this.minX > this.maxX || this.minY > this.maxY ? da.EMPTY : ((t = t || new da(0,0,1,1)).x = this.minX, + t.y = this.minY, + t.width = this.maxX - this.minX, + t.height = this.maxY - this.minY, + t) + } + , + t.prototype.addPoint = function(t) { + this.minX = Math.min(this.minX, t.x), + this.maxX = Math.max(this.maxX, t.x), + this.minY = Math.min(this.minY, t.y), + this.maxY = Math.max(this.maxY, t.y) + } + , + t.prototype.addPointMatrix = function(t, e) { + var i = t.a + , r = t.b + , n = t.c + , s = t.d + , o = t.tx + , a = t.ty + , h = i * e.x + n * e.y + o + , l = r * e.x + s * e.y + a; + this.minX = Math.min(this.minX, h), + this.maxX = Math.max(this.maxX, h), + this.minY = Math.min(this.minY, l), + this.maxY = Math.max(this.maxY, l) + } + , + t.prototype.addQuad = function(t) { + var e = this.minX + , i = this.minY + , r = this.maxX + , n = this.maxY + , s = t[0] + , o = t[1]; + e = s < e ? s : e, + i = o < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + e = (s = t[2]) < e ? s : e, + i = (o = t[3]) < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + e = (s = t[4]) < e ? s : e, + i = (o = t[5]) < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + e = (s = t[6]) < e ? s : e, + i = (o = t[7]) < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + this.minX = e, + this.minY = i, + this.maxX = r, + this.maxY = n + } + , + t.prototype.addFrame = function(t, e, i, r, n) { + this.addFrameMatrix(t.worldTransform, e, i, r, n) + } + , + t.prototype.addFrameMatrix = function(t, e, i, r, n) { + var s = t.a + , o = t.b + , a = t.c + , h = t.d + , l = t.tx + , d = t.ty + , p = this.minX + , m = this.minY + , u = this.maxX + , c = this.maxY + , f = s * e + a * i + l + , y = o * e + h * i + d; + p = f < p ? f : p, + m = y < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + p = (f = s * r + a * i + l) < p ? f : p, + m = (y = o * r + h * i + d) < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + p = (f = s * e + a * n + l) < p ? f : p, + m = (y = o * e + h * n + d) < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + p = (f = s * r + a * n + l) < p ? f : p, + m = (y = o * r + h * n + d) < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + this.minX = p, + this.minY = m, + this.maxX = u, + this.maxY = c + } + , + t.prototype.addVertexData = function(t, e, i) { + for (var r = this.minX, n = this.minY, s = this.maxX, o = this.maxY, a = e; a < i; a += 2) { + var h = t[a] + , l = t[a + 1]; + r = h < r ? h : r, + n = l < n ? l : n, + s = h > s ? h : s, + o = l > o ? l : o + } + this.minX = r, + this.minY = n, + this.maxX = s, + this.maxY = o + } + , + t.prototype.addVertices = function(t, e, i, r) { + this.addVerticesMatrix(t.worldTransform, e, i, r) + } + , + t.prototype.addVerticesMatrix = function(t, e, i, r, n, s) { + void 0 === n && (n = 0), + void 0 === s && (s = n); + for (var o = t.a, a = t.b, h = t.c, l = t.d, d = t.tx, p = t.ty, m = this.minX, u = this.minY, c = this.maxX, f = this.maxY, y = i; y < r; y += 2) { + var x = e[y] + , b = e[y + 1] + , $ = o * x + h * b + d + , v = l * b + a * x + p; + m = Math.min(m, $ - n), + c = Math.max(c, $ + n), + u = Math.min(u, v - s), + f = Math.max(f, v + s) + } + this.minX = m, + this.minY = u, + this.maxX = c, + this.maxY = f + } + , + t.prototype.addBounds = function(t) { + var e = this.minX + , i = this.minY + , r = this.maxX + , n = this.maxY; + this.minX = t.minX < e ? t.minX : e, + this.minY = t.minY < i ? t.minY : i, + this.maxX = t.maxX > r ? t.maxX : r, + this.maxY = t.maxY > n ? t.maxY : n + } + , + t.prototype.addBoundsMask = function(t, e) { + var i = t.minX > e.minX ? t.minX : e.minX + , r = t.minY > e.minY ? t.minY : e.minY + , n = t.maxX < e.maxX ? t.maxX : e.maxX + , s = t.maxY < e.maxY ? t.maxY : e.maxY; + if (i <= n && r <= s) { + var o = this.minX + , a = this.minY + , h = this.maxX + , l = this.maxY; + this.minX = i < o ? i : o, + this.minY = r < a ? r : a, + this.maxX = n > h ? n : h, + this.maxY = s > l ? s : l + } + } + , + t.prototype.addBoundsMatrix = function(t, e) { + this.addFrameMatrix(e, t.minX, t.minY, t.maxX, t.maxY) + } + , + t.prototype.addBoundsArea = function(t, e) { + var i = t.minX > e.x ? t.minX : e.x + , r = t.minY > e.y ? t.minY : e.y + , n = t.maxX < e.x + e.width ? t.maxX : e.x + e.width + , s = t.maxY < e.y + e.height ? t.maxY : e.y + e.height; + if (i <= n && r <= s) { + var o = this.minX + , a = this.minY + , h = this.maxX + , l = this.maxY; + this.minX = i < o ? i : o, + this.minY = r < a ? r : a, + this.maxX = n > h ? n : h, + this.maxY = s > l ? s : l + } + } + , + t.prototype.pad = function(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = t), + this.isEmpty() || (this.minX -= t, + this.maxX += t, + this.minY -= e, + this.maxY += e) + } + , + t.prototype.addFramePad = function(t, e, i, r, n, s) { + t -= n, + e -= s, + i += n, + r += s, + this.minX = this.minX < t ? this.minX : t, + this.maxX = this.maxX > i ? this.maxX : i, + this.minY = this.minY < e ? this.minY : e, + this.maxY = this.maxY > r ? this.maxY : r + } + , + t + }() + , Wg = function(t, e) { + return (Wg = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, e) { + t.__proto__ = e + } + || function(t, e) { + for (var i in e) + e.hasOwnProperty(i) && (t[i] = e[i]) + } + )(t, e) + }; + function zc(t, e) { + function i() { + this.constructor = t + } + Wg(t, e), + t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, + new i) + } + var Hb = function(t) { + function e() { + var e = t.call(this) || this; + return e.tempDisplayObjectParent = null, + e.transform = new Zf, + e.alpha = 1, + e.visible = !0, + e.renderable = !0, + e.parent = null, + e.worldAlpha = 1, + e._lastSortedIndex = 0, + e._zIndex = 0, + e.filterArea = null, + e.filters = null, + e._enabledFilters = null, + e._bounds = new Gb, + e._localBounds = null, + e._boundsID = 0, + e._boundsRect = null, + e._localBoundsRect = null, + e._mask = null, + e._destroyed = !1, + e.isSprite = !1, + e.isMask = !1, + e + } + return zc(e, t), + e.mixin = function(t) { + for (var i = Object.keys(t), r = 0; r < i.length; ++r) { + var n = i[r]; + Object.defineProperty(e.prototype, n, Object.getOwnPropertyDescriptor(t, n)) + } + } + , + e.prototype._recursivePostUpdateTransform = function() { + this.parent ? (this.parent._recursivePostUpdateTransform(), + this.transform.updateTransform(this.parent.transform)) : this.transform.updateTransform(this._tempDisplayObjectParent.transform) + } + , + e.prototype.updateTransform = function() { + this._boundsID++, + this.transform.updateTransform(this.parent.transform), + this.worldAlpha = this.alpha * this.parent.worldAlpha + } + , + e.prototype.getBounds = function(t, e) { + return t || (this.parent ? (this._recursivePostUpdateTransform(), + this.updateTransform()) : (this.parent = this._tempDisplayObjectParent, + this.updateTransform(), + this.parent = null)), + this._bounds.updateID !== this._boundsID && (this.calculateBounds(), + this._bounds.updateID = this._boundsID), + e || (this._boundsRect || (this._boundsRect = new da), + e = this._boundsRect), + this._bounds.getRectangle(e) + } + , + e.prototype.getLocalBounds = function(t) { + t || (this._localBoundsRect || (this._localBoundsRect = new da), + t = this._localBoundsRect), + this._localBounds || (this._localBounds = new Gb); + var e = this.transform + , i = this.parent; + this.parent = null, + this.transform = this._tempDisplayObjectParent.transform; + var r = this._bounds + , n = this._boundsID; + this._bounds = this._localBounds; + var s = this.getBounds(!1, t); + return this.parent = i, + this.transform = e, + this._bounds = r, + this._bounds.updateID += this._boundsID - n, + s + } + , + e.prototype.toGlobal = function(t, e, i) { + return void 0 === i && (i = !1), + i || (this._recursivePostUpdateTransform(), + this.parent ? this.displayObjectUpdateTransform() : (this.parent = this._tempDisplayObjectParent, + this.displayObjectUpdateTransform(), + this.parent = null)), + this.worldTransform.apply(t, e) + } + , + e.prototype.toLocal = function(t, e, i, r) { + return e && (t = e.toGlobal(t, i, r)), + r || (this._recursivePostUpdateTransform(), + this.parent ? this.displayObjectUpdateTransform() : (this.parent = this._tempDisplayObjectParent, + this.displayObjectUpdateTransform(), + this.parent = null)), + this.worldTransform.applyInverse(t, i) + } + , + e.prototype.setParent = function(t) { + if (!t || !t.addChild) + throw new Error("setParent: Argument must be a Container"); + return t.addChild(this), + t + } + , + e.prototype.setTransform = function(t, e, i, r, n, s, o, a, h) { + return void 0 === t && (t = 0), + void 0 === e && (e = 0), + void 0 === i && (i = 1), + void 0 === r && (r = 1), + void 0 === n && (n = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + void 0 === a && (a = 0), + void 0 === h && (h = 0), + this.position.x = t, + this.position.y = e, + this.scale.x = i || 1, + this.scale.y = r || 1, + this.rotation = n, + this.skew.x = s, + this.skew.y = o, + this.pivot.x = a, + this.pivot.y = h, + this + } + , + e.prototype.destroy = function(t) { + this.parent && this.parent.removeChild(this), + this.removeAllListeners(), + this.transform = null, + this.parent = null, + this._bounds = null, + this._mask = null, + this.filters = null, + this.filterArea = null, + this.hitArea = null, + this.interactive = !1, + this.interactiveChildren = !1, + this._destroyed = !0 + } + , + Object.defineProperty(e.prototype, "_tempDisplayObjectParent", { + get: function() { + return null === this.tempDisplayObjectParent && (this.tempDisplayObjectParent = new Xg), + this.tempDisplayObjectParent + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.enableTempParent = function() { + var t = this.parent; + return this.parent = this._tempDisplayObjectParent, + t + } + , + e.prototype.disableTempParent = function(t) { + this.parent = t + } + , + Object.defineProperty(e.prototype, "x", { + get: function() { + return this.position.x + }, + set: function(t) { + this.transform.position.x = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "y", { + get: function() { + return this.position.y + }, + set: function(t) { + this.transform.position.y = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "worldTransform", { + get: function() { + return this.transform.worldTransform + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "localTransform", { + get: function() { + return this.transform.localTransform + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "position", { + get: function() { + return this.transform.position + }, + set: function(t) { + this.transform.position.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "scale", { + get: function() { + return this.transform.scale + }, + set: function(t) { + this.transform.scale.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "pivot", { + get: function() { + return this.transform.pivot + }, + set: function(t) { + this.transform.pivot.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "skew", { + get: function() { + return this.transform.skew + }, + set: function(t) { + this.transform.skew.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "rotation", { + get: function() { + return this.transform.rotation + }, + set: function(t) { + this.transform.rotation = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "angle", { + get: function() { + return this.transform.rotation * Tf + }, + set: function(t) { + this.transform.rotation = t * Uf + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "zIndex", { + get: function() { + return this._zIndex + }, + set: function(t) { + this._zIndex = t, + this.parent && (this.parent.sortDirty = !0) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "worldVisible", { + get: function() { + var t = this; + do { + if (!t.visible) + return !1; + t = t.parent + } while (t); + return !0 + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "mask", { + get: function() { + return this._mask + }, + set: function(t) { + var e; + this._mask && ((e = this._mask.maskObject || this._mask).renderable = !0, + e.isMask = !1); + (this._mask = t, + this._mask) && ((e = this._mask.maskObject || this._mask).renderable = !1, + e.isMask = !0) + }, + enumerable: !1, + configurable: !0 + }), + e + }(rb.d) + , Xg = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.sortDirty = null, + e + } + return zc(e, t), + e + }(Hb); + function Yg(t, e) { + return t.zIndex === e.zIndex ? t._lastSortedIndex - e._lastSortedIndex : t.zIndex - e.zIndex + } + Hb.prototype.displayObjectUpdateTransform = Hb.prototype.updateTransform; + var Ac = function(t) { + function e() { + var e = t.call(this) || this; + return e.children = [], + e.sortableChildren = aa.SORTABLE_CHILDREN, + e.sortDirty = !1, + e + } + return zc(e, t), + e.prototype.onChildrenChange = function(t) {} + , + e.prototype.addChild = function() { + for (var t = arguments, e = [], i = 0; i < arguments.length; i++) + e[i] = t[i]; + if (e.length > 1) + for (var r = 0; r < e.length; r++) + this.addChild(e[r]); + else { + var n = e[0]; + n.parent && n.parent.removeChild(n), + n.parent = this, + this.sortDirty = !0, + n.transform._parentID = -1, + this.children.push(n), + this._boundsID++, + this.onChildrenChange(this.children.length - 1), + this.emit("childAdded", n, this, this.children.length - 1), + n.emit("added", this) + } + return e[0] + } + , + e.prototype.addChildAt = function(t, e) { + if (e < 0 || e > this.children.length) + throw new Error(t + "addChildAt: The index " + e + " supplied is out of bounds " + this.children.length); + return t.parent && t.parent.removeChild(t), + t.parent = this, + this.sortDirty = !0, + t.transform._parentID = -1, + this.children.splice(e, 0, t), + this._boundsID++, + this.onChildrenChange(e), + t.emit("added", this), + this.emit("childAdded", t, this, e), + t + } + , + e.prototype.swapChildren = function(t, e) { + if (t !== e) { + var i = this.getChildIndex(t) + , r = this.getChildIndex(e); + this.children[i] = e, + this.children[r] = t, + this.onChildrenChange(i < r ? i : r) + } + } + , + e.prototype.getChildIndex = function(t) { + var e = this.children.indexOf(t); + if (-1 === e) + throw new Error("The supplied DisplayObject must be a child of the caller"); + return e + } + , + e.prototype.setChildIndex = function(t, e) { + if (e < 0 || e >= this.children.length) + throw new Error("The index " + e + " supplied is out of bounds " + this.children.length); + var i = this.getChildIndex(t); + tb(this.children, i, 1), + this.children.splice(e, 0, t), + this.onChildrenChange(e) + } + , + e.prototype.getChildAt = function(t) { + if (t < 0 || t >= this.children.length) + throw new Error("getChildAt: Index (" + t + ") does not exist."); + return this.children[t] + } + , + e.prototype.removeChild = function() { + for (var t = arguments, e = [], i = 0; i < arguments.length; i++) + e[i] = t[i]; + if (e.length > 1) + for (var r = 0; r < e.length; r++) + this.removeChild(e[r]); + else { + var n = e[0] + , s = this.children.indexOf(n); + if (-1 === s) + return null; + n.parent = null, + n.transform._parentID = -1, + tb(this.children, s, 1), + this._boundsID++, + this.onChildrenChange(s), + n.emit("removed", this), + this.emit("childRemoved", n, this, s) + } + return e[0] + } + , + e.prototype.removeChildAt = function(t) { + var e = this.getChildAt(t); + return e.parent = null, + e.transform._parentID = -1, + tb(this.children, t, 1), + this._boundsID++, + this.onChildrenChange(t), + e.emit("removed", this), + this.emit("childRemoved", e, this, t), + e + } + , + e.prototype.removeChildren = function(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = this.children.length); + var i, r = t, n = e - r; + if (n > 0 && n <= e) { + i = this.children.splice(r, n); + for (var s = 0; s < i.length; ++s) + i[s].parent = null, + i[s].transform && (i[s].transform._parentID = -1); + this._boundsID++, + this.onChildrenChange(t); + for (s = 0; s < i.length; ++s) + i[s].emit("removed", this), + this.emit("childRemoved", i[s], this, s); + return i + } + if (0 === n && 0 === this.children.length) + return []; + throw new RangeError("removeChildren: numeric values are outside the acceptable range.") + } + , + e.prototype.sortChildren = function() { + for (var t = !1, e = 0, i = this.children.length; e < i; ++e) { + var r = this.children[e]; + r._lastSortedIndex = e, + t || 0 === r.zIndex || (t = !0) + } + t && this.children.length > 1 && this.children.sort(Yg), + this.sortDirty = !1 + } + , + e.prototype.updateTransform = function() { + this.sortableChildren && this.sortDirty && this.sortChildren(), + this._boundsID++, + this.transform.updateTransform(this.parent.transform), + this.worldAlpha = this.alpha * this.parent.worldAlpha; + for (var t = 0, e = this.children.length; t < e; ++t) { + var i = this.children[t]; + i.visible && i.updateTransform() + } + } + , + e.prototype.calculateBounds = function() { + this._bounds.clear(), + this._calculateBounds(); + for (var t = 0; t < this.children.length; t++) { + var e = this.children[t]; + if (e.visible && e.renderable) + if (e.calculateBounds(), + e._mask) { + var i = e._mask.maskObject || e._mask; + i.calculateBounds(), + this._bounds.addBoundsMask(e._bounds, i._bounds) + } else + e.filterArea ? this._bounds.addBoundsArea(e._bounds, e.filterArea) : this._bounds.addBounds(e._bounds) + } + this._bounds.updateID = this._boundsID + } + , + e.prototype.getLocalBounds = function(e, i) { + void 0 === i && (i = !1); + var r = t.prototype.getLocalBounds.call(this, e); + if (!i) + for (var n = 0, s = this.children.length; n < s; ++n) { + var o = this.children[n]; + o.visible && o.updateTransform() + } + return r + } + , + e.prototype._calculateBounds = function() {} + , + e.prototype.render = function(t) { + if (this.visible && !(this.worldAlpha <= 0) && this.renderable) + if (this._mask || this.filters && this.filters.length) + this.renderAdvanced(t); + else { + this._render(t); + for (var e = 0, i = this.children.length; e < i; ++e) + this.children[e].render(t) + } + } + , + e.prototype.renderAdvanced = function(t) { + t.batch.flush(); + var e = this.filters + , i = this._mask; + if (e) { + this._enabledFilters || (this._enabledFilters = []), + this._enabledFilters.length = 0; + for (var r = 0; r < e.length; r++) + e[r].enabled && this._enabledFilters.push(e[r]); + this._enabledFilters.length && t.filter.push(this, this._enabledFilters) + } + i && t.mask.push(this, this._mask), + this._render(t); + r = 0; + for (var n = this.children.length; r < n; r++) + this.children[r].render(t); + t.batch.flush(), + i && t.mask.pop(this), + e && this._enabledFilters && this._enabledFilters.length && t.filter.pop() + } + , + e.prototype._render = function(t) {} + , + e.prototype.destroy = function(e) { + t.prototype.destroy.call(this), + this.sortDirty = !1; + var i = "boolean" == typeof e ? e : e && e.children + , r = this.removeChildren(0, this.children.length); + if (i) + for (var n = 0; n < r.length; ++n) + r[n].destroy(e) + } + , + Object.defineProperty(e.prototype, "width", { + get: function() { + return this.scale.x * this.getLocalBounds().width + }, + set: function(t) { + var e = this.getLocalBounds().width; + this.scale.x = 0 !== e ? t / e : 1, + this._width = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "height", { + get: function() { + return this.scale.y * this.getLocalBounds().height + }, + set: function(t) { + var e = this.getLocalBounds().height; + this.scale.y = 0 !== e ? t / e : 1, + this._height = t + }, + enumerable: !1, + configurable: !0 + }), + e + }(Hb); + Ac.prototype.containerUpdateTransform = Ac.prototype.updateTransform; + (function(t) { + t.MITER = "miter", + t.BEVEL = "bevel", + t.ROUND = "round" + } + )(Fa || (ve = Fa = {}, + ve)), + function(t) { + t.BUTT = "butt", + t.ROUND = "round", + t.SQUARE = "square" + }(Ga || (ue = Ga = {}, + ue)); + var gb = { + adaptive: !0, + maxLength: 10, + minSegments: 8, + maxSegments: 2048, + epsilon: 1e-4, + _segmentsCount: function(t, e) { + if (void 0 === e && (e = 20), + !this.adaptive || !t || isNaN(t)) + return e; + var r = Math.ceil(t / this.maxLength); + return r < this.minSegments ? r = this.minSegments : r > this.maxSegments && (r = this.maxSegments), + r + } + } + , de = function() { + function t() { + this.color = 16777215, + this.alpha = 1, + this.texture = oa.WHITE, + this.matrix = null, + this.visible = !1, + this.reset() + } + return t.prototype.clone = function() { + var e = new t; + return e.color = this.color, + e.alpha = this.alpha, + e.texture = this.texture, + e.matrix = this.matrix, + e.visible = this.visible, + e + } + , + t.prototype.reset = function() { + this.color = 16777215, + this.alpha = 1, + this.texture = oa.WHITE, + this.matrix = null, + this.visible = !1 + } + , + t.prototype.destroy = function() { + this.texture = null, + this.matrix = null + } + , + t + }() + , Zg = function(t, e) { + return (Zg = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, e) { + t.__proto__ = e + } + || function(t, e) { + for (var r in e) + e.hasOwnProperty(r) && (t[r] = e[r]) + } + )(t, e) + }; + function Bc(t, e) { + function r() { + this.constructor = t + } + Zg(t, e), + t.prototype = null === e ? Object.create(e) : (r.prototype = e.prototype, + new r) + } + var ee = { + build: function(t) { + t.points = t.shape.points.slice() + }, + triangulate: function(t, e) { + var r = t.points + , i = t.holes + , a = e.points + , n = e.indices; + if (r.length >= 6) { + for (var s = [], h = 0; h < i.length; h++) { + var o = i[h]; + s.push(r.length / 2), + r = r.concat(o.points) + } + var l = cd.d(r, s, 2); + if (!l) + return; + var $ = a.length / 2; + for (h = 0; h < l.length; h += 3) + n.push(l[h] + $), + n.push(l[h + 1] + $), + n.push(l[h + 2] + $); + for (h = 0; h < r.length; h++) + a.push(r[h]) + } + } + } + , fe = { + build: function(t) { + var e, r, i = t.shape, a = t.points, n = i.x, s = i.y; + if (a.length = 0, + t.type === fa.CIRC) + e = i.radius, + r = i.radius; + else { + var h = t.shape; + e = h.width, + r = h.height + } + if (0 !== e && 0 !== r) { + var o = Math.floor(30 * Math.sqrt(i.radius)) || Math.floor(15 * Math.sqrt(e + r)); + o /= 2.3; + for (var l = 2 * Math.PI / o, $ = 0; $ < o - .5; $++) + a.push(n + Math.sin(-l * $) * e, s + Math.cos(-l * $) * r); + a.push(a[0], a[1]) + } + }, + triangulate: function(t, e) { + var r = t.points + , i = e.points + , a = e.indices + , n = i.length / 2 + , s = n + , h = t.shape + , o = t.matrix + , l = h.x + , $ = h.y; + i.push(t.matrix ? o.a * l + o.c * $ + o.tx : l, t.matrix ? o.b * l + o.d * $ + o.ty : $); + for (var u = 0; u < r.length; u += 2) + i.push(r[u], r[u + 1]), + a.push(n++, s, n) + } + } + , $g = { + build: function(t) { + var e = t.shape + , r = e.x + , i = e.y + , a = e.width + , n = e.height + , s = t.points; + s.length = 0, + s.push(r, i, r + a, i, r + a, i + n, r, i + n) + }, + triangulate: function(t, e) { + var r = t.points + , i = e.points + , a = i.length / 2; + i.push(r[0], r[1], r[2], r[3], r[6], r[7], r[4], r[5]), + e.indices.push(a, a + 1, a + 2, a + 1, a + 2, a + 3) + } + }; + function Xa(t, e, r) { + return t + (e - t) * r + } + function Ib(t, e, r, i, a, n, s) { + void 0 === s && (s = []); + for (var h = s, o = 0, l = 0, $ = 0, u = 0, p = 0, c = 0, d = 0, v = 0; d <= 20; ++d) + o = Xa(t, r, v = d / 20), + l = Xa(e, i, v), + $ = Xa(r, a, v), + u = Xa(i, n, v), + p = Xa(o, $, v), + c = Xa(l, u, v), + h.push(p, c); + return h + } + var _g = { + build: function(t) { + var e = t.shape + , r = t.points + , i = e.x + , a = e.y + , n = e.width + , s = e.height + , h = Math.max(0, Math.min(e.radius, Math.min(n, s) / 2)); + r.length = 0, + h ? (Ib(i, a + h, i, a, i + h, a, r), + Ib(i + n - h, a, i + n, a, i + n, a + h, r), + Ib(i + n, a + s - h, i + n, a + s, i + n - h, a + s, r), + Ib(i + h, a + s, i, a + s, i, a + s - h, r)) : r.push(i, a, i + n, a, i + n, a + s, i, a + s) + }, + triangulate: function(t, e) { + for (var r = t.points, i = e.points, a = e.indices, n = i.length / 2, s = cd.d(r, null, 2), h = 0, o = s.length; h < o; h += 3) + a.push(s[h] + n), + a.push(s[h + 1] + n), + a.push(s[h + 2] + n); + for (h = 0, + o = r.length; h < o; h++) + i.push(r[h], r[++h]) + } + }; + function ge(t, e, r, i, a, n, s, h) { + var o, l; + s ? (o = i, + l = -r) : (o = -i, + l = r); + var $ = t - r * a + o + , u = e - i * a + l + , p = t + r * n + o + , c = e + i * n + l; + return h.push($, u), + h.push(p, c), + 2 + } + function Ya(t, e, r, i, a, n, s, h) { + var o = r - t + , l = i - e + , $ = Math.atan2(o, l) + , u = Math.atan2(a - t, n - e); + h && $ < u ? $ += 2 * Math.PI : !h && $ > u && (u += 2 * Math.PI); + var p = $ + , c = u - $ + , d = Math.abs(c) + , v = Math.sqrt(o * o + l * l) + , f = 1 + (15 * d * Math.sqrt(v) / Math.PI >> 0) + , y = c / f; + if (p += y, + h) { + s.push(t, e), + s.push(r, i); + for (var g = 1, q = p; g < f; g++, + q += y) + s.push(t, e), + s.push(t + Math.sin(q) * v, e + Math.cos(q) * v); + s.push(t, e), + s.push(a, n) + } else { + s.push(r, i), + s.push(t, e); + for (g = 1, + q = p; g < f; g++, + q += y) + s.push(t + Math.sin(q) * v, e + Math.cos(q) * v), + s.push(t, e); + s.push(a, n), + s.push(t, e) + } + return 2 * f + } + function ah(t, e) { + var r = t.shape + , i = t.points || r.points.slice() + , a = e.closePointEps; + if (0 !== i.length) { + var n = t.lineStyle + , s = new ra(i[0],i[1]) + , h = new ra(i[i.length - 2],i[i.length - 1]) + , o = r.type !== fa.POLY || r.closeStroke + , l = Math.abs(s.x - h.x) < a && Math.abs(s.y - h.y) < a; + if (o) { + i = i.slice(), + l && (i.pop(), + i.pop(), + h.set(i[i.length - 2], i[i.length - 1])); + var $ = .5 * (s.x + h.x) + , u = .5 * (h.y + s.y); + i.unshift($, u), + i.push($, u) + } + var p = e.points + , c = i.length / 2 + , d = i.length + , v = p.length / 2 + , f = n.width / 2 + , y = f * f + , g = n.miterLimit * n.miterLimit + , q = i[0] + , m = i[1] + , Q = i[2] + , x = i[3] + , b = 0 + , _ = 0 + , P = -(m - x) + , S = q - Q + , A = 0 + , w = 0 + , L = Math.sqrt(P * P + S * S); + P /= L, + S /= L, + P *= f, + S *= f; + var E = n.alignment + , C = 2 * (1 - E) + , M = 2 * E; + o || (n.cap === Ga.ROUND ? d += Ya(q - P * (C - M) * .5, m - S * (C - M) * .5, q - P * C, m - S * C, q + P * M, m + S * M, p, !0) + 2 : n.cap === Ga.SQUARE && (d += ge(q, m, P, S, C, M, !0, p))), + p.push(q - P * C, m - S * C), + p.push(q + P * M, m + S * M); + for (var D = 1; D < c - 1; ++D) { + q = i[2 * (D - 1)], + m = i[2 * (D - 1) + 1], + Q = i[2 * D], + x = i[2 * D + 1], + b = i[2 * (D + 1)], + _ = i[2 * (D + 1) + 1], + P = -(m - x), + S = q - Q, + P /= L = Math.sqrt(P * P + S * S), + S /= L, + P *= f, + S *= f, + A = -(x - _), + w = Q - b, + A /= L = Math.sqrt(A * A + w * w), + w /= L, + A *= f, + w *= f; + var I = Q - q + , T = m - x + , R = Q - b + , O = _ - x + , N = T * R - O * I + , B = N < 0; + if (Math.abs(N) < .1) + p.push(Q - P * C, x - S * C), + p.push(Q + P * M, x + S * M); + else { + var U = (-P + q) * (-S + x) - (-P + Q) * (-S + m) + , H = (-A + b) * (-w + x) - (-A + Q) * (-w + _) + , F = (I * H - R * U) / N + , G = (O * U - T * H) / N + , z = (F - Q) * (F - Q) + (G - x) * (G - x) + , j = Q + (F - Q) * C + , W = x + (G - x) * C + , k = Q - (F - Q) * M + , V = x - (G - x) * M + , J = B ? C : M; + z <= Math.min(I * I + T * T, R * R + O * O) + J * J * y ? n.join === Fa.BEVEL || z / y > g ? (B ? (p.push(j, W), + p.push(Q + P * M, x + S * M), + p.push(j, W), + p.push(Q + A * M, x + w * M)) : (p.push(Q - P * C, x - S * C), + p.push(k, V), + p.push(Q - A * C, x - w * C), + p.push(k, V)), + d += 2) : n.join === Fa.ROUND ? B ? (p.push(j, W), + p.push(Q + P * M, x + S * M), + d += Ya(Q, x, Q + P * M, x + S * M, Q + A * M, x + w * M, p, !0) + 4, + p.push(j, W), + p.push(Q + A * M, x + w * M)) : (p.push(Q - P * C, x - S * C), + p.push(k, V), + d += Ya(Q, x, Q - P * C, x - S * C, Q - A * C, x - w * C, p, !1) + 4, + p.push(Q - A * C, x - w * C), + p.push(k, V)) : (p.push(j, W), + p.push(k, V)) : (p.push(Q - P * C, x - S * C), + p.push(Q + P * M, x + S * M), + n.join === Fa.BEVEL || z / y > g || (n.join === Fa.ROUND ? d += B ? Ya(Q, x, Q + P * M, x + S * M, Q + A * M, x + w * M, p, !0) + 2 : Ya(Q, x, Q - P * C, x - S * C, Q - A * C, x - w * C, p, !1) + 2 : (B ? (p.push(k, V), + p.push(k, V)) : (p.push(j, W), + p.push(j, W)), + d += 2)), + p.push(Q - A * C, x - w * C), + p.push(Q + A * M, x + w * M), + d += 2) + } + } + q = i[2 * (c - 2)], + m = i[2 * (c - 2) + 1], + Q = i[2 * (c - 1)], + P = -(m - (x = i[2 * (c - 1) + 1])), + S = q - Q, + P /= L = Math.sqrt(P * P + S * S), + S /= L, + P *= f, + S *= f, + p.push(Q - P * C, x - S * C), + p.push(Q + P * M, x + S * M), + o || (n.cap === Ga.ROUND ? d += Ya(Q - P * (C - M) * .5, x - S * (C - M) * .5, Q - P * C, x - S * C, Q + P * M, x + S * M, p, !1) + 2 : n.cap === Ga.SQUARE && (d += ge(Q, x, P, S, C, M, !1, p))); + var Y = e.indices + , X = gb.epsilon * gb.epsilon; + for (D = v; D < d + v - 2; ++D) + q = p[2 * D], + m = p[2 * D + 1], + Q = p[2 * (D + 1)], + x = p[2 * (D + 1) + 1], + b = p[2 * (D + 2)], + _ = p[2 * (D + 2) + 1], + Math.abs(q * (x - _) + Q * (_ - m) + b * (m - x)) < X || Y.push(D, D + 1, D + 2) + } + } + function bh(t, e) { + var r = 0 + , i = t.shape + , a = t.points || i.points + , n = i.type !== fa.POLY || i.closeStroke; + if (0 !== a.length) { + var s = e.points + , h = e.indices + , o = a.length / 2 + , l = s.length / 2 + , $ = l; + for (s.push(a[0], a[1]), + r = 1; r < o; r++) + s.push(a[2 * r], a[2 * r + 1]), + h.push($, $ + 1), + $++; + n && h.push($, l) + } + } + function he(t, e) { + t.lineStyle.native ? bh(t, e) : ah(t, e) + } + var hb, ie = function() { + function t() {} + return t.curveTo = function(t, e, r, i, a, n) { + var s = n[n.length - 2] + , h = n[n.length - 1] - e + , o = s - t + , l = i - e + , $ = r - t + , u = Math.abs(h * $ - o * l); + if (u < 1e-8 || 0 === a) + return n[n.length - 2] === t && n[n.length - 1] === e || n.push(t, e), + null; + var p = h * h + o * o + , c = l * l + $ * $ + , d = h * l + o * $ + , v = a * Math.sqrt(p) / u + , f = a * Math.sqrt(c) / u + , y = v * d / p + , g = f * d / c + , q = v * $ + f * o + , m = v * l + f * h + , Q = o * (f + y) + , x = h * (f + y) + , b = $ * (v + g) + , _ = l * (v + g); + return { + cx: q + t, + cy: m + e, + radius: a, + startAngle: Math.atan2(x - m, Q - q), + endAngle: Math.atan2(_ - m, b - q), + anticlockwise: o * l > $ * h + } + } + , + t.arc = function(t, e, r, i, a, n, s, h, o) { + for (var l = s - n, $ = gb._segmentsCount(Math.abs(l) * a, 40 * Math.ceil(Math.abs(l) / wb)), u = l / (2 * $), p = 2 * u, c = Math.cos(u), d = Math.sin(u), v = $ - 1, f = v % 1 / v, y = 0; y <= v; ++y) { + var g = u + n + p * (y + f * y) + , q = Math.cos(g) + , m = -Math.sin(g); + o.push((c * q + d * m) * a + r, (c * -m + d * q) * a + i) + } + } + , + t + }(), ch = function() { + function t() {} + return t.curveLength = function(t, e, r, i, a, n, s, h) { + for (var o = 0, l = 0, $ = 0, u = 0, p = 0, c = 0, d = 0, v = 0, f = 0, y = 0, g = 0, q = t, m = e, Q = 1; Q <= 10; ++Q) + y = q - (v = (d = (c = (p = 1 - (l = Q / 10)) * p) * p) * t + 3 * c * l * r + 3 * p * ($ = l * l) * a + (u = $ * l) * s), + g = m - (f = d * e + 3 * c * l * i + 3 * p * $ * n + u * h), + q = v, + m = f, + o += Math.sqrt(y * y + g * g); + return o + } + , + t.curveTo = function(e, r, i, a, n, s, h) { + var o = h[h.length - 2] + , l = h[h.length - 1]; + h.length -= 2; + var $ = gb._segmentsCount(t.curveLength(o, l, e, r, i, a, n, s)) + , u = 0 + , p = 0 + , c = 0 + , d = 0 + , v = 0; + h.push(o, l); + for (var f = 1, y = 0; f <= $; ++f) + c = (p = (u = 1 - (y = f / $)) * u) * u, + v = (d = y * y) * y, + h.push(c * o + 3 * p * y * e + 3 * u * d * i + v * n, c * l + 3 * p * y * r + 3 * u * d * a + v * s) + } + , + t + }(), dh = function() { + function t() {} + return t.curveLength = function(t, e, r, i, a, n) { + var s = t - 2 * r + a + , h = e - 2 * i + n + , o = 2 * r - 2 * t + , l = 2 * i - 2 * e + , $ = 4 * (s * s + h * h) + , u = 4 * (s * o + h * l) + , p = o * o + l * l + , c = 2 * Math.sqrt($ + u + p) + , d = Math.sqrt($) + , v = 2 * $ * d + , f = 2 * Math.sqrt(p) + , y = u / d; + return (v * c + d * u * (c - f) + (4 * p * $ - u * u) * Math.log((2 * d + y + c) / (y + f))) / (4 * v) + } + , + t.curveTo = function(e, r, i, a, n) { + for (var s = n[n.length - 2], h = n[n.length - 1], o = gb._segmentsCount(t.curveLength(s, h, e, r, i, a)), l = 0, $ = 0, u = 1; u <= o; ++u) { + var p = u / o; + l = s + (e - s) * p, + $ = h + (r - h) * p, + n.push(l + (e + (i - e) * p - l) * p, $ + (r + (a - r) * p - $) * p) + } + } + , + t + }(), eh = function() { + function t() { + this.reset() + } + return t.prototype.begin = function(t, e, r) { + this.reset(), + this.style = t, + this.start = e, + this.attribStart = r + } + , + t.prototype.end = function(t, e) { + this.attribSize = e - this.attribStart, + this.size = t - this.start + } + , + t.prototype.reset = function() { + this.style = null, + this.size = 0, + this.start = 0, + this.attribStart = 0, + this.attribSize = 0 + } + , + t + }(), Cc = ((hb = {})[fa.POLY] = ee, + hb[fa.CIRC] = fe, + hb[fa.ELIP] = fe, + hb[fa.RECT] = $g, + hb[fa.RREC] = _g, + hb), je = [], Jb = [], ke = function() { + function t(t, e, r, i) { + void 0 === e && (e = null), + void 0 === r && (r = null), + void 0 === i && (i = null), + this.shape = t, + this.lineStyle = r, + this.fillStyle = e, + this.matrix = i, + this.type = t.type, + this.points = [], + this.holes = [] + } + return t.prototype.clone = function() { + return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix) + } + , + t.prototype.destroy = function() { + this.shape = null, + this.holes.length = 0, + this.holes = null, + this.points.length = 0, + this.points = null, + this.lineStyle = null, + this.fillStyle = null + } + , + t + }(), Za = new ra, fh = new Gb, gh = function(t) { + function e() { + var e = t.call(this) || this; + return e.uvsFloat32 = null, + e.indicesUint16 = null, + e.points = [], + e.colors = [], + e.uvs = [], + e.indices = [], + e.textureIds = [], + e.graphicsData = [], + e.dirty = 0, + e.batchDirty = -1, + e.cacheDirty = -1, + e.clearDirty = 0, + e.drawCalls = [], + e.batches = [], + e.shapeIndex = 0, + e._bounds = new Gb, + e.boundsDirty = -1, + e.boundsPadding = 0, + e.batchable = !1, + e.indicesUint16 = null, + e.uvsFloat32 = null, + e.closePointEps = 1e-4, + e + } + return Bc(e, t), + Object.defineProperty(e.prototype, "bounds", { + get: function() { + return this.boundsDirty !== this.dirty && (this.boundsDirty = this.dirty, + this.calculateBounds()), + this._bounds + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.invalidate = function() { + this.boundsDirty = -1, + this.dirty++, + this.batchDirty++, + this.shapeIndex = 0, + this.points.length = 0, + this.colors.length = 0, + this.uvs.length = 0, + this.indices.length = 0, + this.textureIds.length = 0; + for (var t = 0; t < this.drawCalls.length; t++) + this.drawCalls[t].texArray.clear(), + Jb.push(this.drawCalls[t]); + this.drawCalls.length = 0; + for (t = 0; t < this.batches.length; t++) { + var e = this.batches[t]; + e.reset(), + je.push(e) + } + this.batches.length = 0 + } + , + e.prototype.clear = function() { + return this.graphicsData.length > 0 && (this.invalidate(), + this.clearDirty++, + this.graphicsData.length = 0), + this + } + , + e.prototype.drawShape = function(t, e, r, i) { + void 0 === e && (e = null), + void 0 === r && (r = null), + void 0 === i && (i = null); + var a = new ke(t,e,r,i); + return this.graphicsData.push(a), + this.dirty++, + this + } + , + e.prototype.drawHole = function(t, e) { + if (void 0 === e && (e = null), + !this.graphicsData.length) + return null; + var r = new ke(t,null,null,e) + , i = this.graphicsData[this.graphicsData.length - 1]; + return r.lineStyle = i.lineStyle, + i.holes.push(r), + this.dirty++, + this + } + , + e.prototype.destroy = function() { + t.prototype.destroy.call(this); + for (var e = 0; e < this.graphicsData.length; ++e) + this.graphicsData[e].destroy(); + this.points.length = 0, + this.points = null, + this.colors.length = 0, + this.colors = null, + this.uvs.length = 0, + this.uvs = null, + this.indices.length = 0, + this.indices = null, + this.indexBuffer.destroy(), + this.indexBuffer = null, + this.graphicsData.length = 0, + this.graphicsData = null, + this.drawCalls.length = 0, + this.drawCalls = null, + this.batches.length = 0, + this.batches = null, + this._bounds = null + } + , + e.prototype.containsPoint = function(t) { + for (var e = this.graphicsData, r = 0; r < e.length; ++r) { + var i = e[r]; + if (i.fillStyle.visible && i.shape && (i.matrix ? i.matrix.applyInverse(t, Za) : Za.copyFrom(t), + i.shape.contains(Za.x, Za.y))) { + var a = !1; + if (i.holes) + for (var n = 0; n < i.holes.length; n++) { + if (i.holes[n].shape.contains(Za.x, Za.y)) { + a = !0; + break + } + } + if (!a) + return !0 + } + } + return !1 + } + , + e.prototype.updateBatches = function(t) { + if (this.graphicsData.length) { + if (this.validateBatching()) { + this.cacheDirty = this.dirty; + var e = this.uvs + , r = this.graphicsData + , i = null + , a = null; + this.batches.length > 0 && (a = (i = this.batches[this.batches.length - 1]).style); + for (var n = this.shapeIndex; n < r.length; n++) { + this.shapeIndex++; + var s = r[n] + , h = s.fillStyle + , o = s.lineStyle; + Cc[s.type].build(s), + s.matrix && this.transformPoints(s.points, s.matrix); + for (var l = 0; l < 2; l++) { + var $ = 0 === l ? h : o; + if ($.visible) { + var u = $.texture.baseTexture + , p = this.indices.length + , c = this.points.length / 2; + u.wrapMode = Rb.REPEAT, + 0 === l ? this.processFill(s) : this.processLine(s); + var d = this.points.length / 2 - c; + 0 !== d && (i && !this._compareStyles(a, $) && (i.end(p, c), + i = null), + i || ((i = je.pop() || new eh).begin($, p, c), + this.batches.push(i), + a = $), + this.addUvs(this.points, e, $.texture, c, d, $.matrix)) + } + } + } + var v = this.indices.length + , f = this.points.length / 2; + if (i && i.end(v, f), + 0 !== this.batches.length) { + if (this.indicesUint16 && this.indices.length === this.indicesUint16.length) + this.indicesUint16.set(this.indices); + else { + var y = f > 65535 && t; + this.indicesUint16 = y ? new Uint32Array(this.indices) : new Uint16Array(this.indices) + } + this.batchable = this.isBatchable(), + this.batchable ? this.packBatches() : this.buildDrawCalls() + } else + this.batchable = !0 + } + } else + this.batchable = !0 + } + , + e.prototype._compareStyles = function(t, e) { + return !(!t || !e) && t.texture.baseTexture === e.texture.baseTexture && t.color + t.alpha === e.color + e.alpha && !!t.native == !!e.native + } + , + e.prototype.validateBatching = function() { + if (this.dirty === this.cacheDirty || !this.graphicsData.length) + return !1; + for (var t = 0, e = this.graphicsData.length; t < e; t++) { + var r = this.graphicsData[t] + , i = r.fillStyle + , a = r.lineStyle; + if (i && !i.texture.baseTexture.valid) + return !1; + if (a && !a.texture.baseTexture.valid) + return !1 + } + return !0 + } + , + e.prototype.packBatches = function() { + this.batchDirty++, + this.uvsFloat32 = new Float32Array(this.uvs); + for (var t = this.batches, e = 0, r = t.length; e < r; e++) + for (var i = t[e], a = 0; a < i.size; a++) { + var n = i.start + a; + this.indicesUint16[n] = this.indicesUint16[n] - i.attribStart + } + } + , + e.prototype.isBatchable = function() { + if (this.points.length > 131070) + return !1; + for (var t = this.batches, r = 0; r < t.length; r++) + if (t[r].style.native) + return !1; + return this.points.length < 2 * e.BATCHABLE_SIZE + } + , + e.prototype.buildDrawCalls = function() { + for (var t = ++ia._globalBatch, e = 0; e < this.drawCalls.length; e++) + this.drawCalls[e].texArray.clear(), + Jb.push(this.drawCalls[e]); + this.drawCalls.length = 0; + var r = this.colors + , i = this.textureIds + , a = Jb.pop(); + a || ((a = new xc).texArray = new yc), + a.texArray.count = 0, + a.start = 0, + a.size = 0, + a.type = Ba.TRIANGLES; + var n = 0 + , s = null + , h = 0 + , o = !1 + , l = Ba.TRIANGLES + , $ = 0; + this.drawCalls.push(a); + for (e = 0; e < this.batches.length; e++) { + var u = this.batches[e] + , p = u.style + , c = p.texture.baseTexture; + o !== !!p.native && (l = (o = !!p.native) ? Ba.LINES : Ba.TRIANGLES, + s = null, + n = 8, + t++), + s !== c && (s = c, + c._batchEnabled !== t && (8 === n && (t++, + n = 0, + a.size > 0 && ((a = Jb.pop()) || ((a = new xc).texArray = new yc), + this.drawCalls.push(a)), + a.start = $, + a.size = 0, + a.texArray.count = 0, + a.type = l), + c.touched = 1, + c._batchEnabled = t, + c._batchLocation = n, + c.wrapMode = 10497, + a.texArray.elements[a.texArray.count++] = c, + n++)), + a.size += u.size, + $ += u.size, + h = c._batchLocation, + this.addColors(r, p.color, p.alpha, u.attribSize), + this.addTextureIds(i, h, u.attribSize) + } + ia._globalBatch = t, + this.packAttributes() + } + , + e.prototype.packAttributes = function() { + for (var t = this.points, e = this.uvs, r = this.colors, i = this.textureIds, a = new ArrayBuffer(3 * t.length * 4), n = new Float32Array(a), s = new Uint32Array(a), h = 0, o = 0; o < t.length / 2; o++) + n[h++] = t[2 * o], + n[h++] = t[2 * o + 1], + n[h++] = e[2 * o], + n[h++] = e[2 * o + 1], + s[h++] = r[o], + n[h++] = i[o]; + this._buffer.update(a), + this._indexBuffer.update(this.indicesUint16) + } + , + e.prototype.processFill = function(t) { + t.holes.length ? (this.processHoles(t.holes), + ee.triangulate(t, this)) : Cc[t.type].triangulate(t, this) + } + , + e.prototype.processLine = function(t) { + he(t, this); + for (var e = 0; e < t.holes.length; e++) + he(t.holes[e], this) + } + , + e.prototype.processHoles = function(t) { + for (var e = 0; e < t.length; e++) { + var r = t[e]; + Cc[r.type].build(r), + r.matrix && this.transformPoints(r.points, r.matrix) + } + } + , + e.prototype.calculateBounds = function() { + var t = this._bounds + , e = fh + , r = la.IDENTITY; + this._bounds.clear(), + e.clear(); + for (var i = 0; i < this.graphicsData.length; i++) { + var a = this.graphicsData[i] + , n = a.shape + , s = a.type + , h = a.lineStyle + , o = a.matrix || la.IDENTITY + , l = 0; + if (h && h.visible) { + var $ = h.alignment; + l = h.width, + s === fa.POLY ? l *= .5 + Math.abs(.5 - $) : l *= Math.max(0, $) + } + if (r !== o && (e.isEmpty() || (t.addBoundsMatrix(e, r), + e.clear()), + r = o), + s === fa.RECT || s === fa.RREC) { + var u = n; + e.addFramePad(u.x, u.y, u.x + u.width, u.y + u.height, l, l) + } else if (s === fa.CIRC) { + var p = n; + e.addFramePad(p.x, p.y, p.x, p.y, p.radius + l, p.radius + l) + } else if (s === fa.ELIP) { + var c = n; + e.addFramePad(c.x, c.y, c.x, c.y, c.width + l, c.height + l) + } else { + var d = n; + t.addVerticesMatrix(r, d.points, 0, d.points.length, l, l) + } + } + e.isEmpty() || t.addBoundsMatrix(e, r), + t.pad(this.boundsPadding, this.boundsPadding) + } + , + e.prototype.transformPoints = function(t, e) { + for (var r = 0; r < t.length / 2; r++) { + var i = t[2 * r] + , a = t[2 * r + 1]; + t[2 * r] = e.a * i + e.c * a + e.tx, + t[2 * r + 1] = e.b * i + e.d * a + e.ty + } + } + , + e.prototype.addColors = function(t, e, r, i) { + for (var a = fd((e >> 16) + (65280 & e) + ((255 & e) << 16), r); i-- > 0; ) + t.push(a) + } + , + e.prototype.addTextureIds = function(t, e, r) { + for (; r-- > 0; ) + t.push(e) + } + , + e.prototype.addUvs = function(t, e, r, i, a, n) { + void 0 === n && (n = null); + for (var s = 0, h = e.length, o = r.frame; s < a; ) { + var l = t[2 * (i + s)] + , $ = t[2 * (i + s) + 1]; + if (n) { + var u = n.a * l + n.c * $ + n.tx; + $ = n.b * l + n.d * $ + n.ty, + l = u + } + s++, + e.push(l / o.width, $ / o.height) + } + var p = r.baseTexture; + (o.width < p.width || o.height < p.height) && this.adjustUvs(e, r, h, a) + } + , + e.prototype.adjustUvs = function(t, e, r, i) { + for (var a = e.baseTexture, n = r + 2 * i, s = e.frame, h = s.width / a.width, o = s.height / a.height, l = s.x / s.width, $ = s.y / s.height, u = Math.floor(t[r] + 1e-6), p = Math.floor(t[r + 1] + 1e-6), c = r + 2; c < n; c += 2) + u = Math.min(u, Math.floor(t[c] + 1e-6)), + p = Math.min(p, Math.floor(t[c + 1] + 1e-6)); + l -= u, + $ -= p; + for (c = r; c < n; c += 2) + t[c] = (t[c] + l) * h, + t[c + 1] = (t[c + 1] + $) * o + } + , + e.BATCHABLE_SIZE = 100, + e + }(_d), hh = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.width = 0, + e.alignment = .5, + e.native = !1, + e.cap = Ga.BUTT, + e.join = Fa.MITER, + e.miterLimit = 10, + e + } + return Bc(e, t), + e.prototype.clone = function() { + var t = new e; + return t.color = this.color, + t.alpha = this.alpha, + t.texture = this.texture, + t.matrix = this.matrix, + t.visible = this.visible, + t.width = this.width, + t.alignment = this.alignment, + t.native = this.native, + t.cap = this.cap, + t.join = this.join, + t.miterLimit = this.miterLimit, + t + } + , + e.prototype.reset = function() { + t.prototype.reset.call(this), + this.color = 0, + this.alignment = .5, + this.width = 0, + this.native = !1 + } + , + e + }(de), ih = new Float32Array(3), Dc = {}, jh = function(t) { + function e(e) { + void 0 === e && (e = null); + var r = t.call(this) || this; + return r._geometry = e || new gh, + r._geometry.refCount++, + r.shader = null, + r.state = Fb.for2d(), + r._fillStyle = new de, + r._lineStyle = new hh, + r._matrix = null, + r._holeMode = !1, + r.currentPath = null, + r.batches = [], + r.batchTint = -1, + r.batchDirty = -1, + r.vertexData = null, + r.pluginName = "batch", + r._transformID = -1, + r.tint = 16777215, + r.blendMode = K.NORMAL, + r + } + return Bc(e, t), + Object.defineProperty(e.prototype, "geometry", { + get: function() { + return this._geometry + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.clone = function() { + return this.finishPoly(), + new e(this._geometry) + } + , + Object.defineProperty(e.prototype, "blendMode", { + get: function() { + return this.state.blendMode + }, + set: function(t) { + this.state.blendMode = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "tint", { + get: function() { + return this._tint + }, + set: function(t) { + this._tint = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "fill", { + get: function() { + return this._fillStyle + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "line", { + get: function() { + return this._lineStyle + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.lineStyle = function(t, e, r, i, a) { + return void 0 === t && (t = null), + void 0 === e && (e = 0), + void 0 === r && (r = 1), + void 0 === i && (i = .5), + void 0 === a && (a = !1), + "number" == typeof t && (t = { + width: t, + color: e, + alpha: r, + alignment: i, + native: a + }), + this.lineTextureStyle(t) + } + , + e.prototype.lineTextureStyle = function(t) { + t = Object.assign({ + width: 0, + texture: oa.WHITE, + color: t && t.texture ? 16777215 : 0, + alpha: 1, + matrix: null, + alignment: .5, + native: !1, + cap: Ga.BUTT, + join: Fa.MITER, + miterLimit: 10 + }, t), + this.currentPath && this.startPoly(); + var e = t.width > 0 && t.alpha > 0; + return e ? (t.matrix && (t.matrix = t.matrix.clone(), + t.matrix.invert()), + Object.assign(this._lineStyle, { + visible: e + }, t)) : this._lineStyle.reset(), + this + } + , + e.prototype.startPoly = function() { + if (this.currentPath) { + var t = this.currentPath.points + , e = this.currentPath.points.length; + e > 2 && (this.drawShape(this.currentPath), + this.currentPath = new $b, + this.currentPath.closeStroke = !1, + this.currentPath.points.push(t[e - 2], t[e - 1])) + } else + this.currentPath = new $b, + this.currentPath.closeStroke = !1 + } + , + e.prototype.finishPoly = function() { + this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), + this.currentPath = null) : this.currentPath.points.length = 0) + } + , + e.prototype.moveTo = function(t, e) { + return this.startPoly(), + this.currentPath.points[0] = t, + this.currentPath.points[1] = e, + this + } + , + e.prototype.lineTo = function(t, e) { + this.currentPath || this.moveTo(0, 0); + var r = this.currentPath.points + , i = r[r.length - 2] + , a = r[r.length - 1]; + return i === t && a === e || r.push(t, e), + this + } + , + e.prototype._initCurve = function(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = 0), + this.currentPath ? 0 === this.currentPath.points.length && (this.currentPath.points = [t, e]) : this.moveTo(t, e) + } + , + e.prototype.quadraticCurveTo = function(t, e, r, i) { + this._initCurve(); + var a = this.currentPath.points; + return 0 === a.length && this.moveTo(0, 0), + dh.curveTo(t, e, r, i, a), + this + } + , + e.prototype.bezierCurveTo = function(t, e, r, i, a, n) { + return this._initCurve(), + ch.curveTo(t, e, r, i, a, n, this.currentPath.points), + this + } + , + e.prototype.arcTo = function(t, e, r, i, a) { + this._initCurve(t, e); + var n = this.currentPath.points + , s = ie.curveTo(t, e, r, i, a, n); + if (s) { + var h = s.cx + , o = s.cy + , l = s.radius + , $ = s.startAngle + , u = s.endAngle + , p = s.anticlockwise; + this.arc(h, o, l, $, u, p) + } + return this + } + , + e.prototype.arc = function(t, e, r, i, a, n) { + if (void 0 === n && (n = !1), + i === a) + return this; + if (!n && a <= i ? a += wb : n && i <= a && (i += wb), + 0 === a - i) + return this; + var s = t + Math.cos(i) * r + , h = e + Math.sin(i) * r + , o = this._geometry.closePointEps + , l = this.currentPath ? this.currentPath.points : null; + if (l) { + var $ = Math.abs(l[l.length - 2] - s) + , u = Math.abs(l[l.length - 1] - h); + $ < o && u < o || l.push(s, h) + } else + this.moveTo(s, h), + l = this.currentPath.points; + return ie.arc(s, h, t, e, r, i, a, n, l), + this + } + , + e.prototype.beginFill = function(t, e) { + return void 0 === t && (t = 0), + void 0 === e && (e = 1), + this.beginTextureFill({ + texture: oa.WHITE, + color: t, + alpha: e + }) + } + , + e.prototype.beginTextureFill = function(t) { + t = Object.assign({ + texture: oa.WHITE, + color: 16777215, + alpha: 1, + matrix: null + }, t), + this.currentPath && this.startPoly(); + var e = t.alpha > 0; + return e ? (t.matrix && (t.matrix = t.matrix.clone(), + t.matrix.invert()), + Object.assign(this._fillStyle, { + visible: e + }, t)) : this._fillStyle.reset(), + this + } + , + e.prototype.endFill = function() { + return this.finishPoly(), + this._fillStyle.reset(), + this + } + , + e.prototype.drawRect = function(t, e, r, i) { + return this.drawShape(new da(t,e,r,i)) + } + , + e.prototype.drawRoundedRect = function(t, e, r, i, a) { + return this.drawShape(new Xf(t,e,r,i,a)) + } + , + e.prototype.drawCircle = function(t, e, r) { + return this.drawShape(new Vf(t,e,r)) + } + , + e.prototype.drawEllipse = function(t, e, r, i) { + return this.drawShape(new Wf(t,e,r,i)) + } + , + e.prototype.drawPolygon = function() { + for (var t, e = arguments, r = [], i = 0; i < arguments.length; i++) + r[i] = e[i]; + var a = !0 + , n = r[0]; + n.points ? (a = n.closeStroke, + t = n.points) : t = Array.isArray(r[0]) ? r[0] : r; + var s = new $b(t); + return s.closeStroke = a, + this.drawShape(s), + this + } + , + e.prototype.drawShape = function(t) { + return this._holeMode ? this._geometry.drawHole(t, this._matrix) : this._geometry.drawShape(t, this._fillStyle.clone(), this._lineStyle.clone(), this._matrix), + this + } + , + e.prototype.clear = function() { + return this._geometry.clear(), + this._lineStyle.reset(), + this._fillStyle.reset(), + this._boundsID++, + this._matrix = null, + this._holeMode = !1, + this.currentPath = null, + this + } + , + e.prototype.isFastRect = function() { + var t = this._geometry.graphicsData; + return 1 === t.length && t[0].shape.type === fa.RECT && !(t[0].lineStyle.visible && t[0].lineStyle.width) + } + , + e.prototype._render = function(t) { + this.finishPoly(); + var e = this._geometry + , r = t.context.supports.uint32Indices; + e.updateBatches(r), + e.batchable ? (this.batchDirty !== e.batchDirty && this._populateBatches(), + this._renderBatched(t)) : (t.batch.flush(), + this._renderDirect(t)) + } + , + e.prototype._populateBatches = function() { + var t = this._geometry + , e = this.blendMode + , r = t.batches.length; + this.batchTint = -1, + this._transformID = -1, + this.batchDirty = t.batchDirty, + this.batches.length = r, + this.vertexData = new Float32Array(t.points); + for (var i = 0; i < r; i++) { + var a = t.batches[i] + , n = a.style.color + , s = new Float32Array(this.vertexData.buffer,4 * a.attribStart * 2,2 * a.attribSize) + , h = new Float32Array(t.uvsFloat32.buffer,4 * a.attribStart * 2,2 * a.attribSize) + , o = { + vertexData: s, + blendMode: e, + indices: new Uint16Array(t.indicesUint16.buffer,2 * a.start,a.size), + uvs: h, + _batchRGB: Xb(n), + _tintRGB: n, + _texture: a.style.texture, + alpha: a.style.alpha, + worldAlpha: 1 + }; + this.batches[i] = o + } + } + , + e.prototype._renderBatched = function(t) { + if (this.batches.length) { + t.batch.setObjectRenderer(t.plugins[this.pluginName]), + this.calculateVertices(), + this.calculateTints(); + for (var e = 0, r = this.batches.length; e < r; e++) { + var i = this.batches[e]; + i.worldAlpha = this.worldAlpha * i.alpha, + t.plugins[this.pluginName].render(i) + } + } + } + , + e.prototype._renderDirect = function(t) { + var e = this._resolveDirectShader(t) + , r = this._geometry + , i = this.tint + , a = this.worldAlpha + , n = e.uniforms + , s = r.drawCalls; + n.translationMatrix = this.transform.worldTransform, + n.tint[0] = (i >> 16 & 255) / 255 * a, + n.tint[1] = (i >> 8 & 255) / 255 * a, + n.tint[2] = (255 & i) / 255 * a, + n.tint[3] = a, + t.shader.bind(e), + t.geometry.bind(r, e), + t.state.set(this.state); + for (var h = 0, o = s.length; h < o; h++) + this._renderDrawCallDirect(t, r.drawCalls[h]) + } + , + e.prototype._renderDrawCallDirect = function(t, e) { + for (var r = e.texArray, i = e.type, a = e.size, n = e.start, s = r.count, h = 0; h < s; h++) + t.texture.bind(r.elements[h], h); + t.geometry.draw(i, a, n) + } + , + e.prototype._resolveDirectShader = function(t) { + var e = this.shader + , r = this.pluginName; + if (!e) { + if (!Dc[r]) { + for (var i = t.plugins.batch.MAX_TEXTURES, a = new Int32Array(i), n = 0; n < i; n++) + a[n] = n; + var s = { + tint: new Float32Array([1, 1, 1, 1]), + translationMatrix: new la, + default: Pa.from({ + uSamplers: a + }, !0) + } + , h = t.plugins[r]._shader.program; + Dc[r] = new oc(h,s) + } + e = Dc[r] + } + return e + } + , + e.prototype._calculateBounds = function() { + this.finishPoly(); + var t = this._geometry; + if (t.graphicsData.length) { + var e = t.bounds + , r = e.minX + , i = e.minY + , a = e.maxX + , n = e.maxY; + this._bounds.addFrame(this.transform, r, i, a, n) + } + } + , + e.prototype.containsPoint = function(t) { + return this.worldTransform.applyInverse(t, e._TEMP_POINT), + this._geometry.containsPoint(e._TEMP_POINT) + } + , + e.prototype.calculateTints = function() { + if (this.batchTint !== this.tint) { + this.batchTint = this.tint; + for (var t = Xb(this.tint, ih), e = 0; e < this.batches.length; e++) { + var r = this.batches[e] + , i = r._batchRGB + , a = (t[0] * i[0] * 255 << 16) + (t[1] * i[1] * 255 << 8) + (0 | t[2] * i[2] * 255); + r._tintRGB = (a >> 16) + (65280 & a) + ((255 & a) << 16) + } + } + } + , + e.prototype.calculateVertices = function() { + var t = this.transform._worldID; + if (this._transformID !== t) { + this._transformID = t; + for (var e = this.transform.worldTransform, r = e.a, i = e.b, a = e.c, n = e.d, s = e.tx, h = e.ty, o = this._geometry.points, l = this.vertexData, $ = 0, u = 0; u < o.length; u += 2) { + var p = o[u] + , c = o[u + 1]; + l[$++] = r * p + a * c + s, + l[$++] = n * c + i * p + h + } + } + } + , + e.prototype.closePath = function() { + var t = this.currentPath; + return t && (t.closeStroke = !0), + this + } + , + e.prototype.setMatrix = function(t) { + return this._matrix = t, + this + } + , + e.prototype.beginHole = function() { + return this.finishPoly(), + this._holeMode = !0, + this + } + , + e.prototype.endHole = function() { + return this.finishPoly(), + this._holeMode = !1, + this + } + , + e.prototype.destroy = function(e) { + this._geometry.refCount--, + 0 === this._geometry.refCount && this._geometry.dispose(), + this._matrix = null, + this.currentPath = null, + this._lineStyle.destroy(), + this._lineStyle = null, + this._fillStyle.destroy(), + this._fillStyle = null, + this._geometry = null, + this.shader = null, + this.vertexData = null, + this.batches.length = 0, + this.batches = null, + t.prototype.destroy.call(this, e) + } + , + e._TEMP_POINT = new ra, + e + }(Ac); + var kh = Nb && Nb.__extends || function() { + var t = function(i, r) { + return (t = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, i) { + t.__proto__ = i + } + || function(t, i) { + for (var r in i) + Object.prototype.hasOwnProperty.call(i, r) && (t[r] = i[r]) + } + )(i, r) + }; + return function(i, r) { + if ("function" != typeof r && null !== r) + throw new TypeError("Class extends value " + String(r) + " is not a constructor or null"); + function o() { + this.constructor = i + } + t(i, r), + i.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, + new o) + } + }() + , lh = window.PIXI ? window.PIXI.Graphics : jh + , le = function(t) { + function i(i, r, o) { + void 0 === r && (r = {}); + var s = t.call(this) || this; + s.graphicsOptions = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: 0, + lineWidth: 1, + lineColor: 16777215 + }, + s.graphicsOptions = Object.assign(s.graphicsOptions, i), + s.physicsOptions = r; + var p = s.graphicsOptions.width / 2 + , n = s.graphicsOptions.height / 2; + return s.pivot.x = p, + s.pivot.y = n, + s._update = o, + s.graphicsOptions.radius ? s._body = ha.Bodies.circle(s.graphicsOptions.x, s.graphicsOptions.y, s.graphicsOptions.radius, s.physicsOptions) : s._body = ha.Bodies.rectangle(s.graphicsOptions.x + p, s.graphicsOptions.y + n, s.graphicsOptions.width, s.graphicsOptions.height, s.physicsOptions), + s + } + return kh(i, t), + Object.defineProperty(i.prototype, "body", { + get: function() { + return this._body + }, + enumerable: !1, + configurable: !0 + }), + i.prototype.update = function() { + this._update({ + position: this._body.position, + rotation: this._body.angle + }) + } + , + i + }(lh); + Nb.PhysicsGraphics = le; + var me = ma && ma.__assign || function() { + return (me = Object.assign || function(r) { + for (var n, e = 1, t = arguments.length; e < t; e++) + for (var a in n = arguments[e]) + Object.prototype.hasOwnProperty.call(n, a) && (r[a] = n[a]); + return r + } + ).apply(this, arguments) + } + , ne = ma && ma.__spreadArray || function(r, n) { + for (var e = 0, t = n.length, a = r.length; e < t; e++, + a++) + r[a] = n[e]; + return r + } + ; + function oe(r, n) { + return window[n] ? Promise.resolve(window[n]) : new Promise(function(e, t) { + var a = document.createElement("script"); + a.onload = function() { + e(n && window[n]) + } + , + a.onerror = function(r) { + a.onload = null, + a.onerror = null, + document.body.removeChild(a), + t(r) + } + , + a.src = r, + a.async = !0, + document.body.appendChild(a) + } + ) + } + ma.loadScript = oe; + var mh = function(r) { + r.App && (r.App.destroy({ + removeView: !0 + }), + window.PIXI.loader.destroy(), + r.App = null, + r.timerMap.forEach(function(r, n) { + window.clearInterval(r), + window.clearTimeout(r) + }), + r.timerMap.clear(), + r.soundMap = {}, + r.music.pause(), + r.music = null, + r.music = new Audio, + Object.keys(r.windowListener).map(function(n) { + var e = n.replace("Listener", ""); + window.removeEventListener(e, r.windowListener[n]) + })) + }; + ma.resetPygameZero = mh; + var Ec = { + aqua: "#00FFFF", + black: "#000000", + blue: "#0000FF", + fuchsia: "#FF00FF", + gray: "#808080", + green: "#008000", + lime: "#00FF00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + orange: "#FFA500", + purple: "#800080", + red: "#FF0000", + silver: "#C0C0C0", + teal: "#008080", + white: "#FFFFFF", + yellow: "#FFFF00" + }; + ma.ColorNameMap = Ec; + var nh = function(r) { + Math.round(r.view.width / 2), + Math.round(r.view.height / 2); + var n = { + transX: function(r, n) { + return void 0 === n && (n = !1), + r + }, + transY: function(r, n) { + return void 0 === n && (n = !1), + r + }, + transPos: function(r, e) { + return void 0 === e && (e = !1), + r ? [n.transX(r[0], e), n.transY(r[1], e)] : r + }, + transColor: function(r) { + return Array.isArray(r) ? window.PIXI.utils.rgb2hex(r) : r.match("#") ? window.PIXI.utils.string2hex(r) : Ec[r] ? window.PIXI.utils.string2hex(Ec[r]) : 16777215 + } + }; + return n + }; + function oh(r, n) { + Array.isArray(n) && (n.x = n[0], + n.y = n[1], + n.width = 0, + n.height = 0), + r.centerX = r.x + r.width / 2, + r.centerY = r.y + r.height / 2, + n.centerX = n.x + n.width / 2, + n.centerY = n.y + n.height / 2, + r.halfWidth = r.width / 2, + r.halfHeight = r.height / 2, + n.halfWidth = n.width / 2, + n.halfHeight = n.height / 2; + var e = r.centerX - n.centerX + , t = r.centerY - n.centerY + , a = r.halfWidth + n.halfWidth + , i = r.halfHeight + n.halfHeight; + return Math.abs(e) < a && Math.abs(t) < i + } + ma.translateTools = nh, + ma.hitTestRectangle = oh; + var Fc = {}; + function ph(r) { + function n(r) { + var n; + return Array.isArray(r) && (n = ne([], r), + r = n[0]), + new Promise(function(e, t) { + window.PIXI.utils.TextureCache[r] ? e(window.PIXI.utils.TextureCache[r]) : window.PIXI.loader.add(n || r).load(function() { + var n = window.PIXI.loader.resources[r].texture; + e(n) + }) + } + ) + } + return /\.json$/.test(r) ? Fc[r] ? n(Fc[r]) : fetch(r).then(function(r) { + return r.json() + }).then(function(e) { + var t = r.replace("index.json", "") + , a = e.map(function(r) { + return t + r + }); + return Fc[r] = a, + n(a) + }) : n(r) + } + ma.textureRecources = ph; + var ga = window.Sk + , qh = function(r) { + return ga.misceval.callsimOrSuspend(ga.builtins.property, new ga.builtin.func(r), new ga.builtin.func(function() {} + )) + }; + function pe(r, n) { + var e = function(e) { + for (var t = [], a = 1; a < arguments.length; a++) + t[a - 1] = arguments[a]; + n || (t = new ga.builtins.tuple(t)); + var i = new ga.builtin.dict(e); + return r(t, i) + }; + return e.co_kwargs = !0, + e + } + ma.defineGetter = qh, + ma.genkwaFunc = pe; + var qe = function(r, n) { + return ga.misceval.callsimOrSuspend(ga.builtins.property, new ga.builtin.func(function(e) { + return "function" == typeof r ? r(e) : ga.ffi.remapToPy(e[r][n]) + } + ), new ga.builtin.func(function(e, t) { + "function" == typeof n ? n(e, t) : e[r][n] = t.v + } + )) + }; + ma.defineProperty = qe; + var rh = function(r, n, e, t) { + return new ga.builtin.func(function(n) { + for (var a = [], i = 1; i < arguments.length; i++) + a[i - 1] = arguments[i]; + return ga.misceval.callsimOrSuspend(ga.misceval.buildClass(r, function(r, i) { + i.__init__ = new ga.builtin.func(function(r) { + r.graph = new window.PIXI.Graphics; + var e = r.graph; + t.apply(void 0, ne([n, e], a)); + var i = r.graph.width / 2 + , o = r.graph.height / 2 + , $ = r.graph.graphicsData[0].shape.x + , s = r.graph.graphicsData[0].shape.y; + r.graph.isCircle ? (r.graph.pivot.set(2 * i, 2 * o), + r.graph.position.set(2 * i, 2 * i)) : (r.graph.pivot.set($ + i, s + o), + r.graph.position.set($ + i, s + o)) + } + ), + i.rotation = qe(function(r) { + return ga.ffi.remapToPy(r.rotation) + }, function(r, n) { + r.physicGraphics ? ha.Body.setAngle(r.physicGraphics._body, n.v) : r.graph.rotation = n.v + }), + i.physicsImpostor = new ga.builtin.func(pe(function(r, n) { + n = ga.ffi.remapToJs(n); + var t = r[0] + , a = r[1] + , i = r[2]; + a = ga.ffi.remapToJs(a || n.is_static) || !1; + var o = !1; + i = ga.ffi.remapToJs(i || n.physicsOptions) || {}; + var $ = t.graph + , s = $.graphicsData + , p = $.width + , c = $.height + , u = $.line + , l = $.rotation + , h = {}; + t.graph.isCircle && (o = !0, + h.radius = s[0].shape.radius), + t.graph.isFilled && (h.fill = s[0].fillStyle.color), + t.physicGraphics = new le(me({ + x: s[0].shape.x, + y: s[0].shape.y, + width: p, + height: c, + lineWidth: u.width, + lineColor: u.color + }, h),me({ + isCircle: o, + isStatic: a + }, i),function(r) { + var n = r.position + , e = r.rotation; + t.graph.position = n, + t.graph.rotation = e + } + ), + ha.Body.setAngle(t.physicGraphics._body, l), + e.addToWorld(t.physicGraphics) + }, !0)) + })) + } + ) + }; + ma.upgradeGraphics = rh; + var sh = {}; + sh = { + scripts: { + start: "parcel build src/main.ts && parcel src/pygame-zero.ts -d ./dist", + server: "node server.js", + build: "parcel build src/main.ts --experimental-scope-hoisting --no-source-maps && parcel build src/pygame-zero.ts --no-source-maps" + }, + name: "skulpt-pygame-zero", + description: "This module provides most of the functions of pygame-zero for skulpt", + version: "0.3.4-alpha2", + main: "dist/main.js", + files: ["lib", "dist", "*.d.ts", "README.md", "README-zh.md"], + devDependencies: { + "alphanum-sort": "^1.0.2", + "ansi-styles": "^3.2.1", + argparse: "^1.0.10", + boolbase: "^1.0.0", + browserslist: "^4.16.3", + "call-bind": "^1.0.2", + "caller-callsite": "^2.0.0", + "caller-path": "^2.0.0", + callsites: "^2.0.0", + "caniuse-api": "^3.0.0", + "caniuse-lite": "^1.0.30001194", + chalk: "^2.4.2", + coa: "^2.0.2", + color: "^3.1.3", + "color-convert": "^1.9.3", + "color-name": "^1.1.3", + "color-string": "^1.5.4", + colorette: "^1.2.2", + cosmiconfig: "^5.2.1", + "css-color-names": "^0.0.4", + "css-declaration-sorter": "^4.0.1", + "css-select": "^2.1.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "^1.0.0-alpha.37", + "css-what": "^3.4.2", + cssesc: "^3.0.0", + "cssnano-preset-default": "^4.0.7", + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "cssnano-util-raw-cache": "^4.0.1", + "cssnano-util-same-parent": "^4.0.1", + csso: "^4.2.0", + "define-properties": "^1.1.3", + "dom-serializer": "^0.2.2", + domelementtype: "^1.3.1", + domutils: "^1.7.0", + "dot-prop": "^5.3.0", + "electron-to-chromium": "^1.3.678", + entities: "^2.2.0", + "error-ex": "^1.3.2", + "es-abstract": "^1.18.0-next.3", + "es-to-primitive": "^1.2.1", + escalade: "^3.1.1", + "escape-string-regexp": "^1.0.5", + esprima: "^4.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + has: "^1.0.3", + "has-bigints": "^1.0.1", + "has-flag": "^3.0.0", + "has-symbols": "^1.0.2", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "html-comment-regex": "^1.1.2", + "import-fresh": "^2.0.0", + "indexes-of": "^1.0.1", + "is-absolute-url": "^2.1.0", + "is-arrayish": "^0.2.1", + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-callable": "^1.2.3", + "is-color-stop": "^1.1.0", + "is-date-object": "^1.0.2", + "is-directory": "^0.3.1", + "is-negative-zero": "^2.0.1", + "is-number-object": "^1.0.4", + "is-obj": "^2.0.0", + "is-regex": "^1.1.2", + "is-resolvable": "^1.1.0", + "is-string": "^1.0.5", + "is-svg": "^3.0.0", + "is-symbol": "^1.0.3", + "js-yaml": "^3.14.1", + "json-parse-better-errors": "^1.0.2", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0", + "matter-js": "^0.16.1", + "mdn-data": "^2.0.4", + minimist: "^1.2.5", + mkdirp: "^0.5.5", + "node-releases": "^1.1.71", + "normalize-url": "^3.3.0", + "nth-check": "^1.0.2", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "object.getownpropertydescriptors": "^2.1.2", + "object.values": "^1.1.3", + "parse-json": "^4.0.0", + postcss: "^7.0.35", + "postcss-calc": "^7.0.5", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-selector-parser": "^3.1.2", + "postcss-svgo": "^4.0.2", + "postcss-unique-selectors": "^4.0.1", + "postcss-value-parser": "^3.3.1", + q: "^1.5.1", + "resolve-from": "^3.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0", + sax: "^1.2.4", + "simple-swizzle": "^0.2.2", + "source-map": "^0.6.1", + "sprintf-js": "^1.0.3", + stable: "^0.1.8", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + stylehacks: "^4.0.3", + "supports-color": "^6.1.0", + svgo: "^1.3.2", + timsort: "^0.3.0", + typescript: "^4.2.3", + "unbox-primitive": "^1.0.0", + uniq: "^1.0.1", + uniqs: "^2.0.0", + unquote: "^1.1.1", + "util-deprecate": "^1.0.2", + "util.promisify": "^1.0.1", + vendors: "^1.0.4", + "which-boxed-primitive": "^1.0.2" + }, + repository: { + type: "git", + url: "git+https://github.com/lipten/skulpt-pygame-zero.git" + }, + keywords: [], + author: "", + license: "ISC", + bugs: { + url: "https://github.com/lipten/skulpt-pygame-zero/issues" + }, + homepage: "https://github.com/lipten/skulpt-pygame-zero#readme", + _id: "skulpt-pygame-zero@0.2.3-alpha3", + dependencies: { + "@pixi/graphics": "^6.0.1" + } + }; + var th = Kb(sh); + var uh = window.Sk + , re = { + // "./pgzrun/__init__.js": "https://cdn.jsdelivr.net/npm/skulpt-pygame-zero@" + th.d.version + "/dist/pygame-zero.js" + "./pgzrun/__init__.js": "https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@main/src/pgzhelper/pygamezero.js" + } + , se = { + usePyGameZero: function(e) { + var n = this; + return function(t) { + return n.matchModelName(t) ? n.load(t) : e.call(this, t) + } + }, + load: function(e) { + return uh.misceval.promiseToSuspension(new Promise(function(n, t) { + oe("https://cdn.bootcdn.net/ajax/libs/pixi.js/5.3.4/pixi.min.js", "PIXI").then(function() { + fetch(re[e]).then(function(e) { + window.PIXI.utils.skipHello(); + var t = e.text(); + n(t) + }) + }) + } + )) + }, + matchModelName: function(e) { + return Object.keys(re).includes(e) + }, + setContainer: function(e) { + this.container = e + }, + reset: function() { + this._handleReset() + }, + _handleReset: function() {}, + _onRunning: function(e) { + this.app = e + }, + _moduleCache: { + App: null, + timerMap: new Map, + soundMap: {}, + music: new Audio, + windowListener: {} + } + }; + Lb.PyGameZero = se, + window.PyGameZero = se; + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = Lb + } else if (typeof define === "function" && define.amd) { + define(function() { + return Lb + }) + } +} +)(); diff --git a/mixly/common/js/skulpt_mixtoy/bg_highlight1.js b/mixly/common/js/skulpt_mixtoy/bg_highlight1.js new file mode 100644 index 00000000..fec71a19 --- /dev/null +++ b/mixly/common/js/skulpt_mixtoy/bg_highlight1.js @@ -0,0 +1,1806 @@ +//这一版删除了所有延时和高亮效果,用以适应非分步调试 +// 监听属性getter/setter +const defineProperty = function(obj, property) { + return Sk.misceval.callsimOrSuspend(Sk.builtins.property, new Sk.builtin.func(function(self) { + if (typeof obj === 'function') { + return obj(self) + } else { + return Sk.ffi.remapToPy(self[obj][property]) + } + }), new Sk.builtin.func(function(self, val) { + if (typeof property === 'function') { + property(self, val) + } else { + self[obj][property] = val.v; + } + })) +} + + +//这一版加入了所有延时和高亮效果,用以适应分布调试 +var $builtinmodule = function (name) { + let mod= {__name__: new Sk.builtin.str("blocklygame")}; + + var svg = d3.select('#blocklySVG').append('svg'); + + //其他变量设置 + var map=//迷宫布局 + [[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], + [0, 2, 1, 1, 1, 1, 3, 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]] + var DirectionType={//移动方向的类型 + NORTH: 0, + EAST: 1, + SOUTH: 2, + WEST: 3 + } + var ResultType = { + UNSET: 0, + SUCCESS: 1, + FAILURE: -1, + TIMEOUT: 2, + ERROR: -2 + } + var tile_SHAPES = { + '10010': [4, 0], // Dead ends + '10001': [3, 3], + '11000': [0, 1], + '10100': [0, 2], + '11010': [4, 1], // Vertical + '10101': [3, 2], // Horizontal + '10110': [0, 0], // Elbows + '10011': [2, 0], + '11001': [4, 2], + '11100': [2, 3], + '11110': [1, 1], // Junctions + '10111': [1, 0], + '11011': [2, 1], + '11101': [1, 2], + '11111': [2, 2], // Cross + 'null0': [4, 3], // Empty + 'null1': [3, 0], + 'null2': [3, 1], + 'null3': [0, 3], + 'null4': [1, 3] + } + // 角色变量 + var actor={ + img : "../common/js/skulpt_mixtoy/pic/pegman.png", + height : 52, + width : 49, + direction : DirectionType.EAST, + type:"animate", + x : 0, + y : 0, + stepSpeed : 150, + coin_point:0, + marker_num:0, + oil:1,//表示小车有充足的油量(为了适应教材而新增的变量) + traffic_light:22,//表示红绿灯为绿灯 + circulation_num:0,//小车在赛道中循环的次数 + apart_markers:{"redmarker":0,"yellowmarker":0,"bluemarker":0,"greenmarker":0} + }; + //迷宫变量 + var maze_SQUARE_SIZE = 50; + var maze_ROWS=map.length; + var maze_COLS=map[0].length; + var maze_marker_num=0;//迷宫中标记点的数目 + var maze={ + mlevel:0, + tiles: '../common/js/skulpt_mixtoy/pic/maze_path.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/bg_default.png',//地图背景图片 + wall:'../common/js/skulpt_mixtoy/pic/wall.png', + award:'../common/js/skulpt_mixtoy/pic/award.png', + barrier:'../common/js/skulpt_mixtoy/pic/roadblock.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + FINISH: 3, + AWARD:4,//金币奖励 + BARRIER:5, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * maze_COLS, + MAZE_HEIGHT : maze_SQUARE_SIZE * maze_ROWS, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:1//类型为用户自定义的 + }; + + //简单的迷宫任务,不是小车的迷宫场景 + var simple_map_para={ + tiles: '../common/js/skulpt_mixtoy/pic/tiles_astro.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/bg_astro.jpg',//地图背景图片 + wall:'', + state_num:0 + } + var simple_Maze=[ + //第一关 + { + mlevel:1, + map:[[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], + [0, 2, 1, 1, 1, 1, 3, 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]], + }, + //第二关 + { + mlevel:2, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 1, 3], + [0, 0, 0, 0, 0, 1, 1, 0], + [0, 0, 0, 0, 1, 1, 0, 0], + [0, 0, 0, 1, 1, 0, 0, 0], + [0, 0, 1, 1, 0, 0, 0, 0], + [0, 1, 1, 0, 0, 0, 0, 0], + [2, 1, 0, 0, 0, 0, 0, 0]], + }, + //第三关 + { + mlevel:3, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 1, 1, 0, 3, 0, 1, 0], + [0, 1, 1, 0, 1, 1, 1, 0], + [0, 1, 0, 1, 0, 1, 0, 0], + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 2, 1, 1, 1, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第四关 + { + mlevel:4, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 1, 1, 1, 1, 1, 0], + [0, 0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 1, 3, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 1, 0], + [0, 0, 2, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第五关 + { + mlevel:5, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 2, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 1, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 3, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第六关 + { + mlevel:6, + map:[ + [0, 0, 1, 1, 1, 0, 1, 1, 1], + [0, 0, 1, 0, 1, 0, 1, 0, 1], + [2, 1, 1, 0, 1, 1, 1, 0, 3], + [0, 0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第七关 + { + mlevel:7, + map:[ + [0, 0, 1, 1, 1], + [0, 0, 1, 0, 1], + [2, 1, 1, Math.random()>0.5?1:5, 3]] + // tiles: '../common/js/skulpt_mixtoy/pic/maze_path.png',//地图路径图片 + // marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + // background: '',//地图背景图片 + }, + //第八关 + { + mlevel:8, + map:[ + [0, 0, 1, 1, 1, 1], + [0, 0, 1, 0, 0, 1], + [0, 1, 1, Math.random()>0.5?1:5, 1, 1], + [0, 1, 0, 0, 0, 1], + [2, 1, Math.random()>0.5?1:5, 1, 1, 3]] + // tiles: '../common/js/skulpt_mixtoy/pic/maze_path.png',//地图路径图片 + // marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + // background: '',//地图背景图片 + }, + //第九关 + { + mlevel:9, + map:[ + [1, 1, 1, 1, 1, 1, 0, 0, 0, 0], + [1, 0, 1, 0, 0, 0, 0, 0, 0, 0], + [1, 0, 4, 1, 1, 0, 0, 0, 0, 0], + [1, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 1, 1, 1, 0, 0, 0], + [0, 1, 0, 0, Math.random()>0.5?1:5, 0, 1, 0, 0, 0], + [0, 1, 0, 0, 4, 0, 1, Math.random()>0.5?1:5, 4, 0], + [0, 1, 0, 0, 1, 0, 1, 0, 1, 0], + [0, 0, 0, 0, 1, 1, 1, 1, 3, 0]] + }, + //第十关 + { + mlevel:10, + map:[ + [3, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 0, 0], + [0, 1, 0, 1, 0, 1], + [0, 1, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 2, 1]] + }, + //第十一关 + { + mlevel:11, + map:[ + [3, 1, 1, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十二关 + { + mlevel:12, + map:[ + [0, 0, 0, 0, 0, 0], + [0, 3, 1, 1, 0, 0], + [0, 0, 0, 1, 0, 1], + [0, 0, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十三关 + { + mlevel:13, + map:[ + [3, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 0, 0], + [0, 0, 0, 1, 0, 0], + [0, 0, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 2, 1]] + }, + //第十四关 + { + mlevel:14, + map:[ + [1, 1, 1, 1, 1, 1], + [1, 0, 0, 0, 0, 1], + [3, 1, 1, 1, Math.random()>0.5?1:5, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十五关 + { + mlevel:15, + map:[ + [1, 1, 1, 1, 1, 1], + [1, 0, 0, 0, 0, 1], + [1, 1, 1, 1, 0, 1], + [1, 0, 0, 1, Math.random()>0.5?1:5, 1], + [1, 3, 1, Math.random()>0.5?1:5, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十六关 + { + mlevel:16, + map:[ + [1, 1, 1, 1, 0, 0], + [1, 0, 0, 1, 0, 0], + [1, 1, Math.random()>0.5?1:5, 1, 1, 1], + [1, 0, 0, Math.random()>0.5?1:5, 0, 1], + [3, 1, 1, 1, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十七关 + { + mlevel:17, + map:[ + [1, 1, 1, 1, 0, 0], + [1, 0, 0, 1, 0, 0], + [1, 1, Math.random()>0.5?1:5, 1, 1, 2], + [1, 0, 0, Math.random()>0.5?1:5, 0, 0], + [1, 3, 1, 1, 0, 0], + [0, 0, 0, 0, 0, 0]] + } + ] + + //已经设置好的关卡的map + var MAZE_setted=[ + //第一关 + { mlevel:1, + map:[ + [0, 1, 1, 13, 1, 1, 12, 0], + [0, 1, 0, 1, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 10, 1, 1, 11, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car1.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第二关 + { + mlevel:2, + map:[ + [0, 1, 1, 13, 1, 1, 12, 0], + [0, 1, 0, 5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 10, 1, 1, 11, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car2.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixtoy/pic/book/barrier.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第三关 + { mlevel:3, + map:[ + [0, 1, 1, 13, 1, 1, 1, 0], + [0, 1, 0, Math.random()>0.5?1:5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car2.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixtoy/pic/book/barrier.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第四关 + { mlevel:4, + map:[ + [0, 1, 1, 13, 1, 1, 1, 0], + [20, 1, 0, Math.random()>0.5?1:5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car3.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixtoy/pic/book/barrier.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER4:13, + S_F: 9,//既是起点又是终点 + OIL_STATION:20//加油站 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第五关 + { mlevel:5, + map:[ + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 2, 21, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car4.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:[], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + S_F: 9,//既是起点又是终点 + TRAFFIC_LIGHT:21//红绿灯 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第六关 + { mlevel:6, + map:[ + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 2, 22, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car4.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:[], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + S_F: 9,//既是起点又是终点 + LIGHT_GREEN:22,//红绿灯中的绿灯 + LIGHT_RED:23//红绿灯中的红灯 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + } + ] + + /** + * Display Pegman at the specified location, facing the specified direction. + * @param {number} x Horizontal grid (or fraction thereof). + * @param {number} y Vertical grid (or fraction thereof). + * @param {number} d Direction (0 - 15) or dance (16 - 17). + * @param {number=} opt_angle Optional angle (in degrees) to rotate Pegman. + */ + var displayPegman = function(x, y, d, opt_angle) { + var pegmanIcon = $('#pegman'); + if(actor.type=='animate'){ + if(maze.type==0 || actor.img=='https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/actor_car.png'){ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE - d * actor.width+ 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 ); + }else{ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE - d * actor.width + 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 - 8); + } + if (opt_angle) { + pegmanIcon.attr('transform', 'rotate(' + opt_angle + ', ' + + (x * maze_SQUARE_SIZE + maze_SQUARE_SIZE / 2) + ', ' + + (y * maze_SQUARE_SIZE + maze_SQUARE_SIZE / 2) + ')'); + } else { + pegmanIcon.attr('transform', 'rotate(0, 0, 0)'); + } + }else{ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE + 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 ); + } + var clipRect = $('#clipRect'); + clipRect.attr('x', x * maze_SQUARE_SIZE + 1); + clipRect.attr('y', pegmanIcon.attr('y')); + }; + + var initPegman=function(){ + // Pegman's clipPath element, whose (x, y) is reset by Maze.displayPegman + svg.append('clipPath').attr('id','pegmanClipPath') + d3.select("#pegmanClipPath").append('rect').attr('id','clipRect').attr('width', actor.width).attr('height', actor.height) + + if(actor.type=="animate"){ + if(maze.type==0 || actor.img=='https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/actor_car.png' ){ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width * 16).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + }else{ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width * 21).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + } + }else{ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width ).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + } + + displayPegman(actor.x , actor.y , actor.direction*4 ) + } + + var drawMap=function(){ + svg.attr('id','game_stage') + var scale = Math.max(maze_ROWS, maze_COLS) * maze_SQUARE_SIZE; + svg.attr('viewBox', '0 -10 ' + scale + ' ' + (scale+10)); + + // 绘制外框 + svg.append('rect').attr('x', 0).attr('y', 0).attr('width', maze.MAZE_WIDTH).attr('height', maze.MAZE_HEIGHT) + .style('fill','#F1EEE7').style('stroke','#CCB').style('stroke-width','1'); + + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + //绘制迷宫背景 + svg.append('image').attr('x', x*maze_SQUARE_SIZE).attr('y', y*maze_SQUARE_SIZE).attr('width', maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href',maze.background) + } + } + // svg.append('image').attr('x', 0).attr('y', 0).attr('width', maze_SQUARE_SIZE*maze_COLS).attr('height',maze_SQUARE_SIZE*maze_ROWS) + // .attr('xlink:href',maze.background) + //初始化地图 + + var normalize = function(x, y) { + if (x < 0 || x >= maze_COLS || y < 0 || y >= maze_ROWS) { + return '0'; + } + return ((map[y][x] == maze.SquareType.WALL)||(map[y][x] == maze.SquareType.OIL_STATION)) ? '0' : '1'; + }; + // 依次判断格子的类型,并绘制相应格子内的图形 + var tileId = 0; + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + // 标记每个格子的“弯曲状态”. + var tileShape = normalize(x, y) + + normalize(x, y - 1) + // North. + normalize(x + 1, y) + // West. + normalize(x, y + 1) + // South. + normalize(x - 1, y); // East. + // 绘制路径. + if (!tile_SHAPES[tileShape]) { + // Empty square. Use null0 for large areas, with null1-4 for borders. + // Add some randomness to avoid large empty spaces. + if (tileShape == '00000' && Math.random() > 0.3) { + tileShape = 'null0'; + } else { + tileShape = 'null' + Math.floor(1 + Math.random() * 4); + } + } + var left = tile_SHAPES[tileShape][0]; + var top = tile_SHAPES[tileShape][1]; + // Tile's clipPath element. + svg.append('clipPath').attr('id','tileClipPath' + tileId) + d3.select("#tileClipPath" + tileId).append('rect').attr('x', x * maze_SQUARE_SIZE).attr('y', y * maze_SQUARE_SIZE).attr('width', maze_SQUARE_SIZE).attr('height', maze_SQUARE_SIZE) + + if(maze.type==0){//非用户自定义 + // Tile sprite. + if ((map[y][x] != maze.SquareType.WALL) && (map[y][x] != maze.SquareType.OIL_STATION) && (map[y][x] != maze.SquareType.TRAFFIC_LIGHT)&& (map[y][x] != maze.SquareType.LIGHT_GREEN)&& (map[y][x] != maze.SquareType.LIGHT_RED)) { + svg.append('image').attr('x', x * maze_SQUARE_SIZE).attr('y', y * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE ).attr('height',maze_SQUARE_SIZE ) + .attr('clip-path', 'url(#tileClipPath' + tileId + ')').attr('xlink:href',maze.tiles) + tileId++; + } + }else{ + // Tile sprite. + svg.append('image').attr('x',(x - left) * maze_SQUARE_SIZE).attr('y',(y - top) * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE * 5).attr('height',maze_SQUARE_SIZE * 4) + .attr('clip-path', 'url(#tileClipPath' + tileId + ')').attr('xlink:href',maze.tiles) + tileId++; + } + + if(map[y][x]==0){//当地图中此处标记为墙时 + if(maze.tiles=='../common/js/skulpt_mixtoy/pic/maze_path.png'){//当是默认方格时,显示为墙的图片 + svg.append('image').attr('x',x * maze_SQUARE_SIZE + (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('width',maze_SQUARE_SIZE*0.8 ).attr('height',maze_SQUARE_SIZE*0.8) + .attr('xlink:href',maze.wall) + } + }else if(map[y][x]==4){//当地图中此处标记为金币时 + svg.append('image').attr('id','coin'+y+x).attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.5/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.5/2)).attr('width',maze_SQUARE_SIZE*0.5).attr('height',maze_SQUARE_SIZE*0.5) + .attr('xlink:href',maze.award) + }else if(map[y][x]==5){//当地图中此处标记为障碍时 + svg.append('image').attr('id','barrier'+y+x).attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.barrier) + }else if(map[y][x]==10){//当地图中此处标记为符号1——红标时 + svg.append('image').attr('id','marker1').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[0]) + maze_marker_num+=1 + }else if(map[y][x]==11){//当地图中此处标记为符号2——橘标时 + svg.append('image').attr('id','marker2').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[1]) + maze_marker_num+=1 + }else if(map[y][x]==12){//当地图中此处标记为符号3——蓝标时 + svg.append('image').attr('id','marker3').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[2]) + maze_marker_num+=1 + }else if(map[y][x]==13){//当地图中此处标记为符号4——绿标时 + svg.append('image').attr('id','marker4').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[3]) + maze_marker_num+=1 + } + } + } + + if(maze.type==1){ + // 绘制终点图标 + svg.append('image').attr('id','finish').attr('width', 0.5 * maze_SQUARE_SIZE).attr('height', 0.5*maze_SQUARE_SIZE).attr('xlink:href',maze.marker) + //定位:精灵与终点初始的位置 + // Locate the start and finish squares. + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + if (map[y][x] == maze.SquareType.START) { + actor.x= x; + actor.y= y; + } + if (map[y][x] == maze.SquareType.FINISH) { + // Move the finish icon into position. + var finishIcon = $('#finish'); + finishIcon.attr('x', maze_SQUARE_SIZE * (x + 0.5) - + finishIcon.attr('width') / 2); + finishIcon.attr('y', maze_SQUARE_SIZE * (y + 0.6) - + finishIcon.attr('height')); + maze.finish={x:x,y:y} + } + } + } + }else{ + //绘制既是起点、又是终点的坐标 + // Locate the start and finish squares. + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + if (map[y][x] == 9) {//既是起点又是终点 + // 绘制终点图标 + svg.append('image').attr('id','finish').attr('width', maze_SQUARE_SIZE).attr('height', maze_SQUARE_SIZE).attr('xlink:href',maze.marker) + actor.x= x; + actor.y= y; + var finishIcon = $('#finish'); + finishIcon.attr('x', maze_SQUARE_SIZE * x ); + finishIcon.attr('y', maze_SQUARE_SIZE * y+5); + maze.finish={x:x,y:y} + }else if(map[y][x]==20){//当地图中此处标记为20——加油站时 + svg.append('image').attr('id','station').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('width',maze_SQUARE_SIZE*2*0.8).attr('height',maze_SQUARE_SIZE*0.8) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/oilstation.png') + }else if(map[y][x]==21){//当地图中此处标记为21——红绿灯时 + svg.append('image').attr('id','trafficlight').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/trafficlight.png') + }else if(map[y][x]==22){//当地图中此处标记为22——红绿灯中的绿灯时 + svg.append('image').attr('id','lightgreen').attr('x',x * maze_SQUARE_SIZE-5).attr('y',y * maze_SQUARE_SIZE+ 5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/greenlight.png') + }else if(map[y][x]==23){//当地图中此处标记为23——红绿灯中的红灯时 + svg.append('image').attr('id','lightred').attr('x',x * maze_SQUARE_SIZE-5).attr('y',y * maze_SQUARE_SIZE+ 5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/redlight.png') + }else if(map[y][x]==2){//当地图中此处标记为起点时,画上和“既是起点又是终点”一样的图标 + actor.x= x; + actor.y= y; + svg.append('image').attr('id','start').attr('x', maze_SQUARE_SIZE * x).attr('y',maze_SQUARE_SIZE * y+5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href',maze.marker) + } + } + } + } + } + + //检查是否已到终点 + var checkFinish=function(){ + maze.result = actor.x != maze.finish.x || actor.y != maze.finish.y ? + ResultType.UNSET : ResultType.SUCCESS; + if(maze.result==ResultType.SUCCESS){ + if(maze.type==1){ + return true + }else{ + if(actor.marker_num==maze_marker_num){ + return true + }else{ + return "error2" + } + } + }else{ + return false + } + } + + /** + * Is there a path next to pegman? + * @param {number} direction Direction to look + * (0 = forward, 1 = right, 2 = backward, 3 = left). + * @param {?string} id ID of block that triggered this action. + * Null if called as a helper function in Maze.move(). + * @return {boolean} True if there is a path. + */ + var isPath=function(direction,id){ + var effectiveDirection = actor.direction + direction; + var square; + var command; + switch (constrainDirection4(effectiveDirection)) { + case DirectionType.NORTH: + square = map[actor.y - 1] && map[actor.y - 1][actor.x]; + command = 'look_north'; + break; + case DirectionType.EAST: + square = map[actor.y][actor.x + 1]; + command = 'look_east'; + break; + case DirectionType.SOUTH: + square = map[actor.y + 1] && map[actor.y + 1][actor.x]; + command = 'look_south'; + break; + case DirectionType.WEST: + square = map[actor.y][actor.x - 1]; + command = 'look_west'; + break; + } + if (id) { + return [command , square !== maze.SquareType.WALL && square !== undefined && square !== maze.SquareType.BARRIER && square !== maze.SquareType.OIL_STATION && square !== maze.SquareType.TRAFFIC_LIGHT && square !== maze.SquareType.LIGHT_RED && square !== maze.SquareType.LIGHT_GREEN] + } + return square !== maze.SquareType.WALL && square !== undefined && square !== maze.SquareType.BARRIER && square !== maze.SquareType.OIL_STATION && square !== maze.SquareType.TRAFFIC_LIGHT && square !== maze.SquareType.LIGHT_RED && square !== maze.SquareType.LIGHT_GREEN; + }; + + var constrainDirection4 = function(d) { + d = Math.round(d) % 4; + if (d < 0) { + d += 4; + } + return d; + }; + var constrainDirection16 = function(d) { + d = Math.round(d) % 16; + if (d < 0) { + d += 16; + } + return d; + }; + + /** + * Attempt to move pegman forward or backward. + * @param {number} direction Direction to move . + * @param {string} id ID of block that triggered this action. + * @throws {true} If the end of the maze is reached. + * @throws {false} If Pegman collides with a wall. + */ + var move = function(direction) { + if (!isPath(0, null)) { + return false + } + var command; + switch (constrainDirection4(direction)) { + case DirectionType.NORTH: + command = 'north'; + break; + case DirectionType.EAST: + command = 'east'; + break; + case DirectionType.SOUTH: + command = 'south'; + break; + case DirectionType.WEST: + command = 'west'; + break; + } + return command + }; + + /** + * Turn pegman left or right. + * @param {number} direction Direction to turn (0 = left, 1 = right). + * @param {string} id ID of block that triggered this action. + */ + var turn = function(direction) { + var command; + if (direction=='right') { + // Right turn (clockwise). + command='right' + } else { + // Left turn (counterclockwise). + command='left' + } + return command + }; + + /** + * Schedule the animations for a move or turn. + * @param {!Array.} startPos X, Y starting points. + * @param {!Array.} endPos X, Y ending points. + */ + var schedule = function(startPos, endPos) { + var deltas = [(endPos[0] - startPos[0]) / 4, (endPos[1] - startPos[1]) / 4, (endPos[2] - startPos[2]) / 4]; + displayPegman(startPos[0] + deltas[0], startPos[1] + deltas[1], constrainDirection16(startPos[2] + deltas[2])); + setTimeout(function() { + displayPegman(startPos[0] + deltas[0] * 2, startPos[1] + deltas[1] * 2, constrainDirection16(startPos[2] + deltas[2] * 2)); + }, actor.stepSpeed); + setTimeout(function() { + displayPegman(startPos[0] + deltas[0] * 3, startPos[1] + deltas[1] * 3, constrainDirection16(startPos[2] + deltas[2] * 3)); + }, actor.stepSpeed * 2) + setTimeout(function() { + displayPegman(endPos[0], endPos[1], constrainDirection16(endPos[2])); + }, actor.stepSpeed * 3) + }; + + /** + * 检查精灵在移动的过程中是否吃到了金币 + * @param {} x 当前精灵的横坐标. + * @param {} y 当前精灵的纵坐标. + */ + var hasCoin=function(x , y) { + if(map[y][x]==maze.SquareType.AWARD){//如果此处是金币 + setTimeout(function() { + $('#coin'+y+x).remove() + }, actor.stepSpeed * 3) + map[y][x]=maze.SquareType.OPEN + actor.coin_point+=1 + } + } + + /** + * 检查精灵在移动的过程中是否走到了标记处分别统计经过的每种标记的数目 + * @param {} x 当前精灵的横坐标. + * @param {} y 当前精灵的纵坐标. + */ + var hasMarker=function(x , y) { + if((map[y][x]==maze.SquareType.MARKER1)||(map[y][x]==maze.SquareType.MARKER2)||(map[y][x]==maze.SquareType.MARKER3)||(map[y][x]==maze.SquareType.MARKER4)){//如果此处是标记 + actor.marker_num+=1 + } + switch (map[y][x]){ + case maze.SquareType.MARKER1: + actor.apart_markers['redmarker']+=1; + break; + case maze.SquareType.MARKER2: + actor.apart_markers['yellowmarker']+=1; + break; + case maze.SquareType.MARKER3: + actor.apart_markers['bluemarker']+=1; + break; + case maze.SquareType.MARKER4: + actor.apart_markers['greenmarker']+=1; + break; + } + } + + //高亮辅助函数 + var highlight = function(id) { + id=Sk.ffi.remapToJs(id) + Blockly.mainWorkspace.highlightBlock(id); + }; + + /** + * 设置地图属性. + * @param {string} block_id 高亮块的ID + * @param {number} M_x为地图横向方格的数目(范围为3-10),初始默认为8 + * @param {number} M_y为地图竖向方格的数目(范围为3-10),初始默认为8 + * @param {number} startPos_x 起点位置的横坐标. + * @param {number} endPos_x 终点位置的横坐标. + * @param {number} endPos_y 终点位置的纵坐标. + * @param {string} block_id 高亮图形块的ID + */ + var setMap_f=function( M_x , M_y , startPos_x ,startPos_y , endPos_x , endPos_y , block_id) { + Sk.builtin.pyCheckArgs("setMap", arguments, 7, 7); + map=[] + + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + + if((M_x<3) || (M_x>20) || (M_y<3) || (M_y>20)){ + throw Error("错误!超出地图可设置范围,请设置横纵方格数大于等于3,小于等于20") + } + M_x = Sk.ffi.remapToJs(M_x); + M_y = Sk.ffi.remapToJs(M_y); + maze_COLS=M_x; + maze_ROWS=M_y; + maze.MAZE_WIDTH= maze_SQUARE_SIZE * maze_COLS; + maze.MAZE_HEIGHT=maze_SQUARE_SIZE * maze_ROWS; + + startPos_x =Sk.ffi.remapToJs(startPos_x)+1 + startPos_y =Sk.ffi.remapToJs(startPos_y)+1 + endPos_x =Sk.ffi.remapToJs(endPos_x)+1 + endPos_y =Sk.ffi.remapToJs(endPos_y)+1 + + if((startPos_x>M_x) || (startPos_x<1) || (startPos_y>M_y) || (startPos_y<1)){ + throw Error("错误!起点坐标超出地图范围!") + } + if((endPos_x>M_x) || (endPos_x<1) || (endPos_y>M_y) || (endPos_y<1)){ + throw Error("错误!终点坐标超出地图范围!") + } + + for (var i=0; i(map[0].length)) || (Pos_x< 0) || (Pos_y+1>(map.length)) || (Pos_y< 0)){ + throw new Sk.builtin.TypeError("错误!放置物坐标超过地图范围"); + }else if((map[Pos_y][Pos_x]==2)||(map[Pos_y][Pos_x]==3)){ + throw new Sk.builtin.TypeError("错误!不能将放置物位置设置在起点或终点坐标!"); + } + + switch(type){ + case "wall"://墙 + map[Pos_y][Pos_x]=maze.SquareType.WALL; + break; + case "coin": + map[Pos_y][Pos_x]=maze.SquareType.AWARD; + break; + case "barrier": + map[Pos_y][Pos_x]=maze.SquareType.BARRIER; + break; + case "redmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER1; + break; + case "yellowmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER2; + break; + case "bluemarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER3; + break; + case "greenmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER4; + break; + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.placeItem = new Sk.builtin.func(placeItem_f); + + /** + * 在某处随机放置障碍 + * + * @param {number} Pos_x 放置物的x坐标位置. + * @param {number} Pos_y 放置物的y坐标位置. + * @param {string} block_id 高亮块的ID + * + */ + var randomPlaceBarrier_f=function(Pos_x , Pos_y,block_id) { + Sk.builtin.pyCheckArgs("randomPlaceBarrier", arguments, 3, 3); + Pos_x = Sk.ffi.remapToJs(Pos_x)+1; + Pos_y = Sk.ffi.remapToJs(Pos_y)+1; + + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + + if((Pos_x>(map[0].length)) || (Pos_x< 1) || (Pos_y>(map.length)) || (Pos_y< 1)){ + throw new Sk.builtin.TypeError("错误!放置物坐标超过地图范围"); + }else if((map[Pos_y-1][Pos_x-1]==2)||(map[Pos_y-1][Pos_x-1]==3)){ + throw new Sk.builtin.TypeError("错误!不能将放置物位置设置在起点或终点坐标!"); + } + + var numType=Math.random()>0.5?maze.SquareType.OPEN:maze.SquareType.BARRIER; + map[Pos_y-1][Pos_x-1]=numType; + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.randomPlaceBarrier = new Sk.builtin.func(randomPlaceBarrier_f); + + var initMap_f=function(block_id) { + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + drawMap() + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.initMap = new Sk.builtin.func(initMap_f); + + + var isDone = function(block_id) { + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id) + var isdone= Sk.ffi.remapToPy(checkFinish()); + resolve(isdone); + }, 800); + }) + } + + var isPathCheck=function(direction,block_id) { + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var state=false; + var square=0; + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id); + switch (direction) { + case DirectionType.NORTH: + if(map[actor.y - 1]){ + square = map[actor.y - 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.EAST: + if(map[actor.y][actor.x + 1]){ + square = map[actor.y][actor.x + 1]; + }else{ + square = 0 + } + break; + case DirectionType.SOUTH: + if(map[actor.y + 1]){ + square = map[actor.y + 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.WEST: + if(map[actor.y][actor.x - 1]){ + square = map[actor.y][actor.x - 1]; + }else{ + square = 0 + } + break; + }; + state= (square != maze.SquareType.BARRIER) && (square != maze.SquareType.WALL); + resolve(Sk.ffi.remapToPy(state)); + }, 800); + }) + } + + var isBarrierCheck=function(direction,block_id) { + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var state=false; + var square=0; + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id); + switch (direction) { + case DirectionType.NORTH: + if(map[actor.y - 1]){ + square = map[actor.y - 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.EAST: + if(map[actor.y][actor.x + 1]){ + square = map[actor.y][actor.x + 1]; + }else{ + square = 0 + } + break; + case DirectionType.SOUTH: + if(map[actor.y + 1]){ + square = map[actor.y + 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.WEST: + if(map[actor.y][actor.x - 1]){ + square = map[actor.y][actor.x - 1]; + }else{ + square = 0 + } + break; + }; + state= square == maze.SquareType.BARRIER; + resolve(Sk.ffi.remapToPy(state)); + }, 800); + }) + } + + var isOilFullCheck=function(block_id) { + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var state=false; + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id); + if(actor.oil==0){//没油了,返回需要加油为True + resolve(Sk.ffi.remapToPy(true)); + }else if(actor.oil==1){//还有油,返回需要加油为False + resolve(Sk.ffi.remapToPy(false)); + } + }, 800); + }) + } + + var getpoint= function(block_id){ + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id) + var point= actor.coin_point; + resolve(Sk.ffi.remapToPy(point)); + }, 800); + }) + } + + var checkLightGreen=function(block_id){ + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id) + if(actor.traffic_light==maze.SquareType.LIGHT_GREEN){//绿灯,返回 true + resolve(Sk.ffi.remapToPy(true)); + }else if(actor.traffic_light==maze.SquareType.LIGHT_RED){//红灯,返回false + resolve(Sk.ffi.remapToPy(false)); + } + }, 800); + }) + } + + var helpCheckMarker=function(marker,block_id){ + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id) + var marker_num=actor.apart_markers[marker]; + if(marker_num==0){ + resolve(Sk.ffi.remapToPy(false)); + }else{ + resolve(Sk.ffi.remapToPy(true)); + } + }, 800); + }) + } + + var helpGetMNum=function(marker,block_id){ + return new Promise((resolve) => { + // Do things + setTimeout( () => { + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + highlight(block_id) + var marker_num=actor.apart_markers[marker]; + resolve(Sk.ffi.remapToPy(marker_num)); + }, 800); + }) + } + + mod.Actor = Sk.misceval.buildClass(mod, function($gbl, $loc) { + $loc.__init__ = new Sk.builtin.func(function(self,img , direction ,block_id) { + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + img= Sk.ffi.remapToJs(img) || 'pegman'; + if(img=='无可用角色'){ + img='pegman'; + } + switch (img){ + case "pegman": + actor.img='../common/js/skulpt_mixtoy/pic/pegman.png';//默认为方格 + actor.type="animate" + break; + case "panda": + actor.img='../common/js/skulpt_mixtoy/pic/panda.png';//设置为管道 + actor.type="animate" + break; + case "astro": + actor.img='../common/js/skulpt_mixtoy/pic/astro.png';//设置为竹子 + actor.type="animate" + break; + case "robot": + actor.img='../common/js/skulpt_mixtoy/pic/robot.png';//设置为机器人 + actor.type="still" + break; + case "car": + actor.img='https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/actor_car.png';//设置为小车 + actor.type="animate" + break; + } + + actor.direction = Sk.ffi.remapToJs(direction) || DirectionType.NORTH; + size=[52,49]//[height,width]//size需要根据方格的数目来确定 + actor.coin_point=0 + + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + initPegman() + resolve(Sk.builtin.none.none$); + }, 800); + })); + + }); + //get & set:Actor.direction新增函数,获取或设置精灵的方向 + $loc.direction = defineProperty( + function(self) { + return Sk.ffi.remapToPy(actor.direction) + }, + function(self, val) { + Sk.builtin.pyCheckType("direction", "number",Sk.builtin.checkNumber(val.v)); + actor.direction=val.v + }); + //向某个方向移动移动 + //暂时只实现了移动一步 + //func: Actor.moveDirection() + $loc.moveDirection=new Sk.builtin.func(function(self,direction,block_id) { + Sk.builtin.pyCheckArgs("moveDirection", arguments, 3,3); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + actor.direction = parseInt(Sk.ffi.remapToJs(direction)); + var command= move(direction) //向某个方向移动 + if(command==false){ + maze.result=ResultType.FAILURE + layer.alert("挑战失败!请修改后重新尝试", { shade: false }) + console.log("错误") + // document.getElementById("side_code").innerText='错误' + throw new Sk.builtin.TypeError("挑战失败!请修改后重新尝试"); + } + + if(maze.mlevel==4){//如果是第四关,则需要判断是否需要加油的问题 + //如果左侧存在加油站 + // if((map[actor.y - 1][actor.x])==maze.SquareType.OIL_STATION||(map[actor.y + 1][actor.x])==maze.SquareType.OIL_STATION||(map[actor.y ][actor.x-1])==maze.SquareType.OIL_STATION||(map[actor.y ][actor.x+1])==maze.SquareType.OIL_STATION){ + if((map[actor.y][actor.x-1])==maze.SquareType.OIL_STATION){ + if(actor.oil==0){//在加油站处,如果没有油还想继续往前面走 + maze.result=ResultType.FAILURE + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/no_oil.png') + layer.alert("挑战失败!小车没有油了", { shade: false }) + throw new Sk.builtin.TypeError("挑战失败!小车没有油了"); + } + } + }else if(maze.mlevel==5){//如果是第五关,则需要记录循环次数;每次经过起点处循环次数+1 + if((map[actor.y][actor.x])==maze.SquareType.START){ + actor.circulation_num+=1; + } + }else if(maze.mlevel==6){//如果是第六关,则需要判断红绿灯是否为绿灯的问题 + if(actor.traffic_light==maze.SquareType.LIGHT_RED){ + layer.alert("挑战失败:小车在红灯亮时还未停止!", { shade: false }); + throw new Sk.builtin.TypeError("挑战失败:小车在红灯亮时还未停止!"); + } + } + + switch (command) { + case 'north': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x, actor.y - 1, actor.direction * 4]); + actor.y--; + break; + case 'east': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x + 1, actor.y, actor.direction * 4]); + actor.x++; + break; + case 'south': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x, actor.y + 1, actor.direction * 4]); + actor.y++; + break; + case 'west': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x - 1, actor.y, actor.direction * 4]); + actor.x--; + break; + } + + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + + hasCoin(actor.x,actor.y) + hasMarker(actor.x,actor.y) + if(maze.mlevel==6){//如果是第六关,则需要随机改变红绿灯的颜色 + if((map[actor.y][actor.x+1])==maze.SquareType.LIGHT_RED || (map[actor.y][actor.x+1])==maze.SquareType.LIGHT_GREEN){ + map[actor.y][actor.x+1]=Math.random()>0.5? maze.SquareType.LIGHT_RED:maze.SquareType.LIGHT_GREEN;//随机刷新红绿灯的状态 + actor.traffic_light=map[actor.y][actor.x+1]; + if(actor.traffic_light==maze.SquareType.LIGHT_RED){//图像变为红灯 + d3.select("#lightgreen").remove(); + svg.append('image').attr('id','lightred').attr('x',(actor.x+1) * maze_SQUARE_SIZE-5).attr('y',actor.y * maze_SQUARE_SIZE+5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/redlight.png') + } + } + } + + var state=checkFinish() + if(state==true){ + // setTimeout(function() { + // layer.alert("挑战成功!", { shade: false }); + // },1000) + resolve(Sk.builtin.none.none$); + // throw Error("挑战成功!"); + }else if(state=="error2"){ + maze.result=ResultType.FAILURE + layer.alert("挑战失败,请检查是否通过所有标记点!", { shade: false }) + throw new Sk.builtin.TypeError("挑战失败,请检查是否通过所有标记点!"); + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + $loc.turn=new Sk.builtin.func(function(self,direction,block_id){ + Sk.builtin.pyCheckArgs("turn", arguments, 3, 3); + Sk.builtin.pyCheckType("direction", "string", Sk.builtin.checkString(direction)); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + direction=Sk.ffi.remapToJs(direction) + var command=turn(direction) + switch (command) { + case 'left': + schedule([actor.x, actor.y, actor.direction * 4], [actor.x, actor.y, actor.direction * 4 - 4]); + actor.direction = constrainDirection4(actor.direction - 1); + break; + case 'right': + schedule([actor.x, actor.y, actor.direction * 4], [actor.x, actor.y, actor.direction * 4 + 4]); + actor.direction = constrainDirection4(actor.direction + 1); + break; + } + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + $loc.isDone=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("isDone", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(isDone(block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + $loc.isPath=new Sk.builtin.func(function(self,direction,block_id){ + Sk.builtin.pyCheckArgs("isPath", arguments, 3, 3); + Sk.builtin.pyCheckType("direction","number", Sk.builtin.checkNumber(direction)); + direction=Sk.ffi.remapToJs(direction) + return new Sk.misceval.promiseToSuspension(isPathCheck(direction,block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + //判断某个方向是否存在障碍物 + $loc.isBarrier=new Sk.builtin.func(function(self,direction,block_id){ + Sk.builtin.pyCheckArgs("isBarrier", arguments, 3, 3); + Sk.builtin.pyCheckType("direction", "number", Sk.builtin.checkNumber(direction)); + direction=Sk.ffi.remapToJs(direction) + return new Sk.misceval.promiseToSuspension(isBarrierCheck(direction,block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + //随机生成小车油量 + $loc.randomOil=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("randomOil", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + actor.oil=Math.random()>0.5?1:0;//随机初始化汽车的油量 + if(actor.oil==0){//没油(呈现少量油的图片) + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/none_oil.png') + }else if(actor.oil==1){//油量充足(呈现油量充足的图片) + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/full_oil.png') + } + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + //判断是否需要加油 + $loc.isOilFull=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("isOilFull", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(isOilFullCheck(block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + //进加油站加油 + $loc.addOil=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("addOil", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/full_oil.png') + actor.oil=1//油量充足 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + //获取角色当前的分数 + $loc.getPoint=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("getPoint", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(getpoint(block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + //判断信号灯是否为绿灯? + $loc.isLightGreen=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("isLightGreen", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(checkLightGreen(block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + //检查循环的次数是否正确 + $loc.isCirculationRight=new Sk.builtin.func(function(self,block_id){ + Sk.builtin.pyCheckArgs("isCirculationRight", arguments, 2, 2); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + var mlevel=maze.mlevel;//获取当前关卡序数 + var state=false; + switch (mlevel){ + case 5://第五关 + state=actor.circulation_num==3?true:false; + break; + case 6://第六关 + if(actor.traffic_light==maze.SquareType.LIGHT_GREEN){//如果是绿灯,则怎么都算失败 + state=false; + }else if(actor.traffic_light==maze.SquareType.LIGHT_RED){//如果是红灯 + for (var y = 0; y < maze.map.length; y++) { + for (var x = 0; x < maze.map[0].length; x++) { + if(maze.map[y][x]==maze.SquareType.LIGHT_RED){ + if((actor.x+1)==x|| (actor.y)==y){//如果小车停的位置在红绿灯的左边,则挑战成功 + state=true; + } + } + } + } + } + break; + } + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + + if(state==true){ + // setTimeout(function() { + // layer.alert("挑战成功!", { shade: false }); + // },1000) + // resolve(Sk.builtin.none.none$); + }else{ + maze.result=ResultType.FAILURE + layer.alert("挑战失败,请检查循环次数是否正确!", { shade: false }) + throw new Sk.builtin.TypeError("挑战失败,请检查循环次数是否正确!"); + } + resolve(Sk.builtin.none.none$); + }, 800); + })) + }); + //判断是否经过某种颜色的标记 + $loc.checkMarker=new Sk.builtin.func(function(self,marker,block_id){ + Sk.builtin.pyCheckArgs("checkMarker", arguments, 3, 3); + marker=Sk.ffi.remapToJs(marker); + return new Sk.misceval.promiseToSuspension(helpCheckMarker(marker,block_id).then((r) => Sk.ffi.remapToPy(r))); + }); + //返回经过某种颜色标记的数目 + $loc.getMarkerNum=new Sk.builtin.func(function(self,marker,block_id){ + Sk.builtin.pyCheckArgs("getMarkerNum", arguments, 3, 3); + marker=Sk.ffi.remapToJs(marker); + return new Sk.misceval.promiseToSuspension(helpGetMNum(marker,block_id).then((r) => Sk.ffi.remapToPy(r))); + }) + }, "Actor") + + /** + * 初始化为设定好的地图 + * + * @param {number} level 初始化地图,level为地图的等级. + * @param {string} block_id 图形块ID. + */ + var settedMap_f=function(level,block_id) { + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + level=Sk.ffi.remapToJs(level) + maze=MAZE_setted[level] + map=MAZE_setted[level].map + drawMap() + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.settedMap = new Sk.builtin.func(settedMap_f); + + /** + * 初始化为设定好的简单的迷宫地图 + * + * @param {number} level 初始化地图,level为地图的等级. + * @param {string} block_id 图形块ID. + */ + var settedSimpleMap_f=function(level, block_id) { + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + //高亮效果 + var re=/block_id=([\s\S]*)/.exec(block_id) + if(re!=null){ + block_id=re[1]; + highlight(block_id) + } + level=Sk.ffi.remapToJs(level) + map=simple_Maze[level].map + maze_ROWS=map.length; + maze_COLS=map[0].length; + // if(level==6 || level==7){ + // maze.tiles=simple_Maze[level].tiles + // maze.background=simple_Maze[level].background + // }else{ + maze.tiles=simple_map_para.tiles + maze.wall=simple_map_para.wall + maze.background=simple_map_para.background + // } + simple_map_para.state_num=1 + drawMap() + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.settedSimpleMap = new Sk.builtin.func(settedSimpleMap_f); + + /** + * 初始化为设定好的简单的迷宫地图 + * + * @return {boolean} 检测小人执行最后一个指令后是否到达终点,如果到达终点,返回True,否则返回False. + */ + var getFinishState_f=function(state){ + var state=checkFinish() + var state_str="" + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + if(state){ + state_str="成功" + setTimeout(function() { + layer.alert("挑战成功!", { shade: false }); + console.log("成功") + },1000); + + }else{ + state_str="失败" + setTimeout(function() { + console.log("失败") + },1000) + } + if(simple_map_para.state_num==1){//对于已经激活的、已经预设的迷宫关卡 + resolve(Sk.ffi.remapToPy(state_str)); + }else{ + resolve(Sk.ffi.remapToPy("")); + } + + })) + } + mod.getFinishState = new Sk.builtin.func(getFinishState_f); + + return mod; +} diff --git a/mixly/common/js/skulpt_mixtoy/bg_noanimation1.js b/mixly/common/js/skulpt_mixtoy/bg_noanimation1.js new file mode 100644 index 00000000..420d4397 --- /dev/null +++ b/mixly/common/js/skulpt_mixtoy/bg_noanimation1.js @@ -0,0 +1,1503 @@ +//这一版删除了所有延时、高亮和动画效果,用以适应提交效果 +// 监听属性getter/setter +const defineProperty = function(obj, property) { + return Sk.misceval.callsimOrSuspend(Sk.builtins.property, new Sk.builtin.func(function(self) { + if (typeof obj === 'function') { + return obj(self) + } else { + return Sk.ffi.remapToPy(self[obj][property]) + } + }), new Sk.builtin.func(function(self, val) { + if (typeof property === 'function') { + property(self, val) + } else { + self[obj][property] = val.v; + } + })) +} + + +var $builtinmodule = function (name) { + let mod= {__name__: new Sk.builtin.str("bg_nonehl")}; + + var svg = d3.select('#blocklySVG').append('svg'); + + //其他变量设置 + var map=//迷宫布局 + [[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], + [0, 2, 1, 1, 1, 1, 3, 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]] + var DirectionType={//移动方向的类型 + NORTH: 0, + EAST: 1, + SOUTH: 2, + WEST: 3 + } + var ResultType = { + UNSET: 0, + SUCCESS: 1, + FAILURE: -1, + TIMEOUT: 2, + ERROR: -2 + } + var tile_SHAPES = { + '10010': [4, 0], // Dead ends + '10001': [3, 3], + '11000': [0, 1], + '10100': [0, 2], + '11010': [4, 1], // Vertical + '10101': [3, 2], // Horizontal + '10110': [0, 0], // Elbows + '10011': [2, 0], + '11001': [4, 2], + '11100': [2, 3], + '11110': [1, 1], // Junctions + '10111': [1, 0], + '11011': [2, 1], + '11101': [1, 2], + '11111': [2, 2], // Cross + 'null0': [4, 3], // Empty + 'null1': [3, 0], + 'null2': [3, 1], + 'null3': [0, 3], + 'null4': [1, 3] + } + // 角色变量 + var actor={ + img : "../common/js/skulpt_mixtoy/pic/pegman.png", + height : 52, + width : 49, + direction : DirectionType.EAST, + type:"animate", + x : 0, + y : 0, + stepSpeed : 150, + coin_point:0, + marker_num:0, + oil:1,//表示小车有充足的油量(为了适应教材而新增的变量) + traffic_light:22,//表示红绿灯为绿灯 + circulation_num:0,//小车在赛道中循环的次数 + apart_markers:{"redmarker":0,"yellowmarker":0,"bluemarker":0,"greenmarker":0} + }; + //迷宫变量 + var maze_SQUARE_SIZE = 50; + var maze_ROWS=map.length; + var maze_COLS=map[0].length; + var maze_marker_num=0;//迷宫中标记点的数目 + var maze={ + mlevel:0, + tiles: '../common/js/skulpt_mixtoy/pic/maze_path.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/bg_default.png',//地图背景图片 + wall:'../common/js/skulpt_mixtoy/pic/wall.png', + award:'../common/js/skulpt_mixtoy/pic/award.png', + barrier:'../common/js/skulpt_mixtoy/pic/roadblock.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + FINISH: 3, + AWARD:4,//金币奖励 + BARRIER:5,//障碍物 + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * maze_COLS, + MAZE_HEIGHT : maze_SQUARE_SIZE * maze_ROWS, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:1//类型为用户自定义的 + }; + //简单的迷宫任务,不是小车的迷宫场景 + var simple_map_para={ + tiles: '../common/js/skulpt_mixtoy/pic/tiles_astro.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/bg_astro.jpg',//地图背景图片 + wall:'', + state_num:0//为0就是未使用,为1就是已经使用(激活) + } + var simple_Maze=[ + //第一关 + { + mlevel:1, + map:[[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], + [0, 2, 1, 1, 1, 1, 3, 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]], + }, + //第二关 + { + mlevel:2, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 1, 3], + [0, 0, 0, 0, 0, 1, 1, 0], + [0, 0, 0, 0, 1, 1, 0, 0], + [0, 0, 0, 1, 1, 0, 0, 0], + [0, 0, 1, 1, 0, 0, 0, 0], + [0, 1, 1, 0, 0, 0, 0, 0], + [2, 1, 0, 0, 0, 0, 0, 0]], + }, + //第三关 + { + mlevel:3, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 1, 1, 0, 3, 0, 1, 0], + [0, 1, 1, 0, 1, 1, 1, 0], + [0, 1, 0, 1, 0, 1, 0, 0], + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 2, 1, 1, 1, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第四关 + { + mlevel:4, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 1, 1, 1, 1, 1, 0], + [0, 0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 1, 3, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 1, 0], + [0, 0, 2, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第五关 + { + mlevel:5, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 2, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 1, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 3, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第六关 + { + mlevel:6, + map:[ + [0, 0, 1, 1, 1, 0, 1, 1, 1], + [0, 0, 1, 0, 1, 0, 1, 0, 1], + [2, 1, 1, 0, 1, 1, 1, 0, 3], + [0, 0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第七关 + { + mlevel:7, + map:[ + [0, 0, 1, 1, 1], + [0, 0, 1, 0, 1], + [2, 1, 1, Math.random()>0.5?1:5, 3]], + // tiles: '../common/js/skulpt_mixtoy/pic/maze_path.png',//地图路径图片 + // marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + // background: '',//地图背景图片 + }, + //第八关 + { + mlevel:8, + map:[ + [0, 0, 1, 1, 1, 1], + [0, 0, 1, 0, 0, 1], + [0, 1, 1, Math.random()>0.5?1:5, 1, 1], + [0, 1, 0, 0, 0, 1], + [2, 1, Math.random()>0.5?1:5, 1, 1, 3]], + // tiles: '../common/js/skulpt_mixtoy/pic/maze_path.png',//地图路径图片 + // marker: '../common/js/skulpt_mixtoy/pic/marker.png',//终点图标图片 + // background: '',//地图背景图片 + }, + //第九关 + { + mlevel:9, + map:[ + [1, 1, 1, 1, 1, 1, 0, 0, 0, 0], + [1, 0, 1, 0, 0, 0, 0, 0, 0, 0], + [1, 0, 4, 1, 1, 0, 0, 0, 0, 0], + [1, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 1, 1, 1, 0, 0, 0], + [0, 1, 0, 0, Math.random()>0.5?1:5, 0, 1, 0, 0, 0], + [0, 1, 0, 0, 4, 0, 1, Math.random()>0.5?1:5, 4, 0], + [0, 1, 0, 0, 1, 0, 1, 0, 1, 0], + [0, 0, 0, 0, 1, 1, 1, 1, 3, 0]] + }, + //第十关 + { + mlevel:10, + map:[ + [3, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 0, 0], + [0, 1, 0, 1, 0, 1], + [0, 1, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 2, 1]] + }, + //第十一关 + { + mlevel:11, + map:[ + [3, 1, 1, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十二关 + { + mlevel:12, + map:[ + [0, 0, 0, 0, 0, 0], + [0, 3, 1, 1, 0, 0], + [0, 0, 0, 1, 0, 1], + [0, 0, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十三关 + { + mlevel:13, + map:[ + [3, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 0, 0], + [0, 0, 0, 1, 0, 0], + [0, 0, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 2, 1]] + }, + //第十四关 + { + mlevel:14, + map:[ + [1, 1, 1, 1, 1, 1], + [1, 0, 0, 0, 0, 1], + [3, 1, 1, 1, Math.random()>0.5?1:5, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十五关 + { + mlevel:15, + map:[ + [1, 1, 1, 1, 1, 1], + [1, 0, 0, 0, 0, 1], + [1, 1, 1, 1, 0, 1], + [1, 0, 0, 1, Math.random()>0.5?1:5, 1], + [1, 3, 1, Math.random()>0.5?1:5, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十六关 + { + mlevel:16, + map:[ + [1, 1, 1, 1, 0, 0], + [1, 0, 0, 1, 0, 0], + [1, 1, Math.random()>0.5?1:5, 1, 1, 1], + [1, 0, 0, Math.random()>0.5?1:5, 0, 1], + [3, 1, 1, 1, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十七关 + { + mlevel:17, + map:[ + [1, 1, 1, 1, 0, 0], + [1, 0, 0, 1, 0, 0], + [1, 1, Math.random()>0.5?1:5, 1, 1, 2], + [1, 0, 0, Math.random()>0.5?1:5, 0, 0], + [1, 3, 1, 1, 0, 0], + [0, 0, 0, 0, 0, 0]] + } + ] + + + //已经设置好的关卡的map + var MAZE_setted=[ + //第一关 + { mlevel:1, + map:[ + [0, 1, 1, 13, 1, 1, 12, 0], + [0, 1, 0, 1, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 10, 1, 1, 11, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car1.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第二关 + { + mlevel:2, + map:[ + [0, 1, 1, 13, 1, 1, 12, 0], + [0, 1, 0, 5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 10, 1, 1, 11, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car2.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixtoy/pic/book/barrier.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第三关 + { mlevel:3, + map:[ + [0, 1, 1, 13, 1, 1, 1, 0], + [0, 1, 0, Math.random()>0.5?1:5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car2.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixtoy/pic/book/barrier.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第四关 + { mlevel:4, + map:[ + [0, 1, 1, 13, 1, 1, 1, 0], + [20, 1, 0, Math.random()>0.5?1:5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car3.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixtoy/pic/book/barrier.png', + markers:['../common/js/skulpt_mixtoy/pic/book/red.png','../common/js/skulpt_mixtoy/pic/book/yellow.png','../common/js/skulpt_mixtoy/pic/book/blue.png','../common/js/skulpt_mixtoy/pic/book/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER4:13, + S_F: 9,//既是起点又是终点 + OIL_STATION:20//加油站 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第五关 + { mlevel:5, + map:[ + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 2, 21, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car4.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:[], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + S_F: 9,//既是起点又是终点 + TRAFFIC_LIGHT:21//红绿灯 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第六关 + { mlevel:6, + map:[ + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 2, 22, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: 'https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixtoy/pic/book/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixtoy/pic/book/bg_car4.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:[], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + S_F: 9,//既是起点又是终点 + LIGHT_GREEN:22,//红绿灯中的绿灯 + LIGHT_RED:23//红绿灯中的红灯 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + } + ] + + /** + * Display Pegman at the specified location, facing the specified direction. + * @param {number} x Horizontal grid (or fraction thereof). + * @param {number} y Vertical grid (or fraction thereof). + * @param {number} d Direction (0 - 15) or dance (16 - 17). + * @param {number=} opt_angle Optional angle (in degrees) to rotate Pegman. + */ + var displayPegman = function(x, y, d, opt_angle) { + var pegmanIcon = $('#pegman'); + if(actor.type=='animate'){ + if(maze.type==0 || actor.img=='https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/actor_car.png' ){ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE - d * actor.width+ 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 ); + }else{ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE - d * actor.width + 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 - 8); + } + if (opt_angle) { + pegmanIcon.attr('transform', 'rotate(' + opt_angle + ', ' + + (x * maze_SQUARE_SIZE + maze_SQUARE_SIZE / 2) + ', ' + + (y * maze_SQUARE_SIZE + maze_SQUARE_SIZE / 2) + ')'); + } else { + pegmanIcon.attr('transform', 'rotate(0, 0, 0)'); + } + }else{ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE + 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 ); + } + var clipRect = $('#clipRect'); + clipRect.attr('x', x * maze_SQUARE_SIZE + 1); + clipRect.attr('y', pegmanIcon.attr('y')); + }; + + var initPegman=function(){ + // Pegman's clipPath element, whose (x, y) is reset by Maze.displayPegman + svg.append('clipPath').attr('id','pegmanClipPath') + d3.select("#pegmanClipPath").append('rect').attr('id','clipRect').attr('width', actor.width).attr('height', actor.height) + + if(actor.type=="animate"){ + if(maze.type==0 || actor.img=='https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/actor_car.png'){ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width * 16).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + }else{ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width * 21).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + } + }else{ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width ).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + } + + displayPegman(actor.x , actor.y , actor.direction*4 ) + } + + var drawMap=function(){ + svg.attr('id','game_stage') + var scale = Math.max(maze_ROWS, maze_COLS) * maze_SQUARE_SIZE; + svg.attr('viewBox', '0 -10 ' + scale + ' ' + (scale+10)); + + // 绘制外框 + svg.append('rect').attr('x', 0).attr('y', 0).attr('width', maze.MAZE_WIDTH).attr('height', maze.MAZE_HEIGHT) + .style('fill','#F1EEE7').style('stroke','#CCB').style('stroke-width','1'); + + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + //绘制迷宫背景 + svg.append('image').attr('x', x*maze_SQUARE_SIZE).attr('y', y*maze_SQUARE_SIZE).attr('width', maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href',maze.background) + } + } + // svg.append('image').attr('x', 0).attr('y', 0).attr('width', maze_SQUARE_SIZE*maze_COLS).attr('height',maze_SQUARE_SIZE*maze_ROWS) + // .attr('xlink:href',maze.background) + //初始化地图 + + var normalize = function(x, y) { + if (x < 0 || x >= maze_COLS || y < 0 || y >= maze_ROWS) { + return '0'; + } + return ((map[y][x] == maze.SquareType.WALL)||(map[y][x] == maze.SquareType.OIL_STATION)) ? '0' : '1'; + }; + // 依次判断格子的类型,并绘制相应格子内的图形 + var tileId = 0; + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + // 标记每个格子的“弯曲状态”. + var tileShape = normalize(x, y) + + normalize(x, y - 1) + // North. + normalize(x + 1, y) + // West. + normalize(x, y + 1) + // South. + normalize(x - 1, y); // East. + // 绘制路径. + if (!tile_SHAPES[tileShape]) { + // Empty square. Use null0 for large areas, with null1-4 for borders. + // Add some randomness to avoid large empty spaces. + if (tileShape == '00000' && Math.random() > 0.3) { + tileShape = 'null0'; + } else { + tileShape = 'null' + Math.floor(1 + Math.random() * 4); + } + } + var left = tile_SHAPES[tileShape][0]; + var top = tile_SHAPES[tileShape][1]; + // Tile's clipPath element. + svg.append('clipPath').attr('id','tileClipPath' + tileId) + d3.select("#tileClipPath" + tileId).append('rect').attr('x', x * maze_SQUARE_SIZE).attr('y', y * maze_SQUARE_SIZE).attr('width', maze_SQUARE_SIZE).attr('height', maze_SQUARE_SIZE) + + if(maze.type==0){//非用户自定义 + // Tile sprite. + if ((map[y][x] != maze.SquareType.WALL) && (map[y][x] != maze.SquareType.OIL_STATION) && (map[y][x] != maze.SquareType.TRAFFIC_LIGHT)&& (map[y][x] != maze.SquareType.LIGHT_GREEN)&& (map[y][x] != maze.SquareType.LIGHT_RED)) { + svg.append('image').attr('x', x * maze_SQUARE_SIZE).attr('y', y * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE ).attr('height',maze_SQUARE_SIZE ) + .attr('clip-path', 'url(#tileClipPath' + tileId + ')').attr('xlink:href',maze.tiles) + tileId++; + } + }else{ + // Tile sprite. + svg.append('image').attr('x',(x - left) * maze_SQUARE_SIZE).attr('y',(y - top) * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE * 5).attr('height',maze_SQUARE_SIZE * 4) + .attr('clip-path', 'url(#tileClipPath' + tileId + ')').attr('xlink:href',maze.tiles) + tileId++; + } + + if(map[y][x]==0){//当地图中此处标记为墙时 + if(maze.tiles=='../common/js/skulpt_mixtoy/pic/maze_path.png'){//当是默认方格时,显示为墙的图片 + svg.append('image').attr('x',x * maze_SQUARE_SIZE + (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('width',maze_SQUARE_SIZE*0.8 ).attr('height',maze_SQUARE_SIZE*0.8) + .attr('xlink:href',maze.wall) + } + }else if(map[y][x]==4){//当地图中此处标记为金币时 + svg.append('image').attr('id','coin'+y+x).attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.5/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.5/2)).attr('width',maze_SQUARE_SIZE*0.5).attr('height',maze_SQUARE_SIZE*0.5) + .attr('xlink:href',maze.award) + }else if(map[y][x]==5){//当地图中此处标记为障碍时 + svg.append('image').attr('id','barrier'+y+x).attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.barrier) + }else if(map[y][x]==10){//当地图中此处标记为符号1——红标时 + svg.append('image').attr('id','marker1').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[0]) + maze_marker_num+=1 + }else if(map[y][x]==11){//当地图中此处标记为符号2——橘标时 + svg.append('image').attr('id','marker2').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[1]) + maze_marker_num+=1 + }else if(map[y][x]==12){//当地图中此处标记为符号3——蓝标时 + svg.append('image').attr('id','marker3').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[2]) + maze_marker_num+=1 + }else if(map[y][x]==13){//当地图中此处标记为符号4——绿标时 + svg.append('image').attr('id','marker4').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[3]) + maze_marker_num+=1 + } + } + } + + if(maze.type==1){ + // 绘制终点图标 + svg.append('image').attr('id','finish').attr('width', 0.5 * maze_SQUARE_SIZE).attr('height', 0.5*maze_SQUARE_SIZE).attr('xlink:href',maze.marker) + //定位:精灵与终点初始的位置 + // Locate the start and finish squares. + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + if (map[y][x] == maze.SquareType.START) { + actor.x= x; + actor.y= y; + } + if (map[y][x] == maze.SquareType.FINISH) { + // Move the finish icon into position. + var finishIcon = $('#finish'); + finishIcon.attr('x', maze_SQUARE_SIZE * (x + 0.5) - + finishIcon.attr('width') / 2); + finishIcon.attr('y', maze_SQUARE_SIZE * (y + 0.6) - + finishIcon.attr('height')); + maze.finish={x:x,y:y} + } + } + } + }else{ + //绘制既是起点、又是终点的坐标 + // Locate the start and finish squares. + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + if (map[y][x] == 9) {//既是起点又是终点 + // 绘制终点图标 + svg.append('image').attr('id','finish').attr('width', maze_SQUARE_SIZE).attr('height', maze_SQUARE_SIZE).attr('xlink:href',maze.marker) + actor.x= x; + actor.y= y; + var finishIcon = $('#finish'); + finishIcon.attr('x', maze_SQUARE_SIZE * x ); + finishIcon.attr('y', maze_SQUARE_SIZE * y+5); + maze.finish={x:x,y:y} + }else if(map[y][x]==20){//当地图中此处标记为20——加油站时 + svg.append('image').attr('id','station').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('width',maze_SQUARE_SIZE*2*0.8).attr('height',maze_SQUARE_SIZE*0.8) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/oilstation.png') + }else if(map[y][x]==21){//当地图中此处标记为21——红绿灯时 + svg.append('image').attr('id','trafficlight').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/trafficlight.png') + }else if(map[y][x]==22){//当地图中此处标记为22——红绿灯中的绿灯时 + svg.append('image').attr('id','lightgreen').attr('x',x * maze_SQUARE_SIZE-5).attr('y',y * maze_SQUARE_SIZE+ 5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/greenlight.png') + }else if(map[y][x]==23){//当地图中此处标记为23——红绿灯中的红灯时 + svg.append('image').attr('id','lightred').attr('x',x * maze_SQUARE_SIZE-5).attr('y',y * maze_SQUARE_SIZE+ 5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/redlight.png') + }else if(map[y][x]==2){//当地图中此处标记为起点时,画上和“既是起点又是终点”一样的图标 + actor.x= x; + actor.y= y; + svg.append('image').attr('id','start').attr('x', maze_SQUARE_SIZE * x).attr('y',maze_SQUARE_SIZE * y+5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href',maze.marker) + } + } + } + } + } + + //检查是否已到终点 + var checkFinish=function(){ + maze.result = actor.x != maze.finish.x || actor.y != maze.finish.y ? + ResultType.UNSET : ResultType.SUCCESS; + if(maze.result==ResultType.SUCCESS){ + if(maze.type==1){ + return true + }else{ + if(actor.marker_num==maze_marker_num){ + return true + }else{ + return "error2" + } + } + }else{ + return false + } + } + + /** + * Is there a path next to pegman? + * @param {number} direction Direction to look + * (0 = forward, 1 = right, 2 = backward, 3 = left). + * @param {?string} id ID of block that triggered this action. + * Null if called as a helper function in Maze.move(). + * @return {boolean} True if there is a path. + */ + var isPath=function(direction,id){ + var effectiveDirection = actor.direction + direction; + var square; + var command; + switch (constrainDirection4(effectiveDirection)) { + case DirectionType.NORTH: + square = map[actor.y - 1] && map[actor.y - 1][actor.x]; + command = 'look_north'; + break; + case DirectionType.EAST: + square = map[actor.y][actor.x + 1]; + command = 'look_east'; + break; + case DirectionType.SOUTH: + square = map[actor.y + 1] && map[actor.y + 1][actor.x]; + command = 'look_south'; + break; + case DirectionType.WEST: + square = map[actor.y][actor.x - 1]; + command = 'look_west'; + break; + } + if (id) { + return [command , square !== maze.SquareType.WALL && square !== undefined && square !== maze.SquareType.BARRIER && square !== maze.SquareType.OIL_STATION && square !== maze.SquareType.TRAFFIC_LIGHT && square !== maze.SquareType.LIGHT_RED && square !== maze.SquareType.LIGHT_GREEN] + } + return square !== maze.SquareType.WALL && square !== undefined && square !== maze.SquareType.BARRIER && square !== maze.SquareType.OIL_STATION && square !== maze.SquareType.TRAFFIC_LIGHT && square !== maze.SquareType.LIGHT_RED && square !== maze.SquareType.LIGHT_GREEN; + }; + + var constrainDirection4 = function(d) { + d = Math.round(d) % 4; + if (d < 0) { + d += 4; + } + return d; + }; + var constrainDirection16 = function(d) { + d = Math.round(d) % 16; + if (d < 0) { + d += 16; + } + return d; + }; + + /** + * Attempt to move pegman forward or backward. + * @param {number} direction Direction to move . + * @param {string} id ID of block that triggered this action. + * @throws {true} If the end of the maze is reached. + * @throws {false} If Pegman collides with a wall. + */ + var move = function(direction) { + if (!isPath(0, null)) { + return false + } + var command; + switch (constrainDirection4(direction)) { + case DirectionType.NORTH: + command = 'north'; + break; + case DirectionType.EAST: + command = 'east'; + break; + case DirectionType.SOUTH: + command = 'south'; + break; + case DirectionType.WEST: + command = 'west'; + break; + } + return command + }; + + /** + * Turn pegman left or right. + * @param {number} direction Direction to turn (0 = left, 1 = right). + * @param {string} id ID of block that triggered this action. + */ + var turn = function(direction) { + var command; + if (direction=='right') { + // Right turn (clockwise). + command='right' + } else { + // Left turn (counterclockwise). + command='left' + } + return command + }; + + /** + * Schedule the animations for a move or turn. + * @param {!Array.} startPos X, Y starting points. + * @param {!Array.} endPos X, Y ending points. + */ + var schedule = function(startPos, endPos) { + var deltas = [(endPos[0] - startPos[0]) / 4, (endPos[1] - startPos[1]) / 4, (endPos[2] - startPos[2]) / 4]; + displayPegman(startPos[0] + deltas[0], startPos[1] + deltas[1], constrainDirection16(startPos[2] + deltas[2])); + // setTimeout(function() { + // displayPegman(startPos[0] + deltas[0] * 2, startPos[1] + deltas[1] * 2, constrainDirection16(startPos[2] + deltas[2] * 2)); + // }, actor.stepSpeed); + // setTimeout(function() { + // displayPegman(startPos[0] + deltas[0] * 3, startPos[1] + deltas[1] * 3, constrainDirection16(startPos[2] + deltas[2] * 3)); + // }, actor.stepSpeed * 2) + // setTimeout(function() { + // displayPegman(endPos[0], endPos[1], constrainDirection16(endPos[2])); + // }, actor.stepSpeed * 3) + displayPegman(endPos[0], endPos[1], constrainDirection16(endPos[2])); + }; + + /** + * 检查精灵在移动的过程中是否吃到了金币 + * @param {} x 当前精灵的横坐标. + * @param {} y 当前精灵的纵坐标. + */ + var hasCoin=function(x , y) { + if(map[y][x]==maze.SquareType.AWARD){//如果此处是金币 + setTimeout(function() { + $('#coin'+y+x).remove() + }, actor.stepSpeed * 3) + map[y][x]=maze.SquareType.OPEN + actor.coin_point+=1 + } + } + + /** + * 检查精灵在移动的过程中是否走到了标记处,并分别统计没种不同类型的标记的数目 + * @param {} x 当前精灵的横坐标. + * @param {} y 当前精灵的纵坐标. + */ + var hasMarker=function(x , y) { + if((map[y][x]==maze.SquareType.MARKER1)||(map[y][x]==maze.SquareType.MARKER2)||(map[y][x]==maze.SquareType.MARKER3)||(map[y][x]==maze.SquareType.MARKER4)){//如果此处是标记 + actor.marker_num+=1 + } + switch (map[y][x]){ + case maze.SquareType.MARKER1: + actor.apart_markers['redmarker']+=1; + break; + case maze.SquareType.MARKER2: + actor.apart_markers['yellowmarker']+=1; + break; + case maze.SquareType.MARKER3: + actor.apart_markers['bluemarker']+=1; + break; + case maze.SquareType.MARKER4: + actor.apart_markers['greenmarker']+=1; + break; + } + } + + /** + * 设置地图属性. + * @param {string} block_id 高亮块的ID + * @param {number} M_x为地图横向方格的数目(范围为3-10),初始默认为8 + * @param {number} M_y为地图竖向方格的数目(范围为3-10),初始默认为8 + * @param {number} startPos_x 起点位置的横坐标. + * @param {number} endPos_x 终点位置的横坐标. + * @param {number} endPos_y 终点位置的纵坐标. + */ + var setMap_f=function( M_x , M_y , startPos_x ,startPos_y , endPos_x , endPos_y ) { + Sk.builtin.pyCheckArgs("setMap", arguments, 6, 6); + map=[] + if((M_x<3) || (M_x>20) || (M_y<3) || (M_y>20)){ + throw Error("错误!超出地图可设置范围,请设置横纵方格数大于等于3,小于等于20") + } + M_x = Sk.ffi.remapToJs(M_x); + M_y = Sk.ffi.remapToJs(M_y); + maze_COLS=M_x; + maze_ROWS=M_y; + maze.MAZE_WIDTH= maze_SQUARE_SIZE * maze_COLS; + maze.MAZE_HEIGHT=maze_SQUARE_SIZE * maze_ROWS; + + startPos_x =Sk.ffi.remapToJs(startPos_x)+1 + startPos_y =Sk.ffi.remapToJs(startPos_y)+1 + endPos_x =Sk.ffi.remapToJs(endPos_x)+1 + endPos_y =Sk.ffi.remapToJs(endPos_y)+1 + + if((startPos_x>M_x) || (startPos_x<1) || (startPos_y>M_y) || (startPos_y<1)){ + throw Error("错误!起点坐标超出地图范围!") + } + if((endPos_x>M_x) || (endPos_x<1) || (endPos_y>M_y) || (endPos_y<1)){ + throw Error("错误!终点坐标超出地图范围!") + } + + for (var i=0; i(map[0].length)) || (Pos_x< 0) || (Pos_y+1>(map.length)) || (Pos_y< 0)){ + throw new Sk.builtin.TypeError("错误!放置物坐标超过地图范围"); + }else if((map[Pos_y][Pos_x]==2)||(map[Pos_y][Pos_x]==3)){ + throw new Sk.builtin.TypeError("错误!不能将放置物位置设置在起点或终点坐标!"); + } + + switch(type){ + case "wall"://墙 + map[Pos_y][Pos_x]=maze.SquareType.WALL; + break; + case "coin": + map[Pos_y][Pos_x]=maze.SquareType.AWARD; + break; + case "barrier": + map[Pos_y][Pos_x]=maze.SquareType.BARRIER; + break; + case "redmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER1; + break; + case "yellowmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER2; + break; + case "bluemarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER3; + break; + case "greenmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER4; + break; + } + } + mod.placeItem = new Sk.builtin.func(placeItem_f); + + /** + * 在某处随机放置障碍 + * + * @param {number} Pos_x 放置物的x坐标位置. + * @param {number} Pos_y 放置物的y坐标位置. + */ + var randomPlaceBarrier_f=function(Pos_x , Pos_y) { + Sk.builtin.pyCheckArgs("randomPlaceBarrier", arguments, 2, 2); + Pos_x = Sk.ffi.remapToJs(Pos_x)+1; + Pos_y = Sk.ffi.remapToJs(Pos_y)+1; + + if((Pos_x>(map[0].length)) || (Pos_x< 1) || (Pos_y>(map.length)) || (Pos_y< 1)){ + throw new Sk.builtin.TypeError("错误!放置物坐标超过地图范围"); + }else if((map[Pos_y-1][Pos_x-1]==2)||(map[Pos_y-1][Pos_x-1]==3)){ + throw new Sk.builtin.TypeError("错误!不能将放置物位置设置在起点或终点坐标!"); + } + + var numType=Math.random()>0.5?maze.SquareType.OPEN:maze.SquareType.BARRIER; + map[Pos_y-1][Pos_x-1]=numType; + + } + mod.randomPlaceBarrier = new Sk.builtin.func(randomPlaceBarrier_f); + + /** + * 初始化地图 + */ + var initMap_f=function() { + drawMap() + } + mod.initMap = new Sk.builtin.func(initMap_f); + + + mod.Actor = Sk.misceval.buildClass(mod, function($gbl, $loc) { + $loc.__init__ = new Sk.builtin.func(function(self,img , direction) { + img= Sk.ffi.remapToJs(img) || 'pegman'; + if(img=='无可用角色'){ + img='pegman'; + } + switch (img){ + case "pegman": + actor.img='../common/js/skulpt_mixtoy/pic/pegman.png';//默认为方格 + actor.type="animate" + break; + case "panda": + actor.img='../common/js/skulpt_mixtoy/pic/panda.png';//设置为管道 + actor.type="animate" + break; + case "astro": + actor.img='../common/js/skulpt_mixtoy/pic/astro.png';//设置为竹子 + actor.type="animate" + break; + case "robot": + actor.img='../common/js/skulpt_mixtoy/pic/robot.png';//设置为机器人 + actor.type="still" + break; + case "car": + actor.img='https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@latest/pic/book/actor_car.png';//设置为小车 + actor.type="animate" + break; + } + + actor.direction = Sk.ffi.remapToJs(direction) || DirectionType.NORTH; + size=[52,49]//[height,width]//size需要根据方格的数目来确定 + actor.coin_point=0 + initPegman() + }); + //get & set:Actor.direction新增函数,获取或设置精灵的方向 + $loc.direction = defineProperty( + function(self) { + return Sk.ffi.remapToPy(actor.direction) + }, + function(self, val) { + Sk.builtin.pyCheckType("direction", "number",Sk.builtin.checkNumber(val.v)); + actor.direction=val.v + }); + //向某个方向移动移动 + //暂时只实现了移动一步 + //func: Actor.moveDirection() + $loc.moveDirection=new Sk.builtin.func(function(self,direction) { + Sk.builtin.pyCheckArgs("moveDirection", arguments, 2,2); + actor.direction = parseInt(Sk.ffi.remapToJs(direction)); + var command= move(direction) //向某个方向移动 + if(command==false){ + maze.result=ResultType.FAILURE + console.log("错误") + // document.getElementById("side_code").innerText='错误' + // throw new Sk.builtin.TypeError("挑战失败!请修改后重新尝试"); + Sk.execLimit = 0; + // throw new Error("挑战失败!请修改后重新尝试"); + } + + if(maze.mlevel==4){//如果是第四关,则需要判断是否需要加油的问题 + //如果左侧存在加油站 + // if((map[actor.y - 1][actor.x])==maze.SquareType.OIL_STATION||(map[actor.y + 1][actor.x])==maze.SquareType.OIL_STATION||(map[actor.y ][actor.x-1])==maze.SquareType.OIL_STATION||(map[actor.y ][actor.x+1])==maze.SquareType.OIL_STATION){ + if((map[actor.y][actor.x-1])==maze.SquareType.OIL_STATION){ + if(actor.oil==0){//在加油站处,如果没有油还想继续往前面走 + maze.result=ResultType.FAILURE + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/no_oil.png') + throw new Sk.builtin.TypeError("挑战失败!小车没有油了"); + } + } + }else if(maze.mlevel==5){//如果是第五关,则需要记录循环次数;每次经过起点处循环次数+1 + if((map[actor.y][actor.x])==maze.SquareType.START){ + actor.circulation_num+=1; + } + }else if(maze.mlevel==6){//如果是第六关,则需要判断红绿灯是否为绿灯的问题 + if(actor.traffic_light==maze.SquareType.LIGHT_RED){ + throw new Sk.builtin.TypeError("挑战失败:小车在红灯亮时还未停止!"); + } + } + + switch (command) { + case 'north': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x, actor.y - 1, actor.direction * 4]); + actor.y--; + break; + case 'east': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x + 1, actor.y, actor.direction * 4]); + actor.x++; + break; + case 'south': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x, actor.y + 1, actor.direction * 4]); + actor.y++; + break; + case 'west': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x - 1, actor.y, actor.direction * 4]); + actor.x--; + break; + } + hasCoin(actor.x,actor.y) + hasMarker(actor.x,actor.y) + if(maze.mlevel==6){//如果是第六关,则需要随机改变红绿灯的颜色 + if((map[actor.y][actor.x+1])==maze.SquareType.LIGHT_RED || (map[actor.y][actor.x+1])==maze.SquareType.LIGHT_GREEN){ + map[actor.y][actor.x+1]=Math.random()>0.5? maze.SquareType.LIGHT_RED:maze.SquareType.LIGHT_GREEN;//随机刷新红绿灯的状态 + actor.traffic_light=map[actor.y][actor.x+1]; + if(actor.traffic_light==maze.SquareType.LIGHT_RED){//图像变为红灯 + d3.select("#lightgreen").remove(); + svg.append('image').attr('id','lightred').attr('x',(actor.x+1) * maze_SQUARE_SIZE-5).attr('y',actor.y * maze_SQUARE_SIZE+5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/redlight.png') + } + } + } + + var state=checkFinish() + if(state=="error2"){ + maze.result=ResultType.FAILURE + console.log("失败") + throw new Sk.builtin.TypeError("挑战失败,请检查是否通过所有标记点!"); + } + }); + $loc.turn=new Sk.builtin.func(function(self,direction){ + Sk.builtin.pyCheckArgs("turn", arguments, 2, 2); + Sk.builtin.pyCheckType("direction", "string", Sk.builtin.checkString(direction)); + direction=Sk.ffi.remapToJs(direction) + var command=turn(direction) + switch (command) { + case 'left': + schedule([actor.x, actor.y, actor.direction * 4], [actor.x, actor.y, actor.direction * 4 - 4]); + actor.direction = constrainDirection4(actor.direction - 1); + break; + case 'right': + schedule([actor.x, actor.y, actor.direction * 4], [actor.x, actor.y, actor.direction * 4 + 4]); + actor.direction = constrainDirection4(actor.direction + 1); + break; + } + }); + $loc.isDone=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isDone", arguments, 1, 1); + var isdone= Sk.ffi.remapToPy(checkFinish()); + return new Sk.ffi.remapToPy(isdone); + }); + $loc.isPath=new Sk.builtin.func(function(self,direction){ + Sk.builtin.pyCheckArgs("isPath", arguments, 2, 2); + Sk.builtin.pyCheckType("direction", "number", Sk.builtin.checkNumber(direction)); + direction=Sk.ffi.remapToJs(direction) + var state=false; + var square=0; + switch (direction) { + case DirectionType.NORTH: + if(map[actor.y - 1]){ + square = map[actor.y - 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.EAST: + if(map[actor.y][actor.x + 1]){ + square = map[actor.y][actor.x + 1]; + }else{ + square = 0 + } + break; + case DirectionType.SOUTH: + if(map[actor.y + 1]){ + square = map[actor.y + 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.WEST: + if(map[actor.y][actor.x - 1]){ + square = map[actor.y][actor.x - 1]; + }else{ + square = 0 + } + break; + }; + state= (square != maze.SquareType.BARRIER) && (square != maze.SquareType.WALL); + return Sk.ffi.remapToPy(state); + }); + //判断某个方向是否存在障碍物 + $loc.isBarrier=new Sk.builtin.func(function(self,direction){ + Sk.builtin.pyCheckArgs("isBarrier", arguments, 2, 2); + Sk.builtin.pyCheckType("direction", "number", Sk.builtin.checkNumber(direction)); + direction=Sk.ffi.remapToJs(direction) + var state=false; + var square=0; + switch (direction) { + case DirectionType.NORTH: + if(map[actor.y - 1]){ + square = map[actor.y - 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.EAST: + if(map[actor.y][actor.x + 1]){ + square = map[actor.y][actor.x + 1]; + }else{ + square = 0 + } + break; + case DirectionType.SOUTH: + if(map[actor.y + 1]){ + square = map[actor.y + 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.WEST: + if(map[actor.y][actor.x - 1]){ + square = map[actor.y][actor.x - 1]; + }else{ + square = 0 + } + break; + }; + state= square == maze.SquareType.BARRIER; + return Sk.ffi.remapToPy(state); + }); + //随机生成小车油量 + $loc.randomOil=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("randomOil", arguments, 1, 1); + actor.oil=Math.random()>0.5?1:0;//随机初始化汽车的油量 + if(actor.oil==0){//没油(呈现少量油的图片) + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/none_oil.png') + }else if(actor.oil==1){//油量充足(呈现油量充足的图片) + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/full_oil.png') + } + }); + //判断是否需要加油 + $loc.isOilFull=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isOilFull", arguments, 1, 1); + if(actor.oil==0){//没油了,返回需要加油为True + return Sk.ffi.remapToPy(true); + }else if(actor.oil==1){//还有油,返回需要加油为False + return Sk.ffi.remapToPy(false); + } + }); + //进加油站加油 + $loc.addOil=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("addOil", arguments, 1, 1); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixtoy/pic/book/full_oil.png') + actor.oil=1//油量充足 + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + $loc.getPoint=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("getPoint", arguments, 1, 1); + var point= actor.coin_point; + return Sk.ffi.remapToPy(point); + }); + //判断信号灯是否为绿灯? + $loc.isLightGreen=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isLightGreen", arguments, 1, 1); + if(actor.traffic_light==maze.SquareType.LIGHT_GREEN){//绿灯,返回 true + return Sk.ffi.remapToPy(true); + }else if(actor.traffic_light==maze.SquareType.LIGHT_RED){//红灯,返回false + return Sk.ffi.remapToPy(false); + } + }); + //检查循环的次数是否正确 + $loc.isCirculationRight=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isCirculationRight", arguments, 1, 1); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + var mlevel=maze.mlevel;//获取当前关卡序数 + var state=false; + switch (mlevel){ + case 5://第五关 + state=actor.circulation_num==3?true:false; + break; + case 6://第六关 + if(actor.traffic_light==maze.SquareType.LIGHT_GREEN){//如果是绿灯,则怎么都算失败 + state=false; + }else if(actor.traffic_light==maze.SquareType.LIGHT_RED){//如果是红灯 + for (var y = 0; y < maze.map.length; y++) { + for (var x = 0; x < maze.map[0].length; x++) { + if(maze.map[y][x]==maze.SquareType.LIGHT_RED){ + if((actor.x+1)==x|| (actor.y)==y){//如果小车停的位置在红绿灯的左边,则挑战成功 + state=true; + } + } + } + } + } + break; + } + if(state==true){ + // setTimeout(function() { + // layer.alert("挑战成功!", { shade: false }); + // },1000) + // getFinishState_f(state) + // resolve(Sk.builtin.none.none$); + }else{ + maze.result=ResultType.FAILURE + layer.alert("挑战失败,请检查循环次数是否正确!", { shade: false }) + console.log("失败") + throw new Sk.builtin.TypeError("挑战失败,请检查循环次数是否正确!"); + } + })) + }); + //判断是否经过某种颜色的标记 + $loc.checkMarker=new Sk.builtin.func(function(self,marker){ + Sk.builtin.pyCheckArgs("checkMarker", arguments, 2, 2); + marker=Sk.ffi.remapToJs(marker); + var marker_num=actor.apart_markers[marker]; + if(marker_num==0){ + return Sk.ffi.remapToPy(false); + }else{ + return Sk.ffi.remapToPy(true); + } + }); + //返回经过某种颜色标记的数目 + $loc.getMarkerNum=new Sk.builtin.func(function(self,marker){ + Sk.builtin.pyCheckArgs("getMarkerNum", arguments, 2, 2); + marker=Sk.ffi.remapToJs(marker); + var marker_num=actor.apart_markers[marker]; + return Sk.ffi.remapToPy(marker_num); + }) + }, "Actor") + + /** + * 初始化为设定好的地图 + * + * @param {number} level 初始化地图,level为地图的等级. + */ + var settedMap_f=function(level) { + level=Sk.ffi.remapToJs(level) + maze=MAZE_setted[level] + map=MAZE_setted[level].map + drawMap() + } + mod.settedMap = new Sk.builtin.func(settedMap_f); + + /** + * 初始化为设定好的简单的迷宫地图 + * + * @param {number} level 初始化地图,level为地图的等级. + */ + var settedSimpleMap_f=function(level) { + level=Sk.ffi.remapToJs(level) + map=simple_Maze[level].map + maze_ROWS=map.length; + maze_COLS=map[0].length; + // if(level==6 || level==7){ + // maze.tiles=simple_Maze[level].tiles + // maze.background=simple_Maze[level].background + // }else{ + maze.tiles=simple_map_para.tiles + maze.wall=simple_map_para.wall + maze.background=simple_map_para.background + // } + simple_map_para.state_num=1 + drawMap() + } + mod.settedSimpleMap = new Sk.builtin.func(settedSimpleMap_f); + + /** + * 初始化为设定好的简单的迷宫地图 + * + * @return {boolean} 检测小人执行最后一个指令后是否到达终点,如果到达终点,返回True,否则返回False. + */ + var getFinishState_f=function(state){ + var state=checkFinish() + var state_str="" + if(state){ + state_str="成功" + console.log("成功") + }else{ + state_str="失败" + console.log("失败") + } + if(simple_map_para.state_num==1){//对于已经激活的、已经预设的迷宫关卡 + return Sk.ffi.remapToPy(state_str); + }else{ + return Sk.ffi.remapToPy(""); + } + } + mod.getFinishState = new Sk.builtin.func(getFinishState_f); + + return mod; +} diff --git a/mixly/common/js/skulpt_mixtoy/bg_nonehl1.js b/mixly/common/js/skulpt_mixtoy/bg_nonehl1.js new file mode 100644 index 00000000..e75d6aaa --- /dev/null +++ b/mixly/common/js/skulpt_mixtoy/bg_nonehl1.js @@ -0,0 +1,1663 @@ +//这一版删除了所有延时和高亮效果,用以适应非分步调试 +// 监听属性getter/setter +const defineProperty = function(obj, property) { + return Sk.misceval.callsimOrSuspend(Sk.builtins.property, new Sk.builtin.func(function(self) { + if (typeof obj === 'function') { + return obj(self) + } else { + return Sk.ffi.remapToPy(self[obj][property]) + } + }), new Sk.builtin.func(function(self, val) { + if (typeof property === 'function') { + property(self, val) + } else { + self[obj][property] = val.v; + } + })) +} + + +var $builtinmodule = function (name) { + let mod= {__name__: new Sk.builtin.str("bg_nonehl")}; + + var svg = d3.select('#blocklySVG').append('svg'); + var stepplay_btn=$("#stepplay_btn") + var play_btn=$("#play_btn") + var undo_btn=$("#undo_btn") + var redo_btn=$("#redo_btn") + var sub_btn=$("#sub") + + //其他变量设置 + var map=//迷宫布局 + [[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], + [0, 2, 1, 1, 1, 1, 3, 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]] + var DirectionType={//移动方向的类型 + NORTH: 0, + EAST: 1, + SOUTH: 2, + WEST: 3 + } + var ResultType = { + UNSET: 0, + SUCCESS: 1, + FAILURE: -1, + TIMEOUT: 2, + ERROR: -2 + } + var tile_SHAPES = { + '10010': [4, 0], // Dead ends + '10001': [3, 3], + '11000': [0, 1], + '10100': [0, 2], + '11010': [4, 1], // Vertical + '10101': [3, 2], // Horizontal + '10110': [0, 0], // Elbows + '10011': [2, 0], + '11001': [4, 2], + '11100': [2, 3], + '11110': [1, 1], // Junctions + '10111': [1, 0], + '11011': [2, 1], + '11101': [1, 2], + '11111': [2, 2], // Cross + 'null0': [4, 3], // Empty + 'null1': [3, 0], + 'null2': [3, 1], + 'null3': [0, 3], + 'null4': [1, 3] + } + // 角色变量 + var actor={ + img : "../common/js/skulpt_mixcar/pic/pegman.png", + height : 52, + width : 49, + direction : DirectionType.EAST, + type:"animate", + x : 0, + y : 0, + stepSpeed : 150, + coin_point:0, + marker_num:0, + oil:1,//表示小车有充足的油量(为了适应教材而新增的变量) + traffic_light:22,//表示红绿灯为绿灯 + circulation_num:0,//小车在赛道中循环的次数 + apart_markers:{"redmarker":0,"yellowmarker":0,"bluemarker":0,"greenmarker":0} + }; + //迷宫变量 + var maze_SQUARE_SIZE = 50; + var maze_ROWS=map.length; + var maze_COLS=map[0].length; + var maze_marker_num=0;//迷宫中标记点的数目 + var maze={ + mlevel:0, + tiles: '../common/js/skulpt_mixcar/pic/maze_path.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/marker.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_default.png',//地图背景图片 + wall:'../common/js/skulpt_mixcar/pic/wall.png', + award:'../common/js/skulpt_mixcar/pic/award.png', + barrier:'../common/js/skulpt_mixcar/pic/roadblock.png', + markers:['../common/js/skulpt_mixcar/pic/red.png','../common/js/skulpt_mixcar/pic/yellow.png','../common/js/skulpt_mixcar/pic/blue.png','../common/js/skulpt_mixcar/pic/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + FINISH: 3, + AWARD:4,//金币奖励 + BARRIER:5,//障碍物 + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * maze_COLS, + MAZE_HEIGHT : maze_SQUARE_SIZE * maze_ROWS, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:1//类型为用户自定义的 + }; + //简单的迷宫任务,不是小车的迷宫场景 + var simple_map_para={ + tiles: '../common/js/skulpt_mixcar/pic/tiles_astro.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/marker.png',//终点图标图片 + background: '',//地图背景图片 + wall:'', + state_num:1//为0就是未使用,为1就是已经使用(激活) + } + var simple_Maze=[ + //第一关 + { + mlevel:1, + map:[[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], + [0, 2, 1, 1, 1, 1, 3, 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]], + }, + //第二关 + { + mlevel:2, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 1, 3], + [0, 0, 0, 0, 0, 1, 1, 0], + [0, 0, 0, 0, 1, 1, 0, 0], + [0, 0, 0, 1, 1, 0, 0, 0], + [0, 0, 1, 1, 0, 0, 0, 0], + [0, 1, 1, 0, 0, 0, 0, 0], + [2, 1, 0, 0, 0, 0, 0, 0]], + }, + //第三关 + { + mlevel:3, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 1, 1, 0, 3, 0, 1, 0], + [0, 1, 1, 0, 1, 1, 1, 0], + [0, 1, 0, 1, 0, 1, 0, 0], + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 2, 1, 1, 1, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第四关 + { + mlevel:4, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 1, 1, 1, 1, 1, 0], + [0, 0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 1, 3, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 1, 0], + [0, 0, 2, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第五关 + { + mlevel:5, + map:[ + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 2, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 1, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 3, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第六关 + { + mlevel:6, + map:[ + [0, 0, 1, 1, 1, 0, 1, 1, 1], + [0, 0, 1, 0, 1, 0, 1, 0, 1], + [2, 1, 1, 0, 1, 1, 1, 0, 3], + [0, 0, 0, 0, 0, 0, 0, 0, 0]] + }, + //第七关 + { + mlevel:7, + map:[ + [0, 0, 1, 1, 1], + [0, 0, 1, 0, 1], + [2, 1, 1, Math.random()>0.5?1:5, 3]], + // tiles: '../common/js/skulpt_mixcar/pic/maze_path.png',//地图路径图片 + // marker: '../common/js/skulpt_mixcar/pic/marker.png',//终点图标图片 + // background: '',//地图背景图片 + }, + //第八关 + { + mlevel:8, + map:[ + [0, 0, 1, 1, 1, 1], + [0, 0, 1, 0, 0, 1], + [0, 1, 1, Math.random()>0.5?1:5, 1, 1], + [0, 1, 0, 0, 0, 1], + [2, 1, Math.random()>0.5?1:5, 1, 1, 3]], + // tiles: '../common/js/skulpt_mixcar/pic/maze_path.png',//地图路径图片 + // marker: '../common/js/skulpt_mixcar/pic/marker.png',//终点图标图片 + // background: '',//地图背景图片 + }, + //第九关 + { + mlevel:9, + map:[ + [1, 1, 1, 1, 1, 1, 0, 0, 0, 0], + [1, 0, 1, 0, 0, 0, 0, 0, 0, 0], + [1, 0, 4, 1, 1, 0, 0, 0, 0, 0], + [1, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 1, 1, 1, 0, 0, 0], + [0, 1, 0, 0, Math.random()>0.5?1:5, 0, 1, 0, 0, 0], + [0, 1, 0, 0, 4, 0, 1, Math.random()>0.5?1:5, 4, 0], + [0, 1, 0, 0, 1, 0, 1, 0, 1, 0], + [0, 0, 0, 0, 1, 1, 1, 1, 3, 0]] + }, + //第十关 + { + mlevel:10, + map:[ + [3, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 0, 0], + [0, 1, 0, 1, 0, 1], + [0, 1, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 2, 1]] + }, + //第十一关 + { + mlevel:11, + map:[ + [3, 1, 1, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十二关 + { + mlevel:12, + map:[ + [0, 0, 0, 0, 0, 0], + [0, 3, 1, 1, 0, 0], + [0, 0, 0, 1, 0, 1], + [0, 0, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十三关 + { + mlevel:13, + map:[ + [3, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 0, 0], + [0, 0, 0, 1, 0, 0], + [0, 0, 0, 1, 1, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 2, 1]] + }, + //第十四关 + { + mlevel:14, + map:[ + [1, 1, 1, 1, 1, 1], + [1, 0, 0, 0, 0, 1], + [3, 1, 1, 1, Math.random()>0.5?1:5, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十五关 + { + mlevel:15, + map:[ + [1, 1, 1, 1, 1, 1], + [1, 0, 0, 0, 0, 1], + [1, 1, 1, 1, 0, 1], + [1, 0, 0, 1, Math.random()>0.5?1:5, 1], + [1, 3, 1, Math.random()>0.5?1:5, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十六关 + { + mlevel:16, + map:[ + [1, 1, 1, 1, 0, 0], + [1, 0, 0, 1, 0, 0], + [1, 1, Math.random()>0.5?1:5, 1, 1, 1], + [1, 0, 0, Math.random()>0.5?1:5, 0, 1], + [3, 1, 1, 1, 0, 1], + [0, 0, 0, 0, 0, 1], + [0, 0, 0, 0, 0, 2]] + }, + //第十七关 + { + mlevel:17, + map:[ + [1, 1, 1, 1, 0, 0], + [1, 0, 0, 1, 0, 0], + [1, 1, Math.random()>0.5?1:5, 1, 1, 2], + [1, 0, 0, Math.random()>0.5?1:5, 0, 0], + [1, 3, 1, 1, 0, 0], + [0, 0, 0, 0, 0, 0]] + }, + //第十八关 + { + mlevel:18, + map:[ + [0, 2, 0, 0, 0], + [0, 1, 1, 1, 0], + [0, Math.random()>0.5?1:5, 0, 1, 0], + [0, 1, 0, 1, 0], + [0, 3, 1, 1, 0]], + tiles: '../common/js/skulpt_mixcar/pic/maze_path.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/marker.png',//终点图标图片 + background: '',//地图背景图片 + }, + ] + + + //已经设置好的关卡的map + var MAZE_setted=[ + //第一关 + { mlevel:1, + map:[ + [0, 1, 1, 13, 1, 1, 12, 0], + [0, 1, 0, 1, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 10, 1, 1, 11, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: '../common/js/skulpt_mixcar/pic/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_car1.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:['../common/js/skulpt_mixcar/pic/red.png','../common/js/skulpt_mixcar/pic/yellow.png','../common/js/skulpt_mixcar/pic/blue.png','../common/js/skulpt_mixcar/pic/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第二关 + { + mlevel:2, + map:[ + [0, 1, 1, 13, 1, 1, 12, 0], + [0, 1, 0, 5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 10, 1, 1, 11, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: '../common/js/skulpt_mixcar/pic/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_car2.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixcar/pic/barrier.png', + markers:['../common/js/skulpt_mixcar/pic/red.png','../common/js/skulpt_mixcar/pic/yellow.png','../common/js/skulpt_mixcar/pic/blue.png','../common/js/skulpt_mixcar/pic/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER1:10, + MARKER2:11, + MARKER3:12, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第三关 + { mlevel:3, + map:[ + [0, 1, 1, 13, 1, 1, 1, 0], + [0, 1, 0, Math.random()>0.5?1:5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: '../common/js/skulpt_mixcar/pic/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_car2.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixcar/pic/barrier.png', + markers:['../common/js/skulpt_mixcar/pic/red.png','../common/js/skulpt_mixcar/pic/yellow.png','../common/js/skulpt_mixcar/pic/blue.png','../common/js/skulpt_mixcar/pic/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER4:13, + S_F: 9,//既是起点又是终点 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第四关 + { mlevel:4, + map:[ + [0, 1, 1, 13, 1, 1, 1, 0], + [20, 1, 0, Math.random()>0.5?1:5, 0, 0, 1, 0], + [0, 1, 1, 9, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: '../common/js/skulpt_mixcar/pic/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_car3.png',//地图背景图片 + wall:'', + award:'', + barrier:'../common/js/skulpt_mixcar/pic/barrier.png', + markers:['../common/js/skulpt_mixcar/pic/red.png','../common/js/skulpt_mixcar/pic/yellow.png','../common/js/skulpt_mixcar/pic/blue.png','../common/js/skulpt_mixcar/pic/green.png'], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + BARRIER:5, + MARKER4:13, + S_F: 9,//既是起点又是终点 + OIL_STATION:20//加油站 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第五关 + { mlevel:5, + map:[ + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 2, 21, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: '../common/js/skulpt_mixcar/pic/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_car4.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:[], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + S_F: 9,//既是起点又是终点 + TRAFFIC_LIGHT:21//红绿灯 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + }, + //第六关 + { mlevel:6, + map:[ + [0, 1, 1, 1, 1, 1, 1, 0], + [0, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 2, 22, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 0, 0, 1, 0], + [0, 0, 0, 1, 1, 1, 1, 0], + [0, 0, 0, 0, 0, 0, 0, 0]], + tiles: '../common/js/skulpt_mixcar/pic/tiles_road.png',//地图路径图片 + marker: '../common/js/skulpt_mixcar/pic/Start_final.png',//终点图标图片 + background: '../common/js/skulpt_mixcar/pic/bg_car4.png',//地图背景图片 + wall:'', + award:'', + barrier:'', + markers:[], + SquareType :{//迷宫中方块的类型 + WALL: 0, + OPEN: 1, + START: 2, + S_F: 9,//既是起点又是终点 + LIGHT_GREEN:22,//红绿灯中的绿灯 + LIGHT_RED:23//红绿灯中的红灯 + }, + //迷宫部分参数指定 + MAZE_WIDTH : maze_SQUARE_SIZE * 8, + MAZE_HEIGHT : maze_SQUARE_SIZE * 8, + PATH_WIDTH : maze_SQUARE_SIZE / 3, + result : ResultType.UNSET, + finish : {x:0,y:0}, + type:0//类型为非用户自定义的 + } + ] + + /** + * Display Pegman at the specified location, facing the specified direction. + * @param {number} x Horizontal grid (or fraction thereof). + * @param {number} y Vertical grid (or fraction thereof). + * @param {number} d Direction (0 - 15) or dance (16 - 17). + * @param {number=} opt_angle Optional angle (in degrees) to rotate Pegman. + */ + var displayPegman = function(x, y, d, opt_angle) { + var pegmanIcon = $('#pegman'); + if(actor.type=='animate'){ + if(maze.type==0 || actor.img=='../common/js/skulpt_mixcar/pic/actor_car.png' ){ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE - d * actor.width+ 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 ); + }else{ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE - d * actor.width + 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 - 8); + } + if (opt_angle) { + pegmanIcon.attr('transform', 'rotate(' + opt_angle + ', ' + + (x * maze_SQUARE_SIZE + maze_SQUARE_SIZE / 2) + ', ' + + (y * maze_SQUARE_SIZE + maze_SQUARE_SIZE / 2) + ')'); + } else { + pegmanIcon.attr('transform', 'rotate(0, 0, 0)'); + } + }else{ + pegmanIcon.attr('x', x * maze_SQUARE_SIZE + 1); + pegmanIcon.attr('y', maze_SQUARE_SIZE * (y + 0.5) - actor.height / 2 ); + } + var clipRect = $('#clipRect'); + clipRect.attr('x', x * maze_SQUARE_SIZE + 1); + clipRect.attr('y', pegmanIcon.attr('y')); + }; + + var initPegman=function(){ + // Pegman's clipPath element, whose (x, y) is reset by Maze.displayPegman + svg.append('clipPath').attr('id','pegmanClipPath') + d3.select("#pegmanClipPath").append('rect').attr('id','clipRect').attr('width', actor.width).attr('height', actor.height) + + if(actor.type=="animate"){ + if(maze.type==0 || actor.img=='../common/js/skulpt_mixcar/pic/actor_car.png'){ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width * 16).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + }else{ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width * 21).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + } + }else{ + //绘制精灵. + svg.append('image').attr('id','pegman').attr('width', actor.width ).attr('height', actor.height).attr('clip-path', 'url(#pegmanClipPath)') + .attr('xlink:href',actor.img) + } + + displayPegman(actor.x , actor.y , actor.direction*4 ) + } + + var drawMap=function(){ + svg.attr('id','game_stage') + var scale = Math.max(maze_ROWS, maze_COLS) * maze_SQUARE_SIZE; + svg.attr('viewBox', '0 0 ' + scale + ' ' + scale); + + // 绘制外框 + svg.append('rect').attr('x', 0).attr('y', 0).attr('width', maze.MAZE_WIDTH).attr('height', maze.MAZE_HEIGHT) + .style('fill','#F1EEE7').style('stroke','#CCB').style('stroke-width','1'); + + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + //绘制迷宫背景 + svg.append('image').attr('x', x*maze_SQUARE_SIZE).attr('y', y*maze_SQUARE_SIZE).attr('width', maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href',maze.background) + } + } + // svg.append('image').attr('x', 0).attr('y', 0).attr('width', maze_SQUARE_SIZE*maze_COLS).attr('height',maze_SQUARE_SIZE*maze_ROWS) + // .attr('xlink:href',maze.background) + //初始化地图 + + var normalize = function(x, y) { + if (x < 0 || x >= maze_COLS || y < 0 || y >= maze_ROWS) { + return '0'; + } + return ((map[y][x] == maze.SquareType.WALL)||(map[y][x] == maze.SquareType.OIL_STATION)) ? '0' : '1'; + }; + // 依次判断格子的类型,并绘制相应格子内的图形 + var tileId = 0; + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + // 标记每个格子的“弯曲状态”. + var tileShape = normalize(x, y) + + normalize(x, y - 1) + // North. + normalize(x + 1, y) + // West. + normalize(x, y + 1) + // South. + normalize(x - 1, y); // East. + // 绘制路径. + if (!tile_SHAPES[tileShape]) { + // Empty square. Use null0 for large areas, with null1-4 for borders. + // Add some randomness to avoid large empty spaces. + if (tileShape == '00000' && Math.random() > 0.3) { + tileShape = 'null0'; + } else { + tileShape = 'null' + Math.floor(1 + Math.random() * 4); + } + } + var left = tile_SHAPES[tileShape][0]; + var top = tile_SHAPES[tileShape][1]; + // Tile's clipPath element. + svg.append('clipPath').attr('id','tileClipPath' + tileId) + d3.select("#tileClipPath" + tileId).append('rect').attr('x', x * maze_SQUARE_SIZE).attr('y', y * maze_SQUARE_SIZE).attr('width', maze_SQUARE_SIZE).attr('height', maze_SQUARE_SIZE) + + if(maze.type==0){//非用户自定义 + // Tile sprite. + if ((map[y][x] != maze.SquareType.WALL) && (map[y][x] != maze.SquareType.OIL_STATION) && (map[y][x] != maze.SquareType.TRAFFIC_LIGHT)&& (map[y][x] != maze.SquareType.LIGHT_GREEN)&& (map[y][x] != maze.SquareType.LIGHT_RED)) { + svg.append('image').attr('x', x * maze_SQUARE_SIZE).attr('y', y * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE ).attr('height',maze_SQUARE_SIZE ) + .attr('clip-path', 'url(#tileClipPath' + tileId + ')').attr('xlink:href',maze.tiles) + tileId++; + } + }else{ + // Tile sprite. + svg.append('image').attr('x',(x - left) * maze_SQUARE_SIZE).attr('y',(y - top) * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE * 5).attr('height',maze_SQUARE_SIZE * 4) + .attr('clip-path', 'url(#tileClipPath' + tileId + ')').attr('xlink:href',maze.tiles) + tileId++; + } + + if(map[y][x]==0){//当地图中此处标记为墙时 + if(maze.tiles=='../common/js/skulpt_mixcar/pic/maze_path.png'){//当是默认方格时,显示为墙的图片 + svg.append('image').attr('x',x * maze_SQUARE_SIZE + (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('width',maze_SQUARE_SIZE*0.8 ).attr('height',maze_SQUARE_SIZE*0.8) + .attr('xlink:href',maze.wall) + } + }else if(map[y][x]==4){//当地图中此处标记为金币时 + svg.append('image').attr('id','coin'+y+x).attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.5/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.5/2)).attr('width',maze_SQUARE_SIZE*0.5).attr('height',maze_SQUARE_SIZE*0.5) + .attr('xlink:href',maze.award) + }else if(map[y][x]==5){//当地图中此处标记为障碍时 + svg.append('image').attr('id','barrier'+y+x).attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.barrier) + }else if(map[y][x]==10){//当地图中此处标记为符号1——红标时 + svg.append('image').attr('id','marker1').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[0]) + maze_marker_num+=1 + }else if(map[y][x]==11){//当地图中此处标记为符号2——橘标时 + svg.append('image').attr('id','marker2').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[1]) + maze_marker_num+=1 + }else if(map[y][x]==12){//当地图中此处标记为符号3——蓝标时 + svg.append('image').attr('id','marker3').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[2]) + maze_marker_num+=1 + }else if(map[y][x]==13){//当地图中此处标记为符号4——绿标时 + svg.append('image').attr('id','marker4').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href',maze.markers[3]) + maze_marker_num+=1 + } + } + } + + if(maze.type==1){ + // 绘制终点图标 + svg.append('image').attr('id','finish').attr('width', 0.5 * maze_SQUARE_SIZE).attr('height', 0.5*maze_SQUARE_SIZE).attr('xlink:href',maze.marker) + //定位:精灵与终点初始的位置 + // Locate the start and finish squares. + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + if (map[y][x] == maze.SquareType.START) { + actor.x= x; + actor.y= y; + } + if (map[y][x] == maze.SquareType.FINISH) { + // Move the finish icon into position. + var finishIcon = $('#finish'); + finishIcon.attr('x', maze_SQUARE_SIZE * (x + 0.5) - + finishIcon.attr('width') / 2); + finishIcon.attr('y', maze_SQUARE_SIZE * (y + 0.6) - + finishIcon.attr('height')); + maze.finish={x:x,y:y} + } + } + } + }else{ + //绘制既是起点、又是终点的坐标 + // Locate the start and finish squares. + for (var y = 0; y < maze_ROWS; y++) { + for (var x = 0; x < maze_COLS; x++) { + if (map[y][x] == 9) {//既是起点又是终点 + // 绘制终点图标 + svg.append('image').attr('id','finish').attr('width', maze_SQUARE_SIZE).attr('height', maze_SQUARE_SIZE).attr('xlink:href',maze.marker) + actor.x= x; + actor.y= y; + var finishIcon = $('#finish'); + finishIcon.attr('x', maze_SQUARE_SIZE * x ); + finishIcon.attr('y', maze_SQUARE_SIZE * y+5); + maze.finish={x:x,y:y} + }else if(map[y][x]==20){//当地图中此处标记为20——加油站时 + svg.append('image').attr('id','station').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.8/2)).attr('width',maze_SQUARE_SIZE*2*0.8).attr('height',maze_SQUARE_SIZE*0.8) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/oilstation.png') + }else if(map[y][x]==21){//当地图中此处标记为21——红绿灯时 + svg.append('image').attr('id','trafficlight').attr('x',x * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('y',y * maze_SQUARE_SIZE+ (maze_SQUARE_SIZE/2 - maze_SQUARE_SIZE*0.7/2)).attr('width',maze_SQUARE_SIZE*0.7).attr('height',maze_SQUARE_SIZE*0.7) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/trafficlight.png') + }else if(map[y][x]==22){//当地图中此处标记为22——红绿灯中的绿灯时 + svg.append('image').attr('id','lightgreen').attr('x',x * maze_SQUARE_SIZE-5).attr('y',y * maze_SQUARE_SIZE+ 5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/greenlight.png') + }else if(map[y][x]==23){//当地图中此处标记为23——红绿灯中的红灯时 + svg.append('image').attr('id','lightred').attr('x',x * maze_SQUARE_SIZE-5).attr('y',y * maze_SQUARE_SIZE+ 5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/redlight.png') + }else if(map[y][x]==2){//当地图中此处标记为起点时,画上和“既是起点又是终点”一样的图标 + actor.x= x; + actor.y= y; + svg.append('image').attr('id','start').attr('x', maze_SQUARE_SIZE * x).attr('y',maze_SQUARE_SIZE * y+5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href',maze.marker) + } + } + } + } + } + + //检查是否已到终点 + var checkFinish=function(){ + maze.result = actor.x != maze.finish.x || actor.y != maze.finish.y ? + ResultType.UNSET : ResultType.SUCCESS; + if(maze.result==ResultType.SUCCESS){ + if(maze.type==1){ + return true + }else{ + if(actor.marker_num==maze_marker_num){ + return true + }else{ + return "error2" + } + } + }else{ + return false + } + } + + /** + * Is there a path next to pegman? + * @param {number} direction Direction to look + * (0 = forward, 1 = right, 2 = backward, 3 = left). + * @param {?string} id ID of block that triggered this action. + * Null if called as a helper function in Maze.move(). + * @return {boolean} True if there is a path. + */ + var isPath=function(direction,id){ + var effectiveDirection = actor.direction + direction; + var square; + var command; + switch (constrainDirection4(effectiveDirection)) { + case DirectionType.NORTH: + square = map[actor.y - 1] && map[actor.y - 1][actor.x]; + command = 'look_north'; + break; + case DirectionType.EAST: + square = map[actor.y][actor.x + 1]; + command = 'look_east'; + break; + case DirectionType.SOUTH: + square = map[actor.y + 1] && map[actor.y + 1][actor.x]; + command = 'look_south'; + break; + case DirectionType.WEST: + square = map[actor.y][actor.x - 1]; + command = 'look_west'; + break; + } + if (id) { + return [command , square !== maze.SquareType.WALL && square !== undefined && square !== maze.SquareType.BARRIER && square !== maze.SquareType.OIL_STATION && square !== maze.SquareType.TRAFFIC_LIGHT && square !== maze.SquareType.LIGHT_RED && square !== maze.SquareType.LIGHT_GREEN] + } + return square !== maze.SquareType.WALL && square !== undefined && square !== maze.SquareType.BARRIER && square !== maze.SquareType.OIL_STATION && square !== maze.SquareType.TRAFFIC_LIGHT && square !== maze.SquareType.LIGHT_RED && square !== maze.SquareType.LIGHT_GREEN; + }; + + var constrainDirection4 = function(d) { + d = Math.round(d) % 4; + if (d < 0) { + d += 4; + } + return d; + }; + var constrainDirection16 = function(d) { + d = Math.round(d) % 16; + if (d < 0) { + d += 16; + } + return d; + }; + + /** + * Attempt to move pegman forward or backward. + * @param {number} direction Direction to move . + * @param {string} id ID of block that triggered this action. + * @throws {true} If the end of the maze is reached. + * @throws {false} If Pegman collides with a wall. + */ + var move = function(direction) { + if (!isPath(0, null)) { + return false + } + var command; + switch (constrainDirection4(direction)) { + case DirectionType.NORTH: + command = 'north'; + break; + case DirectionType.EAST: + command = 'east'; + break; + case DirectionType.SOUTH: + command = 'south'; + break; + case DirectionType.WEST: + command = 'west'; + break; + } + return command + }; + + /** + * Turn pegman left or right. + * @param {number} direction Direction to turn (0 = left, 1 = right). + * @param {string} id ID of block that triggered this action. + */ + var turn = function(direction) { + var command; + if (direction=='right') { + // Right turn (clockwise). + command='right' + } else { + // Left turn (counterclockwise). + command='left' + } + return command + }; + + /** + * Schedule the animations for a move or turn. + * @param {!Array.} startPos X, Y starting points. + * @param {!Array.} endPos X, Y ending points. + */ + var schedule = function(startPos, endPos) { + var deltas = [(endPos[0] - startPos[0]) / 4, (endPos[1] - startPos[1]) / 4, (endPos[2] - startPos[2]) / 4]; + displayPegman(startPos[0] + deltas[0], startPos[1] + deltas[1], constrainDirection16(startPos[2] + deltas[2])); + setTimeout(function() { + displayPegman(startPos[0] + deltas[0] * 2, startPos[1] + deltas[1] * 2, constrainDirection16(startPos[2] + deltas[2] * 2)); + }, actor.stepSpeed); + setTimeout(function() { + displayPegman(startPos[0] + deltas[0] * 3, startPos[1] + deltas[1] * 3, constrainDirection16(startPos[2] + deltas[2] * 3)); + }, actor.stepSpeed * 2) + setTimeout(function() { + displayPegman(endPos[0], endPos[1], constrainDirection16(endPos[2])); + }, actor.stepSpeed * 3) + }; + + /** + * 检查精灵在移动的过程中是否吃到了金币 + * @param {} x 当前精灵的横坐标. + * @param {} y 当前精灵的纵坐标. + */ + var hasCoin=function(x , y) { + if(map[y][x]==maze.SquareType.AWARD){//如果此处是金币 + setTimeout(function() { + $('#coin'+y+x).remove() + }, actor.stepSpeed * 3) + map[y][x]=maze.SquareType.OPEN + actor.coin_point+=1 + } + } + + /** + * 检查精灵在移动的过程中是否走到了标记处,并分别统计没种不同类型的标记的数目 + * @param {} x 当前精灵的横坐标. + * @param {} y 当前精灵的纵坐标. + */ + var hasMarker=function(x , y) { + if((map[y][x]==maze.SquareType.MARKER1)||(map[y][x]==maze.SquareType.MARKER2)||(map[y][x]==maze.SquareType.MARKER3)||(map[y][x]==maze.SquareType.MARKER4)){//如果此处是标记 + actor.marker_num+=1 + } + switch (map[y][x]){ + case maze.SquareType.MARKER1: + actor.apart_markers['redmarker']+=1; + break; + case maze.SquareType.MARKER2: + actor.apart_markers['yellowmarker']+=1; + break; + case maze.SquareType.MARKER3: + actor.apart_markers['bluemarker']+=1; + break; + case maze.SquareType.MARKER4: + actor.apart_markers['greenmarker']+=1; + break; + } + } + + /** + * 设置地图属性. + * @param {string} block_id 高亮块的ID + * @param {number} M_x为地图横向方格的数目(范围为3-10),初始默认为8 + * @param {number} M_y为地图竖向方格的数目(范围为3-10),初始默认为8 + * @param {number} startPos_x 起点位置的横坐标. + * @param {number} endPos_x 终点位置的横坐标. + * @param {number} endPos_y 终点位置的纵坐标. + */ + var setMap_f=function( M_x , M_y , startPos_x ,startPos_y , endPos_x , endPos_y ) { + Sk.builtin.pyCheckArgs("setMap", arguments, 6, 6); + map=[] + if((M_x<3) || (M_x>20) || (M_y<3) || (M_y>20)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw Error("错误!超出地图可设置范围,请设置横纵方格数大于等于3,小于等于20") + } + M_x = Sk.ffi.remapToJs(M_x); + M_y = Sk.ffi.remapToJs(M_y); + maze_COLS=M_x; + maze_ROWS=M_y; + maze.MAZE_WIDTH= maze_SQUARE_SIZE * maze_COLS; + maze.MAZE_HEIGHT=maze_SQUARE_SIZE * maze_ROWS; + + startPos_x =Sk.ffi.remapToJs(startPos_x)+1 + startPos_y =Sk.ffi.remapToJs(startPos_y)+1 + endPos_x =Sk.ffi.remapToJs(endPos_x)+1 + endPos_y =Sk.ffi.remapToJs(endPos_y)+1 + + if((startPos_x>M_x) || (startPos_x<1) || (startPos_y>M_y) || (startPos_y<1)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw Error("错误!起点坐标超出地图范围!") + } + if((endPos_x>M_x) || (endPos_x<1) || (endPos_y>M_y) || (endPos_y<1)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw Error("错误!终点坐标超出地图范围!") + } + + for (var i=0; i(map[0].length)) || (Pos_x< 0) || (Pos_y+1>(map.length)) || (Pos_y< 0)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw new Sk.builtin.TypeError("错误!放置物坐标超过地图范围"); + }else if((map[Pos_y][Pos_x]==2)||(map[Pos_y][Pos_x]==3)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw new Sk.builtin.TypeError("错误!不能将放置物位置设置在起点或终点坐标!"); + } + + switch(type){ + case "wall"://墙 + map[Pos_y][Pos_x]=maze.SquareType.WALL; + break; + case "coin": + map[Pos_y][Pos_x]=maze.SquareType.AWARD; + break; + case "barrier": + map[Pos_y][Pos_x]=maze.SquareType.BARRIER; + break; + case "redmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER1; + break; + case "yellowmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER2; + break; + case "bluemarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER3; + break; + case "greenmarker": + map[Pos_y][Pos_x]=maze.SquareType.MARKER4; + break; + } + } + mod.placeItem = new Sk.builtin.func(placeItem_f); + + /** + * 在某处随机放置障碍 + * + * @param {number} Pos_x 放置物的x坐标位置. + * @param {number} Pos_y 放置物的y坐标位置. + */ + var randomPlaceBarrier_f=function(Pos_x , Pos_y) { + Sk.builtin.pyCheckArgs("randomPlaceBarrier", arguments, 2, 2); + Pos_x = Sk.ffi.remapToJs(Pos_x)+1; + Pos_y = Sk.ffi.remapToJs(Pos_y)+1; + + if((Pos_x>(map[0].length)) || (Pos_x< 1) || (Pos_y>(map.length)) || (Pos_y< 1)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw new Sk.builtin.TypeError("错误!放置物坐标超过地图范围"); + }else if((map[Pos_y-1][Pos_x-1]==2)||(map[Pos_y-1][Pos_x-1]==3)){ + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw new Sk.builtin.TypeError("错误!不能将放置物位置设置在起点或终点坐标!"); + } + + var numType=Math.random()>0.5?maze.SquareType.OPEN:maze.SquareType.BARRIER; + map[Pos_y-1][Pos_x-1]=numType; + + } + mod.randomPlaceBarrier = new Sk.builtin.func(randomPlaceBarrier_f); + + /** + * 初始化地图 + */ + var initMap_f=function() { + drawMap() + } + mod.initMap = new Sk.builtin.func(initMap_f); + + + mod.Actor = Sk.misceval.buildClass(mod, function($gbl, $loc) { + $loc.__init__ = new Sk.builtin.func(function(self,img , direction) { + img= Sk.ffi.remapToJs(img) || 'pegman'; + if(img=='无可用角色'){ + img='pegman'; + } + switch (img){ + case "pegman": + actor.img='../common/js/skulpt_mixcar/pic/pegman.png';//默认为方格 + actor.type="animate" + break; + case "panda": + actor.img='../common/js/skulpt_mixcar/pic/panda2.png';//设置为管道 + actor.type="animate" + break; + case "astro": + actor.img='../common/js/skulpt_mixcar/pic/astro2.png';//设置为竹子 + actor.type="animate" + break; + case "robot": + actor.img='../common/js/skulpt_mixcar/pic/robot.png';//设置为机器人 + actor.type="still" + break; + case "car": + actor.img='../common/js/skulpt_mixcar/pic/actor_car.png';//设置为小车 + actor.type="animate" + break; + } + + actor.direction = Sk.ffi.remapToJs(direction) || DirectionType.NORTH; + size=[52,49]//[height,width]//size需要根据方格的数目来确定 + actor.coin_point=0 + initPegman() + }); + //get & set:Actor.direction新增函数,获取或设置精灵的方向 + $loc.direction = defineProperty( + function(self) { + return Sk.ffi.remapToPy(actor.direction) + }, + function(self, val) { + Sk.builtin.pyCheckType("direction", "number",Sk.builtin.checkNumber(val.v)); + actor.direction=val.v + }); + //向某个方向移动移动 + //暂时只实现了移动一步 + //func: Actor.moveDirection() + $loc.moveDirection=new Sk.builtin.func(function(self,direction) { + Sk.builtin.pyCheckArgs("moveDirection", arguments, 2,2); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + actor.direction = parseInt(Sk.ffi.remapToJs(direction)); + var command= move(direction) //向某个方向移动 + if(command==false){ + maze.result=ResultType.FAILURE + layer.alert("挑战失败!请修改后重新尝试", { shade: false }) + console.log("错误") + // document.getElementById("side_code").innerText='错误' + //恢复初始样式 + stepplay_btn.attr('onclick','pyengine.steprun();'); + stepplay_btn.css("color","B5D9D5"); + + play_btn.attr('onclick','pyengine.run();'); + play_btn.css("color","B5D9D5"); + + undo_btn.attr('onclick','UndoClick();'); + undo_btn.css("color","B5D9D5"); + + redo_btn.attr('onclick','pyengine.reset();'); + redo_btn.css("color","B5D9D5"); + + sub_btn.attr('onclick','submit();'); + sub_btn.css("color","B5D9D5"); + throw new Sk.builtin.TypeError("挑战失败!请修改后重新尝试"); + } + + if(maze.mlevel==4){//如果是第四关,则需要判断是否需要加油的问题 + //如果左侧存在加油站 + // if((map[actor.y - 1][actor.x])==maze.SquareType.OIL_STATION||(map[actor.y + 1][actor.x])==maze.SquareType.OIL_STATION||(map[actor.y ][actor.x-1])==maze.SquareType.OIL_STATION||(map[actor.y ][actor.x+1])==maze.SquareType.OIL_STATION){ + if((map[actor.y][actor.x-1])==maze.SquareType.OIL_STATION){ + if(actor.oil==0){//在加油站处,如果没有油还想继续往前面走 + maze.result=ResultType.FAILURE + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/no_oil.png') + layer.alert("挑战失败!小车没有油了", { shade: false }) + throw new Sk.builtin.TypeError("挑战失败!小车没有油了"); + } + } + }else if(maze.mlevel==5){//如果是第五关,则需要记录循环次数;每次经过起点处循环次数+1 + if((map[actor.y][actor.x])==maze.SquareType.START){ + actor.circulation_num+=1; + } + }else if(maze.mlevel==6){//如果是第六关,则需要判断红绿灯是否为绿灯的问题 + if(actor.traffic_light==maze.SquareType.LIGHT_RED){ + layer.alert("挑战失败:小车在红灯亮时还未停止!", { shade: false }); + throw new Sk.builtin.TypeError("挑战失败:小车在红灯亮时还未停止!"); + } + } + + switch (command) { + case 'north': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x, actor.y - 1, actor.direction * 4]); + actor.y--; + break; + case 'east': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x + 1, actor.y, actor.direction * 4]); + actor.x++; + break; + case 'south': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x, actor.y + 1, actor.direction * 4]); + actor.y++; + break; + case 'west': + schedule([actor.x, actor.y, actor.direction * 4], + [actor.x - 1, actor.y, actor.direction * 4]); + actor.x--; + break; + } + hasCoin(actor.x,actor.y) + hasMarker(actor.x,actor.y) + if(maze.mlevel==6){//如果是第六关,则需要随机改变红绿灯的颜色 + if((map[actor.y][actor.x+1])==maze.SquareType.LIGHT_RED || (map[actor.y][actor.x+1])==maze.SquareType.LIGHT_GREEN){ + map[actor.y][actor.x+1]=Math.random()>0.5? maze.SquareType.LIGHT_RED:maze.SquareType.LIGHT_GREEN;//随机刷新红绿灯的状态 + actor.traffic_light=map[actor.y][actor.x+1]; + if(actor.traffic_light==maze.SquareType.LIGHT_RED){//图像变为红灯 + d3.select("#lightgreen").remove(); + svg.append('image').attr('id','lightred').attr('x',(actor.x+1) * maze_SQUARE_SIZE-5).attr('y',actor.y * maze_SQUARE_SIZE+5).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/redlight.png') + } + } + } + + var state=checkFinish() + if(state==true){ + resolve(Sk.builtin.none.none$); + }else if(state=="error2"){ + maze.result=ResultType.FAILURE + layer.alert("挑战失败,请检查是否通过所有标记点!", { shade: false }) + console.log("失败") + throw new Sk.builtin.TypeError("挑战失败,请检查是否通过所有标记点!"); + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + $loc.turn=new Sk.builtin.func(function(self,direction){ + Sk.builtin.pyCheckArgs("turn", arguments, 2, 2); + Sk.builtin.pyCheckType("direction", "string", Sk.builtin.checkString(direction)); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + direction=Sk.ffi.remapToJs(direction) + var command=turn(direction) + switch (command) { + case 'left': + schedule([actor.x, actor.y, actor.direction * 4], [actor.x, actor.y, actor.direction * 4 - 4]); + actor.direction = constrainDirection4(actor.direction - 1); + break; + case 'right': + schedule([actor.x, actor.y, actor.direction * 4], [actor.x, actor.y, actor.direction * 4 + 4]); + actor.direction = constrainDirection4(actor.direction + 1); + break; + } + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + $loc.isDone=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isDone", arguments, 1, 1); + var isdone= Sk.ffi.remapToPy(checkFinish()); + return new Sk.ffi.remapToPy(isdone); + }); + $loc.isPath=new Sk.builtin.func(function(self,direction){ + Sk.builtin.pyCheckArgs("isPath", arguments, 2, 2); + Sk.builtin.pyCheckType("direction", "number", Sk.builtin.checkNumber(direction)); + direction=Sk.ffi.remapToJs(direction) + var state=false; + var square=0; + switch (direction) { + case DirectionType.NORTH: + if(map[actor.y - 1]){ + square = map[actor.y - 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.EAST: + if(map[actor.y][actor.x + 1]){ + square = map[actor.y][actor.x + 1]; + }else{ + square = 0 + } + break; + case DirectionType.SOUTH: + if(map[actor.y + 1]){ + square = map[actor.y + 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.WEST: + if(map[actor.y][actor.x - 1]){ + square = map[actor.y][actor.x - 1]; + }else{ + square = 0 + } + break; + }; + state= (square != maze.SquareType.BARRIER) && (square != maze.SquareType.WALL); + return Sk.ffi.remapToPy(state); + }); + //判断某个方向是否存在障碍物 + $loc.isBarrier=new Sk.builtin.func(function(self,direction){ + Sk.builtin.pyCheckArgs("isBarrier", arguments, 2, 2); + Sk.builtin.pyCheckType("direction", "number", Sk.builtin.checkNumber(direction)); + direction=Sk.ffi.remapToJs(direction) + var state=false; + var square=0; + switch (direction) { + case DirectionType.NORTH: + if(map[actor.y - 1]){ + square = map[actor.y - 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.EAST: + if(map[actor.y][actor.x + 1]){ + square = map[actor.y][actor.x + 1]; + }else{ + square = 0 + } + break; + case DirectionType.SOUTH: + if(map[actor.y + 1]){ + square = map[actor.y + 1][actor.x]; + }else{ + square = 0 + } + break; + case DirectionType.WEST: + if(map[actor.y][actor.x - 1]){ + square = map[actor.y][actor.x - 1]; + }else{ + square = 0 + } + break; + }; + state= square == maze.SquareType.BARRIER; + return Sk.ffi.remapToPy(state); + }); + //随机生成小车油量 + $loc.randomOil=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("randomOil", arguments, 1, 1); + actor.oil=Math.random()>0.5?1:0;//随机初始化汽车的油量 + if(actor.oil==0){//没油(呈现少量油的图片) + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/none_oil.png') + }else if(actor.oil==1){//油量充足(呈现油量充足的图片) + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/full_oil.png') + } + }); + //判断是否需要加油 + $loc.isOilFull=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isOilFull", arguments, 1, 1); + if(actor.oil==0){//没油了,返回需要加油为True + return Sk.ffi.remapToPy(true); + }else if(actor.oil==1){//还有油,返回需要加油为False + return Sk.ffi.remapToPy(false); + } + }); + //进加油站加油 + $loc.addOil=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("addOil", arguments, 1, 1); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + Sk.setTimeout(function() { + svg.append('image').attr('id','caroil').attr('x',maze_SQUARE_SIZE).attr('y',3.5 * maze_SQUARE_SIZE).attr('width',maze_SQUARE_SIZE).attr('height',maze_SQUARE_SIZE) + .attr('xlink:href','../common/js/skulpt_mixcar/pic/full_oil.png') + actor.oil=1//油量充足 + resolve(Sk.builtin.none.none$); + }, 800); + })); + }); + $loc.getPoint=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("getPoint", arguments, 1, 1); + var point= actor.coin_point; + return Sk.ffi.remapToPy(point); + }); + //判断信号灯是否为绿灯? + $loc.isLightGreen=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isLightGreen", arguments, 1, 1); + if(actor.traffic_light==maze.SquareType.LIGHT_GREEN){//绿灯,返回 true + return Sk.ffi.remapToPy(true); + }else if(actor.traffic_light==maze.SquareType.LIGHT_RED){//红灯,返回false + return Sk.ffi.remapToPy(false); + } + }); + //检查循环的次数是否正确 + $loc.isCirculationRight=new Sk.builtin.func(function(self){ + Sk.builtin.pyCheckArgs("isCirculationRight", arguments, 1, 1); + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + var mlevel=maze.mlevel;//获取当前关卡序数 + var state=false; + switch (mlevel){ + case 5://第五关 + state=actor.circulation_num==3?true:false; + break; + case 6://第六关 + if(actor.traffic_light==maze.SquareType.LIGHT_GREEN){//如果是绿灯,则怎么都算失败 + state=false; + }else if(actor.traffic_light==maze.SquareType.LIGHT_RED){//如果是红灯 + for (var y = 0; y < maze.map.length; y++) { + for (var x = 0; x < maze.map[0].length; x++) { + if(maze.map[y][x]==maze.SquareType.LIGHT_RED){ + if((actor.x+1)==x|| (actor.y)==y){//如果小车停的位置在红绿灯的左边,则挑战成功 + state=true; + } + } + } + } + } + break; + } + if(state==true){ + // setTimeout(function() { + // layer.alert("挑战成功!", { shade: false }); + // },1000) + // getFinishState_f(state) + // resolve(Sk.builtin.none.none$); + }else{ + maze.result=ResultType.FAILURE + layer.alert("挑战失败,请检查循环次数是否正确!", { shade: false }) + console.log("失败") + throw new Sk.builtin.TypeError("挑战失败,请检查循环次数是否正确!"); + } + })) + }); + //判断是否经过某种颜色的标记 + $loc.checkMarker=new Sk.builtin.func(function(self,marker){ + Sk.builtin.pyCheckArgs("checkMarker", arguments, 2, 2); + marker=Sk.ffi.remapToJs(marker); + var marker_num=actor.apart_markers[marker]; + if(marker_num==0){ + return Sk.ffi.remapToPy(false); + }else{ + return Sk.ffi.remapToPy(true); + } + }); + //返回经过某种颜色标记的数目 + $loc.getMarkerNum=new Sk.builtin.func(function(self,marker){ + Sk.builtin.pyCheckArgs("getMarkerNum", arguments, 2, 2); + marker=Sk.ffi.remapToJs(marker); + var marker_num=actor.apart_markers[marker]; + return Sk.ffi.remapToPy(marker_num); + }) + }, "Actor") + + /** + * 初始化为设定好的地图 + * + * @param {number} level 初始化地图,level为地图的等级. + */ + var settedMap_f=function(level) { + level=Sk.ffi.remapToJs(level) + maze=MAZE_setted[level] + map=MAZE_setted[level].map + drawMap() + } + mod.settedMap = new Sk.builtin.func(settedMap_f); + + /** + * 初始化为设定好的简单的迷宫地图 + * + * @param {number} level 初始化地图,level为地图的等级. + */ + var settedSimpleMap_f=function(level) { + level=Sk.ffi.remapToJs(level) + map=simple_Maze[level].map + maze_ROWS=map.length; + maze_COLS=map[0].length; + // if(level==6 || level==7){ + // maze.tiles=simple_Maze[level].tiles + // maze.background=simple_Maze[level].background + // }else{ + maze.tiles=simple_map_para.tiles + maze.wall=simple_map_para.wall + maze.background=simple_map_para.background + // } + simple_map_para.state_num=1 + drawMap() + } + mod.settedSimpleMap = new Sk.builtin.func(settedSimpleMap_f); + + /** + * 初始化为设定好的简单的迷宫地图 + * + * @return {boolean} 检测小人执行最后一个指令后是否到达终点,如果到达终点,返回True,否则返回False. + */ + var getFinishState_f=function(state){ + var state=checkFinish() + var state_str="" + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + if(state){ + state_str="成功" + setTimeout(function() { + layer.alert("挑战成功!", { shade: false }); + console.log("成功") + },1000); + + }else{ + state_str="失败" + setTimeout(function() { + console.log("失败") + },1000) + } + if(simple_map_para.state_num==1){//对于已经激活的、已经预设的迷宫关卡 + resolve(Sk.ffi.remapToPy(state_str)); + }else{ + resolve(Sk.ffi.remapToPy("")); + } + + })) + } + mod.getFinishState = new Sk.builtin.func(getFinishState_f); + + return mod; +} diff --git a/mixly/common/js/skulpt_mixtoy/engine.js b/mixly/common/js/skulpt_mixtoy/engine.js new file mode 100644 index 00000000..ec01f94c --- /dev/null +++ b/mixly/common/js/skulpt_mixtoy/engine.js @@ -0,0 +1,1598 @@ +var externalLibs = {//外部引入的第三方库 + "./blocklygame/__init__.js": "../common/js/skulpt_mixtoy/bg_highlight1.js", + "./blocktool/__init__.js": "../common/js/skulpt_mixtoy/inittool.js", + "./bg_nonehl/__init__.js":"../common/js/skulpt_mixtoy/bg_nonehl1.js", + "./bg_noanimation/__init__.js":"../common/js/skulpt_mixtoy/bg_noanimation1.js" +}; +// document.write(""); +/** + * An object for executing Python code and passing the results along to interested components. + * + * @constructor + * @this {BlockPyEditor} + * @param {Object} main - The main BlockPy instance + * @param {HTMLElement} tag - The HTML object this is attached to. + */ +var PyEngine = function(programStatus, mixpyProject) { + this.loadEngine(); + this.programStatus = programStatus; + this.mixpyProject = mixpyProject; +} + +/** + * Definable function to be run when execution has fully ended, + * whether it succeeds or fails. + * + */ +PyEngine.prototype.onExecutionEnd = null; + +/** + * Helper function that will attempt to call the defined onExecutionEnd, + * but will do nothing if there is no function defined. + */ +PyEngine.prototype.executionEnd_ = function() { + if (this.onExecutionEnd !== null) { + this.onExecutionEnd(); + } +}; + +/** + * Initializes the Python Execution engine and the Printer (console). + */ +PyEngine.prototype.loadEngine = function() { + var engine = this; + // No connected services + Sk.connectedServices = {} + // TODO + //Sk.console = printer.getConfiguration(); + // Definitely use a prompt + Sk.inputfunTakesPrompt = true; + + // Keeps track of the tracing while the program is executing; destroyed afterwards. + this.executionBuffer = {}; +} + +/** + * Used to access Skulpt built-ins. This is pretty generic, taken + * almost directly from the Skulpt docs. + * + * @param {String} filename - The python filename (e.g., "os" or "pprint") that will be loaded. + * @returns {String} The JavaScript source code of the file (weird, right?) + * @throws Will throw an error if the file isn't found. + */ +PyEngine.prototype.readFile = function(file) { + console.log("Attempting file: " + Sk.ffi.remapToJs(file)); + // 加载模块 + if (PyGameZero.matchModelName(file)) { + return PyGameZero.load(file) + } + if (externalLibs[file] !== undefined) { + return Sk.misceval.promiseToSuspension( + fetch(externalLibs[file]).then( + function (resp){ return resp.text(); } + )); + } + if (Sk.builtinFiles === undefined || Sk.builtinFiles.files[file] === undefined) { + throw "File not found: '" + file + "'"; + } + return Sk.builtinFiles.files[file]; +} + +PyEngine.prototype.fileread = function(filename, mode) { + if(this.mixpyProject.exist(filename)){ + return this.mixpyProject.getFileContent(filename); + }else{ + if(mode.indexOf('w') !== -1){ + this.mixpyProject.add(filename, '', 1); + return ''; + }else + return null; + } +} + +PyEngine.prototype.filewrite = function(fileItem, str) { + var filename = fileItem.name; + this.mixpyProject.modify(filename, str); + this.mixpyProject.select(filename); +} + +PyEngine.prototype.skInput = function(prompt) { + return new Promise((resolve, reject) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + var currText = statusBarTerminal.getValue(); + if (currText.lastIndexOf('\n') !== currText.length - 1) + statusBarTerminal.addValue('\n>>>' + prompt); + else + statusBarTerminal.addValue('>>>' + prompt); + const { editor } = statusBarTerminal; + const { selection } = editor; + editor.setReadOnly(false); + const session = editor.getSession(); + const initRow = session.getLength(); + editor.gotoLine(initRow); + selection.moveCursorLineEnd(); + const initCursor = selection.getCursor(); + const cursorCallback = session.selection.on('changeCursor', function (e) { + const cursor = selection.getCursor(); + if (cursor.row < initCursor.row) + selection.moveCursorTo(initCursor.row, initCursor.column, true); + else if (cursor.row === initCursor.row + && cursor.column <= initCursor.column) + selection.moveCursorTo(initCursor.row, initCursor.column, true); + let endRowStr = session.getLine(cursor.row - 1); + if (endRowStr.indexOf('>>>') !== -1 + && cursor.row === initCursor.row + 1 + && cursor.column === 0) { + endRowStr = endRowStr.replace('>>>' + prompt, ''); + session.selection.removeEventListener('changeCursor', cursorCallback); + selection.moveCursorLineEnd(); + editor.setReadOnly(true); + resolve(endRowStr); + } else { + const nowRow = session.getLength(); + if (nowRow !== initRow) { + session.selection.removeEventListener('changeCursor', cursorCallback); + editor.setReadOnly(true); + resolve(''); + } + } + }); + }); +} + +/** + * Resets the state of the execution engine, including reinitailizing + * the execution buffer (trace, step, etc.), reseting the printer, and + * hiding the trace button. + * + */ +PyEngine.prototype.reset = function() { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + //点击取消按钮发送数据 + Sk.execLimit = 0; + Sk.execLimit = Number.POSITIVE_INFINITY; + //$("#side_code").text(''); + //$("#blocklySVG").empty(); + statusBarTerminal.setValue(''); +} + +PyEngine.prototype.kill = function(type) { + // event_save('kill'); + //点击取消按钮发送数据 + Sk.execLimit = 0; + $("#loading").css('display', "none"); + if (document.getElementById("img01")) { + document.getElementById("img01").src=""; + } +} + +/** + * "Steps" the execution of the code, meant to be used as a callback to the Skulpt + * environment. + * + * @param {Object} variables - Hash that maps the names of variables (Strings) to their Skulpt representation. + * @param {Number} lineNumber - The corresponding line number in the source code that is being executed. + * @param {Number} columnNumber - The corresponding column number in the source code that is being executed. Think of it as the "X" position to the lineNumber's "Y" position. + * @param {String} filename - The name of the python file being executed (e.g., "__main__.py"). + * @param {String} astType - Unused? TODO: What is this? + * @param {String} ast - String-encoded JSON representation of the AST node associated with this element. + */ +PyEngine.prototype.step = function(variables, lineNumber, + columnNumber, filename, astType, ast) { + if (filename == '.py') { + var currentStep = this.executionBuffer.step; + var globals = this.parseGlobals(variables); + this.executionBuffer.trace.push( + {'step': currentStep, + 'filename': filename, + //'block': highlightMap[lineNumber-1], + 'line': lineNumber, + 'column': columnNumber, + 'properties': globals.properties, + 'modules': globals.modules}); + this.executionBuffer.step = currentStep+1; + this.executionBuffer.last_step = currentStep+1; + this.executionBuffer.line_number = lineNumber; + } +} + +/** + * Runs the AbstractInterpreter to get some static information about the code, + * in particular the variables' types. This is needed for type checking. + * + * @returns {Object} Maps variable names (as Strings) to types as constructed by the AbstractIntepreter. + */ +PyEngine.prototype.analyzeVariables = function() { + // Get the code + var code = this.main.model.programs['__main__'](); + if (code.trim() == "") { + return {}; + } + + var analyzer = new AbstractInterpreter(code); + report = analyzer.report; + return analyzer.variableTypes; +} + +/** + * Runs the AbstractInterpreter to get some static information about the code, + * including potential semantic errors. It then parses that information to give + * feedback. + * + * @returns {Boolean} Whether the code was successfully analyzed. + */ +PyEngine.prototype.analyze = function() { + this.main.model.execution.status("analyzing"); + + var feedback = this.main.components.feedback; + + // Get the code + var code = this.main.model.programs['__main__'](); + if (code.trim() == "") { + this.main.components.feedback.emptyProgram("You haven't written any code yet!"); + //this.main.model.feedback.status("semantic"); + return false; + } + + var analyzer = new AbstractInterpreter(code); + this.main.model.execution.ast = analyzer.ast; + + report = analyzer.report; + // Syntax error + if (report.error !== false) { + console.log(report.error.args.v) + var codeLine = '.'; + if (report.error.args.v.length > 3) { + codeLine = ', where it says:
'+report.error.args.v[3][2]+''; + } + this.main.reportError('editor', report.error, "While attempting to process your Python code, I found a syntax error. In other words, your Python code has a mistake in it (e.g., mispelled a keyword, bad indentation, unnecessary symbol). You should check to make sure that you have written all of your code correctly. To me, it looks like the problem is on line "+ report.error.args.v[2]+codeLine, report.error.args.v[2]); + return false; + } + + if (report["Unconnected blocks"].length >= 1) { + var variable = report['Unconnected blocks'][0]; + feedback.semanticError("Unconnected blocks", "It looks like you have unconnected blocks on line "+variable.position.line+". Before you run your program, you must make sure that all of your blocks are connected and that there are no unfilled holes.", variable.position.line) + return false; + } else if (report['Iteration variable is iteration list'].length >= 1) { + var variable = report['Iteration variable is iteration list'][0]; + feedback.semanticError("Iteration Problem", "The property "+variable.name+" was iterated on line "+variable.position.line+", but you used the same variable as the iteration variable. You should choose a different variable name for the iteration variable. Usually, the iteration variable is the singular form of the iteration list (e.g., for dog in dogs:).", variable.position.line) + return false; + } else if (report["Undefined variables"].length >= 1) { + var variable = report["Undefined variables"][0]; + feedback.semanticError("Initialization Problem", "The property "+variable.name+" was read on line "+variable.position.line+", but it was not given a value on a previous line. You cannot use a property until it has been initialized.", variable.position.line) + return false; + } else if (report["Possibly undefined variables"].length >= 1) { + var variable = report["Possibly undefined variables"][0]; + feedback.semanticError("Initialization Problem", "The property "+variable.name+" was read on line "+variable.position.line+", but it was possibly not given a value on a previous line. You cannot use a property until it has been initialized. Check to make sure that this variable was declared in all of the branches of your decision.", variable.position.line); + return false; + } else if (report["Unread variables"].length >= 1) { + var variable = report["Unread variables"][0]; + feedback.semanticError("Unused Property", "The property "+variable.name+" was set, but was never used after that.", null) + return false; + } else if (report["Overwritten variables"].length >= 1) { + var variable = report["Overwritten variables"][0]; + feedback.semanticError("Overwritten Property", "The property "+variable.name+" was set, but before it could be read it was changed on line "+variable.position.line+". It is unnecessary to change an existing variable's value without reading it first.", variable.position.line) + return false; + } else if (report["Empty iterations"].length >= 1) { + var variable = report["Empty iterations"][0]; + feedback.semanticError("Iterating over empty list", "The property "+variable.name+" was set as an empty list, and then you attempted to iterate over it on "+variable.position.line+". You should only iterate over non-empty lists.", variable.position.line) + return false; + } else if (report["Non-list iterations"].length >= 1) { + var variable = report["Non-list iterations"][0]; + feedback.semanticError("Iterating over non-list", "The property "+variable.name+" is not a list, but you attempted to iterate over it on "+variable.position.line+". You should only iterate over non-empty lists.", variable.position.line) + return false; + } else if (report["Incompatible types"].length >= 1) { + var variable = report["Incompatible types"][0]; + feedback.semanticError("Incompatible types", "You attempted to "+variable.operation+" a "+variable.left.type+" and a "+variable.right.type+" on line "+variable.position.line+". But you can't do that with that operator. Make sure both sides of the operator are the right type.", variable.position.line) + return false; + } + + return true; +} + +var GLOBAL_VALUE; + + +/** + * Runs the given python code, resetting the console and Trace Table. + * 分步调试代码 + */ +PyEngine.prototype.steprun = function(type) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.show(); + if (!$('#skulpt-img').length) { + $('body').append($( + `` + )); + } + var xml = Blockly.Xml.workspaceToDom(Mixly.Editor.blockEditor); + var data = Blockly.Xml.domToText(xml); + if (document.getElementById("boardSelector").value == ""){ + var fn = 'filename.xml' + }else{ + var fn = document.getElementById("boardSelector").value + '.xml' + } + + window.actionArrayRecord = []; + $("#blocklySVG").empty(); + $("#loading").css('display', "inline-block"); + + // Reset everything + this.reset(); + + //SK设置 + this.loadEngine(); + // Major Skulpt configurations + Sk.configure({ + // Function to handle the text outputted by Skulpt + //设置文本输出 + output: function(lineText){ + statusBarTerminal.addValue(lineText); + }, + // Function to handle loading in new files + read: this.readFile.bind(this), + inputfun:this.skInput.bind(this), + inputfunTakesPrompt: true, + execLimit:Number.POSITIVE_INFINITY, + fileread:this.fileread.bind(this), + filewrite:this.filewrite.bind(this), + __future__: Sk.python3,//python3已成默认值,要使用python2需要单独设置 + }); + + Sk.builtins.value = new Sk.builtin.func(function() { + return Sk.ffi.remapToPy(GLOBAL_VALUE === undefined ? 5 : GLOBAL_VALUE); + }); + Sk.builtins.set_value = new Sk.builtin.func(function(v) { + GLOBAL_VALUE = v.v; + }); + + // Get the code + var code = Mixly.MFile.getCode(); + //如果存在游戏模块,则只能读取模块代码 + if ((code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + code = Blockly.Python.workspaceToCode(Mixly.Editor.blockEditor) || '';//code + code+="\nprint(blocklygame.getFinishState())" + } + + var engine = this; + if(code === "") { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + statusBarTerminal.setValue('==无程序需运行==\n'); + return; + } + + var pack_num = 0; + //检验是否有数据分析、机器学习相关的模块 + var pack_list = ["numpy","pandas","scikit-learn","matplotlib"]; + var code_pack_list = []; + for (var i = 0; i < pack_list.length; i++) { + if ((code.indexOf("import "+pack_list[i])!=-1)||(code.indexOf("from "+pack_list[i]+" import")!=-1)){ + pack_num++; + code_pack_list.push(pack_list[i]) + } + } + + //检验是否存在pygame-zero模块 + var pyzrun_pack="pgzrun" + var ifpgzrun=false; + if ((code.indexOf("import "+pyzrun_pack)!=-1)||(code.indexOf("from "+pyzrun_pack+" import")!=-1)){ + ifpgzrun=true; + } + + if (this.layerNum && this.layerSize) { + this.layerSize.content = [ + $('#skulpt-img').width(), + $('#skulpt-img').height(), + ]; + } + + if(code_pack_list.includes('matplotlib')){ + document.getElementById("mat_div").style.height='100%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + $("#matplot_img").css('width', this?.layerSize?.content[0] ?? ($('body').width() / 2 + 'px')); + $("#matplot_img").css('height',this?.layerSize?.content[1] ?? ($('body').height() * 0.7 - 30 + 'px')); + } + + //如果存在pygame-zero,则进行相关的配置 + if(ifpgzrun){ + document.getElementById("mat_div").style.height='0%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='100%' + const Sk = window.Sk; + Sk.TurtleGraphics.reset && Sk.TurtleGraphics.reset() + Sk.TurtleGraphics.target = "pggame_stage"; + Sk.TurtleGraphics.width = (this?.layerSize?.content[0] ?? ($('body').width() / 2) - 30) - 5; + Sk.TurtleGraphics.height = (this?.layerSize?.content[1] ?? ($('body').height() * 0.7 - 40)) - 5; + + const PyGameZero = window.PyGameZero; + const stageSize = {width: 0, height: 0}; + const stageEl = document.getElementById("pggame_stage"); + // 配置容器 + stageSize.width = $('#pggame_stage').width() - 50; + stageSize.height = $('#pggame_stage').height() - 50; + PyGameZero.setContainer(stageEl) + PyGameZero.reset(); + + } + + //检验是否存在pygame-zero模块 + var bg_nonehl_pack="blocklygame" + var ifbg_nonehl=false; + if ((code.indexOf("import "+bg_nonehl_pack)!=-1)||(code.indexOf("from "+bg_nonehl_pack+" import")!=-1)){ + ifbg_nonehl=true; + } + + //如果存在bg_nonehl,则进行相关的配置 + if(ifbg_nonehl){ + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + document.getElementById("blocklySVG").style.height='100%' + } + + // event_save('steprun'); + + if (ifpgzrun || ifbg_nonehl) { + const _this = this; + this.layerNum = Mixly.LayerExt.open({ + title: [Mixly.Msg.Lang['显示'], '30px'], + shade: 0, + offset: 'rt', + area: _this?.layerSize?.layero ?? ['50%', '70%'], + max: [$('body').width() + 'px', $('body').height() + 'px'], + fixed: false, + content: $('#skulpt-img'), + resizing: function(size) { + _this.layerSize = size; + }, + end: function() { + _this.layerNum = null; + pyengine.kill(); + } + }); + } + //已经读取了代码:code + // Actually run the python code + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, code, true); + }); + executionPromise.then( + function (module) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + // Run the afterSingleExecution one extra time for final state + /*Sk.afterSingleExecution(module.$d, -1, 0, ".py"); + engine.check(code, execution.trace(), execution.output(), execution.ast, module.$d); + engine.executionEnd_(); + */ + statusBarTerminal.addValue('==程序运行完成==\n'); + console.log('success'); + }, + function(error) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + + var original = prettyPrintError(error); + //hack for kill program with time limiterror + if(original.indexOf("TimeLimitError") !== -1) + return; + if($('.inputMsg').length > 0) + $('#side_code').text($('#side_code').text() + $('.inputMsg').val()) + + // var $errorE = $('').addClass('errorMsg').html(original); + // $("#side_code").append($errorE) + statusBarTerminal.addValue(original); + var matchRet = /on line (\d+)/.exec(original); + var lineNumber = -1; + if(matchRet !== null && matchRet.length == 2){ + lineNumber = parseInt(matchRet[1]) - 1; + editor.session.addMarker(new EditorRange(lineNumber, 0, lineNumber, 1), "errorMarker", "fullLine"); + editor.hasMarker = true; + } + engine.executionEnd_(); + console.log(error.toString()); + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue(error.toString() + '\n==程序运行完成==\n'); + } +); + +} + +/** + * Runs the given python code, resetting the console and Trace Table. + * 直接运行,不分步高亮显示 + */ + PyEngine.prototype.run = function(type) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.show(); + if (!$('#skulpt-img').length) { + $('body').append($( + `` + )); + } + var xml = Blockly.Xml.workspaceToDom(Mixly.Editor.blockEditor); + var data = Blockly.Xml.domToText(xml); + if (document.getElementById("boardSelector").value == ""){ + var fn = 'filename.xml' + }else{ + var fn = document.getElementById("boardSelector").value + '.xml' + } + + window.actionArrayRecord = []; + $("#blocklySVG").empty(); + $("#loading").css('display', "inline-block"); + + + /*if(sidecodeDisplay === false){ + sidecodeClick(); + }*/ + // Reset everything + this.reset(); + + //SK设置 + this.loadEngine(); + // Major Skulpt configurations + Sk.configure({ + // Function to handle the text outputted by Skulpt + //设置文本输出 + output: function(lineText){ + statusBarTerminal.addValue(lineText); + }, + // Function to handle loading in new files + read: this.readFile.bind(this), + inputfun:this.skInput.bind(this), + inputfunTakesPrompt: true, + execLimit:Number.POSITIVE_INFINITY, + fileread:this.fileread.bind(this), + filewrite:this.filewrite.bind(this), + __future__: Sk.python2,//python3已成默认值,要使用python2需要单独设置 + }); + + Sk.builtins.value = new Sk.builtin.func(function() { + return Sk.ffi.remapToPy(GLOBAL_VALUE === undefined ? 5 : GLOBAL_VALUE); + }); + Sk.builtins.set_value = new Sk.builtin.func(function(v) { + GLOBAL_VALUE = v.v; + }); + // event_save('run'); + // Get the code + var code = Mixly.MFile.getCode(); + if(code === "") { + this.programStatus['running'] = false; + $("#loading").css('display', "none"); + statusBarTerminal.setValue('==无程序需运行==\n'); + return; + } + //如果存在游戏模块,则只能读取模块代码 + if ((code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + code = Blockly.Python.workspaceToCode(Mixly.Editor.blockEditor) || '';//code + code+="\nprint(blocklygame.getFinishState())" + } + //改为只读区代码区的代码,这样就能够消除高亮执行 + if ((code.indexOf("import blocktool")!=-1)||(code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + //正则匹配替换block id元素 + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + var target=""; + var re=/,?'block_id=[\s\S]*'/.exec(code_piece[i]); + if(re!=null){ + target=re[0]; + code_piece[i]=code_piece[i].replace(target,""); + } + } + //检查是否是高亮辅助块\toll,如果是,则将此行代码移除 + if((code_piece[i].indexOf("import blocktool") >= 0) || (code_piece[i].indexOf("blocktool.highlight") >= 0) ){ + code_piece[i]="delete"; + } + //如果使用的是分步调试的blocklygame,要将其换成非分步调试的模块bg_nonehl + if((code_piece[i].indexOf("blocklygame") >= 0)){ + code_piece[i]=code_piece[i].replace("blocklygame","bg_nonehl"); + } + + } + code="" + for(var i=0;i= 0){//处理print函数中的end + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + if(code_piece[i].indexOf(",end") >= 0 ){ + var target=""; + var re=/,end =([\s\S]*)\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + target=/['"]([\s\S]*)['"]/.exec(target)[0] + code_piece[i]=code_piece[i].replace(/,end =([\s\S]*)\)$/,")"+";print("+target+");"); + } + //console.log(code_piece[i]) + }else{ + var target=""; + var re=/\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + // code_piece[i]=code_piece[i].replace(/\)$/,"+'\\n'"+target) + code_piece[i]=code_piece[i].replace(/\)$/,target+";"); + } + //console.log(code_piece[i]) + } + } + } + code_new=code_piece.join("\n"); + //console.log(code_new) + code=code_new + } + + if(code_pack_list.includes('matplotlib')){ + document.getElementById("mat_div").style.height='100%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + $("#matplot_img").css('width', this?.layerSize?.content[0] ?? ($('body').width() / 2 + 'px')); + $("#matplot_img").css('height',this?.layerSize?.content[1] ?? ($('body').height() - 30 + 'px')); + } + + //如果存在pygame-zero,则进行相关的配置 + if(ifpgzrun){ + document.getElementById("mat_div").style.height='0%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='100%' + + const Sk = window.Sk; + Sk.TurtleGraphics.reset && Sk.TurtleGraphics.reset() + Sk.TurtleGraphics.target = "pggame_stage"; + Sk.TurtleGraphics.width = (this?.layerSize?.content[0] ?? ($('body').width() / 2) - 30) - 5; + Sk.TurtleGraphics.height = (this?.layerSize?.content[1] ?? ($('body').height() - 35)) - 5; + + const PyGameZero = window.PyGameZero; + const stageSize = {width: 0, height: 0}; + const stageEl = document.getElementById("pggame_stage"); + // 配置容器 + stageSize.width = $('#pggame_stage').width() - 50; + stageSize.height = $('#pggame_stage').height() - 50; + PyGameZero.setContainer(stageEl) + PyGameZero.reset(); + } + + //如果存在bg_nonehl,则进行相关的配置 + if(ifbg_nonehl){ + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + document.getElementById("blocklySVG").style.height='100%' + } + + if (ifpgzrun || ifbg_nonehl) { + const _this = this; + this.layerNum = Mixly.LayerExt.open({ + title: [Mixly.Msg.Lang['显示'], '30px'], + shade: 0, + offset: 'rt', + area: _this?.layerSize?.layero ?? ['50%', '70%'], + max: [$('body').width() + 'px', $('body').height() + 'px'], + fixed: false, + content: $('#skulpt-img'), + resizing: function(size) { + _this.layerSize = size; + }, + end: function() { + _this.layerNum = null; + pyengine.kill(); + } + }); + } + + //已经读取了代码:code + // Actually run the python code + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, code, true); + }); + executionPromise.then( + function (module) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + // Run the afterSingleExecution one extra time for final state + /*Sk.afterSingleExecution(module.$d, -1, 0, ".py"); + engine.check(code, execution.trace(), execution.output(), execution.ast, module.$d); + engine.executionEnd_(); + */ + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + window.userOpEvents && window.userOpEvents.addRecord({ + operation: 'run-success' + }); + window.userEvents && window.userEvents.addRecord({ + operation: 'run-success' + }); + statusBarTerminal.addValue(`==${Mixly.Msg.Lang['shell.finish']}==\n`); + }, + function(error) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + + var original = prettyPrintError(error); + //hack for kill program with time limiterror + if(original.indexOf("TimeLimitError") !== -1) + return; + + var $errorE = $('').addClass('errorMsg').html(original); + // $("#side_code").append($errorE) + statusBarTerminal.addValue(original); + var matchRet = /on line (\d+)/.exec(original); + var lineNumber = -1; + if(matchRet !== null && matchRet.length == 2){ + lineNumber = parseInt(matchRet[1]) - 1; + editor.session.addMarker(new EditorRange(lineNumber, 0, lineNumber, 1), "errorMarker", "fullLine"); + editor.hasMarker = true; + } + engine.executionEnd_(); + console.log(error.toString()); + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue(error.toString() + '\n'); + window.userOpEvents && window.userOpEvents.addRecord({ + operation: 'run-error' + }); + window.userEvents && window.userEvents.addRecord({ + operation: 'run-error' + }); + statusBarTerminal.addValue(`==${Mixly.Msg.Lang['shell.finish']}==\n`); + } +); + +} + +//提交代码:先运行代码,返回运行结果,然后提交 +PyEngine.prototype.run2 = function(type) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + var xml = Blockly.Xml.workspaceToDom(Mixly.Editor.blockEditor); + var data = Blockly.Xml.domToText(xml); + if (document.getElementById("boardSelector").value == ""){ + var fn = 'filename.xml' + }else{ + var fn = document.getElementById("boardSelector").value + '.xml' + } + + layer.closeAll('page'); + window.actionArrayRecord = []; + $("#blocklySVG").empty(); + $("#loading").css('display', "inline-block"); + + + /*if(sidecodeDisplay === false){ + sidecodeClick(); + }*/ + // Reset everything + this.reset(); + + //SK设置 + this.loadEngine(); + // Major Skulpt configurations + Sk.configure({ + // Function to handle the text outputted by Skulpt + //设置文本输出 + output: function(lineText){ + statusBarTerminal.addValue(lineText); + }, + // Function to handle loading in new files + read: this.readFile.bind(this), + inputfun:this.skInput.bind(this), + inputfunTakesPrompt: true, + execLimit:Number.POSITIVE_INFINITY, + fileread:this.fileread.bind(this), + filewrite:this.filewrite.bind(this), + __future__: Sk.python2,//python3已成默认值,要使用python2需要单独设置 + }); + + Sk.builtins.value = new Sk.builtin.func(function() { + return Sk.ffi.remapToPy(GLOBAL_VALUE === undefined ? 5 : GLOBAL_VALUE); + }); + Sk.builtins.set_value = new Sk.builtin.func(function(v) { + GLOBAL_VALUE = v.v; + }); + // Get the code + var code = Mixly.MFile.getCode(); + //如果存在游戏模块,则只能读取模块代码 + if ((code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + code = Blockly.Python.workspaceToCode(Mixly.Editor.blockEditor) || '';//code + code+="\nprint(blocklygame.getFinishState())" + } + //改为只读区代码区的代码,这样就能够消除高亮执行 + if ((code.indexOf("import blocktool")!=-1)||(code.indexOf("import blocklygame")!=-1)||(code.indexOf("from blocklygame import")!=-1)){ + //正则匹配替换block id元素 + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + var target=""; + var re=/,?'block_id=[\s\S]*'/.exec(code_piece[i]); + if(re!=null){ + target=re[0]; + code_piece[i]=code_piece[i].replace(target,""); + } + } + //检查是否是高亮辅助块\toll,如果是,则将此行代码移除 + if((code_piece[i].indexOf("import blocktool") >= 0) || (code_piece[i].indexOf("blocktool.highlight") >= 0) ){ + code_piece[i]="delete"; + } + //如果使用的是分步调试的blocklygame,要将其换成非分步调试的模块bg_nonehl + if((code_piece[i].indexOf("blocklygame") >= 0)){ + code_piece[i]=code_piece[i].replace("blocklygame","bg_noanimation"); + } + + } + code="" + for(var i=0;i= 0){//处理print函数中的end + var code_piece=[]; + code_piece=code.split("\n"); + for(var i=0;i= 0 ){ + if(code_piece[i].indexOf(",end") >= 0 ){ + var target=""; + var re=/,end =([\s\S]*)\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + target=/['"]([\s\S]*)['"]/.exec(target)[0] + code_piece[i]=code_piece[i].replace(/,end =([\s\S]*)\)$/,")"+";print("+target+");"); + } + //console.log(code_piece[i]) + }else{ + var target=""; + var re=/\)$/.exec(code_piece[i]) + if(re!=null){ + target=re[0]; + // code_piece[i]=code_piece[i].replace(/\)$/,"+'\\n'"+target) + code_piece[i]=code_piece[i].replace(/\)$/,target+";print('\\n');"); + } + //console.log(code_piece[i]) + } + } + } + code_new=code_piece.join("\n"); + //console.log(code_new) + code=code_new + } + + if(code_pack_list.includes('matplotlib')){ + document.getElementById("mat_div").style.height='100%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='0%' + $("#matplot_img").css('width','450px'); + $("#matplot_img").css('height','450px'); + } + + //如果存在pygame-zero,则进行相关的配置 + if(ifpgzrun){ + document.getElementById("mat_div").style.height='0%' + document.getElementById("output_img").style.height='0%' + document.getElementById("pggame_stage").style.height='100%' + + const Sk = window.Sk; + Sk.TurtleGraphics.reset && Sk.TurtleGraphics.reset() + Sk.TurtleGraphics.target = "pggame_stage"; + Sk.TurtleGraphics.width = $('#pggame_stage').width() - 50 + Sk.TurtleGraphics.height = $('#pggame_stage').height() - 50 + + const PyGameZero = window.PyGameZero; + const stageSize = {width: 0, height: 0}; + const stageEl = document.getElementById("pggame_stage"); + // 配置容器 + stageSize.width = $('#pggame_stage').width() - 50; + stageSize.height = $('#pggame_stage').height() - 50; + PyGameZero.setContainer(stageEl) + PyGameZero.reset(); + + } + console.log(code) + + //已经读取了代码:code + // Actually run the python code + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, code, true); + }); + executionPromise.then( + function (module) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + // Run the afterSingleExecution one extra time for final state + /*Sk.afterSingleExecution(module.$d, -1, 0, ".py"); + engine.check(code, execution.trace(), execution.output(), execution.ast, module.$d); + engine.executionEnd_(); + */ + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue('==程序运行完成==\n'); + console.log('success'); + }, + function(error) { + engine.programStatus['running'] = false; + $("#loading").css('display', "none"); + + var original = prettyPrintError(error); + //hack for kill program with time limiterror + if(original.indexOf("TimeLimitError") !== -1) + return; + if($('.inputMsg').length > 0) + $('#side_code').text($('#side_code').text() + $('.inputMsg').val()) + + var $errorE = $('').addClass('errorMsg').html(original); + // $("#side_code").append($errorE) + statusBarTerminal.addValue(original); + var matchRet = /on line (\d+)/.exec(original); + var lineNumber = -1; + if(matchRet !== null && matchRet.length == 2){ + lineNumber = parseInt(matchRet[1]) - 1; + editor.session.addMarker(new EditorRange(lineNumber, 0, lineNumber, 1), "errorMarker", "fullLine"); + editor.hasMarker = true; + } + engine.executionEnd_(); + console.log(error.toString()); + const nowValue = statusBarTerminal.getValue(); + if (nowValue.lastIndexOf('\n') !== nowValue.length - 1) { + statusBarTerminal.addValue('\n'); + } + statusBarTerminal.addValue(error.toString() + '\n==程序运行完成==\n'); + } +); + +} + + +/** + * Indents the given string by 4 spaces. This correctly handles multi-line strings. + * + * @param {String} str - The string to be manipulated. + * @returns {String} The string with four spaces added at the start of every new line. + */ +function indent(str) { + return str.replace(/^(?=.)/gm, ' '); +} + +function prettyPrintError (error) { + if (typeof error === "string") { + return error; + } else { + // A weird skulpt thing? + if (error.tp$str !== undefined) { + return error.tp$str().v; + } else { + return ""+error.name + ": " + error.message; + } + } +} + +/** + * Skulpt Module for holding the Instructor API. + * + * This module is a little hackish. We need to sit down and reevaluate the best way to + * organize it and whether this particular structure is ideal. I suspect it should be + * it's own proper JS file. + * + * @param {String} name - The name of the module (should always be 'instructor') + * + */ +var instructor_module = function(name) { + // Main module object that gets returned at the end. + var mod = {}; + + /** + * Skulpt Exception that represents a Feedback object, to be rendered to the user + * when the feedback system finds a problem. + * + * @param {Array} args - A list of optional arguments to pass to the Exception. + * Usually this will include a message for the user. + */ + Sk.builtin.Feedback = function (args) { + var o; + if (!(this instanceof Sk.builtin.Feedback)) { + o = Object.create(Sk.builtin.Feedback.prototype); + o.constructor.apply(o, arguments); + return o; + } + Sk.builtin.Exception.apply(this, arguments); + }; + Sk.abstr.setUpInheritance("Feedback", Sk.builtin.Feedback, Sk.builtin.Exception); + + /** + * Skulpt Exception that represents a Success object, to be thrown when the user + * completes their program successfully. + * + ** @param {Array} args - A list of optional arguments to pass to the Exception. + * Usually this will be empty. + */ + Sk.builtin.Success = function (args) { + var o; + if (!(this instanceof Sk.builtin.Success)) { + o = Object.create(Sk.builtin.Success.prototype); + o.constructor.apply(o, arguments); + return o; + } + Sk.builtin.Exception.apply(this, arguments); + }; + Sk.abstr.setUpInheritance("Success", Sk.builtin.Success, Sk.builtin.Exception); + + /** + * Skulpt Exception that represents a Finished object, to be thrown when the user + * completes their program successfully, but isn't in a problem with a "solution". + * This is useful for open-ended canvases where we still want to capture the students' + * code in Canvas. + * + ** @param {Array} args - A list of optional arguments to pass to the Exception. + * Usually this will be empty. + */ + Sk.builtin.Finished = function (args) { + var o; + if (!(this instanceof Sk.builtin.Finished)) { + o = Object.create(Sk.builtin.Finished.prototype); + o.constructor.apply(o, arguments); + return o; + } + Sk.builtin.Exception.apply(this, arguments); + }; + Sk.abstr.setUpInheritance("Finished", Sk.builtin.Finished, Sk.builtin.Exception); + + /** + * A Skulpt function that throws a Feedback exception, allowing us to give feedback + * to the user through the Feedback panel. This function call is done for aesthetic + * reasons, so that we are calling a function instead of raising an error. Still, + * exceptions allow us to break out of the control flow immediately, like a + * return, so they are a good mechanism to use under the hood. + * + * @param {String} message - The message to display to the user. + */ + mod.set_feedback = new Sk.builtin.func(function(message) { + Sk.builtin.pyCheckArgs("set_feedback", arguments, 1, 1); + Sk.builtin.pyCheckType("message", "string", Sk.builtin.checkString(message)); + throw new Sk.builtin.Feedback(message.v); + }); + + /** + * A Skulpt function that throws a Success exception. This will terminate the + * feedback analysis, but reports that the students' code was successful. + * This function call is done for aesthetic reasons, so that we are calling a + * function instead of raising an error. Still, exceptions allow us to break + * out of the control flow immediately, like a return would, so they are a + * good mechanism to use under the hood. + */ + mod.set_success = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("set_success", arguments, 0, 0); + throw new Sk.builtin.Success(); + }); + + /** + * A Skulpt function that throws a Finished exception. This will terminate the + * feedback analysis, but reports that the students' code was successful. + * This function call is done for aesthetic reasons, so that we are calling a + * function instead of raising an error. Still, exceptions allow us to break + * out of the control flow immediately, like a return would, so they are a + * good mechanism to use under the hood. + */ + mod.set_finished = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("set_finished", arguments, 0, 0); + throw new Sk.builtin.Finished(); + }); + + // Memoization of previous parses - some mild redundancy to save time + // TODO: There's no evidence this is good, and could be a memory hog on big + // programs. Someone should investigate this. The assumption is that multiple + // helper functions might be using parses. But shouldn't we trim old parses? + // Perhaps a timed cache would work better. + var parses = {}; + + /** + * Given source code as a string, return a flat list of all of the AST elements + * in the parsed source code. + * + * TODO: There's redundancy here, since the source code was previously parsed + * to run the file and to execute it. We should probably be able to do this just + * once and shave off time. + * + * @param {String} source - Python source code. + * @returns {Array.} + */ + function getParseList(source) { + if (!(source in parses)) { + var parse = Sk.parse("__main__", source); + parses[source] = Sk.astFromParse(parse.cst, "__main__", parse.flags); + } + var ast = parses[source]; + return (new NodeVisitor()).recursive_walk(ast); + } + + /** + * Given source code as a string, return a list of all of the AST elements + * that are Num (aka numeric literals) but that are not inside List elements. + * + * @param {String} source - Python source code. + * @returns {Array.number} The list of JavaScript numeric literals that were found. + */ + function getNonListNums(source) { + if (!(source in parses)) { + var parse = Sk.parse("__main__", source); + parses[source] = Sk.astFromParse(parse.cst, "__main__", parse.flags); + } + var ast = parses[source]; + var visitor = new NodeVisitor(); + var insideList = false; + var nums = []; + visitor.visit_List = function(node) { + insideList = true; + this.generic_visit(node); + insideList = false; + } + visitor.visit_Num = function(node) { + if (!insideList) { + nums.push(node.n); + } + this.generic_visit(node); + } + visitor.visit(ast); + return nums; + } + + /** + * Given source code as a string, return a list of all of the AST elements + * that are being printed (using the print function) but are not variables. + * + * @param {String} source - Python source code. + * @returns {Array.} The list of AST elements that were found. + */ + function getPrintedNonProperties(source) { + if (!(source in parses)) { + var parse = Sk.parse("__main__", source); + parses[source] = Sk.astFromParse(parse.cst, "__main__", parse.flags); + } + var ast = parses[source]; + var visitor = new NodeVisitor(); + var nonVariables = []; + visitor.visit_Call = function(node) { + var func = node.func; + var args = node.args; + if (func._astname == 'Name' && func.id.v == 'print') { + for (var i =0; i < args.length; i+= 1) { + if (args[i]._astname != "Name") { + nonVariables.push(args[i]); + } + } + } + this.generic_visit(node); + } + visitor.visit(ast); + return nonVariables; + } + + /** + * Skulpt function to iterate through the final state of + * all the variables in the program, and check to see if they have + * a given value. + */ + mod.get_value_by_name = new Sk.builtin.func(function(name) { + Sk.builtin.pyCheckArgs("get_value_by_name", arguments, 1, 1); + Sk.builtin.pyCheckType("name", "string", Sk.builtin.checkString(name)); + name = name.v; + var final_values = Sk.builtins._final_values; + if (name in final_values) { + return final_values[name]; + } else { + return Sk.builtin.none.none$; + } + }); + mod.get_value_by_type = new Sk.builtin.func(function(type) { + Sk.builtin.pyCheckArgs("get_value_by_type", arguments, 1, 1); + + var final_values = Sk.builtins._final_values; + var result = []; + for (var property in final_values) { + if (final_values[property].tp$name == type.tp$name) { + result.push(final_values[property]); + } + } + return Sk.builtin.list(result); + }); + + mod.parse_json = new Sk.builtin.func(function(blob) { + Sk.builtin.pyCheckArgs("parse_json", arguments, 1, 1); + Sk.builtin.pyCheckType("blob", "string", Sk.builtin.checkString(blob)); + blob = blob.v; + return Sk.ffi.remapToPy(JSON.parse(blob)); + }); + mod.get_property = new Sk.builtin.func(function(name) { + Sk.builtin.pyCheckArgs("get_property", arguments, 1, 1); + Sk.builtin.pyCheckType("name", "string", Sk.builtin.checkString(name)); + name = name.v; + var trace = Sk.builtins._trace; + if (trace.length <= 0) { + return Sk.builtin.none.none$; + } + var properties = trace[trace.length-1]["properties"]; + for (var i = 0, len = properties.length; i < len; i += 1) { + if (properties[i]['name'] == name) { + return Sk.ffi.remapToPy(properties[i]) + } + } + return Sk.builtin.none.none$; + }); + + mod.calls_function = new Sk.builtin.func(function(source, name) { + Sk.builtin.pyCheckArgs("calls_function", arguments, 2, 2); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + Sk.builtin.pyCheckType("name", "string", Sk.builtin.checkString(name)); + + source = source.v; + name = name.v; + + var ast_list = getParseList(source); + + var count = 0; + for (var i = 0, len = ast_list.length; i < len; i = i+1) { + if (ast_list[i]._astname == 'Call') { + if (ast_list[i].func._astname == 'Attribute') { + count += Sk.ffi.remapToJs(ast_list[i].func.attr) == name | 0; + } else if (ast_list[i].func._astname == 'Name') { + count += Sk.ffi.remapToJs(ast_list[i].func.id) == name | 0; + } + } + } + + return Sk.ffi.remapToPy(count > 0); + }); + + mod.count_components = new Sk.builtin.func(function(source, component) { + Sk.builtin.pyCheckArgs("count_components", arguments, 2, 2); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + Sk.builtin.pyCheckType("component", "string", Sk.builtin.checkString(component)); + + source = source.v; + component = component.v; + + var ast_list = getParseList(source); + + var count = 0; + for (var i = 0, len = ast_list.length; i < len; i = i+1) { + if (ast_list[i]._astname == component) { + count = count+1; + } + } + + return Sk.ffi.remapToPy(count); + }); + + mod.no_nonlist_nums = new Sk.builtin.func(function(source) { + Sk.builtin.pyCheckArgs("no_nonlist_nums", arguments, 1, 1); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + + source = source.v; + + var num_list = getNonListNums(source); + + var count = 0; + for (var i = 0, len = num_list.length; i < len; i = i+1) { + if (num_list[i].v != 0 && num_list[i].v != 1) { + return Sk.ffi.remapToPy(true); + } + } + return Sk.ffi.remapToPy(false); + }); + mod.only_printing_properties = new Sk.builtin.func(function(source) { + Sk.builtin.pyCheckArgs("only_printing_properties", arguments, 1, 1); + Sk.builtin.pyCheckType("source", "string", Sk.builtin.checkString(source)); + + source = source.v; + + var non_var_list = getPrintedNonProperties(source); + return Sk.ffi.remapToPy(non_var_list.length == 0); + }); + + return mod; +} + +PyEngine.prototype.setupEnvironment = function(student_code, traceTable, output, ast, final_values) { + var model = this.main.model; + this._backup_execution = Sk.afterSingleExecution; + Sk.afterSingleExecution = undefined; + Sk.builtins.get_output = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("get_output", arguments, 0, 0); + return Sk.ffi.remapToPy(model.execution.output()); + }); + Sk.builtins.reset_output = new Sk.builtin.func(function() { + Sk.builtin.pyCheckArgs("reset_output", arguments, 0, 0); + model.execution.output.removeAll(); + }); + Sk.builtins.log = new Sk.builtin.func(function(data) { + Sk.builtin.pyCheckArgs("log", arguments, 1, 1); + console.log(data) + }); + //Sk.builtins.trace = Sk.ffi.remapToPy(traceTable); + Sk.builtins._trace = traceTable; + Sk.builtins._final_values = final_values; + Sk.builtins.code = Sk.ffi.remapToPy(student_code); + Sk.builtins.set_success = this.instructor_module.set_success; + Sk.builtins.set_feedback = this.instructor_module.set_feedback; + Sk.builtins.set_finished = this.instructor_module.set_finished; + Sk.builtins.count_components = this.instructor_module.count_components; + Sk.builtins.no_nonlist_nums = this.instructor_module.no_nonlist_nums; + Sk.builtins.only_printing_properties = this.instructor_module.only_printing_properties; + Sk.builtins.calls_function = this.instructor_module.calls_function; + Sk.builtins.get_property = this.instructor_module.get_property; + Sk.builtins.get_value_by_name = this.instructor_module.get_value_by_name; + Sk.builtins.get_value_by_type = this.instructor_module.get_value_by_type; + Sk.builtins.parse_json = this.instructor_module.parse_json; + Sk.skip_drawing = true; + model.settings.mute_printer(true); +} + +PyEngine.prototype.disposeEnvironment = function() { + Sk.afterSingleExecution = this._backup_execution; + Sk.builtins.get_output = undefined; + Sk.builtins.reset_output = undefined; + Sk.builtins.log = undefined; + Sk.builtins._trace = undefined; + Sk.builtins.trace = undefined; + Sk.builtins.code = undefined; + Sk.builtins.set_success = undefined; + Sk.builtins.set_feedback = undefined; + Sk.builtins.set_finished = undefined; + Sk.builtins.count_components = undefined; + Sk.builtins.calls_function = undefined; + Sk.builtins.get_property = undefined; + Sk.builtins.get_value_by_name = undefined; + Sk.builtins.get_value_by_type = undefined; + Sk.builtins.no_nonlist_nums = undefined; + Sk.builtins.only_printing_properties = undefined; + Sk.builtins.parse_json = undefined; + Sk.skip_drawing = false; + GLOBAL_VALUE = undefined; + this.main.model.settings.mute_printer(false); +} + +PyEngine.prototype.check = function(student_code, traceTable, output, ast, final_values) { + var engine = this; + var model = this.main.model; + var on_run = model.programs['give_feedback'](); + if (on_run !== undefined && on_run.trim() !== "") { + on_run = 'def run_code():\n'+indent(student_code)+'\n'+on_run; + this.setupEnvironment(student_code, traceTable, output, ast, final_values); + + var executionPromise = Sk.misceval.asyncToPromise(function() { + return Sk.importMainWithBody("", false, on_run, true); + }); + executionPromise.then( + function (module) { + engine.main.components.feedback.noErrors(); + engine.disposeEnvironment(); + }, function (error) { + engine.disposeEnvironment(); + console.log(error.tp$name, error.tp$name == "Success"); + if (error.tp$name == "Success") { + server.markSuccess(1.0); + engine.main.components.feedback.complete(); + } else if (error.tp$name == "Feedback") { + server.markSuccess(0.0); + engine.main.components.feedback.instructorFeedback("Incorrect Answer", error.args.v[0].v); + } else if (error.tp$name == "Finished") { + server.markSuccess(1.0); + engine.main.components.feedback.finished(); + } else { + console.error(error); + engine.main.components.feedback.internalError(error, "Feedback Error", "Error in instructor's feedback. Please show the above message to an instructor!"); + server.logEvent('blockly_instructor_error', ''+error); + } + }); + } +} + +PyEngine.prototype.parseGlobals = function(variables) { + var result = Array(); + var modules = Array(); + for (var property in variables) { + var value = variables[property]; + if (property !== "__name__" && property !== "__doc__") { + property = property.replace('_$rw$', '') + .replace('_$rn$', ''); + var parsed = this.parseValue(property, value); + if (parsed !== null) { + result.push(parsed); + } else if (value.constructor == Sk.builtin.module) { + modules.push(value.$d.__name__.v); + } + } + } + return {"properties": result, "modules": modules}; +} + +PyEngine.prototype.parseValue = function(property, value) { + if (value == undefined) { + return {'name': property, + 'type': 'Unknown', + "value": 'Undefined' + }; + } + switch (value.constructor) { + case Sk.builtin.func: + return {'name': property, + 'type': "Function", + "value": + (value.func_code.co_varnames !== undefined ? + " Arguments: "+value.func_code.co_varnames.join(", ") : + ' No arguments') + }; + case Sk.builtin.module: return null; + case Sk.builtin.str: + return {'name': property, + 'type': "String", + "value": value.$r().v + }; + case Sk.builtin.none: + return {'name': property, + 'type': "None", + "value": "None" + }; + case Sk.builtin.bool: + return {'name': property, + 'type': "Boolean", + "value": value.$r().v + }; + case Sk.builtin.nmber: + return {'name': property, + 'type': "int" == value.skType ? "Integer": "Float", + "value": value.$r().v + }; + case Sk.builtin.int_: + return {'name': property, + 'type': "Integer", + "value": value.$r().v + }; + case Sk.builtin.float_: + return {'name': property, + 'type': "Float", + "value": value.$r().v + }; + case Sk.builtin.tuple: + return {'name': property, + 'type': "Tuple", + "value": value.$r().v + }; + case Sk.builtin.list: + if (value.v.length <= 20) { + return {'name': property, + 'type': "List", + "value": value.$r().v, + 'exact_value': value + }; + } else { + return {'name': property, + 'type': "List", + "value": "[... "+value.v.length+" elements ...]", + "exact_value": value + }; + } + case Sk.builtin.dict: + return {'name': property, + 'type': "Dictionary", + "value": value.$r().v + }; + case Number: + return {'name': property, + 'type': value % 1 === 0 ? "Integer" : "Float", + "value": value + }; + case String: + return {'name': property, + 'type': "String", + "value": value + }; + case Boolean: + return {'name': property, + 'type': "Boolean", + "value": (value ? "True": "False") + }; + default: + return {'name': property, + 'type': value.tp$name == undefined ? value : value.tp$name, + "value": value.$r == undefined ? value : value.$r().v + }; + } +} diff --git a/mixly/common/js/skulpt_mixtoy/inittool.js b/mixly/common/js/skulpt_mixtoy/inittool.js new file mode 100644 index 00000000..8e29cbc9 --- /dev/null +++ b/mixly/common/js/skulpt_mixtoy/inittool.js @@ -0,0 +1,20 @@ +var $builtinmodule = function (name) { + let mod= {__name__: new Sk.builtin.str("blocktool")}; + + var highlight = function(id) { + id=Sk.ffi.remapToJs(id) + Mixly.Editor.blockEditor.highlightBlock(id); + }; + + var highlight_f=function(block_id) { + return new Sk.misceval.promiseToSuspension(new Promise(function(resolve) { + setTimeout( () => { + highlight(block_id) + resolve(Sk.builtin.none.none$); + }, 800); + })); + } + mod.highlight = new Sk.builtin.func(highlight_f); + + return mod; +} \ No newline at end of file diff --git a/mixly/common/js/skulpt_mixtoy/pygame_zero_main.js b/mixly/common/js/skulpt_mixtoy/pygame_zero_main.js new file mode 100644 index 00000000..6d7cd310 --- /dev/null +++ b/mixly/common/js/skulpt_mixtoy/pygame_zero_main.js @@ -0,0 +1,15269 @@ +(function() { + function Kb(a) { + return a && a.__esModule ? { + d: a.default + } : { + d: a + } + } + function Gc(name) { + var err = new Error("Cannot find module '" + name + "'"); + err.code = "MODULE_NOT_FOUND"; + throw err + } + var Hc = this; + var Lb = {}; + var ma = {}; + var te, Mb, ha = {}; + !function(e, t) { + "object" == typeof ha ? ha = t(function() { + try { + return Gc("poly-decomp") + } catch (e) {} + }()) : "function" == typeof Mb && Mb.amd ? Mb("Matter", ["poly-decomp"], t) : "object" == typeof ha ? (te = t(function() { + try { + return Gc("poly-decomp") + } catch (e) {} + }()), + ha.Matter = te) : e.Matter = t(e.decomp) + }(ha, function(e) { + return function(e) { + var t = {}; + function n(i) { + if (t[i]) + return t[i].exports; + var o = t[i] = { + i: i, + l: !1, + exports: {} + }; + return e[i].call(o.exports, o, o.exports, n), + o.l = !0, + o.exports + } + return n.m = e, + n.c = t, + n.d = function(e, t, i) { + n.o(e, t) || Object.defineProperty(e, t, { + enumerable: !0, + get: i + }) + } + , + n.r = function(e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { + value: "Module" + }), + Object.defineProperty(e, "__esModule", { + value: !0 + }) + } + , + n.t = function(e, t) { + if (1 & t && (e = n(e)), + 8 & t) + return e; + if (4 & t && "object" == typeof e && e && e.__esModule) + return e; + var i = Object.create(null); + if (n.r(i), + Object.defineProperty(i, "default", { + enumerable: !0, + value: e + }), + 2 & t && "string" != typeof e) + for (var o in e) + n.d(i, o, function(t) { + return e[t] + } + .bind(null, o)); + return i + } + , + n.n = function(e) { + var t = e && e.__esModule ? function() { + return e.default + } + : function() { + return e + } + ; + return n.d(t, "a", t), + t + } + , + n.o = function(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + } + , + n.p = "", + n(n.s = 24) + }([function(e, t) { + var n = {}; + e.exports = n, + function() { + n._nextId = 0, + n._seed = 0, + n._nowStartTime = +new Date, + n.extend = function(e, t) { + var i, o; + "boolean" == typeof t ? (i = 2, + o = t) : (i = 1, + o = !0); + for (var r = i; r < arguments.length; r++) { + var s = arguments[r]; + if (s) + for (var a in s) + o && s[a] && s[a].constructor === Object ? e[a] && e[a].constructor !== Object ? e[a] = s[a] : (e[a] = e[a] || {}, + n.extend(e[a], o, s[a])) : e[a] = s[a] + } + return e + } + , + n.clone = function(e, t) { + return n.extend({}, t, e) + } + , + n.keys = function(e) { + if (Object.keys) + return Object.keys(e); + var t = []; + for (var n in e) + t.push(n); + return t + } + , + n.values = function(e) { + var t = []; + if (Object.keys) { + for (var n = Object.keys(e), i = 0; i < n.length; i++) + t.push(e[n[i]]); + return t + } + for (var o in e) + t.push(e[o]); + return t + } + , + n.get = function(e, t, n, i) { + t = t.split(".").slice(n, i); + for (var o = 0; o < t.length; o += 1) + e = e[t[o]]; + return e + } + , + n.set = function(e, t, i, o, r) { + var s = t.split(".").slice(o, r); + return n.get(e, t, 0, -1)[s[s.length - 1]] = i, + i + } + , + n.shuffle = function(e) { + for (var t = e.length - 1; t > 0; t--) { + var i = Math.floor(n.random() * (t + 1)) + , o = e[t]; + e[t] = e[i], + e[i] = o + } + return e + } + , + n.choose = function(e) { + return e[Math.floor(n.random() * e.length)] + } + , + n.isElement = function(e) { + return "undefined" != typeof HTMLElement ? e instanceof HTMLElement : !!(e && e.nodeType && e.nodeName) + } + , + n.isArray = function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + } + , + n.isFunction = function(e) { + return "function" == typeof e + } + , + n.isPlainObject = function(e) { + return "object" == typeof e && e.constructor === Object + } + , + n.isString = function(e) { + return "[object String]" === toString.call(e) + } + , + n.clamp = function(e, t, n) { + return e < t ? t : e > n ? n : e + } + , + n.sign = function(e) { + return e < 0 ? -1 : 1 + } + , + n.now = function() { + if ("undefined" != typeof window && window.performance) { + if (window.performance.now) + return window.performance.now(); + if (window.performance.webkitNow) + return window.performance.webkitNow() + } + return new Date - n._nowStartTime + } + , + n.random = function(t, n) { + return n = void 0 !== n ? n : 1, + (t = void 0 !== t ? t : 0) + e() * (n - t) + } + ; + var e = function() { + return n._seed = (9301 * n._seed + 49297) % 233280, + n._seed / 233280 + }; + n.colorToNumber = function(e) { + return 3 == (e = e.replace("#", "")).length && (e = e.charAt(0) + e.charAt(0) + e.charAt(1) + e.charAt(1) + e.charAt(2) + e.charAt(2)), + parseInt(e, 16) + } + , + n.logLevel = 1, + n.log = function() { + console && n.logLevel > 0 && n.logLevel <= 3 && console.log.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) + } + , + n.info = function() { + console && n.logLevel > 0 && n.logLevel <= 2 && console.info.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) + } + , + n.warn = function() { + console && n.logLevel > 0 && n.logLevel <= 3 && console.warn.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) + } + , + n.nextId = function() { + return n._nextId++ + } + , + n.indexOf = function(e, t) { + if (e.indexOf) + return e.indexOf(t); + for (var n = 0; n < e.length; n++) + if (e[n] === t) + return n; + return -1 + } + , + n.map = function(e, t) { + if (e.map) + return e.map(t); + for (var n = [], i = 0; i < e.length; i += 1) + n.push(t(e[i])); + return n + } + , + n.topologicalSort = function(e) { + var t = [] + , i = [] + , o = []; + for (var r in e) + i[r] || o[r] || n._topologicalSort(r, i, o, e, t); + return t + } + , + n._topologicalSort = function(e, t, i, o, r) { + var s = o[e] || []; + i[e] = !0; + for (var a = 0; a < s.length; a += 1) { + var l = s[a]; + i[l] || t[l] || n._topologicalSort(l, t, i, o, r) + } + i[e] = !1, + t[e] = !0, + r.push(e) + } + , + n.chain = function() { + for (var e = [], t = 0; t < arguments.length; t += 1) { + var n = arguments[t]; + n._chained ? e.push.apply(e, n._chained) : e.push(n) + } + var i = function() { + for (var t, n = new Array(arguments.length), i = 0, o = arguments.length; i < o; i++) + n[i] = arguments[i]; + for (i = 0; i < e.length; i += 1) { + var r = e[i].apply(t, n); + void 0 !== r && (t = r) + } + return t + }; + return i._chained = e, + i + } + , + n.chainPathBefore = function(e, t, i) { + return n.set(e, t, n.chain(i, n.get(e, t))) + } + , + n.chainPathAfter = function(e, t, i) { + return n.set(e, t, n.chain(n.get(e, t), i)) + } + }() + } + , function(e, t) { + var n = {}; + e.exports = n, + n.create = function(e) { + var t = { + min: { + x: 0, + y: 0 + }, + max: { + x: 0, + y: 0 + } + }; + return e && n.update(t, e), + t + } + , + n.update = function(e, t, n) { + e.min.x = 1 / 0, + e.max.x = -1 / 0, + e.min.y = 1 / 0, + e.max.y = -1 / 0; + for (var i = 0; i < t.length; i++) { + var o = t[i]; + o.x > e.max.x && (e.max.x = o.x), + o.x < e.min.x && (e.min.x = o.x), + o.y > e.max.y && (e.max.y = o.y), + o.y < e.min.y && (e.min.y = o.y) + } + n && (n.x > 0 ? e.max.x += n.x : e.min.x += n.x, + n.y > 0 ? e.max.y += n.y : e.min.y += n.y) + } + , + n.contains = function(e, t) { + return t.x >= e.min.x && t.x <= e.max.x && t.y >= e.min.y && t.y <= e.max.y + } + , + n.overlaps = function(e, t) { + return e.min.x <= t.max.x && e.max.x >= t.min.x && e.max.y >= t.min.y && e.min.y <= t.max.y + } + , + n.translate = function(e, t) { + e.min.x += t.x, + e.max.x += t.x, + e.min.y += t.y, + e.max.y += t.y + } + , + n.shift = function(e, t) { + var n = e.max.x - e.min.x + , i = e.max.y - e.min.y; + e.min.x = t.x, + e.max.x = t.x + n, + e.min.y = t.y, + e.max.y = t.y + i + } + } + , function(e, t) { + var n = {}; + e.exports = n, + n.create = function(e, t) { + return { + x: e || 0, + y: t || 0 + } + } + , + n.clone = function(e) { + return { + x: e.x, + y: e.y + } + } + , + n.magnitude = function(e) { + return Math.sqrt(e.x * e.x + e.y * e.y) + } + , + n.magnitudeSquared = function(e) { + return e.x * e.x + e.y * e.y + } + , + n.rotate = function(e, t, n) { + var i = Math.cos(t) + , o = Math.sin(t); + n || (n = {}); + var r = e.x * i - e.y * o; + return n.y = e.x * o + e.y * i, + n.x = r, + n + } + , + n.rotateAbout = function(e, t, n, i) { + var o = Math.cos(t) + , r = Math.sin(t); + i || (i = {}); + var s = n.x + ((e.x - n.x) * o - (e.y - n.y) * r); + return i.y = n.y + ((e.x - n.x) * r + (e.y - n.y) * o), + i.x = s, + i + } + , + n.normalise = function(e) { + var t = n.magnitude(e); + return 0 === t ? { + x: 0, + y: 0 + } : { + x: e.x / t, + y: e.y / t + } + } + , + n.dot = function(e, t) { + return e.x * t.x + e.y * t.y + } + , + n.cross = function(e, t) { + return e.x * t.y - e.y * t.x + } + , + n.cross3 = function(e, t, n) { + return (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x) + } + , + n.add = function(e, t, n) { + return n || (n = {}), + n.x = e.x + t.x, + n.y = e.y + t.y, + n + } + , + n.sub = function(e, t, n) { + return n || (n = {}), + n.x = e.x - t.x, + n.y = e.y - t.y, + n + } + , + n.mult = function(e, t) { + return { + x: e.x * t, + y: e.y * t + } + } + , + n.div = function(e, t) { + return { + x: e.x / t, + y: e.y / t + } + } + , + n.perp = function(e, t) { + return { + x: (t = !0 === t ? -1 : 1) * -e.y, + y: t * e.x + } + } + , + n.neg = function(e) { + return { + x: -e.x, + y: -e.y + } + } + , + n.angle = function(e, t) { + return Math.atan2(t.y - e.y, t.x - e.x) + } + , + n._temp = [n.create(), n.create(), n.create(), n.create(), n.create(), n.create()] + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(2) + , r = n(0); + i.create = function(e, t) { + for (var n = [], i = 0; i < e.length; i++) { + var o = e[i] + , r = { + x: o.x, + y: o.y, + index: i, + body: t, + isInternal: !1 + }; + n.push(r) + } + return n + } + , + i.fromPath = function(e, t) { + var n = []; + return e.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi, function(e, t, i) { + n.push({ + x: parseFloat(t), + y: parseFloat(i) + }) + }), + i.create(n, t) + } + , + i.centre = function(e) { + for (var t, n, r, s = i.area(e, !0), a = { + x: 0, + y: 0 + }, l = 0; l < e.length; l++) + r = (l + 1) % e.length, + t = o.cross(e[l], e[r]), + n = o.mult(o.add(e[l], e[r]), t), + a = o.add(a, n); + return o.div(a, 6 * s) + } + , + i.mean = function(e) { + for (var t = { + x: 0, + y: 0 + }, n = 0; n < e.length; n++) + t.x += e[n].x, + t.y += e[n].y; + return o.div(t, e.length) + } + , + i.area = function(e, t) { + for (var n = 0, i = e.length - 1, o = 0; o < e.length; o++) + n += (e[i].x - e[o].x) * (e[i].y + e[o].y), + i = o; + return t ? n / 2 : Math.abs(n) / 2 + } + , + i.inertia = function(e, t) { + for (var n, i, r = 0, s = 0, a = e, l = 0; l < a.length; l++) + i = (l + 1) % a.length, + r += (n = Math.abs(o.cross(a[i], a[l]))) * (o.dot(a[i], a[i]) + o.dot(a[i], a[l]) + o.dot(a[l], a[l])), + s += n; + return t / 6 * (r / s) + } + , + i.translate = function(e, t, n) { + var i; + if (n) + for (i = 0; i < e.length; i++) + e[i].x += t.x * n, + e[i].y += t.y * n; + else + for (i = 0; i < e.length; i++) + e[i].x += t.x, + e[i].y += t.y; + return e + } + , + i.rotate = function(e, t, n) { + if (0 !== t) { + for (var i = Math.cos(t), o = Math.sin(t), r = 0; r < e.length; r++) { + var s = e[r] + , a = s.x - n.x + , l = s.y - n.y; + s.x = n.x + (a * i - l * o), + s.y = n.y + (a * o + l * i) + } + return e + } + } + , + i.contains = function(e, t) { + for (var n = 0; n < e.length; n++) { + var i = e[n] + , o = e[(n + 1) % e.length]; + if ((t.x - i.x) * (o.y - i.y) + (t.y - i.y) * (i.x - o.x) > 0) + return !1 + } + return !0 + } + , + i.scale = function(e, t, n, r) { + if (1 === t && 1 === n) + return e; + var s, a; + r = r || i.centre(e); + for (var l = 0; l < e.length; l++) + s = e[l], + a = o.sub(s, r), + e[l].x = r.x + a.x * t, + e[l].y = r.y + a.y * n; + return e + } + , + i.chamfer = function(e, t, n, i, s) { + t = "number" == typeof t ? [t] : t || [8], + n = void 0 !== n ? n : -1, + i = i || 2, + s = s || 14; + for (var a = [], l = 0; l < e.length; l++) { + var c = e[l - 1 >= 0 ? l - 1 : e.length - 1] + , d = e[l] + , u = e[(l + 1) % e.length] + , p = t[l < t.length ? l : t.length - 1]; + if (0 !== p) { + var f = o.normalise({ + x: d.y - c.y, + y: c.x - d.x + }) + , v = o.normalise({ + x: u.y - d.y, + y: d.x - u.x + }) + , m = Math.sqrt(2 * Math.pow(p, 2)) + , y = o.mult(r.clone(f), p) + , g = o.normalise(o.mult(o.add(f, v), .5)) + , x = o.sub(d, o.mult(g, m)) + , h = n; + -1 === n && (h = 1.75 * Math.pow(p, .32)), + (h = r.clamp(h, i, s)) % 2 == 1 && (h += 1); + for (var b = Math.acos(o.dot(f, v)) / h, w = 0; w < h; w++) + a.push(o.add(o.rotate(y, b * w), x)) + } else + a.push(d) + } + return a + } + , + i.clockwiseSort = function(e) { + var t = i.mean(e); + return e.sort(function(e, n) { + return o.angle(t, e) - o.angle(t, n) + }), + e + } + , + i.isConvex = function(e) { + var t, n, i, o, r = 0, s = e.length; + if (s < 3) + return null; + for (t = 0; t < s; t++) + if (i = (t + 2) % s, + o = (e[n = (t + 1) % s].x - e[t].x) * (e[i].y - e[n].y), + (o -= (e[n].y - e[t].y) * (e[i].x - e[n].x)) < 0 ? r |= 1 : o > 0 && (r |= 2), + 3 === r) + return !1; + return 0 !== r || null + } + , + i.hull = function(e) { + var t, n, i = [], r = []; + for ((e = e.slice(0)).sort(function(e, t) { + var n = e.x - t.x; + return 0 !== n ? n : e.y - t.y + }), + n = 0; n < e.length; n += 1) { + for (t = e[n]; r.length >= 2 && o.cross3(r[r.length - 2], r[r.length - 1], t) <= 0; ) + r.pop(); + r.push(t) + } + for (n = e.length - 1; n >= 0; n -= 1) { + for (t = e[n]; i.length >= 2 && o.cross3(i[i.length - 2], i[i.length - 1], t) <= 0; ) + i.pop(); + i.push(t) + } + return i.pop(), + r.pop(), + i.concat(r) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0); + i.on = function(e, t, n) { + for (var i, o = t.split(" "), r = 0; r < o.length; r++) + i = o[r], + e.events = e.events || {}, + e.events[i] = e.events[i] || [], + e.events[i].push(n); + return n + } + , + i.off = function(e, t, n) { + if (t) { + "function" == typeof t && (n = t, + t = o.keys(e.events).join(" ")); + for (var i = t.split(" "), r = 0; r < i.length; r++) { + var s = e.events[i[r]] + , a = []; + if (n && s) + for (var l = 0; l < s.length; l++) + s[l] !== n && a.push(s[l]); + e.events[i[r]] = a + } + } else + e.events = {} + } + , + i.trigger = function(e, t, n) { + var i, r, s, a, l = e.events; + if (l && o.keys(l).length > 0) { + n || (n = {}), + i = t.split(" "); + for (var c = 0; c < i.length; c++) + if (s = l[r = i[c]]) { + (a = o.clone(n, !1)).name = r, + a.source = e; + for (var d = 0; d < s.length; d++) + s[d].apply(e, [a]) + } + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(4) + , r = n(0) + , s = n(1) + , a = n(6); + i.create = function(e) { + return r.extend({ + id: r.nextId(), + type: "composite", + parent: null, + isModified: !1, + bodies: [], + constraints: [], + composites: [], + label: "Composite", + plugin: {} + }, e) + } + , + i.setModified = function(e, t, n, o) { + if (e.isModified = t, + n && e.parent && i.setModified(e.parent, t, n, o), + o) + for (var r = 0; r < e.composites.length; r++) { + var s = e.composites[r]; + i.setModified(s, t, n, o) + } + } + , + i.add = function(e, t) { + var n = [].concat(t); + o.trigger(e, "beforeAdd", { + object: t + }); + for (var s = 0; s < n.length; s++) { + var a = n[s]; + switch (a.type) { + case "body": + if (a.parent !== a) { + r.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)"); + break + } + i.addBody(e, a); + break; + case "constraint": + i.addConstraint(e, a); + break; + case "composite": + i.addComposite(e, a); + break; + case "mouseConstraint": + i.addConstraint(e, a.constraint); + } + } + return o.trigger(e, "afterAdd", { + object: t + }), + e + } + , + i.remove = function(e, t, n) { + var r = [].concat(t); + o.trigger(e, "beforeRemove", { + object: t + }); + for (var s = 0; s < r.length; s++) { + var a = r[s]; + switch (a.type) { + case "body": + i.removeBody(e, a, n); + break; + case "constraint": + i.removeConstraint(e, a, n); + break; + case "composite": + i.removeComposite(e, a, n); + break; + case "mouseConstraint": + i.removeConstraint(e, a.constraint); + } + } + return o.trigger(e, "afterRemove", { + object: t + }), + e + } + , + i.addComposite = function(e, t) { + return e.composites.push(t), + t.parent = e, + i.setModified(e, !0, !0, !1), + e + } + , + i.removeComposite = function(e, t, n) { + var o = r.indexOf(e.composites, t); + if (-1 !== o && (i.removeCompositeAt(e, o), + i.setModified(e, !0, !0, !1)), + n) + for (var s = 0; s < e.composites.length; s++) + i.removeComposite(e.composites[s], t, !0); + return e + } + , + i.removeCompositeAt = function(e, t) { + return e.composites.splice(t, 1), + i.setModified(e, !0, !0, !1), + e + } + , + i.addBody = function(e, t) { + return e.bodies.push(t), + i.setModified(e, !0, !0, !1), + e + } + , + i.removeBody = function(e, t, n) { + var o = r.indexOf(e.bodies, t); + if (-1 !== o && (i.removeBodyAt(e, o), + i.setModified(e, !0, !0, !1)), + n) + for (var s = 0; s < e.composites.length; s++) + i.removeBody(e.composites[s], t, !0); + return e + } + , + i.removeBodyAt = function(e, t) { + return e.bodies.splice(t, 1), + i.setModified(e, !0, !0, !1), + e + } + , + i.addConstraint = function(e, t) { + return e.constraints.push(t), + i.setModified(e, !0, !0, !1), + e + } + , + i.removeConstraint = function(e, t, n) { + var o = r.indexOf(e.constraints, t); + if (-1 !== o && i.removeConstraintAt(e, o), + n) + for (var s = 0; s < e.composites.length; s++) + i.removeConstraint(e.composites[s], t, !0); + return e + } + , + i.removeConstraintAt = function(e, t) { + return e.constraints.splice(t, 1), + i.setModified(e, !0, !0, !1), + e + } + , + i.clear = function(e, t, n) { + if (n) + for (var o = 0; o < e.composites.length; o++) + i.clear(e.composites[o], t, !0); + return t ? e.bodies = e.bodies.filter(function(e) { + return e.isStatic + }) : e.bodies.length = 0, + e.constraints.length = 0, + e.composites.length = 0, + i.setModified(e, !0, !0, !1), + e + } + , + i.allBodies = function(e) { + for (var t = [].concat(e.bodies), n = 0; n < e.composites.length; n++) + t = t.concat(i.allBodies(e.composites[n])); + return t + } + , + i.allConstraints = function(e) { + for (var t = [].concat(e.constraints), n = 0; n < e.composites.length; n++) + t = t.concat(i.allConstraints(e.composites[n])); + return t + } + , + i.allComposites = function(e) { + for (var t = [].concat(e.composites), n = 0; n < e.composites.length; n++) + t = t.concat(i.allComposites(e.composites[n])); + return t + } + , + i.get = function(e, t, n) { + var o, r; + switch (n) { + case "body": + o = i.allBodies(e); + break; + case "constraint": + o = i.allConstraints(e); + break; + case "composite": + o = i.allComposites(e).concat(e); + } + return o ? 0 === (r = o.filter(function(e) { + return e.id.toString() === t.toString() + })).length ? null : r[0] : null + } + , + i.move = function(e, t, n) { + return i.remove(e, t), + i.add(n, t), + e + } + , + i.rebase = function(e) { + for (var t = i.allBodies(e).concat(i.allConstraints(e)).concat(i.allComposites(e)), n = 0; n < t.length; n++) + t[n].id = r.nextId(); + return i.setModified(e, !0, !0, !1), + e + } + , + i.translate = function(e, t, n) { + for (var o = n ? i.allBodies(e) : e.bodies, r = 0; r < o.length; r++) + a.translate(o[r], t); + return i.setModified(e, !0, !0, !1), + e + } + , + i.rotate = function(e, t, n, o) { + for (var r = Math.cos(t), s = Math.sin(t), l = o ? i.allBodies(e) : e.bodies, c = 0; c < l.length; c++) { + var d = l[c] + , u = d.position.x - n.x + , p = d.position.y - n.y; + a.setPosition(d, { + x: n.x + (u * r - p * s), + y: n.y + (u * s + p * r) + }), + a.rotate(d, t) + } + return i.setModified(e, !0, !0, !1), + e + } + , + i.scale = function(e, t, n, o, r) { + for (var s = r ? i.allBodies(e) : e.bodies, l = 0; l < s.length; l++) { + var c = s[l] + , d = c.position.x - o.x + , u = c.position.y - o.y; + a.setPosition(c, { + x: o.x + d * t, + y: o.y + u * n + }), + a.scale(c, t, n) + } + return i.setModified(e, !0, !0, !1), + e + } + , + i.bounds = function(e) { + for (var t = i.allBodies(e), n = [], o = 0; o < t.length; o += 1) { + var r = t[o]; + n.push(r.bounds.min, r.bounds.max) + } + return s.create(n) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2) + , s = n(7) + , a = (n(10), + n(0)) + , l = n(1) + , c = n(15); + !function() { + i._inertiaScale = 4, + i._nextCollidingGroupId = 1, + i._nextNonCollidingGroupId = -1, + i._nextCategory = 1, + i.create = function(t) { + var n = { + id: a.nextId(), + type: "body", + label: "Body", + parts: [], + plugin: {}, + angle: 0, + vertices: o.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"), + position: { + x: 0, + y: 0 + }, + force: { + x: 0, + y: 0 + }, + torque: 0, + positionImpulse: { + x: 0, + y: 0 + }, + constraintImpulse: { + x: 0, + y: 0, + angle: 0 + }, + totalContacts: 0, + speed: 0, + angularSpeed: 0, + velocity: { + x: 0, + y: 0 + }, + angularVelocity: 0, + isSensor: !1, + isStatic: !1, + isSleeping: !1, + motion: 0, + sleepThreshold: 60, + density: .001, + restitution: 0, + friction: .1, + frictionStatic: .5, + frictionAir: .01, + collisionFilter: { + category: 1, + mask: 4294967295, + group: 0 + }, + slop: .05, + timeScale: 1, + render: { + visible: !0, + opacity: 1, + strokeStyle: null, + fillStyle: null, + lineWidth: null, + sprite: { + xScale: 1, + yScale: 1, + xOffset: 0, + yOffset: 0 + } + }, + events: null, + bounds: null, + chamfer: null, + circleRadius: 0, + positionPrev: null, + anglePrev: 0, + parent: null, + axes: null, + area: 0, + mass: 0, + inertia: 0, + _original: null + } + , i = a.extend(n, t); + return e(i, t), + i + } + , + i.nextGroup = function(e) { + return e ? i._nextNonCollidingGroupId-- : i._nextCollidingGroupId++ + } + , + i.nextCategory = function() { + return i._nextCategory = i._nextCategory << 1, + i._nextCategory + } + ; + var e = function(e, t) { + t = t || {}, + i.set(e, { + bounds: e.bounds || l.create(e.vertices), + positionPrev: e.positionPrev || r.clone(e.position), + anglePrev: e.anglePrev || e.angle, + vertices: e.vertices, + parts: e.parts || [e], + isStatic: e.isStatic, + isSleeping: e.isSleeping, + parent: e.parent || e + }), + o.rotate(e.vertices, e.angle, e.position), + c.rotate(e.axes, e.angle), + l.update(e.bounds, e.vertices, e.velocity), + i.set(e, { + axes: t.axes || e.axes, + area: t.area || e.area, + mass: t.mass || e.mass, + inertia: t.inertia || e.inertia + }); + var n = e.isStatic ? "#14151f" : a.choose(["#f19648", "#f5d259", "#f55a3c", "#063e7b", "#ececd1"]) + , s = e.isStatic ? "#555" : "#ccc" + , d = e.isStatic && null === e.render.fillStyle ? 1 : 0; + e.render.fillStyle = e.render.fillStyle || n, + e.render.strokeStyle = e.render.strokeStyle || s, + e.render.lineWidth = e.render.lineWidth || d, + e.render.sprite.xOffset += -(e.bounds.min.x - e.position.x) / (e.bounds.max.x - e.bounds.min.x), + e.render.sprite.yOffset += -(e.bounds.min.y - e.position.y) / (e.bounds.max.y - e.bounds.min.y) + }; + i.set = function(e, t, n) { + var o; + for (o in "string" == typeof t && (o = t, + (t = {})[o] = n), + t) + if (Object.prototype.hasOwnProperty.call(t, o)) + switch (n = t[o], + o) { + case "isStatic": + i.setStatic(e, n); + break; + case "isSleeping": + s.set(e, n); + break; + case "mass": + i.setMass(e, n); + break; + case "density": + i.setDensity(e, n); + break; + case "inertia": + i.setInertia(e, n); + break; + case "vertices": + i.setVertices(e, n); + break; + case "position": + i.setPosition(e, n); + break; + case "angle": + i.setAngle(e, n); + break; + case "velocity": + i.setVelocity(e, n); + break; + case "angularVelocity": + i.setAngularVelocity(e, n); + break; + case "parts": + i.setParts(e, n); + break; + case "centre": + i.setCentre(e, n); + break; + default: + e[o] = n; + } + } + , + i.setStatic = function(e, t) { + for (var n = 0; n < e.parts.length; n++) { + var i = e.parts[n]; + i.isStatic = t, + t ? (i._original = { + restitution: i.restitution, + friction: i.friction, + mass: i.mass, + inertia: i.inertia, + density: i.density, + inverseMass: i.inverseMass, + inverseInertia: i.inverseInertia + }, + i.restitution = 0, + i.friction = 1, + i.mass = i.inertia = i.density = 1 / 0, + i.inverseMass = i.inverseInertia = 0, + i.positionPrev.x = i.position.x, + i.positionPrev.y = i.position.y, + i.anglePrev = i.angle, + i.angularVelocity = 0, + i.speed = 0, + i.angularSpeed = 0, + i.motion = 0) : i._original && (i.restitution = i._original.restitution, + i.friction = i._original.friction, + i.mass = i._original.mass, + i.inertia = i._original.inertia, + i.density = i._original.density, + i.inverseMass = i._original.inverseMass, + i.inverseInertia = i._original.inverseInertia, + i._original = null) + } + } + , + i.setMass = function(e, t) { + var n = e.inertia / (e.mass / 6); + e.inertia = n * (t / 6), + e.inverseInertia = 1 / e.inertia, + e.mass = t, + e.inverseMass = 1 / e.mass, + e.density = e.mass / e.area + } + , + i.setDensity = function(e, t) { + i.setMass(e, t * e.area), + e.density = t + } + , + i.setInertia = function(e, t) { + e.inertia = t, + e.inverseInertia = 1 / e.inertia + } + , + i.setVertices = function(e, t) { + t[0].body === e ? e.vertices = t : e.vertices = o.create(t, e), + e.axes = c.fromVertices(e.vertices), + e.area = o.area(e.vertices), + i.setMass(e, e.density * e.area); + var n = o.centre(e.vertices); + o.translate(e.vertices, n, -1), + i.setInertia(e, i._inertiaScale * o.inertia(e.vertices, e.mass)), + o.translate(e.vertices, e.position), + l.update(e.bounds, e.vertices, e.velocity) + } + , + i.setParts = function(e, t, n) { + var r; + for (t = t.slice(0), + e.parts.length = 0, + e.parts.push(e), + e.parent = e, + r = 0; r < t.length; r++) { + var s = t[r]; + s !== e && (s.parent = e, + e.parts.push(s)) + } + if (1 !== e.parts.length) { + if (n = void 0 === n || n) { + var a = []; + for (r = 0; r < t.length; r++) + a = a.concat(t[r].vertices); + o.clockwiseSort(a); + var l = o.hull(a) + , c = o.centre(l); + i.setVertices(e, l), + o.translate(e.vertices, c) + } + var d = i._totalProperties(e); + e.area = d.area, + e.parent = e, + e.position.x = d.centre.x, + e.position.y = d.centre.y, + e.positionPrev.x = d.centre.x, + e.positionPrev.y = d.centre.y, + i.setMass(e, d.mass), + i.setInertia(e, d.inertia), + i.setPosition(e, d.centre) + } + } + , + i.setCentre = function(e, t, n) { + n ? (e.positionPrev.x += t.x, + e.positionPrev.y += t.y, + e.position.x += t.x, + e.position.y += t.y) : (e.positionPrev.x = t.x - (e.position.x - e.positionPrev.x), + e.positionPrev.y = t.y - (e.position.y - e.positionPrev.y), + e.position.x = t.x, + e.position.y = t.y) + } + , + i.setPosition = function(e, t) { + var n = r.sub(t, e.position); + e.positionPrev.x += n.x, + e.positionPrev.y += n.y; + for (var i = 0; i < e.parts.length; i++) { + var s = e.parts[i]; + s.position.x += n.x, + s.position.y += n.y, + o.translate(s.vertices, n), + l.update(s.bounds, s.vertices, e.velocity) + } + } + , + i.setAngle = function(e, t) { + var n = t - e.angle; + e.anglePrev += n; + for (var i = 0; i < e.parts.length; i++) { + var s = e.parts[i]; + s.angle += n, + o.rotate(s.vertices, n, e.position), + c.rotate(s.axes, n), + l.update(s.bounds, s.vertices, e.velocity), + i > 0 && r.rotateAbout(s.position, n, e.position, s.position) + } + } + , + i.setVelocity = function(e, t) { + e.positionPrev.x = e.position.x - t.x, + e.positionPrev.y = e.position.y - t.y, + e.velocity.x = t.x, + e.velocity.y = t.y, + e.speed = r.magnitude(e.velocity) + } + , + i.setAngularVelocity = function(e, t) { + e.anglePrev = e.angle - t, + e.angularVelocity = t, + e.angularSpeed = Math.abs(e.angularVelocity) + } + , + i.translate = function(e, t) { + i.setPosition(e, r.add(e.position, t)) + } + , + i.rotate = function(e, t, n) { + if (n) { + var o = Math.cos(t) + , r = Math.sin(t) + , s = e.position.x - n.x + , a = e.position.y - n.y; + i.setPosition(e, { + x: n.x + (s * o - a * r), + y: n.y + (s * r + a * o) + }), + i.setAngle(e, e.angle + t) + } else + i.setAngle(e, e.angle + t) + } + , + i.scale = function(e, t, n, r) { + var s = 0 + , a = 0; + r = r || e.position; + for (var d = 0; d < e.parts.length; d++) { + var u = e.parts[d]; + o.scale(u.vertices, t, n, r), + u.axes = c.fromVertices(u.vertices), + u.area = o.area(u.vertices), + i.setMass(u, e.density * u.area), + o.translate(u.vertices, { + x: -u.position.x, + y: -u.position.y + }), + i.setInertia(u, i._inertiaScale * o.inertia(u.vertices, u.mass)), + o.translate(u.vertices, { + x: u.position.x, + y: u.position.y + }), + d > 0 && (s += u.area, + a += u.inertia), + u.position.x = r.x + (u.position.x - r.x) * t, + u.position.y = r.y + (u.position.y - r.y) * n, + l.update(u.bounds, u.vertices, e.velocity) + } + e.parts.length > 1 && (e.area = s, + e.isStatic || (i.setMass(e, e.density * s), + i.setInertia(e, a))), + e.circleRadius && (t === n ? e.circleRadius *= t : e.circleRadius = null) + } + , + i.update = function(e, t, n, i) { + var s = Math.pow(t * n * e.timeScale, 2) + , a = 1 - e.frictionAir * n * e.timeScale + , d = e.position.x - e.positionPrev.x + , u = e.position.y - e.positionPrev.y; + e.velocity.x = d * a * i + e.force.x / e.mass * s, + e.velocity.y = u * a * i + e.force.y / e.mass * s, + e.positionPrev.x = e.position.x, + e.positionPrev.y = e.position.y, + e.position.x += e.velocity.x, + e.position.y += e.velocity.y, + e.angularVelocity = (e.angle - e.anglePrev) * a * i + e.torque / e.inertia * s, + e.anglePrev = e.angle, + e.angle += e.angularVelocity, + e.speed = r.magnitude(e.velocity), + e.angularSpeed = Math.abs(e.angularVelocity); + for (var p = 0; p < e.parts.length; p++) { + var f = e.parts[p]; + o.translate(f.vertices, e.velocity), + p > 0 && (f.position.x += e.velocity.x, + f.position.y += e.velocity.y), + 0 !== e.angularVelocity && (o.rotate(f.vertices, e.angularVelocity, e.position), + c.rotate(f.axes, e.angularVelocity), + p > 0 && r.rotateAbout(f.position, e.angularVelocity, e.position, f.position)), + l.update(f.bounds, f.vertices, e.velocity) + } + } + , + i.applyForce = function(e, t, n) { + e.force.x += n.x, + e.force.y += n.y; + var i = t.x - e.position.x + , o = t.y - e.position.y; + e.torque += i * n.y - o * n.x + } + , + i._totalProperties = function(e) { + for (var t = { + mass: 0, + area: 0, + inertia: 0, + centre: { + x: 0, + y: 0 + } + }, n = 1 === e.parts.length ? 0 : 1; n < e.parts.length; n++) { + var i = e.parts[n] + , o = i.mass !== 1 / 0 ? i.mass : 1; + t.mass += o, + t.area += i.area, + t.inertia += i.inertia, + t.centre = r.add(t.centre, r.mult(i.position, o)) + } + return t.centre = r.div(t.centre, t.mass), + t + } + }() + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(4); + i._motionWakeThreshold = .18, + i._motionSleepThreshold = .08, + i._minBias = .9, + i.update = function(e, t) { + for (var n = t * t * t, o = 0; o < e.length; o++) { + var r = e[o] + , s = r.speed * r.speed + r.angularSpeed * r.angularSpeed; + if (0 === r.force.x && 0 === r.force.y) { + var a = Math.min(r.motion, s) + , l = Math.max(r.motion, s); + r.motion = i._minBias * a + (1 - i._minBias) * l, + r.sleepThreshold > 0 && r.motion < i._motionSleepThreshold * n ? (r.sleepCounter += 1, + r.sleepCounter >= r.sleepThreshold && i.set(r, !0)) : r.sleepCounter > 0 && (r.sleepCounter -= 1) + } else + i.set(r, !1) + } + } + , + i.afterCollisions = function(e, t) { + for (var n = t * t * t, o = 0; o < e.length; o++) { + var r = e[o]; + if (r.isActive) { + var s = r.collision + , a = s.bodyA.parent + , l = s.bodyB.parent; + if (!(a.isSleeping && l.isSleeping || a.isStatic || l.isStatic) && (a.isSleeping || l.isSleeping)) { + var c = a.isSleeping && !a.isStatic ? a : l + , d = c === a ? l : a; + !c.isStatic && d.motion > i._motionWakeThreshold * n && i.set(c, !1) + } + } + } + } + , + i.set = function(e, t) { + var n = e.isSleeping; + t ? (e.isSleeping = !0, + e.sleepCounter = e.sleepThreshold, + e.positionImpulse.x = 0, + e.positionImpulse.y = 0, + e.positionPrev.x = e.position.x, + e.positionPrev.y = e.position.y, + e.anglePrev = e.angle, + e.speed = 0, + e.angularSpeed = 0, + e.motion = 0, + n || o.trigger(e, "sleepStart")) : (e.isSleeping = !1, + e.sleepCounter = 0, + n && o.trigger(e, "sleepEnd")) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2) + , s = n(7) + , a = n(1) + , l = n(15) + , c = n(0); + i._warming = .4, + i._torqueDampen = 1, + i._minLength = 1e-6, + i.create = function(e) { + var t = e; + t.bodyA && !t.pointA && (t.pointA = { + x: 0, + y: 0 + }), + t.bodyB && !t.pointB && (t.pointB = { + x: 0, + y: 0 + }); + var n = t.bodyA ? r.add(t.bodyA.position, t.pointA) : t.pointA + , i = t.bodyB ? r.add(t.bodyB.position, t.pointB) : t.pointB + , o = r.magnitude(r.sub(n, i)); + t.length = void 0 !== t.length ? t.length : o, + t.id = t.id || c.nextId(), + t.label = t.label || "Constraint", + t.type = "constraint", + t.stiffness = t.stiffness || (t.length > 0 ? 1 : .7), + t.damping = t.damping || 0, + t.angularStiffness = t.angularStiffness || 0, + t.angleA = t.bodyA ? t.bodyA.angle : t.angleA, + t.angleB = t.bodyB ? t.bodyB.angle : t.angleB, + t.plugin = {}; + var s = { + visible: !0, + lineWidth: 2, + strokeStyle: "#ffffff", + type: "line", + anchors: !0 + }; + return 0 === t.length && t.stiffness > .1 ? (s.type = "pin", + s.anchors = !1) : t.stiffness < .9 && (s.type = "spring"), + t.render = c.extend(s, t.render), + t + } + , + i.preSolveAll = function(e) { + for (var t = 0; t < e.length; t += 1) { + var n = e[t] + , i = n.constraintImpulse; + n.isStatic || 0 === i.x && 0 === i.y && 0 === i.angle || (n.position.x += i.x, + n.position.y += i.y, + n.angle += i.angle) + } + } + , + i.solveAll = function(e, t) { + for (var n = 0; n < e.length; n += 1) { + var o = e[n] + , r = !o.bodyA || o.bodyA && o.bodyA.isStatic + , s = !o.bodyB || o.bodyB && o.bodyB.isStatic; + (r || s) && i.solve(e[n], t) + } + for (n = 0; n < e.length; n += 1) + r = !(o = e[n]).bodyA || o.bodyA && o.bodyA.isStatic, + s = !o.bodyB || o.bodyB && o.bodyB.isStatic, + r || s || i.solve(e[n], t) + } + , + i.solve = function(e, t) { + var n = e.bodyA + , o = e.bodyB + , s = e.pointA + , a = e.pointB; + if (n || o) { + n && !n.isStatic && (r.rotate(s, n.angle - e.angleA, s), + e.angleA = n.angle), + o && !o.isStatic && (r.rotate(a, o.angle - e.angleB, a), + e.angleB = o.angle); + var l = s + , c = a; + if (n && (l = r.add(n.position, s)), + o && (c = r.add(o.position, a)), + l && c) { + var d = r.sub(l, c) + , u = r.magnitude(d); + u < i._minLength && (u = i._minLength); + var p, f, v, m, y, g = (u - e.length) / u, x = e.stiffness < 1 ? e.stiffness * t : e.stiffness, h = r.mult(d, g * x), b = (n ? n.inverseMass : 0) + (o ? o.inverseMass : 0), w = b + ((n ? n.inverseInertia : 0) + (o ? o.inverseInertia : 0)); + if (e.damping) { + var S = r.create(); + v = r.div(d, u), + y = r.sub(o && r.sub(o.position, o.positionPrev) || S, n && r.sub(n.position, n.positionPrev) || S), + m = r.dot(v, y) + } + n && !n.isStatic && (f = n.inverseMass / b, + n.constraintImpulse.x -= h.x * f, + n.constraintImpulse.y -= h.y * f, + n.position.x -= h.x * f, + n.position.y -= h.y * f, + e.damping && (n.positionPrev.x -= e.damping * v.x * m * f, + n.positionPrev.y -= e.damping * v.y * m * f), + p = r.cross(s, h) / w * i._torqueDampen * n.inverseInertia * (1 - e.angularStiffness), + n.constraintImpulse.angle -= p, + n.angle -= p), + o && !o.isStatic && (f = o.inverseMass / b, + o.constraintImpulse.x += h.x * f, + o.constraintImpulse.y += h.y * f, + o.position.x += h.x * f, + o.position.y += h.y * f, + e.damping && (o.positionPrev.x += e.damping * v.x * m * f, + o.positionPrev.y += e.damping * v.y * m * f), + p = r.cross(a, h) / w * i._torqueDampen * o.inverseInertia * (1 - e.angularStiffness), + o.constraintImpulse.angle += p, + o.angle += p) + } + } + } + , + i.postSolveAll = function(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t] + , c = n.constraintImpulse; + if (!(n.isStatic || 0 === c.x && 0 === c.y && 0 === c.angle)) { + s.set(n, !1); + for (var d = 0; d < n.parts.length; d++) { + var u = n.parts[d]; + o.translate(u.vertices, c), + d > 0 && (u.position.x += c.x, + u.position.y += c.y), + 0 !== c.angle && (o.rotate(u.vertices, c.angle, n.position), + l.rotate(u.axes, c.angle), + d > 0 && r.rotateAbout(u.position, c.angle, n.position, u.position)), + a.update(u.bounds, u.vertices, n.velocity) + } + c.angle *= i._warming, + c.x *= i._warming, + c.y *= i._warming + } + } + } + , + i.pointAWorld = function(e) { + return { + x: (e.bodyA ? e.bodyA.position.x : 0) + e.pointA.x, + y: (e.bodyA ? e.bodyA.position.y : 0) + e.pointA.y + } + } + , + i.pointBWorld = function(e) { + return { + x: (e.bodyB ? e.bodyB.position.x : 0) + e.pointB.x, + y: (e.bodyB ? e.bodyB.position.y : 0) + e.pointB.y + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(18); + i.create = function(e, t) { + var n = e.bodyA + , o = e.bodyB + , r = e.parentA + , s = e.parentB + , a = { + id: i.id(n, o), + bodyA: n, + bodyB: o, + contacts: {}, + activeContacts: [], + separation: 0, + isActive: !0, + confirmedActive: !0, + isSensor: n.isSensor || o.isSensor, + timeCreated: t, + timeUpdated: t, + inverseMass: r.inverseMass + s.inverseMass, + friction: Math.min(r.friction, s.friction), + frictionStatic: Math.max(r.frictionStatic, s.frictionStatic), + restitution: Math.max(r.restitution, s.restitution), + slop: Math.max(r.slop, s.slop) + }; + return i.update(a, e, t), + a + } + , + i.update = function(e, t, n) { + var r = e.contacts + , s = t.supports + , a = e.activeContacts + , l = t.parentA + , c = t.parentB; + if (e.collision = t, + e.inverseMass = l.inverseMass + c.inverseMass, + e.friction = Math.min(l.friction, c.friction), + e.frictionStatic = Math.max(l.frictionStatic, c.frictionStatic), + e.restitution = Math.max(l.restitution, c.restitution), + e.slop = Math.max(l.slop, c.slop), + a.length = 0, + t.collided) { + for (var d = 0; d < s.length; d++) { + var u = s[d] + , p = o.id(u) + , f = r[p]; + f ? a.push(f) : a.push(r[p] = o.create(u)) + } + e.separation = t.depth, + i.setActive(e, !0, n) + } else + !0 === e.isActive && i.setActive(e, !1, n) + } + , + i.setActive = function(e, t, n) { + t ? (e.isActive = !0, + e.timeUpdated = n) : (e.isActive = !1, + e.activeContacts.length = 0) + } + , + i.id = function(e, t) { + return e.id < t.id ? "A" + e.id + "B" + t.id : "A" + t.id + "B" + e.id + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0) + , r = n(5) + , s = n(1) + , a = n(4) + , l = n(11) + , c = n(2) + , d = n(14); + !function() { + var e, t; + "undefined" != typeof window && (e = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(e) { + window.setTimeout(function() { + e(o.now()) + }, 1e3 / 60) + } + , + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame), + i.create = function(e) { + var t = { + controller: i, + engine: null, + element: null, + canvas: null, + mouse: null, + frameRequestId: null, + options: { + width: 800, + height: 600, + pixelRatio: 1, + background: "#14151f", + wireframeBackground: "#14151f", + hasBounds: !!e.bounds, + enabled: !0, + wireframes: !0, + showSleeping: !0, + showDebug: !1, + showBroadphase: !1, + showBounds: !1, + showVelocity: !1, + showCollisions: !1, + showSeparations: !1, + showAxes: !1, + showPositions: !1, + showAngleIndicator: !1, + showIds: !1, + showShadows: !1, + showVertexNumbers: !1, + showConvexHulls: !1, + showInternalEdges: !1, + showMousePosition: !1 + } + } + , r = o.extend(t, e); + return r.canvas && (r.canvas.width = r.options.width || r.canvas.width, + r.canvas.height = r.options.height || r.canvas.height), + r.mouse = e.mouse, + r.engine = e.engine, + r.canvas = r.canvas || n(r.options.width, r.options.height), + r.context = r.canvas.getContext("2d"), + r.textures = {}, + r.bounds = r.bounds || { + min: { + x: 0, + y: 0 + }, + max: { + x: r.canvas.width, + y: r.canvas.height + } + }, + 1 !== r.options.pixelRatio && i.setPixelRatio(r, r.options.pixelRatio), + o.isElement(r.element) ? r.element.appendChild(r.canvas) : r.canvas.parentNode || o.log("Render.create: options.element was undefined, render.canvas was created but not appended", "warn"), + r + } + , + i.run = function(t) { + !function n(o) { + t.frameRequestId = e(n), + i.world(t) + }() + } + , + i.stop = function(e) { + t(e.frameRequestId) + } + , + i.setPixelRatio = function(e, t) { + var n = e.options + , i = e.canvas; + "auto" === t && (t = u(i)), + n.pixelRatio = t, + i.setAttribute("data-pixel-ratio", t), + i.width = n.width * t, + i.height = n.height * t, + i.style.width = n.width + "px", + i.style.height = n.height + "px" + } + , + i.lookAt = function(e, t, n, i) { + i = void 0 === i || i, + t = o.isArray(t) ? t : [t], + n = n || { + x: 0, + y: 0 + }; + for (var r = { + min: { + x: 1 / 0, + y: 1 / 0 + }, + max: { + x: -1 / 0, + y: -1 / 0 + } + }, s = 0; s < t.length; s += 1) { + var a = t[s] + , l = a.bounds ? a.bounds.min : a.min || a.position || a + , c = a.bounds ? a.bounds.max : a.max || a.position || a; + l && c && (l.x < r.min.x && (r.min.x = l.x), + c.x > r.max.x && (r.max.x = c.x), + l.y < r.min.y && (r.min.y = l.y), + c.y > r.max.y && (r.max.y = c.y)) + } + var u = r.max.x - r.min.x + 2 * n.x + , p = r.max.y - r.min.y + 2 * n.y + , f = e.canvas.height + , v = e.canvas.width / f + , m = u / p + , y = 1 + , g = 1; + m > v ? g = m / v : y = v / m, + e.options.hasBounds = !0, + e.bounds.min.x = r.min.x, + e.bounds.max.x = r.min.x + u * y, + e.bounds.min.y = r.min.y, + e.bounds.max.y = r.min.y + p * g, + i && (e.bounds.min.x += .5 * u - u * y * .5, + e.bounds.max.x += .5 * u - u * y * .5, + e.bounds.min.y += .5 * p - p * g * .5, + e.bounds.max.y += .5 * p - p * g * .5), + e.bounds.min.x -= n.x, + e.bounds.max.x -= n.x, + e.bounds.min.y -= n.y, + e.bounds.max.y -= n.y, + e.mouse && (d.setScale(e.mouse, { + x: (e.bounds.max.x - e.bounds.min.x) / e.canvas.width, + y: (e.bounds.max.y - e.bounds.min.y) / e.canvas.height + }), + d.setOffset(e.mouse, e.bounds.min)) + } + , + i.startViewTransform = function(e) { + var t = e.bounds.max.x - e.bounds.min.x + , n = e.bounds.max.y - e.bounds.min.y + , i = t / e.options.width + , o = n / e.options.height; + e.context.setTransform(e.options.pixelRatio / i, 0, 0, e.options.pixelRatio / o, 0, 0), + e.context.translate(-e.bounds.min.x, -e.bounds.min.y) + } + , + i.endViewTransform = function(e) { + e.context.setTransform(e.options.pixelRatio, 0, 0, e.options.pixelRatio, 0, 0) + } + , + i.world = function(e) { + var t, n = e.engine, o = n.world, u = e.canvas, p = e.context, v = e.options, m = r.allBodies(o), y = r.allConstraints(o), g = v.wireframes ? v.wireframeBackground : v.background, x = [], h = [], b = { + timestamp: n.timing.timestamp + }; + if (a.trigger(e, "beforeRender", b), + e.currentBackground !== g && f(e, g), + p.globalCompositeOperation = "source-in", + p.fillStyle = "transparent", + p.fillRect(0, 0, u.width, u.height), + p.globalCompositeOperation = "source-over", + v.hasBounds) { + for (t = 0; t < m.length; t++) { + var w = m[t]; + s.overlaps(w.bounds, e.bounds) && x.push(w) + } + for (t = 0; t < y.length; t++) { + var S = y[t] + , A = S.bodyA + , P = S.bodyB + , C = S.pointA + , M = S.pointB; + A && (C = c.add(A.position, S.pointA)), + P && (M = c.add(P.position, S.pointB)), + C && M && (s.contains(e.bounds, C) || s.contains(e.bounds, M)) && h.push(S) + } + i.startViewTransform(e), + e.mouse && (d.setScale(e.mouse, { + x: (e.bounds.max.x - e.bounds.min.x) / e.options.width, + y: (e.bounds.max.y - e.bounds.min.y) / e.options.height + }), + d.setOffset(e.mouse, e.bounds.min)) + } else + h = y, + x = m, + 1 !== e.options.pixelRatio && e.context.setTransform(e.options.pixelRatio, 0, 0, e.options.pixelRatio, 0, 0); + !v.wireframes || n.enableSleeping && v.showSleeping ? i.bodies(e, x, p) : (v.showConvexHulls && i.bodyConvexHulls(e, x, p), + i.bodyWireframes(e, x, p)), + v.showBounds && i.bodyBounds(e, x, p), + (v.showAxes || v.showAngleIndicator) && i.bodyAxes(e, x, p), + v.showPositions && i.bodyPositions(e, x, p), + v.showVelocity && i.bodyVelocity(e, x, p), + v.showIds && i.bodyIds(e, x, p), + v.showSeparations && i.separations(e, n.pairs.list, p), + v.showCollisions && i.collisions(e, n.pairs.list, p), + v.showVertexNumbers && i.vertexNumbers(e, x, p), + v.showMousePosition && i.mousePosition(e, e.mouse, p), + i.constraints(h, p), + v.showBroadphase && n.broadphase.controller === l && i.grid(e, n.broadphase, p), + v.showDebug && i.debug(e, p), + v.hasBounds && i.endViewTransform(e), + a.trigger(e, "afterRender", b) + } + , + i.debug = function(e, t) { + var n = t + , i = e.engine + , o = i.world + , s = i.metrics + , a = e.options + , c = r.allBodies(o); + if (i.timing.timestamp - (e.debugTimestamp || 0) >= 500) { + var d = ""; + s.timing && (d += "fps: " + Math.round(s.timing.fps) + " "), + s.extended && (s.timing && (d += "delta: " + s.timing.delta.toFixed(3) + " ", + d += "correction: " + s.timing.correction.toFixed(3) + " "), + d += "bodies: " + c.length + " ", + i.broadphase.controller === l && (d += "buckets: " + s.buckets + " "), + d += "\n", + d += "collisions: " + s.collisions + " ", + d += "pairs: " + i.pairs.list.length + " ", + d += "broad: " + s.broadEff + " ", + d += "mid: " + s.midEff + " ", + d += "narrow: " + s.narrowEff + " "), + e.debugString = d, + e.debugTimestamp = i.timing.timestamp + } + if (e.debugString) { + n.font = "12px Arial", + a.wireframes ? n.fillStyle = "rgba(255,255,255,0.5)" : n.fillStyle = "rgba(0,0,0,0.5)"; + for (var u = e.debugString.split("\n"), p = 0; p < u.length; p++) + n.fillText(u[p], 50, 50 + 18 * p) + } + } + , + i.constraints = function(e, t) { + for (var n = t, i = 0; i < e.length; i++) { + var r = e[i]; + if (r.render.visible && r.pointA && r.pointB) { + var s, a, l = r.bodyA, d = r.bodyB; + if (s = l ? c.add(l.position, r.pointA) : r.pointA, + "pin" === r.render.type) + n.beginPath(), + n.arc(s.x, s.y, 3, 0, 2 * Math.PI), + n.closePath(); + else { + if (a = d ? c.add(d.position, r.pointB) : r.pointB, + n.beginPath(), + n.moveTo(s.x, s.y), + "spring" === r.render.type) + for (var u, p = c.sub(a, s), f = c.perp(c.normalise(p)), v = Math.ceil(o.clamp(r.length / 5, 12, 20)), m = 1; m < v; m += 1) + u = m % 2 == 0 ? 1 : -1, + n.lineTo(s.x + p.x * (m / v) + f.x * u * 4, s.y + p.y * (m / v) + f.y * u * 4); + n.lineTo(a.x, a.y) + } + r.render.lineWidth && (n.lineWidth = r.render.lineWidth, + n.strokeStyle = r.render.strokeStyle, + n.stroke()), + r.render.anchors && (n.fillStyle = r.render.strokeStyle, + n.beginPath(), + n.arc(s.x, s.y, 3, 0, 2 * Math.PI), + n.arc(a.x, a.y, 3, 0, 2 * Math.PI), + n.closePath(), + n.fill()) + } + } + } + , + i.bodyShadows = function(e, t, n) { + for (var i = n, o = (e.engine, + 0); o < t.length; o++) { + var r = t[o]; + if (r.render.visible) { + if (r.circleRadius) + i.beginPath(), + i.arc(r.position.x, r.position.y, r.circleRadius, 0, 2 * Math.PI), + i.closePath(); + else { + i.beginPath(), + i.moveTo(r.vertices[0].x, r.vertices[0].y); + for (var s = 1; s < r.vertices.length; s++) + i.lineTo(r.vertices[s].x, r.vertices[s].y); + i.closePath() + } + var a = r.position.x - .5 * e.options.width + , l = r.position.y - .2 * e.options.height + , c = Math.abs(a) + Math.abs(l); + i.shadowColor = "rgba(0,0,0,0.15)", + i.shadowOffsetX = .05 * a, + i.shadowOffsetY = .05 * l, + i.shadowBlur = 1 + 12 * Math.min(1, c / 1e3), + i.fill(), + i.shadowColor = null, + i.shadowOffsetX = null, + i.shadowOffsetY = null, + i.shadowBlur = null + } + } + } + , + i.bodies = function(e, t, n) { + var i, o, r, s, a = n, l = (e.engine, + e.options), c = l.showInternalEdges || !l.wireframes; + for (r = 0; r < t.length; r++) + if ((i = t[r]).render.visible) + for (s = i.parts.length > 1 ? 1 : 0; s < i.parts.length; s++) + if ((o = i.parts[s]).render.visible) { + if (l.showSleeping && i.isSleeping ? a.globalAlpha = .5 * o.render.opacity : 1 !== o.render.opacity && (a.globalAlpha = o.render.opacity), + o.render.sprite && o.render.sprite.texture && !l.wireframes) { + var d = o.render.sprite + , u = p(e, d.texture); + a.translate(o.position.x, o.position.y), + a.rotate(o.angle), + a.drawImage(u, u.width * -d.xOffset * d.xScale, u.height * -d.yOffset * d.yScale, u.width * d.xScale, u.height * d.yScale), + a.rotate(-o.angle), + a.translate(-o.position.x, -o.position.y) + } else { + if (o.circleRadius) + a.beginPath(), + a.arc(o.position.x, o.position.y, o.circleRadius, 0, 2 * Math.PI); + else { + a.beginPath(), + a.moveTo(o.vertices[0].x, o.vertices[0].y); + for (var f = 1; f < o.vertices.length; f++) + !o.vertices[f - 1].isInternal || c ? a.lineTo(o.vertices[f].x, o.vertices[f].y) : a.moveTo(o.vertices[f].x, o.vertices[f].y), + o.vertices[f].isInternal && !c && a.moveTo(o.vertices[(f + 1) % o.vertices.length].x, o.vertices[(f + 1) % o.vertices.length].y); + a.lineTo(o.vertices[0].x, o.vertices[0].y), + a.closePath() + } + l.wireframes ? (a.lineWidth = 1, + a.strokeStyle = "#bbb", + a.stroke()) : (a.fillStyle = o.render.fillStyle, + o.render.lineWidth && (a.lineWidth = o.render.lineWidth, + a.strokeStyle = o.render.strokeStyle, + a.stroke()), + a.fill()) + } + a.globalAlpha = 1 + } + } + , + i.bodyWireframes = function(e, t, n) { + var i, o, r, s, a, l = n, c = e.options.showInternalEdges; + for (l.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).render.visible) + for (a = i.parts.length > 1 ? 1 : 0; a < i.parts.length; a++) { + for (o = i.parts[a], + l.moveTo(o.vertices[0].x, o.vertices[0].y), + s = 1; s < o.vertices.length; s++) + !o.vertices[s - 1].isInternal || c ? l.lineTo(o.vertices[s].x, o.vertices[s].y) : l.moveTo(o.vertices[s].x, o.vertices[s].y), + o.vertices[s].isInternal && !c && l.moveTo(o.vertices[(s + 1) % o.vertices.length].x, o.vertices[(s + 1) % o.vertices.length].y); + l.lineTo(o.vertices[0].x, o.vertices[0].y) + } + l.lineWidth = 1, + l.strokeStyle = "#bbb", + l.stroke() + } + , + i.bodyConvexHulls = function(e, t, n) { + var i, o, r, s = n; + for (s.beginPath(), + o = 0; o < t.length; o++) + if ((i = t[o]).render.visible && 1 !== i.parts.length) { + for (s.moveTo(i.vertices[0].x, i.vertices[0].y), + r = 1; r < i.vertices.length; r++) + s.lineTo(i.vertices[r].x, i.vertices[r].y); + s.lineTo(i.vertices[0].x, i.vertices[0].y) + } + s.lineWidth = 1, + s.strokeStyle = "rgba(255,255,255,0.2)", + s.stroke() + } + , + i.vertexNumbers = function(e, t, n) { + var i, o, r, s = n; + for (i = 0; i < t.length; i++) { + var a = t[i].parts; + for (r = a.length > 1 ? 1 : 0; r < a.length; r++) { + var l = a[r]; + for (o = 0; o < l.vertices.length; o++) + s.fillStyle = "rgba(255,255,255,0.2)", + s.fillText(i + "_" + o, l.position.x + .8 * (l.vertices[o].x - l.position.x), l.position.y + .8 * (l.vertices[o].y - l.position.y)) + } + } + } + , + i.mousePosition = function(e, t, n) { + var i = n; + i.fillStyle = "rgba(255,255,255,0.8)", + i.fillText(t.position.x + " " + t.position.y, t.position.x + 5, t.position.y - 5) + } + , + i.bodyBounds = function(e, t, n) { + var i = n + , o = (e.engine, + e.options); + i.beginPath(); + for (var r = 0; r < t.length; r++) { + if (t[r].render.visible) + for (var s = t[r].parts, a = s.length > 1 ? 1 : 0; a < s.length; a++) { + var l = s[a]; + i.rect(l.bounds.min.x, l.bounds.min.y, l.bounds.max.x - l.bounds.min.x, l.bounds.max.y - l.bounds.min.y) + } + } + o.wireframes ? i.strokeStyle = "rgba(255,255,255,0.08)" : i.strokeStyle = "rgba(0,0,0,0.1)", + i.lineWidth = 1, + i.stroke() + } + , + i.bodyAxes = function(e, t, n) { + var i, o, r, s, a = n, l = (e.engine, + e.options); + for (a.beginPath(), + o = 0; o < t.length; o++) { + var c = t[o] + , d = c.parts; + if (c.render.visible) + if (l.showAxes) + for (r = d.length > 1 ? 1 : 0; r < d.length; r++) + for (i = d[r], + s = 0; s < i.axes.length; s++) { + var u = i.axes[s]; + a.moveTo(i.position.x, i.position.y), + a.lineTo(i.position.x + 20 * u.x, i.position.y + 20 * u.y) + } + else + for (r = d.length > 1 ? 1 : 0; r < d.length; r++) + for (i = d[r], + s = 0; s < i.axes.length; s++) + a.moveTo(i.position.x, i.position.y), + a.lineTo((i.vertices[0].x + i.vertices[i.vertices.length - 1].x) / 2, (i.vertices[0].y + i.vertices[i.vertices.length - 1].y) / 2) + } + l.wireframes ? (a.strokeStyle = "indianred", + a.lineWidth = 1) : (a.strokeStyle = "rgba(255, 255, 255, 0.4)", + a.globalCompositeOperation = "overlay", + a.lineWidth = 2), + a.stroke(), + a.globalCompositeOperation = "source-over" + } + , + i.bodyPositions = function(e, t, n) { + var i, o, r, s, a = n, l = (e.engine, + e.options); + for (a.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).render.visible) + for (s = 0; s < i.parts.length; s++) + o = i.parts[s], + a.arc(o.position.x, o.position.y, 3, 0, 2 * Math.PI, !1), + a.closePath(); + for (l.wireframes ? a.fillStyle = "indianred" : a.fillStyle = "rgba(0,0,0,0.5)", + a.fill(), + a.beginPath(), + r = 0; r < t.length; r++) + (i = t[r]).render.visible && (a.arc(i.positionPrev.x, i.positionPrev.y, 2, 0, 2 * Math.PI, !1), + a.closePath()); + a.fillStyle = "rgba(255,165,0,0.8)", + a.fill() + } + , + i.bodyVelocity = function(e, t, n) { + var i = n; + i.beginPath(); + for (var o = 0; o < t.length; o++) { + var r = t[o]; + r.render.visible && (i.moveTo(r.position.x, r.position.y), + i.lineTo(r.position.x + 2 * (r.position.x - r.positionPrev.x), r.position.y + 2 * (r.position.y - r.positionPrev.y))) + } + i.lineWidth = 3, + i.strokeStyle = "cornflowerblue", + i.stroke() + } + , + i.bodyIds = function(e, t, n) { + var i, o, r = n; + for (i = 0; i < t.length; i++) + if (t[i].render.visible) { + var s = t[i].parts; + for (o = s.length > 1 ? 1 : 0; o < s.length; o++) { + var a = s[o]; + r.font = "12px Arial", + r.fillStyle = "rgba(255,255,255,0.5)", + r.fillText(a.id, a.position.x + 10, a.position.y - 10) + } + } + } + , + i.collisions = function(e, t, n) { + var i, o, r, s, a = n, l = e.options; + for (a.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).isActive) + for (o = i.collision, + s = 0; s < i.activeContacts.length; s++) { + var c = i.activeContacts[s].vertex; + a.rect(c.x - 1.5, c.y - 1.5, 3.5, 3.5) + } + for (l.wireframes ? a.fillStyle = "rgba(255,255,255,0.7)" : a.fillStyle = "orange", + a.fill(), + a.beginPath(), + r = 0; r < t.length; r++) + if ((i = t[r]).isActive && (o = i.collision, + i.activeContacts.length > 0)) { + var d = i.activeContacts[0].vertex.x + , u = i.activeContacts[0].vertex.y; + 2 === i.activeContacts.length && (d = (i.activeContacts[0].vertex.x + i.activeContacts[1].vertex.x) / 2, + u = (i.activeContacts[0].vertex.y + i.activeContacts[1].vertex.y) / 2), + o.bodyB === o.supports[0].body || !0 === o.bodyA.isStatic ? a.moveTo(d - 8 * o.normal.x, u - 8 * o.normal.y) : a.moveTo(d + 8 * o.normal.x, u + 8 * o.normal.y), + a.lineTo(d, u) + } + l.wireframes ? a.strokeStyle = "rgba(255,165,0,0.7)" : a.strokeStyle = "orange", + a.lineWidth = 1, + a.stroke() + } + , + i.separations = function(e, t, n) { + var i, o, r, s, a, l = n, c = e.options; + for (l.beginPath(), + a = 0; a < t.length; a++) + if ((i = t[a]).isActive) { + r = (o = i.collision).bodyA; + var d = 1; + (s = o.bodyB).isStatic || r.isStatic || (d = .5), + s.isStatic && (d = 0), + l.moveTo(s.position.x, s.position.y), + l.lineTo(s.position.x - o.penetration.x * d, s.position.y - o.penetration.y * d), + d = 1, + s.isStatic || r.isStatic || (d = .5), + r.isStatic && (d = 0), + l.moveTo(r.position.x, r.position.y), + l.lineTo(r.position.x + o.penetration.x * d, r.position.y + o.penetration.y * d) + } + c.wireframes ? l.strokeStyle = "rgba(255,165,0,0.5)" : l.strokeStyle = "orange", + l.stroke() + } + , + i.grid = function(e, t, n) { + var i = n; + e.options.wireframes ? i.strokeStyle = "rgba(255,180,0,0.1)" : i.strokeStyle = "rgba(255,180,0,0.5)", + i.beginPath(); + for (var r = o.keys(t.buckets), s = 0; s < r.length; s++) { + var a = r[s]; + if (!(t.buckets[a].length < 2)) { + var l = a.split(/C|R/); + i.rect(.5 + parseInt(l[1], 10) * t.bucketWidth, .5 + parseInt(l[2], 10) * t.bucketHeight, t.bucketWidth, t.bucketHeight) + } + } + i.lineWidth = 1, + i.stroke() + } + , + i.inspector = function(e, t) { + e.engine; + var n, i = e.selected, o = e.render, r = o.options; + if (r.hasBounds) { + var s = o.bounds.max.x - o.bounds.min.x + , a = o.bounds.max.y - o.bounds.min.y + , l = s / o.options.width + , c = a / o.options.height; + t.scale(1 / l, 1 / c), + t.translate(-o.bounds.min.x, -o.bounds.min.y) + } + for (var d = 0; d < i.length; d++) { + var u = i[d].data; + switch (t.translate(.5, .5), + t.lineWidth = 1, + t.strokeStyle = "rgba(255,165,0,0.9)", + t.setLineDash([1, 2]), + u.type) { + case "body": + n = u.bounds, + t.beginPath(), + t.rect(Math.floor(n.min.x - 3), Math.floor(n.min.y - 3), Math.floor(n.max.x - n.min.x + 6), Math.floor(n.max.y - n.min.y + 6)), + t.closePath(), + t.stroke(); + break; + case "constraint": + var p = u.pointA; + u.bodyA && (p = u.pointB), + t.beginPath(), + t.arc(p.x, p.y, 10, 0, 2 * Math.PI), + t.closePath(), + t.stroke(); + } + t.setLineDash([]), + t.translate(-.5, -.5) + } + null !== e.selectStart && (t.translate(.5, .5), + t.lineWidth = 1, + t.strokeStyle = "rgba(255,165,0,0.6)", + t.fillStyle = "rgba(255,165,0,0.1)", + n = e.selectBounds, + t.beginPath(), + t.rect(Math.floor(n.min.x), Math.floor(n.min.y), Math.floor(n.max.x - n.min.x), Math.floor(n.max.y - n.min.y)), + t.closePath(), + t.stroke(), + t.fill(), + t.translate(-.5, -.5)), + r.hasBounds && t.setTransform(1, 0, 0, 1, 0, 0) + } + ; + var n = function(e, t) { + var n = document.createElement("canvas"); + return n.width = e, + n.height = t, + n.oncontextmenu = function() { + return !1 + } + , + n.onselectstart = function() { + return !1 + } + , + n + } + , u = function(e) { + var t = e.getContext("2d"); + return (window.devicePixelRatio || 1) / (t.webkitBackingStorePixelRatio || t.mozBackingStorePixelRatio || t.msBackingStorePixelRatio || t.oBackingStorePixelRatio || t.backingStorePixelRatio || 1) + } + , p = function(e, t) { + var n = e.textures[t]; + return n || ((n = e.textures[t] = new Image).src = t, + n) + } + , f = function(e, t) { + var n = t; + /(jpg|gif|png)$/.test(t) && (n = "url(" + t + ")"), + e.canvas.style.background = n, + e.canvas.style.backgroundSize = "contain", + e.currentBackground = t + } + }() + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(9) + , r = n(12) + , s = n(0); + i.create = function(e) { + var t = { + controller: i, + detector: r.collisions, + buckets: {}, + pairs: {}, + pairsList: [], + bucketWidth: 48, + bucketHeight: 48 + }; + return s.extend(t, e) + } + , + i.update = function(e, t, n, o) { + var r, s, a, l, c, d = n.world, u = e.buckets, p = !1, f = n.metrics; + for (f.broadphaseTests = 0, + r = 0; r < t.length; r++) { + var v = t[r]; + if ((!v.isSleeping || o) && !(v.bounds.max.x < d.bounds.min.x || v.bounds.min.x > d.bounds.max.x || v.bounds.max.y < d.bounds.min.y || v.bounds.min.y > d.bounds.max.y)) { + var m = i._getRegion(e, v); + if (!v.region || m.id !== v.region.id || o) { + f.broadphaseTests += 1, + v.region && !o || (v.region = m); + var y = i._regionUnion(m, v.region); + for (s = y.startCol; s <= y.endCol; s++) + for (a = y.startRow; a <= y.endRow; a++) { + l = u[c = i._getBucketId(s, a)]; + var g = s >= m.startCol && s <= m.endCol && a >= m.startRow && a <= m.endRow + , x = s >= v.region.startCol && s <= v.region.endCol && a >= v.region.startRow && a <= v.region.endRow; + !g && x && x && l && i._bucketRemoveBody(e, l, v), + (v.region === m || g && !x || o) && (l || (l = i._createBucket(u, c)), + i._bucketAddBody(e, l, v)) + } + v.region = m, + p = !0 + } + } + } + p && (e.pairsList = i._createActivePairsList(e)) + } + , + i.clear = function(e) { + e.buckets = {}, + e.pairs = {}, + e.pairsList = [] + } + , + i._regionUnion = function(e, t) { + var n = Math.min(e.startCol, t.startCol) + , o = Math.max(e.endCol, t.endCol) + , r = Math.min(e.startRow, t.startRow) + , s = Math.max(e.endRow, t.endRow); + return i._createRegion(n, o, r, s) + } + , + i._getRegion = function(e, t) { + var n = t.bounds + , o = Math.floor(n.min.x / e.bucketWidth) + , r = Math.floor(n.max.x / e.bucketWidth) + , s = Math.floor(n.min.y / e.bucketHeight) + , a = Math.floor(n.max.y / e.bucketHeight); + return i._createRegion(o, r, s, a) + } + , + i._createRegion = function(e, t, n, i) { + return { + id: e + "," + t + "," + n + "," + i, + startCol: e, + endCol: t, + startRow: n, + endRow: i + } + } + , + i._getBucketId = function(e, t) { + return "C" + e + "R" + t + } + , + i._createBucket = function(e, t) { + return e[t] = [] + } + , + i._bucketAddBody = function(e, t, n) { + for (var i = 0; i < t.length; i++) { + var r = t[i]; + if (!(n.id === r.id || n.isStatic && r.isStatic)) { + var s = o.id(n, r) + , a = e.pairs[s]; + a ? a[2] += 1 : e.pairs[s] = [n, r, 1] + } + } + t.push(n) + } + , + i._bucketRemoveBody = function(e, t, n) { + t.splice(s.indexOf(t, n), 1); + for (var i = 0; i < t.length; i++) { + var r = t[i] + , a = o.id(n, r) + , l = e.pairs[a]; + l && (l[2] -= 1) + } + } + , + i._createActivePairsList = function(e) { + var t, n, i = []; + t = s.keys(e.pairs); + for (var o = 0; o < t.length; o++) + (n = e.pairs[t[o]])[2] > 0 ? i.push(n) : delete e.pairs[t[o]]; + return i + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(13) + , r = n(9) + , s = n(1); + i.collisions = function(e, t) { + for (var n = [], a = t.pairs.table, l = t.metrics, c = 0; c < e.length; c++) { + var d = e[c][0] + , u = e[c][1]; + if ((!d.isStatic && !d.isSleeping || !u.isStatic && !u.isSleeping) && i.canCollide(d.collisionFilter, u.collisionFilter) && (l.midphaseTests += 1, + s.overlaps(d.bounds, u.bounds))) + for (var p = d.parts.length > 1 ? 1 : 0; p < d.parts.length; p++) + for (var f = d.parts[p], v = u.parts.length > 1 ? 1 : 0; v < u.parts.length; v++) { + var m = u.parts[v]; + if (f === d && m === u || s.overlaps(f.bounds, m.bounds)) { + var y, g = a[r.id(f, m)]; + y = g && g.isActive ? g.collision : null; + var x = o.collides(f, m, y); + l.narrowphaseTests += 1, + x.reused && (l.narrowReuseCount += 1), + x.collided && (n.push(x), + l.narrowDetections += 1) + } + } + } + return n + } + , + i.canCollide = function(e, t) { + return e.group === t.group && 0 !== e.group ? e.group > 0 : 0 != (e.mask & t.category) && 0 != (t.mask & e.category) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2); + i.collides = function(e, t, n) { + var s, a, l, c, d = !1; + if (n) { + var u = e.parent + , p = t.parent + , f = u.speed * u.speed + u.angularSpeed * u.angularSpeed + p.speed * p.speed + p.angularSpeed * p.angularSpeed; + d = n && n.collided && f < .2, + c = n + } else + c = { + collided: !1, + bodyA: e, + bodyB: t + }; + if (n && d) { + var v = c.axisBody + , m = v === e ? t : e + , y = [v.axes[n.axisNumber]]; + if (l = i._overlapAxes(v.vertices, m.vertices, y), + c.reused = !0, + l.overlap <= 0) + return c.collided = !1, + c + } else { + if ((s = i._overlapAxes(e.vertices, t.vertices, e.axes)).overlap <= 0) + return c.collided = !1, + c; + if ((a = i._overlapAxes(t.vertices, e.vertices, t.axes)).overlap <= 0) + return c.collided = !1, + c; + s.overlap < a.overlap ? (l = s, + c.axisBody = e) : (l = a, + c.axisBody = t), + c.axisNumber = l.axisNumber + } + c.bodyA = e.id < t.id ? e : t, + c.bodyB = e.id < t.id ? t : e, + c.collided = !0, + c.depth = l.overlap, + c.parentA = c.bodyA.parent, + c.parentB = c.bodyB.parent, + e = c.bodyA, + t = c.bodyB, + r.dot(l.axis, r.sub(t.position, e.position)) < 0 ? c.normal = { + x: l.axis.x, + y: l.axis.y + } : c.normal = { + x: -l.axis.x, + y: -l.axis.y + }, + c.tangent = r.perp(c.normal), + c.penetration = c.penetration || {}, + c.penetration.x = c.normal.x * c.depth, + c.penetration.y = c.normal.y * c.depth; + var g = i._findSupports(e, t, c.normal) + , x = []; + if (o.contains(e.vertices, g[0]) && x.push(g[0]), + o.contains(e.vertices, g[1]) && x.push(g[1]), + x.length < 2) { + var h = i._findSupports(t, e, r.neg(c.normal)); + o.contains(t.vertices, h[0]) && x.push(h[0]), + x.length < 2 && o.contains(t.vertices, h[1]) && x.push(h[1]) + } + return x.length < 1 && (x = [g[0]]), + c.supports = x, + c + } + , + i._overlapAxes = function(e, t, n) { + for (var o, s, a = r._temp[0], l = r._temp[1], c = { + overlap: Number.MAX_VALUE + }, d = 0; d < n.length; d++) { + if (s = n[d], + i._projectToAxis(a, e, s), + i._projectToAxis(l, t, s), + (o = Math.min(a.max - l.min, l.max - a.min)) <= 0) + return c.overlap = o, + c; + o < c.overlap && (c.overlap = o, + c.axis = s, + c.axisNumber = d) + } + return c + } + , + i._projectToAxis = function(e, t, n) { + for (var i = r.dot(t[0], n), o = i, s = 1; s < t.length; s += 1) { + var a = r.dot(t[s], n); + a > o ? o = a : a < i && (i = a) + } + e.min = i, + e.max = o + } + , + i._findSupports = function(e, t, n) { + for (var i, o, s, a, l = Number.MAX_VALUE, c = r._temp[0], d = t.vertices, u = e.position, p = 0; p < d.length; p++) + o = d[p], + c.x = o.x - u.x, + c.y = o.y - u.y, + (i = -r.dot(n, c)) < l && (l = i, + s = o); + return o = d[s.index - 1 >= 0 ? s.index - 1 : d.length - 1], + c.x = o.x - u.x, + c.y = o.y - u.y, + l = -r.dot(n, c), + a = o, + o = d[(s.index + 1) % d.length], + c.x = o.x - u.x, + c.y = o.y - u.y, + (i = -r.dot(n, c)) < l && (a = o), + [s, a] + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0); + i.create = function(e) { + var t = {}; + return e || o.log("Mouse.create: element was undefined, defaulting to document.body", "warn"), + t.element = e || document.body, + t.absolute = { + x: 0, + y: 0 + }, + t.position = { + x: 0, + y: 0 + }, + t.mousedownPosition = { + x: 0, + y: 0 + }, + t.mouseupPosition = { + x: 0, + y: 0 + }, + t.offset = { + x: 0, + y: 0 + }, + t.scale = { + x: 1, + y: 1 + }, + t.wheelDelta = 0, + t.button = -1, + t.pixelRatio = parseInt(t.element.getAttribute("data-pixel-ratio"), 10) || 1, + t.sourceEvents = { + mousemove: null, + mousedown: null, + mouseup: null, + mousewheel: null + }, + t.mousemove = function(e) { + var n = i._getRelativeMousePosition(e, t.element, t.pixelRatio); + e.changedTouches && (t.button = 0, + e.preventDefault()), + t.absolute.x = n.x, + t.absolute.y = n.y, + t.position.x = t.absolute.x * t.scale.x + t.offset.x, + t.position.y = t.absolute.y * t.scale.y + t.offset.y, + t.sourceEvents.mousemove = e + } + , + t.mousedown = function(e) { + var n = i._getRelativeMousePosition(e, t.element, t.pixelRatio); + e.changedTouches ? (t.button = 0, + e.preventDefault()) : t.button = e.button, + t.absolute.x = n.x, + t.absolute.y = n.y, + t.position.x = t.absolute.x * t.scale.x + t.offset.x, + t.position.y = t.absolute.y * t.scale.y + t.offset.y, + t.mousedownPosition.x = t.position.x, + t.mousedownPosition.y = t.position.y, + t.sourceEvents.mousedown = e + } + , + t.mouseup = function(e) { + var n = i._getRelativeMousePosition(e, t.element, t.pixelRatio); + e.changedTouches && e.preventDefault(), + t.button = -1, + t.absolute.x = n.x, + t.absolute.y = n.y, + t.position.x = t.absolute.x * t.scale.x + t.offset.x, + t.position.y = t.absolute.y * t.scale.y + t.offset.y, + t.mouseupPosition.x = t.position.x, + t.mouseupPosition.y = t.position.y, + t.sourceEvents.mouseup = e + } + , + t.mousewheel = function(e) { + t.wheelDelta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail)), + e.preventDefault() + } + , + i.setElement(t, t.element), + t + } + , + i.setElement = function(e, t) { + e.element = t, + t.addEventListener("mousemove", e.mousemove), + t.addEventListener("mousedown", e.mousedown), + t.addEventListener("mouseup", e.mouseup), + t.addEventListener("mousewheel", e.mousewheel), + t.addEventListener("DOMMouseScroll", e.mousewheel), + t.addEventListener("touchmove", e.mousemove), + t.addEventListener("touchstart", e.mousedown), + t.addEventListener("touchend", e.mouseup) + } + , + i.clearSourceEvents = function(e) { + e.sourceEvents.mousemove = null, + e.sourceEvents.mousedown = null, + e.sourceEvents.mouseup = null, + e.sourceEvents.mousewheel = null, + e.wheelDelta = 0 + } + , + i.setOffset = function(e, t) { + e.offset.x = t.x, + e.offset.y = t.y, + e.position.x = e.absolute.x * e.scale.x + e.offset.x, + e.position.y = e.absolute.y * e.scale.y + e.offset.y + } + , + i.setScale = function(e, t) { + e.scale.x = t.x, + e.scale.y = t.y, + e.position.x = e.absolute.x * e.scale.x + e.offset.x, + e.position.y = e.absolute.y * e.scale.y + e.offset.y + } + , + i._getRelativeMousePosition = function(e, t, n) { + var i, o, r = t.getBoundingClientRect(), s = document.documentElement || document.body.parentNode || document.body, a = void 0 !== window.pageXOffset ? window.pageXOffset : s.scrollLeft, l = void 0 !== window.pageYOffset ? window.pageYOffset : s.scrollTop, c = e.changedTouches; + return c ? (i = c[0].pageX - r.left - a, + o = c[0].pageY - r.top - l) : (i = e.pageX - r.left - a, + o = e.pageY - r.top - l), + { + x: i / (t.clientWidth / (t.width || t.clientWidth) * n), + y: o / (t.clientHeight / (t.height || t.clientHeight) * n) + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(2) + , r = n(0); + i.fromVertices = function(e) { + for (var t = {}, n = 0; n < e.length; n++) { + var i = (n + 1) % e.length + , s = o.normalise({ + x: e[i].y - e[n].y, + y: e[n].x - e[i].x + }) + , a = 0 === s.y ? 1 / 0 : s.x / s.y; + t[a = a.toFixed(3).toString()] = s + } + return r.values(t) + } + , + i.rotate = function(e, t) { + if (0 !== t) + for (var n = Math.cos(t), i = Math.sin(t), o = 0; o < e.length; o++) { + var r, s = e[o]; + r = s.x * n - s.y * i, + s.y = s.x * i + s.y * n, + s.x = r + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(0) + , s = n(6) + , a = n(1) + , l = n(2); + i._decompWarned = !1, + i.rectangle = function(e, t, n, i, a) { + a = a || {}; + var l = { + label: "Rectangle Body", + position: { + x: e, + y: t + }, + vertices: o.fromPath("L 0 0 L " + n + " 0 L " + n + " " + i + " L 0 " + i) + }; + if (a.chamfer) { + var c = a.chamfer; + l.vertices = o.chamfer(l.vertices, c.radius, c.quality, c.qualityMin, c.qualityMax), + delete a.chamfer + } + return s.create(r.extend({}, l, a)) + } + , + i.trapezoid = function(e, t, n, i, a, l) { + l = l || {}; + var c, d = n * (a *= .5), u = d + (1 - 2 * a) * n, p = u + d; + c = a < .5 ? "L 0 0 L " + d + " " + -i + " L " + u + " " + -i + " L " + p + " 0" : "L 0 0 L " + u + " " + -i + " L " + p + " 0"; + var f = { + label: "Trapezoid Body", + position: { + x: e, + y: t + }, + vertices: o.fromPath(c) + }; + if (l.chamfer) { + var v = l.chamfer; + f.vertices = o.chamfer(f.vertices, v.radius, v.quality, v.qualityMin, v.qualityMax), + delete l.chamfer + } + return s.create(r.extend({}, f, l)) + } + , + i.circle = function(e, t, n, o, s) { + o = o || {}; + var a = { + label: "Circle Body", + circleRadius: n + }; + s = s || 25; + var l = Math.ceil(Math.max(10, Math.min(s, n))); + return l % 2 == 1 && (l += 1), + i.polygon(e, t, l, n, r.extend({}, a, o)) + } + , + i.polygon = function(e, t, n, a, l) { + if (l = l || {}, + n < 3) + return i.circle(e, t, a, l); + for (var c = 2 * Math.PI / n, d = "", u = .5 * c, p = 0; p < n; p += 1) { + var f = u + p * c + , v = Math.cos(f) * a + , m = Math.sin(f) * a; + d += "L " + v.toFixed(3) + " " + m.toFixed(3) + " " + } + var y = { + label: "Polygon Body", + position: { + x: e, + y: t + }, + vertices: o.fromPath(d) + }; + if (l.chamfer) { + var g = l.chamfer; + y.vertices = o.chamfer(y.vertices, g.radius, g.quality, g.qualityMin, g.qualityMax), + delete l.chamfer + } + return s.create(r.extend({}, y, l)) + } + , + i.fromVertices = function(e, t, c, d, u, p, f, v) { + var m, y, g, x, h, b, w, S, A, P, C; + try { + m = n(27) + } catch (E) { + m = null + } + for (y = Boolean(m && m.quickDecomp), + d = d || {}, + x = [], + u = void 0 !== u && u, + p = void 0 !== p ? p : .01, + f = void 0 !== f ? f : 10, + v = void 0 !== v ? v : .01, + r.isArray(c[0]) || (c = [c]), + P = 0; P < c.length; P += 1) + if (b = c[P], + !!(h = o.isConvex(b)) || y || i._decompWarned || (r.warn("Could not resolve the expected 'poly-decomp' package for concave vertices in 'Bodies.fromVertices'"), + r.warn("Try 'npm install poly-decomp --save' or as a global e.g. 'window.decomp'"), + i._decompWarned = !0), + h || !y) + b = h ? o.clockwiseSort(b) : o.hull(b), + x.push({ + position: { + x: e, + y: t + }, + vertices: b + }); + else { + var M = b.map(function(e) { + return [e.x, e.y] + }); + m.makeCCW(M), + !1 !== p && m.removeCollinearPoints(M, p), + !1 !== v && m.removeDuplicatePoints && m.removeDuplicatePoints(M, v); + var k = m.quickDecomp(M); + for (w = 0; w < k.length; w++) { + var B = k[w].map(function(e) { + return { + x: e[0], + y: e[1] + } + }); + f > 0 && o.area(B) < f || x.push({ + position: o.centre(B), + vertices: B + }) + } + } + for (w = 0; w < x.length; w++) + x[w] = s.create(r.extend(x[w], d)); + if (u) + for (w = 0; w < x.length; w++) { + var I = x[w]; + for (S = w + 1; S < x.length; S++) { + var _ = x[S]; + if (a.overlaps(I.bounds, _.bounds)) { + var T = I.vertices + , R = _.vertices; + for (A = 0; A < I.vertices.length; A++) + for (C = 0; C < _.vertices.length; C++) { + var L = l.magnitudeSquared(l.sub(T[(A + 1) % T.length], R[C])) + , O = l.magnitudeSquared(l.sub(T[A], R[(C + 1) % R.length])); + L < 5 && O < 5 && (T[A].isInternal = !0, + R[C].isInternal = !0) + } + } + } + } + return x.length > 1 ? (g = s.create(r.extend({ + parts: x.slice(0) + }, d)), + s.setPosition(g, { + x: e, + y: t + }), + g) : x[0] + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(0); + i._registry = {}, + i.register = function(e) { + if (i.isPlugin(e) || o.warn("Plugin.register:", i.toString(e), "does not implement all required fields."), + e.name in i._registry) { + var t = i._registry[e.name] + , n = i.versionParse(e.version).number + , r = i.versionParse(t.version).number; + n > r ? (o.warn("Plugin.register:", i.toString(t), "was upgraded to", i.toString(e)), + i._registry[e.name] = e) : n < r ? o.warn("Plugin.register:", i.toString(t), "can not be downgraded to", i.toString(e)) : e !== t && o.warn("Plugin.register:", i.toString(e), "is already registered to different plugin object") + } else + i._registry[e.name] = e; + return e + } + , + i.resolve = function(e) { + return i._registry[i.dependencyParse(e).name] + } + , + i.toString = function(e) { + return "string" == typeof e ? e : (e.name || "anonymous") + "@" + (e.version || e.range || "0.0.0") + } + , + i.isPlugin = function(e) { + return e && e.name && e.version && e.install + } + , + i.isUsed = function(e, t) { + return e.used.indexOf(t) > -1 + } + , + i.isFor = function(e, t) { + var n = e.for && i.dependencyParse(e.for); + return !e.for || t.name === n.name && i.versionSatisfies(t.version, n.range) + } + , + i.use = function(e, t) { + if (e.uses = (e.uses || []).concat(t || []), + 0 !== e.uses.length) { + for (var n = i.dependencies(e), r = o.topologicalSort(n), s = [], a = 0; a < r.length; a += 1) + if (r[a] !== e.name) { + var l = i.resolve(r[a]); + l ? i.isUsed(e, l.name) || (i.isFor(l, e) || (o.warn("Plugin.use:", i.toString(l), "is for", l.for, "but installed on", i.toString(e) + "."), + l._warned = !0), + l.install ? l.install(e) : (o.warn("Plugin.use:", i.toString(l), "does not specify an install function."), + l._warned = !0), + l._warned ? (s.push("\uD83D\uDD36 " + i.toString(l)), + delete l._warned) : s.push("\u2705 " + i.toString(l)), + e.used.push(l.name)) : s.push("\u274C " + r[a]) + } + s.length > 0 && o.info(s.join(" ")) + } else + o.warn("Plugin.use:", i.toString(e), "does not specify any dependencies to install.") + } + , + i.dependencies = function(e, t) { + var n = i.dependencyParse(e) + , r = n.name; + if (!(r in (t = t || {}))) { + e = i.resolve(e) || e, + t[r] = o.map(e.uses || [], function(t) { + i.isPlugin(t) && i.register(t); + var r = i.dependencyParse(t) + , s = i.resolve(t); + return s && !i.versionSatisfies(s.version, r.range) ? (o.warn("Plugin.dependencies:", i.toString(s), "does not satisfy", i.toString(r), "used by", i.toString(n) + "."), + s._warned = !0, + e._warned = !0) : s || (o.warn("Plugin.dependencies:", i.toString(t), "used by", i.toString(n), "could not be resolved."), + e._warned = !0), + r.name + }); + for (var s = 0; s < t[r].length; s += 1) + i.dependencies(t[r][s], t); + return t + } + } + , + i.dependencyParse = function(e) { + return o.isString(e) ? (/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(e) || o.warn("Plugin.dependencyParse:", e, "is not a valid dependency string."), + { + name: e.split("@")[0], + range: e.split("@")[1] || "*" + }) : { + name: e.name, + range: e.range || e.version + } + } + , + i.versionParse = function(e) { + var t = /^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-]+)?$/; + t.test(e) || o.warn("Plugin.versionParse:", e, "is not a valid version or range."); + var n = t.exec(e) + , i = Number(n[4]) + , r = Number(n[5]) + , s = Number(n[6]); + return { + isRange: Boolean(n[1] || n[2]), + version: n[3], + range: e, + operator: n[1] || n[2] || "", + major: i, + minor: r, + patch: s, + parts: [i, r, s], + prerelease: n[7], + number: 1e8 * i + 1e4 * r + s + } + } + , + i.versionSatisfies = function(e, t) { + t = t || "*"; + var n = i.versionParse(t) + , o = i.versionParse(e); + if (n.isRange) { + if ("*" === n.operator || "*" === e) + return !0; + if (">" === n.operator) + return o.number > n.number; + if (">=" === n.operator) + return o.number >= n.number; + if ("~" === n.operator) + return o.major === n.major && o.minor === n.minor && o.patch >= n.patch; + if ("^" === n.operator) + return n.major > 0 ? o.major === n.major && o.number >= n.number : n.minor > 0 ? o.minor === n.minor && o.patch >= n.patch : o.patch === n.patch + } + return e === t || "*" === e + } + } + , function(e, t) { + var n = {}; + e.exports = n, + n.create = function(e) { + return { + id: n.id(e), + vertex: e, + normalImpulse: 0, + tangentImpulse: 0 + } + } + , + n.id = function(e) { + return e.body.id + "_" + e.index + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(5) + , r = (n(8), + n(0)); + i.create = function(e) { + var t = o.create() + , n = { + label: "World", + gravity: { + x: 0, + y: 1, + scale: .001 + }, + bounds: { + min: { + x: -1 / 0, + y: -1 / 0 + }, + max: { + x: 1 / 0, + y: 1 / 0 + } + } + }; + return r.extend(t, n, e) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(9) + , r = n(0); + i._pairMaxIdleLife = 1e3, + i.create = function(e) { + return r.extend({ + table: {}, + list: [], + collisionStart: [], + collisionActive: [], + collisionEnd: [] + }, e) + } + , + i.update = function(e, t, n) { + var i, r, s, a, l = e.list, c = e.table, d = e.collisionStart, u = e.collisionEnd, p = e.collisionActive; + for (d.length = 0, + u.length = 0, + p.length = 0, + a = 0; a < l.length; a++) + l[a].confirmedActive = !1; + for (a = 0; a < t.length; a++) + (i = t[a]).collided && ((s = c[r = o.id(i.bodyA, i.bodyB)]) ? (s.isActive ? p.push(s) : d.push(s), + o.update(s, i, n), + s.confirmedActive = !0) : (s = o.create(i, n), + c[r] = s, + d.push(s), + l.push(s))); + for (a = 0; a < l.length; a++) + (s = l[a]).isActive && !s.confirmedActive && (o.setActive(s, !1, n), + u.push(s)) + } + , + i.removeOld = function(e, t) { + var n, o, r, s, a = e.list, l = e.table, c = []; + for (s = 0; s < a.length; s++) + (o = (n = a[s]).collision).bodyA.isSleeping || o.bodyB.isSleeping ? n.timeUpdated = t : t - n.timeUpdated > i._pairMaxIdleLife && c.push(s); + for (s = 0; s < c.length; s++) + delete l[(n = a[r = c[s] - s]).id], + a.splice(r, 1) + } + , + i.clear = function(e) { + return e.table = {}, + e.list.length = 0, + e.collisionStart.length = 0, + e.collisionActive.length = 0, + e.collisionEnd.length = 0, + e + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(2) + , s = n(0) + , a = n(1); + i._restingThresh = 4, + i._restingThreshTangent = 6, + i._positionDampen = .9, + i._positionWarming = .8, + i._frictionNormalMultiplier = 5, + i.preSolvePosition = function(e) { + var t, n, i; + for (t = 0; t < e.length; t++) + (n = e[t]).isActive && (i = n.activeContacts.length, + n.collision.parentA.totalContacts += i, + n.collision.parentB.totalContacts += i) + } + , + i.solvePosition = function(e, t) { + var n, o, s, a, l, c, d, u, p, f = r._temp[0], v = r._temp[1], m = r._temp[2], y = r._temp[3]; + for (n = 0; n < e.length; n++) + (o = e[n]).isActive && !o.isSensor && (a = (s = o.collision).parentA, + l = s.parentB, + c = s.normal, + d = r.sub(r.add(l.positionImpulse, l.position, f), r.add(a.positionImpulse, r.sub(l.position, s.penetration, v), m), y), + o.separation = r.dot(c, d)); + for (n = 0; n < e.length; n++) + (o = e[n]).isActive && !o.isSensor && (a = (s = o.collision).parentA, + l = s.parentB, + c = s.normal, + p = (o.separation - o.slop) * t, + (a.isStatic || l.isStatic) && (p *= 2), + a.isStatic || a.isSleeping || (u = i._positionDampen / a.totalContacts, + a.positionImpulse.x += c.x * p * u, + a.positionImpulse.y += c.y * p * u), + l.isStatic || l.isSleeping || (u = i._positionDampen / l.totalContacts, + l.positionImpulse.x -= c.x * p * u, + l.positionImpulse.y -= c.y * p * u)) + } + , + i.postSolvePosition = function(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t]; + if (n.totalContacts = 0, + 0 !== n.positionImpulse.x || 0 !== n.positionImpulse.y) { + for (var s = 0; s < n.parts.length; s++) { + var l = n.parts[s]; + o.translate(l.vertices, n.positionImpulse), + a.update(l.bounds, l.vertices, n.velocity), + l.position.x += n.positionImpulse.x, + l.position.y += n.positionImpulse.y + } + n.positionPrev.x += n.positionImpulse.x, + n.positionPrev.y += n.positionImpulse.y, + r.dot(n.positionImpulse, n.velocity) < 0 ? (n.positionImpulse.x = 0, + n.positionImpulse.y = 0) : (n.positionImpulse.x *= i._positionWarming, + n.positionImpulse.y *= i._positionWarming) + } + } + } + , + i.preSolveVelocity = function(e) { + var t, n, i, o, s, a, l, c, d, u, p, f, v, m, y = r._temp[0], g = r._temp[1]; + for (t = 0; t < e.length; t++) + if ((i = e[t]).isActive && !i.isSensor) + for (o = i.activeContacts, + a = (s = i.collision).parentA, + l = s.parentB, + c = s.normal, + d = s.tangent, + n = 0; n < o.length; n++) + p = (u = o[n]).vertex, + f = u.normalImpulse, + v = u.tangentImpulse, + 0 === f && 0 === v || (y.x = c.x * f + d.x * v, + y.y = c.y * f + d.y * v, + a.isStatic || a.isSleeping || (m = r.sub(p, a.position, g), + a.positionPrev.x += y.x * a.inverseMass, + a.positionPrev.y += y.y * a.inverseMass, + a.anglePrev += r.cross(m, y) * a.inverseInertia), + l.isStatic || l.isSleeping || (m = r.sub(p, l.position, g), + l.positionPrev.x -= y.x * l.inverseMass, + l.positionPrev.y -= y.y * l.inverseMass, + l.anglePrev -= r.cross(m, y) * l.inverseInertia)) + } + , + i.solveVelocity = function(e, t) { + for (var n = t * t, o = r._temp[0], a = r._temp[1], l = r._temp[2], c = r._temp[3], d = r._temp[4], u = r._temp[5], p = 0; p < e.length; p++) { + var f = e[p]; + if (f.isActive && !f.isSensor) { + var v = f.collision + , m = v.parentA + , y = v.parentB + , g = v.normal + , x = v.tangent + , h = f.activeContacts + , b = 1 / h.length; + m.velocity.x = m.position.x - m.positionPrev.x, + m.velocity.y = m.position.y - m.positionPrev.y, + y.velocity.x = y.position.x - y.positionPrev.x, + y.velocity.y = y.position.y - y.positionPrev.y, + m.angularVelocity = m.angle - m.anglePrev, + y.angularVelocity = y.angle - y.anglePrev; + for (var w = 0; w < h.length; w++) { + var S = h[w] + , A = S.vertex + , P = r.sub(A, m.position, a) + , C = r.sub(A, y.position, l) + , M = r.add(m.velocity, r.mult(r.perp(P), m.angularVelocity), c) + , k = r.add(y.velocity, r.mult(r.perp(C), y.angularVelocity), d) + , B = r.sub(M, k, u) + , I = r.dot(g, B) + , _ = r.dot(x, B) + , T = Math.abs(_) + , R = s.sign(_) + , L = (1 + f.restitution) * I + , O = s.clamp(f.separation + I, 0, 1) * i._frictionNormalMultiplier + , E = _ + , V = 1 / 0; + T > f.friction * f.frictionStatic * O * n && (V = T, + E = s.clamp(f.friction * R * n, -V, V)); + var F = r.cross(P, g) + , D = r.cross(C, g) + , W = b / (m.inverseMass + y.inverseMass + m.inverseInertia * F * F + y.inverseInertia * D * D); + if (L *= W, + E *= W, + I < 0 && I * I > i._restingThresh * n) + S.normalImpulse = 0; + else { + var q = S.normalImpulse; + S.normalImpulse = Math.min(S.normalImpulse + L, 0), + L = S.normalImpulse - q + } + if (_ * _ > i._restingThreshTangent * n) + S.tangentImpulse = 0; + else { + var j = S.tangentImpulse; + S.tangentImpulse = s.clamp(S.tangentImpulse + E, -V, V), + E = S.tangentImpulse - j + } + o.x = g.x * L + x.x * E, + o.y = g.y * L + x.y * E, + m.isStatic || m.isSleeping || (m.positionPrev.x += o.x * m.inverseMass, + m.positionPrev.y += o.y * m.inverseMass, + m.anglePrev += r.cross(P, o) * m.inverseInertia), + y.isStatic || y.isSleeping || (y.positionPrev.x -= o.x * y.inverseMass, + y.positionPrev.y -= o.y * y.inverseMass, + y.anglePrev -= r.cross(C, o) * y.inverseInertia) + } + } + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(19) + , r = n(7) + , s = n(21) + , a = n(10) + , l = n(20) + , c = n(23) + , d = n(11) + , u = n(4) + , p = n(5) + , f = n(8) + , v = n(0) + , m = n(6); + i.create = function(e, t) { + t = (t = v.isElement(e) ? t : e) || {}, + ((e = v.isElement(e) ? e : null) || t.render) && v.warn("Engine.create: engine.render is deprecated (see docs)"); + var n = { + positionIterations: 6, + velocityIterations: 4, + constraintIterations: 2, + enableSleeping: !1, + events: [], + plugin: {}, + timing: { + timestamp: 0, + timeScale: 1 + }, + broadphase: { + controller: d + } + } + , i = v.extend(n, t); + if (e || i.render) { + var r = { + element: e, + controller: a + }; + i.render = v.extend(r, i.render) + } + return i.render && i.render.controller && (i.render = i.render.controller.create(i.render)), + i.render && (i.render.engine = i), + i.world = t.world || o.create(i.world), + i.pairs = l.create(), + i.broadphase = i.broadphase.controller.create(i.broadphase), + i.metrics = i.metrics || { + extended: !1 + }, + i.metrics = c.create(i.metrics), + i + } + , + i.update = function(e, t, n) { + t = t || 1e3 / 60, + n = n || 1; + var o, a = e.world, d = e.timing, v = e.broadphase, m = []; + d.timestamp += t * d.timeScale; + var y = { + timestamp: d.timestamp + }; + u.trigger(e, "beforeUpdate", y); + var g = p.allBodies(a) + , x = p.allConstraints(a); + for (c.reset(e.metrics), + e.enableSleeping && r.update(g, d.timeScale), + i._bodiesApplyGravity(g, a.gravity), + i._bodiesUpdate(g, t, d.timeScale, n, a.bounds), + f.preSolveAll(g), + o = 0; o < e.constraintIterations; o++) + f.solveAll(x, d.timeScale); + f.postSolveAll(g), + v.controller ? (a.isModified && v.controller.clear(v), + v.controller.update(v, g, e, a.isModified), + m = v.pairsList) : m = g, + a.isModified && p.setModified(a, !1, !1, !0); + var h = v.detector(m, e) + , b = e.pairs + , w = d.timestamp; + for (l.update(b, h, w), + l.removeOld(b, w), + e.enableSleeping && r.afterCollisions(b.list, d.timeScale), + b.collisionStart.length > 0 && u.trigger(e, "collisionStart", { + pairs: b.collisionStart + }), + s.preSolvePosition(b.list), + o = 0; o < e.positionIterations; o++) + s.solvePosition(b.list, d.timeScale); + for (s.postSolvePosition(g), + f.preSolveAll(g), + o = 0; o < e.constraintIterations; o++) + f.solveAll(x, d.timeScale); + for (f.postSolveAll(g), + s.preSolveVelocity(b.list), + o = 0; o < e.velocityIterations; o++) + s.solveVelocity(b.list, d.timeScale); + return b.collisionActive.length > 0 && u.trigger(e, "collisionActive", { + pairs: b.collisionActive + }), + b.collisionEnd.length > 0 && u.trigger(e, "collisionEnd", { + pairs: b.collisionEnd + }), + c.update(e.metrics, e), + i._bodiesClearForces(g), + u.trigger(e, "afterUpdate", y), + e + } + , + i.merge = function(e, t) { + if (v.extend(e, t), + t.world) { + e.world = t.world, + i.clear(e); + for (var n = p.allBodies(e.world), o = 0; o < n.length; o++) { + var s = n[o]; + r.set(s, !1), + s.id = v.nextId() + } + } + } + , + i.clear = function(e) { + var t = e.world; + l.clear(e.pairs); + var n = e.broadphase; + if (n.controller) { + var i = p.allBodies(t); + n.controller.clear(n), + n.controller.update(n, i, e, !0) + } + } + , + i._bodiesClearForces = function(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t]; + n.force.x = 0, + n.force.y = 0, + n.torque = 0 + } + } + , + i._bodiesApplyGravity = function(e, t) { + var n = void 0 !== t.scale ? t.scale : .001; + if ((0 !== t.x || 0 !== t.y) && 0 !== n) + for (var i = 0; i < e.length; i++) { + var o = e[i]; + o.isStatic || o.isSleeping || (o.force.y += o.mass * t.y * n, + o.force.x += o.mass * t.x * n) + } + } + , + i._bodiesUpdate = function(e, t, n, i, o) { + for (var r = 0; r < e.length; r++) { + var s = e[r]; + s.isStatic || s.isSleeping || m.update(s, t, n, i) + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(5) + , r = n(0); + i.create = function(e) { + return r.extend({ + extended: !1, + narrowDetections: 0, + narrowphaseTests: 0, + narrowReuse: 0, + narrowReuseCount: 0, + midphaseTests: 0, + broadphaseTests: 0, + narrowEff: 1e-4, + midEff: 1e-4, + broadEff: 1e-4, + collisions: 0, + buckets: 0, + bodies: 0, + pairs: 0 + }, !1, e) + } + , + i.reset = function(e) { + e.extended && (e.narrowDetections = 0, + e.narrowphaseTests = 0, + e.narrowReuse = 0, + e.narrowReuseCount = 0, + e.midphaseTests = 0, + e.broadphaseTests = 0, + e.narrowEff = 0, + e.midEff = 0, + e.broadEff = 0, + e.collisions = 0, + e.buckets = 0, + e.pairs = 0, + e.bodies = 0) + } + , + i.update = function(e, t) { + if (e.extended) { + var n = t.world + , i = o.allBodies(n); + e.collisions = e.narrowDetections, + e.pairs = t.pairs.list.length, + e.bodies = i.length, + e.midEff = (e.narrowDetections / (e.midphaseTests || 1)).toFixed(2), + e.narrowEff = (e.narrowDetections / (e.narrowphaseTests || 1)).toFixed(2), + e.broadEff = (1 - e.broadphaseTests / (i.length || 1)).toFixed(2), + e.narrowReuse = (e.narrowReuseCount / (e.narrowphaseTests || 1)).toFixed(2) + } + } + } + , function(e, t, n) { + var i = e.exports = n(25); + i.Body = n(6), + i.Composite = n(5), + i.World = n(19), + i.Contact = n(18), + i.Detector = n(12), + i.Grid = n(11), + i.Pairs = n(20), + i.Pair = n(9), + i.Query = n(26), + i.Resolver = n(21), + i.SAT = n(13), + i.Constraint = n(8), + i.MouseConstraint = n(28), + i.Common = n(0), + i.Engine = n(22), + i.Events = n(4), + i.Mouse = n(14), + i.Runner = n(29), + i.Sleeping = n(7), + i.Plugin = n(17), + i.Metrics = n(23), + i.Bodies = n(16), + i.Composites = n(30), + i.Axes = n(15), + i.Bounds = n(1), + i.Svg = n(31), + i.Vector = n(2), + i.Vertices = n(3), + i.Render = n(10), + i.RenderPixi = n(32), + i.World.add = i.Composite.add, + i.World.remove = i.Composite.remove, + i.World.addComposite = i.Composite.addComposite, + i.World.addBody = i.Composite.addBody, + i.World.addConstraint = i.Composite.addConstraint, + i.World.clear = i.Composite.clear, + i.Engine.run = i.Runner.run + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(17) + , r = n(0); + i.name = "matter-js", + i.version = "0.16.1", + i.uses = [], + i.used = [], + i.use = function() { + o.use(i, Array.prototype.slice.call(arguments)) + } + , + i.before = function(e, t) { + return e = e.replace(/^Matter./, ""), + r.chainPathBefore(i, e, t) + } + , + i.after = function(e, t) { + return e = e.replace(/^Matter./, ""), + r.chainPathAfter(i, e, t) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(2) + , r = n(13) + , s = n(1) + , a = n(16) + , l = n(3); + i.collides = function(e, t) { + for (var n = [], i = 0; i < t.length; i++) { + var o = t[i]; + if (s.overlaps(o.bounds, e.bounds)) + for (var a = 1 === o.parts.length ? 0 : 1; a < o.parts.length; a++) { + var l = o.parts[a]; + if (s.overlaps(l.bounds, e.bounds)) { + var c = r.collides(l, e); + if (c.collided) { + n.push(c); + break + } + } + } + } + return n + } + , + i.ray = function(e, t, n, r) { + r = r || 1e-100; + for (var s = o.angle(t, n), l = o.magnitude(o.sub(t, n)), c = .5 * (n.x + t.x), d = .5 * (n.y + t.y), u = a.rectangle(c, d, l, r, { + angle: s + }), p = i.collides(u, e), f = 0; f < p.length; f += 1) { + var v = p[f]; + v.body = v.bodyB = v.bodyA + } + return p + } + , + i.region = function(e, t, n) { + for (var i = [], o = 0; o < e.length; o++) { + var r = e[o] + , a = s.overlaps(r.bounds, t); + (a && !n || !a && n) && i.push(r) + } + return i + } + , + i.point = function(e, t) { + for (var n = [], i = 0; i < e.length; i++) { + var o = e[i]; + if (s.contains(o.bounds, t)) + for (var r = 1 === o.parts.length ? 0 : 1; r < o.parts.length; r++) { + var a = o.parts[r]; + if (s.contains(a.bounds, t) && l.contains(a.vertices, t)) { + n.push(o); + break + } + } + } + return n + } + } + , function(t, n) { + if (void 0 === e) { + var i = new Error("Cannot find module 'undefined'"); + throw i.code = "MODULE_NOT_FOUND", + i + } + t.exports = e + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(3) + , r = n(7) + , s = n(14) + , a = n(4) + , l = n(12) + , c = n(8) + , d = n(5) + , u = n(0) + , p = n(1); + i.create = function(e, t) { + var n = (e ? e.mouse : null) || (t ? t.mouse : null); + n || (e && e.render && e.render.canvas ? n = s.create(e.render.canvas) : t && t.element ? n = s.create(t.element) : (n = s.create(), + u.warn("MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected"))); + var o = { + type: "mouseConstraint", + mouse: n, + element: null, + body: null, + constraint: c.create({ + label: "Mouse Constraint", + pointA: n.position, + pointB: { + x: 0, + y: 0 + }, + length: .01, + stiffness: .1, + angularStiffness: 1, + render: { + strokeStyle: "#90EE90", + lineWidth: 3 + } + }), + collisionFilter: { + category: 1, + mask: 4294967295, + group: 0 + } + } + , r = u.extend(o, t); + return a.on(e, "beforeUpdate", function() { + var t = d.allBodies(e.world); + i.update(r, t), + i._triggerEvents(r) + }), + r + } + , + i.update = function(e, t) { + var n = e.mouse + , i = e.constraint + , s = e.body; + if (0 === n.button) { + if (i.bodyB) + r.set(i.bodyB, !1), + i.pointA = n.position; + else + for (var c = 0; c < t.length; c++) + if (s = t[c], + p.contains(s.bounds, n.position) && l.canCollide(s.collisionFilter, e.collisionFilter)) + for (var d = s.parts.length > 1 ? 1 : 0; d < s.parts.length; d++) { + var u = s.parts[d]; + if (o.contains(u.vertices, n.position)) { + i.pointA = n.position, + i.bodyB = e.body = s, + i.pointB = { + x: n.position.x - s.position.x, + y: n.position.y - s.position.y + }, + i.angleB = s.angle, + r.set(s, !1), + a.trigger(e, "startdrag", { + mouse: n, + body: s + }); + break + } + } + } else + i.bodyB = e.body = null, + i.pointB = null, + s && a.trigger(e, "enddrag", { + mouse: n, + body: s + }) + } + , + i._triggerEvents = function(e) { + var t = e.mouse + , n = t.sourceEvents; + n.mousemove && a.trigger(e, "mousemove", { + mouse: t + }), + n.mousedown && a.trigger(e, "mousedown", { + mouse: t + }), + n.mouseup && a.trigger(e, "mouseup", { + mouse: t + }), + s.clearSourceEvents(t) + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(4) + , r = n(22) + , s = n(0); + !function() { + var e, t, n; + ("undefined" != typeof window && (e = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame, + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame), + e) || (e = function(e) { + n = setTimeout(function() { + e(s.now()) + }, 1e3 / 60) + } + , + t = function() { + clearTimeout(n) + } + ); + i.create = function(e) { + var t = s.extend({ + fps: 60, + correction: 1, + deltaSampleSize: 60, + counterTimestamp: 0, + frameCounter: 0, + deltaHistory: [], + timePrev: null, + timeScalePrev: 1, + frameRequestId: null, + isFixed: !1, + enabled: !0 + }, e); + return t.delta = t.delta || 1e3 / t.fps, + t.deltaMin = t.deltaMin || 1e3 / t.fps, + t.deltaMax = t.deltaMax || 1e3 / (.5 * t.fps), + t.fps = 1e3 / t.delta, + t + } + , + i.run = function(t, n) { + return void 0 !== t.positionIterations && (n = t, + t = i.create()), + function o(r) { + t.frameRequestId = e(o), + r && t.enabled && i.tick(t, n, r) + }(), + t + } + , + i.tick = function(e, t, n) { + var i, s = t.timing, a = 1, l = { + timestamp: s.timestamp + }; + o.trigger(e, "beforeTick", l), + o.trigger(t, "beforeTick", l), + e.isFixed ? i = e.delta : (i = n - e.timePrev || e.delta, + e.timePrev = n, + e.deltaHistory.push(i), + e.deltaHistory = e.deltaHistory.slice(-e.deltaSampleSize), + a = (i = (i = (i = Math.min.apply(null, e.deltaHistory)) < e.deltaMin ? e.deltaMin : i) > e.deltaMax ? e.deltaMax : i) / e.delta, + e.delta = i), + 0 !== e.timeScalePrev && (a *= s.timeScale / e.timeScalePrev), + 0 === s.timeScale && (a = 0), + e.timeScalePrev = s.timeScale, + e.correction = a, + e.frameCounter += 1, + n - e.counterTimestamp >= 1e3 && (e.fps = e.frameCounter * ((n - e.counterTimestamp) / 1e3), + e.counterTimestamp = n, + e.frameCounter = 0), + o.trigger(e, "tick", l), + o.trigger(t, "tick", l), + t.world.isModified && t.render && t.render.controller && t.render.controller.clear && t.render.controller.clear(t.render), + o.trigger(e, "beforeUpdate", l), + r.update(t, i, a), + o.trigger(e, "afterUpdate", l), + t.render && t.render.controller && (o.trigger(e, "beforeRender", l), + o.trigger(t, "beforeRender", l), + t.render.controller.world(t.render), + o.trigger(e, "afterRender", l), + o.trigger(t, "afterRender", l)), + o.trigger(e, "afterTick", l), + o.trigger(t, "afterTick", l) + } + , + i.stop = function(e) { + t(e.frameRequestId) + } + , + i.start = function(e, t) { + i.run(e, t) + } + }() + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(5) + , r = n(8) + , s = n(0) + , a = n(6) + , l = n(16); + i.stack = function(e, t, n, i, r, s, l) { + for (var c, d = o.create({ + label: "Stack" + }), u = e, p = t, f = 0, v = 0; v < i; v++) { + for (var m = 0, y = 0; y < n; y++) { + var g = l(u, p, y, v, c, f); + if (g) { + var x = g.bounds.max.y - g.bounds.min.y + , h = g.bounds.max.x - g.bounds.min.x; + x > m && (m = x), + a.translate(g, { + x: .5 * h, + y: .5 * x + }), + u = g.bounds.max.x + r, + o.addBody(d, g), + c = g, + f += 1 + } else + u += r + } + p += m + s, + u = e + } + return d + } + , + i.chain = function(e, t, n, i, a, l) { + for (var c = e.bodies, d = 1; d < c.length; d++) { + var u = c[d - 1] + , p = c[d] + , f = u.bounds.max.y - u.bounds.min.y + , v = u.bounds.max.x - u.bounds.min.x + , m = p.bounds.max.y - p.bounds.min.y + , y = { + bodyA: u, + pointA: { + x: v * t, + y: f * n + }, + bodyB: p, + pointB: { + x: (p.bounds.max.x - p.bounds.min.x) * i, + y: m * a + } + } + , g = s.extend(y, l); + o.addConstraint(e, r.create(g)) + } + return e.label += " Chain", + e + } + , + i.mesh = function(e, t, n, i, a) { + var l, c, d, u, p, f = e.bodies; + for (l = 0; l < n; l++) { + for (c = 1; c < t; c++) + d = f[c - 1 + l * t], + u = f[c + l * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: d, + bodyB: u + }, a))); + if (l > 0) + for (c = 0; c < t; c++) + d = f[c + (l - 1) * t], + u = f[c + l * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: d, + bodyB: u + }, a))), + i && c > 0 && (p = f[c - 1 + (l - 1) * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: p, + bodyB: u + }, a)))), + i && c < t - 1 && (p = f[c + 1 + (l - 1) * t], + o.addConstraint(e, r.create(s.extend({ + bodyA: p, + bodyB: u + }, a)))) + } + return e.label += " Mesh", + e + } + , + i.pyramid = function(e, t, n, o, r, s, l) { + return i.stack(e, t, n, o, r, s, function(t, i, s, c, d, u) { + var p = Math.min(o, Math.ceil(n / 2)) + , f = d ? d.bounds.max.x - d.bounds.min.x : 0; + if (!(c > p || s < (c = p - c) || s > n - 1 - c)) + return 1 === u && a.translate(d, { + x: (s + (n % 2 == 1 ? 1 : -1)) * f, + y: 0 + }), + l(e + (d ? s * f : 0) + s * r, i, s, c, d, u) + }) + } + , + i.newtonsCradle = function(e, t, n, i, s) { + for (var a = o.create({ + label: "Newtons Cradle" + }), c = 0; c < n; c++) { + var d = l.circle(e + c * (1.9 * i), t + s, i, { + inertia: 1 / 0, + restitution: 1, + friction: 0, + frictionAir: 1e-4, + slop: 1 + }) + , u = r.create({ + pointA: { + x: e + c * (1.9 * i), + y: t + }, + bodyB: d + }); + o.addBody(a, d), + o.addConstraint(a, u) + } + return a + } + , + i.car = function(e, t, n, i, s) { + var c = a.nextGroup(!0) + , d = .5 * -n + 20 + , u = .5 * n - 20 + , p = o.create({ + label: "Car" + }) + , f = l.rectangle(e, t, n, i, { + collisionFilter: { + group: c + }, + chamfer: { + radius: .5 * i + }, + density: 2e-4 + }) + , v = l.circle(e + d, t + 0, s, { + collisionFilter: { + group: c + }, + friction: .8 + }) + , m = l.circle(e + u, t + 0, s, { + collisionFilter: { + group: c + }, + friction: .8 + }) + , y = r.create({ + bodyB: f, + pointB: { + x: d, + y: 0 + }, + bodyA: v, + stiffness: 1, + length: 0 + }) + , g = r.create({ + bodyB: f, + pointB: { + x: u, + y: 0 + }, + bodyA: m, + stiffness: 1, + length: 0 + }); + return o.addBody(p, f), + o.addBody(p, v), + o.addBody(p, m), + o.addConstraint(p, y), + o.addConstraint(p, g), + p + } + , + i.softBody = function(e, t, n, o, r, a, c, d, u, p) { + u = s.extend({ + inertia: 1 / 0 + }, u), + p = s.extend({ + stiffness: .2, + render: { + type: "line", + anchors: !1 + } + }, p); + var f = i.stack(e, t, n, o, r, a, function(e, t) { + return l.circle(e, t, d, u) + }); + return i.mesh(f, n, o, c, p), + f.label = "Soft Body", + f + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + n(1); + var o = n(0); + i.pathToVertices = function(e, t) { + "undefined" == typeof window || "SVGPathSeg"in window || o.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required."); + var n, r, s, a, l, c, d, u, p, f, v, m = [], y = 0, g = 0, x = 0; + t = t || 15; + var h = function(e, t, n) { + var i = n % 2 == 1 && n > 1; + if (!p || e != p.x || t != p.y) { + p && i ? (f = p.x, + v = p.y) : (f = 0, + v = 0); + var o = { + x: f + e, + y: v + t + }; + !i && p || (p = o), + m.push(o), + g = f + e, + x = v + t + } + } + , b = function(e) { + var t = e.pathSegTypeAsLetter.toUpperCase(); + if ("Z" !== t) { + switch (t) { + case "M": + case "L": + case "T": + case "C": + case "S": + case "Q": + g = e.x, + x = e.y; + break; + case "H": + g = e.x; + break; + case "V": + x = e.y; + } + h(g, x, e.pathSegType) + } + }; + for (i._svgPathToAbsolute(e), + s = e.getTotalLength(), + c = [], + n = 0; n < e.pathSegList.numberOfItems; n += 1) + c.push(e.pathSegList.getItem(n)); + for (d = c.concat(); y < s; ) { + if ((l = c[e.getPathSegAtLength(y)]) != u) { + for (; d.length && d[0] != l; ) + b(d.shift()); + u = l + } + switch (l.pathSegTypeAsLetter.toUpperCase()) { + case "C": + case "T": + case "S": + case "Q": + case "A": + a = e.getPointAtLength(y), + h(a.x, a.y, 0); + } + y += t + } + for (n = 0, + r = d.length; n < r; ++n) + b(d[n]); + return m + } + , + i._svgPathToAbsolute = function(e) { + for (var t, n, i, o, r, s, a = e.pathSegList, l = 0, c = 0, d = a.numberOfItems, u = 0; u < d; ++u) { + var p = a.getItem(u) + , f = p.pathSegTypeAsLetter; + if (/[MLHVCSQTA]/.test(f)) + "x"in p && (l = p.x), + "y"in p && (c = p.y); + else + switch ("x1"in p && (i = l + p.x1), + "x2"in p && (r = l + p.x2), + "y1"in p && (o = c + p.y1), + "y2"in p && (s = c + p.y2), + "x"in p && (l += p.x), + "y"in p && (c += p.y), + f) { + case "m": + a.replaceItem(e.createSVGPathSegMovetoAbs(l, c), u); + break; + case "l": + a.replaceItem(e.createSVGPathSegLinetoAbs(l, c), u); + break; + case "h": + a.replaceItem(e.createSVGPathSegLinetoHorizontalAbs(l), u); + break; + case "v": + a.replaceItem(e.createSVGPathSegLinetoVerticalAbs(c), u); + break; + case "c": + a.replaceItem(e.createSVGPathSegCurvetoCubicAbs(l, c, i, o, r, s), u); + break; + case "s": + a.replaceItem(e.createSVGPathSegCurvetoCubicSmoothAbs(l, c, r, s), u); + break; + case "q": + a.replaceItem(e.createSVGPathSegCurvetoQuadraticAbs(l, c, i, o), u); + break; + case "t": + a.replaceItem(e.createSVGPathSegCurvetoQuadraticSmoothAbs(l, c), u); + break; + case "a": + a.replaceItem(e.createSVGPathSegArcAbs(l, c, p.r1, p.r2, p.angle, p.largeArcFlag, p.sweepFlag), u); + break; + case "z": + case "Z": + l = t, + c = n; + } + "M" != f && "m" != f || (t = l, + n = c) + } + } + } + , function(e, t, n) { + var i = {}; + e.exports = i; + var o = n(1) + , r = n(5) + , s = n(0) + , a = n(4) + , l = n(2); + !function() { + var e, t; + "undefined" != typeof window && (e = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(e) { + window.setTimeout(function() { + e(s.now()) + }, 1e3 / 60) + } + , + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame), + i.create = function(e) { + s.warn("RenderPixi.create: Matter.RenderPixi is deprecated (see docs)"); + var t = { + controller: i, + engine: null, + element: null, + frameRequestId: null, + canvas: null, + renderer: null, + container: null, + spriteContainer: null, + pixiOptions: null, + options: { + width: 800, + height: 600, + background: "#fafafa", + wireframeBackground: "#222", + hasBounds: !1, + enabled: !0, + wireframes: !0, + showSleeping: !0, + showDebug: !1, + showBroadphase: !1, + showBounds: !1, + showVelocity: !1, + showCollisions: !1, + showAxes: !1, + showPositions: !1, + showAngleIndicator: !1, + showIds: !1, + showShadows: !1 + } + } + , n = s.extend(t, e) + , o = !n.options.wireframes && "transparent" === n.options.background; + return n.pixiOptions = n.pixiOptions || { + view: n.canvas, + transparent: o, + antialias: !0, + backgroundColor: e.background + }, + n.mouse = e.mouse, + n.engine = e.engine, + n.renderer = n.renderer || new PIXI.WebGLRenderer(n.options.width,n.options.height,n.pixiOptions), + n.container = n.container || new PIXI.Container, + n.spriteContainer = n.spriteContainer || new PIXI.Container, + n.canvas = n.canvas || n.renderer.view, + n.bounds = n.bounds || { + min: { + x: 0, + y: 0 + }, + max: { + x: n.options.width, + y: n.options.height + } + }, + a.on(n.engine, "beforeUpdate", function() { + i.clear(n) + }), + n.textures = {}, + n.sprites = {}, + n.primitives = {}, + n.container.addChild(n.spriteContainer), + s.isElement(n.element) ? n.element.appendChild(n.canvas) : s.warn("No \"render.element\" passed, \"render.canvas\" was not inserted into document."), + n.canvas.oncontextmenu = function() { + return !1 + } + , + n.canvas.onselectstart = function() { + return !1 + } + , + n + } + , + i.run = function(t) { + !function n(o) { + t.frameRequestId = e(n), + i.world(t) + }() + } + , + i.stop = function(e) { + t(e.frameRequestId) + } + , + i.clear = function(e) { + for (var t = e.container, n = e.spriteContainer; t.children[0]; ) + t.removeChild(t.children[0]); + for (; n.children[0]; ) + n.removeChild(n.children[0]); + var i = e.sprites["bg-0"]; + e.textures = {}, + e.sprites = {}, + e.primitives = {}, + e.sprites["bg-0"] = i, + i && t.addChildAt(i, 0), + e.container.addChild(e.spriteContainer), + e.currentBackground = null, + t.scale.set(1, 1), + t.position.set(0, 0) + } + , + i.setBackground = function(e, t) { + if (e.currentBackground !== t) { + var n = t.indexOf && -1 !== t.indexOf("#") + , i = e.sprites["bg-0"]; + if (n) { + var o = s.colorToNumber(t); + e.renderer.backgroundColor = o, + i && e.container.removeChild(i) + } else if (!i) { + var r = d(e, t); + (i = e.sprites["bg-0"] = new PIXI.Sprite(r)).position.x = 0, + i.position.y = 0, + e.container.addChildAt(i, 0) + } + e.currentBackground = t + } + } + , + i.world = function(e) { + var t, n = e.engine.world, s = e.renderer, a = e.container, c = e.options, d = r.allBodies(n), u = r.allConstraints(n), p = []; + c.wireframes ? i.setBackground(e, c.wireframeBackground) : i.setBackground(e, c.background); + var f = e.bounds.max.x - e.bounds.min.x + , v = e.bounds.max.y - e.bounds.min.y + , m = f / e.options.width + , y = v / e.options.height; + if (c.hasBounds) { + for (t = 0; t < d.length; t++) { + var g = d[t]; + g.render.sprite.visible = o.overlaps(g.bounds, e.bounds) + } + for (t = 0; t < u.length; t++) { + var x = u[t] + , h = x.bodyA + , b = x.bodyB + , w = x.pointA + , S = x.pointB; + h && (w = l.add(h.position, x.pointA)), + b && (S = l.add(b.position, x.pointB)), + w && S && (o.contains(e.bounds, w) || o.contains(e.bounds, S)) && p.push(x) + } + a.scale.set(1 / m, 1 / y), + a.position.set(-e.bounds.min.x * (1 / m), -e.bounds.min.y * (1 / y)) + } else + p = u; + for (t = 0; t < d.length; t++) + i.body(e, d[t]); + for (t = 0; t < p.length; t++) + i.constraint(e, p[t]); + s.render(a) + } + , + i.constraint = function(e, t) { + e.engine; + var n = t.bodyA + , i = t.bodyB + , o = t.pointA + , r = t.pointB + , a = e.container + , l = t.render + , c = "c-" + t.id + , d = e.primitives[c]; + d || (d = e.primitives[c] = new PIXI.Graphics), + l.visible && t.pointA && t.pointB ? (-1 === s.indexOf(a.children, d) && a.addChild(d), + d.clear(), + d.beginFill(0, 0), + d.lineStyle(l.lineWidth, s.colorToNumber(l.strokeStyle), 1), + n ? d.moveTo(n.position.x + o.x, n.position.y + o.y) : d.moveTo(o.x, o.y), + i ? d.lineTo(i.position.x + r.x, i.position.y + r.y) : d.lineTo(r.x, r.y), + d.endFill()) : d.clear() + } + , + i.body = function(e, t) { + e.engine; + var i = t.render; + if (i.visible) + if (i.sprite && i.sprite.texture) { + var o = "b-" + t.id + , r = e.sprites[o] + , a = e.spriteContainer; + r || (r = e.sprites[o] = n(e, t)), + -1 === s.indexOf(a.children, r) && a.addChild(r), + r.position.x = t.position.x, + r.position.y = t.position.y, + r.rotation = t.angle, + r.scale.x = i.sprite.xScale || 1, + r.scale.y = i.sprite.yScale || 1 + } else { + var l = "b-" + t.id + , d = e.primitives[l] + , u = e.container; + d || ((d = e.primitives[l] = c(e, t)).initialAngle = t.angle), + -1 === s.indexOf(u.children, d) && u.addChild(d), + d.position.x = t.position.x, + d.position.y = t.position.y, + d.rotation = t.angle - d.initialAngle + } + } + ; + var n = function(e, t) { + var n = t.render.sprite.texture + , i = d(e, n) + , o = new PIXI.Sprite(i); + return o.anchor.x = t.render.sprite.xOffset, + o.anchor.y = t.render.sprite.yOffset, + o + } + , c = function(e, t) { + var n, i = t.render, o = e.options, r = new PIXI.Graphics, a = s.colorToNumber(i.fillStyle), l = s.colorToNumber(i.strokeStyle), c = s.colorToNumber(i.strokeStyle), d = s.colorToNumber("#bbb"), u = s.colorToNumber("#CD5C5C"); + r.clear(); + for (var p = t.parts.length > 1 ? 1 : 0; p < t.parts.length; p++) { + n = t.parts[p], + o.wireframes ? (r.beginFill(0, 0), + r.lineStyle(1, d, 1)) : (r.beginFill(a, 1), + r.lineStyle(i.lineWidth, l, 1)), + r.moveTo(n.vertices[0].x - t.position.x, n.vertices[0].y - t.position.y); + for (var f = 1; f < n.vertices.length; f++) + r.lineTo(n.vertices[f].x - t.position.x, n.vertices[f].y - t.position.y); + r.lineTo(n.vertices[0].x - t.position.x, n.vertices[0].y - t.position.y), + r.endFill(), + (o.showAngleIndicator || o.showAxes) && (r.beginFill(0, 0), + o.wireframes ? r.lineStyle(1, u, 1) : r.lineStyle(1, c), + r.moveTo(n.position.x - t.position.x, n.position.y - t.position.y), + r.lineTo((n.vertices[0].x + n.vertices[n.vertices.length - 1].x) / 2 - t.position.x, (n.vertices[0].y + n.vertices[n.vertices.length - 1].y) / 2 - t.position.y), + r.endFill()) + } + return r + } + , d = function(e, t) { + var n = e.textures[t]; + return n || (n = e.textures[t] = PIXI.Texture.fromImage(t)), + n + } + }() + } + ]) + }); + var a = function() { + function e(e) { + this._engine = ha.Engine.create(), + this._pixiObjects = [], + ha.Engine.run(this.engine); + var t = ha.MouseConstraint.create(this.engine, { + mouse: ha.Mouse.create(e.stage) + }); + ha.World.add(this.engine.world, t) + } + return Object.defineProperty(e.prototype, "engine", { + get: function() { + return this._engine + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "pixiObjects", { + get: function() { + return this._pixiObjects + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.update = function() { + this._pixiObjects.forEach(function(e) { + return e.update() + }) + } + , + e.prototype.addToWorld = function() { + for (var e = this, t = [], i = 0; i < arguments.length; i++) + t[i] = arguments[i]; + t.forEach(function(t) { + return ha.World.addBody(e.engine.world, t.body) + }), + this._pixiObjects = this._pixiObjects.concat(t) + } + , + e.prototype.removeFromWorld = function() { + for (var e = this, t = [], i = 0; i < arguments.length; i++) + t[i] = arguments[i]; + t.forEach(function(t) { + return ha.World.remove(e.engine.world, t.body) + }), + this._pixiObjects = this._pixiObjects.filter(function(e) { + return !t.includes(e) + }) + } + , + e + }(); + var b = function() { + function i(i, t, e) { + void 0 === t && (t = {}); + var o = i.x + , s = i.y + , r = i.width + , p = i.height; + i.texture; + this._sprite = i, + this._update = e, + this.physicsOptions = t, + t.isCircle ? this._body = ha.Bodies.circle(o, s, r / 2, t) : this._body = ha.Bodies.rectangle(o, s, r, p, t) + } + return Object.defineProperty(i.prototype, "body", { + get: function() { + return this._body + }, + enumerable: !1, + configurable: !0 + }), + i.prototype.update = function() { + this._update ? this._update({ + position: this._body.position, + rotation: this._body.angle + }) : (this._sprite.position = this._body.position, + this._sprite.rotation = this._body.angle) + } + , + i + }(); + var Nb = {}; + var ue, ve, Fa, Ga; + var Ob = /iPhone/i + , Ic = /iPod/i + , Jc = /iPad/i + , Kc = /\biOS-universal(?:.+)Mac\b/i + , Pb = /\bAndroid(?:.+)Mobile\b/i + , Lc = /Android/i + , Ra = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i + , ib = /Silk/i + , wa = /Windows Phone/i + , Mc = /\bWindows(?:.+)ARM\b/i + , Nc = /BlackBerry/i + , Oc = /BB10/i + , Pc = /Opera Mini/i + , Qc = /\b(CriOS|Chrome)(?:.+)Mobile/i + , Rc = /Mobile(?:.+)Firefox\b/i + , Sc = function($) { + return void 0 !== $ && "MacIntel" === $.platform && "number" == typeof $.maxTouchPoints && $.maxTouchPoints > 1 && "undefined" == typeof MSStream + }; + function we($) { + return function(a) { + return a.test($) + } + } + function xe($) { + var a = { + userAgent: "", + platform: "", + maxTouchPoints: 0 + }; + $ || "undefined" == typeof navigator ? "string" == typeof $ ? a.userAgent = $ : $ && $.userAgent && (a = { + userAgent: $.userAgent, + platform: $.platform, + maxTouchPoints: $.maxTouchPoints || 0 + }) : a = { + userAgent: navigator.userAgent, + platform: navigator.platform, + maxTouchPoints: navigator.maxTouchPoints || 0 + }; + var e = a.userAgent + , r = e.split("[FBAN"); + void 0 !== r[1] && (e = r[0]), + void 0 !== (r = e.split("Twitter"))[1] && (e = r[0]); + var o = we(e) + , v = { + apple: { + phone: o(Ob) && !o(wa), + ipod: o(Ic), + tablet: !o(Ob) && (o(Jc) || Sc(a)) && !o(wa), + universal: o(Kc), + device: (o(Ob) || o(Ic) || o(Jc) || o(Kc) || Sc(a)) && !o(wa) + }, + amazon: { + phone: o(Ra), + tablet: !o(Ra) && o(ib), + device: o(Ra) || o(ib) + }, + android: { + phone: !o(wa) && o(Ra) || !o(wa) && o(Pb), + tablet: !o(wa) && !o(Ra) && !o(Pb) && (o(ib) || o(Lc)), + device: !o(wa) && (o(Ra) || o(ib) || o(Pb) || o(Lc)) || o(/\bokhttp\b/i) + }, + windows: { + phone: o(wa), + tablet: o(Mc), + device: o(wa) || o(Mc) + }, + other: { + blackberry: o(Nc), + blackberry10: o(Oc), + opera: o(Pc), + firefox: o(Rc), + chrome: o(Qc), + device: o(Nc) || o(Oc) || o(Pc) || o(Rc) || o(Qc) + }, + any: !1, + phone: !1, + tablet: !1 + }; + return v.any = v.apple.device || v.android.device || v.windows.device || v.other.device, + v.phone = v.apple.phone || v.android.phone || v.windows.phone, + v.tablet = v.apple.tablet || v.android.tablet || v.windows.tablet, + v + } + var Ha = xe(self.navigator); + function ye(e) { + var i = !0; + if (Ha.tablet || Ha.phone) { + var r; + if (Ha.apple.device) + if (r = navigator.userAgent.match(/OS (\d+)_(\d+)?/)) + parseInt(r[1], 10) < 11 && (i = !1); + if (Ha.android.device) + if (r = navigator.userAgent.match(/Android\s([0-9.]*)/)) + parseInt(r[1], 10) < 7 && (i = !1) + } + return i ? e : 4 + } + function ze() { + return !Ha.apple.device + } + var aa = { + MIPMAP_TEXTURES: 1, + ANISOTROPIC_LEVEL: 0, + RESOLUTION: 1, + FILTER_RESOLUTION: 1, + SPRITE_MAX_TEXTURES: ye(32), + SPRITE_BATCH_SIZE: 4096, + RENDER_OPTIONS: { + view: null, + antialias: !1, + autoDensity: !1, + backgroundColor: 0, + backgroundAlpha: 1, + useContextAlpha: !0, + clearBeforeRender: !0, + preserveDrawingBuffer: !1, + width: 800, + height: 600, + legacy: !1 + }, + GC_MODE: 0, + GC_MAX_IDLE: 3600, + GC_MAX_CHECK_COUNT: 600, + WRAP_MODE: 33071, + SCALE_MODE: 1, + PRECISION_VERTEX: "highp", + PRECISION_FRAGMENT: Ha.apple.device ? "highp" : "mediump", + CAN_UPLOAD_SAME_BUFFER: ze(), + CREATE_IMAGE_BITMAP: !1, + ROUND_PIXELS: !1 + }; + var Ae, Be, Ce, De, Ee, Fe, Ge, He, Ie, Je, Ke, Le, Me, Ne, Oe, Pe, Qe, Aa, jb, Qb, K, Ba, kb, Sa, ua, Ca, Rb, $a, Ia, Ja, Tc, xa, qa, _a; + !function(E) { + E[E.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", + E[E.WEBGL = 1] = "WEBGL", + E[E.WEBGL2 = 2] = "WEBGL2" + }(Aa || (Fe = Aa = {}, + Fe)), + function(E) { + E[E.UNKNOWN = 0] = "UNKNOWN", + E[E.WEBGL = 1] = "WEBGL", + E[E.CANVAS = 2] = "CANVAS" + }(jb || (Me = jb = {}, + Me)), + function(E) { + E[E.COLOR = 16384] = "COLOR", + E[E.DEPTH = 256] = "DEPTH", + E[E.STENCIL = 1024] = "STENCIL" + }(Qb || (Ce = Qb = {}, + Ce)), + function(E) { + E[E.NORMAL = 0] = "NORMAL", + E[E.ADD = 1] = "ADD", + E[E.MULTIPLY = 2] = "MULTIPLY", + E[E.SCREEN = 3] = "SCREEN", + E[E.OVERLAY = 4] = "OVERLAY", + E[E.DARKEN = 5] = "DARKEN", + E[E.LIGHTEN = 6] = "LIGHTEN", + E[E.COLOR_DODGE = 7] = "COLOR_DODGE", + E[E.COLOR_BURN = 8] = "COLOR_BURN", + E[E.HARD_LIGHT = 9] = "HARD_LIGHT", + E[E.SOFT_LIGHT = 10] = "SOFT_LIGHT", + E[E.DIFFERENCE = 11] = "DIFFERENCE", + E[E.EXCLUSION = 12] = "EXCLUSION", + E[E.HUE = 13] = "HUE", + E[E.SATURATION = 14] = "SATURATION", + E[E.COLOR = 15] = "COLOR", + E[E.LUMINOSITY = 16] = "LUMINOSITY", + E[E.NORMAL_NPM = 17] = "NORMAL_NPM", + E[E.ADD_NPM = 18] = "ADD_NPM", + E[E.SCREEN_NPM = 19] = "SCREEN_NPM", + E[E.NONE = 20] = "NONE", + E[E.SRC_OVER = 0] = "SRC_OVER", + E[E.SRC_IN = 21] = "SRC_IN", + E[E.SRC_OUT = 22] = "SRC_OUT", + E[E.SRC_ATOP = 23] = "SRC_ATOP", + E[E.DST_OVER = 24] = "DST_OVER", + E[E.DST_IN = 25] = "DST_IN", + E[E.DST_OUT = 26] = "DST_OUT", + E[E.DST_ATOP = 27] = "DST_ATOP", + E[E.ERASE = 26] = "ERASE", + E[E.SUBTRACT = 28] = "SUBTRACT", + E[E.XOR = 29] = "XOR" + }(K || (Be = K = {}, + Be)), + function(E) { + E[E.POINTS = 0] = "POINTS", + E[E.LINES = 1] = "LINES", + E[E.LINE_LOOP = 2] = "LINE_LOOP", + E[E.LINE_STRIP = 3] = "LINE_STRIP", + E[E.TRIANGLES = 4] = "TRIANGLES", + E[E.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", + E[E.TRIANGLE_FAN = 6] = "TRIANGLE_FAN" + }(Ba || (Ee = Ba = {}, + Ee)), + function(E) { + E[E.RGBA = 6408] = "RGBA", + E[E.RGB = 6407] = "RGB", + E[E.ALPHA = 6406] = "ALPHA", + E[E.LUMINANCE = 6409] = "LUMINANCE", + E[E.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", + E[E.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", + E[E.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL" + }(kb || (Ge = kb = {}, + Ge)), + function(E) { + E[E.TEXTURE_2D = 3553] = "TEXTURE_2D", + E[E.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", + E[E.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", + E[E.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", + E[E.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", + E[E.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", + E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", + E[E.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", + E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z" + }(Sa || (Oe = Sa = {}, + Oe)), + function(E) { + E[E.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", + E[E.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", + E[E.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", + E[E.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", + E[E.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", + E[E.FLOAT = 5126] = "FLOAT", + E[E.HALF_FLOAT = 36193] = "HALF_FLOAT" + }(ua || (Pe = ua = {}, + Pe)), + function(E) { + E[E.NEAREST = 0] = "NEAREST", + E[E.LINEAR = 1] = "LINEAR" + }(Ca || (Ne = Ca = {}, + Ne)), + function(E) { + E[E.CLAMP = 33071] = "CLAMP", + E[E.REPEAT = 10497] = "REPEAT", + E[E.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT" + }(Rb || (Qe = Rb = {}, + Qe)), + function(E) { + E[E.OFF = 0] = "OFF", + E[E.POW2 = 1] = "POW2", + E[E.ON = 2] = "ON", + E[E.ON_MANUAL = 3] = "ON_MANUAL" + }($a || (Je = $a = {}, + Je)), + function(E) { + E[E.NPM = 0] = "NPM", + E[E.UNPACK = 1] = "UNPACK", + E[E.PMA = 2] = "PMA", + E[E.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", + E[E.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", + E[E.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA" + }(Ia || (Ae = Ia = {}, + Ae)), + function(E) { + E[E.NO = 0] = "NO", + E[E.YES = 1] = "YES", + E[E.AUTO = 2] = "AUTO", + E[E.BLEND = 0] = "BLEND", + E[E.CLEAR = 1] = "CLEAR", + E[E.BLIT = 2] = "BLIT" + }(Ja || (De = Ja = {}, + De)), + function(E) { + E[E.AUTO = 0] = "AUTO", + E[E.MANUAL = 1] = "MANUAL" + }(Tc || (He = Tc = {}, + He)), + function(E) { + E.LOW = "lowp", + E.MEDIUM = "mediump", + E.HIGH = "highp" + }(xa || (Le = xa = {}, + Le)), + function(E) { + E[E.NONE = 0] = "NONE", + E[E.SCISSOR = 1] = "SCISSOR", + E[E.STENCIL = 2] = "STENCIL", + E[E.SPRITE = 3] = "SPRITE" + }(qa || (Ie = qa = {}, + Ie)), + function(E) { + E[E.NONE = 0] = "NONE", + E[E.LOW = 2] = "LOW", + E[E.MEDIUM = 4] = "MEDIUM", + E[E.HIGH = 8] = "HIGH" + }(_a || (Ke = _a = {}, + Ke)); + var Re = {} + , Se = Object.prototype.hasOwnProperty + , na = "~"; + function ab() {} + function Te(e, t, r) { + this.fn = e, + this.context = t, + this.once = r || !1 + } + function Uc(e, t, r, n, $) { + if ("function" != typeof r) + throw new TypeError("The listener must be a function"); + var v = new Te(r,n || e,$) + , a = na ? na + t : t; + return e._events[a] ? e._events[a].fn ? e._events[a] = [e._events[a], v] : e._events[a].push(v) : (e._events[a] = v, + e._eventsCount++), + e + } + function lb(e, t) { + 0 == --e._eventsCount ? e._events = new ab : delete e._events[t] + } + function ja() { + this._events = new ab, + this._eventsCount = 0 + } + Object.create && (ab.prototype = Object.create(null), + new ab().__proto__ || (na = !1)), + ja.prototype.eventNames = function() { + var e, t, r = []; + if (0 === this._eventsCount) + return r; + for (t in e = this._events) + Se.call(e, t) && r.push(na ? t.slice(1) : t); + return Object.getOwnPropertySymbols ? r.concat(Object.getOwnPropertySymbols(e)) : r + } + , + ja.prototype.listeners = function(e) { + var t = na ? na + e : e + , r = this._events[t]; + if (!r) + return []; + if (r.fn) + return [r.fn]; + for (var n = 0, $ = r.length, v = new Array($); n < $; n++) + v[n] = r[n].fn; + return v + } + , + ja.prototype.listenerCount = function(e) { + var t = na ? na + e : e + , r = this._events[t]; + return r ? r.fn ? 1 : r.length : 0 + } + , + ja.prototype.emit = function(e, t, r, n, $, v) { + var a = na ? na + e : e; + if (!this._events[a]) + return !1; + var i, J, l = this._events[a], s = arguments.length; + if (l.fn) { + switch (l.once && this.removeListener(e, l.fn, void 0, !0), + s) { + case 1: + return l.fn.call(l.context), + !0; + case 2: + return l.fn.call(l.context, t), + !0; + case 3: + return l.fn.call(l.context, t, r), + !0; + case 4: + return l.fn.call(l.context, t, r, n), + !0; + case 5: + return l.fn.call(l.context, t, r, n, $), + !0; + case 6: + return l.fn.call(l.context, t, r, n, $, v), + !0; + } + for (J = 1, + i = new Array(s - 1); J < s; J++) + i[J - 1] = arguments[J]; + l.fn.apply(l.context, i) + } else { + var o, f = l.length; + for (J = 0; J < f; J++) + switch (l[J].once && this.removeListener(e, l[J].fn, void 0, !0), + s) { + case 1: + l[J].fn.call(l[J].context); + break; + case 2: + l[J].fn.call(l[J].context, t); + break; + case 3: + l[J].fn.call(l[J].context, t, r); + break; + case 4: + l[J].fn.call(l[J].context, t, r, n); + break; + default: + if (!i) + for (o = 1, + i = new Array(s - 1); o < s; o++) + i[o - 1] = arguments[o]; + l[J].fn.apply(l[J].context, i); + } + } + return !0 + } + , + ja.prototype.on = function(e, t, r) { + return Uc(this, e, t, r, !1) + } + , + ja.prototype.once = function(e, t, r) { + return Uc(this, e, t, r, !0) + } + , + ja.prototype.removeListener = function(e, t, r, n) { + var $ = na ? na + e : e; + if (!this._events[$]) + return this; + if (!t) + return lb(this, $), + this; + var v = this._events[$]; + if (v.fn) + v.fn !== t || n && !v.once || r && v.context !== r || lb(this, $); + else { + for (var a = 0, i = [], J = v.length; a < J; a++) + (v[a].fn !== t || n && !v[a].once || r && v[a].context !== r) && i.push(v[a]); + i.length ? this._events[$] = 1 === i.length ? i[0] : i : lb(this, $) + } + return this + } + , + ja.prototype.removeAllListeners = function(e) { + var t; + return e ? (t = na ? na + e : e, + this._events[t] && lb(this, t)) : (this._events = new ab, + this._eventsCount = 0), + this + } + , + ja.prototype.off = ja.prototype.removeListener, + ja.prototype.addListener = ja.prototype.on, + ja.prefixed = na, + ja.EventEmitter = ja, + Re = ja; + var Ue = {}; + function mb(v, r, e) { + e = e || 2; + var $, n, t, a, i, h, x, o = r && r.length, w = o ? r[0] * e : v.length, l = Vc(v, 0, w, e, !0), u = []; + if (!l || l.next === l.prev) + return u; + if (o && (l = Ze(v, r, l, e)), + v.length > 80 * e) { + $ = t = v[0], + n = a = v[1]; + for (var s = e; s < w; s += e) + (i = v[s]) < $ && ($ = i), + (h = v[s + 1]) < n && (n = h), + i > t && (t = i), + h > a && (a = h); + x = 0 !== (x = Math.max(t - $, a - n)) ? 1 / x : 0 + } + return bb(l, u, e, $, n, x), + u + } + function Vc(v, r, e, $, n) { + var t, a; + if (n === Ub(v, r, e, $) > 0) + for (t = r; t < e; t += $) + a = Yc(t, v[t], v[t + 1], a); + else + for (t = e - $; t >= r; t -= $) + a = Yc(t, v[t], v[t + 1], a); + return a && nb(a, a.next) && (db(a), + a = a.next), + a + } + function Da(v, r) { + if (!v) + return v; + r || (r = v); + var e, $ = v; + do { + if (e = !1, + $.steiner || !nb($, $.next) && 0 !== ca($.prev, $, $.next)) + $ = $.next; + else { + if (db($), + ($ = r = $.prev) === $.next) + break; + e = !0 + } + } while (e || $ !== r); + return r + } + function bb(v, r, e, $, n, t, a) { + if (v) { + !a && t && cf(v, $, n, t); + for (var i, h, x = v; v.prev !== v.next; ) + if (i = v.prev, + h = v.next, + t ? We(v, $, n, t) : Ve(v)) + r.push(i.i / e), + r.push(v.i / e), + r.push(h.i / e), + db(v), + v = h.next, + x = h.next; + else if ((v = h) === x) { + a ? 1 === a ? bb(v = Xe(Da(v), r, e), r, e, $, n, t, 2) : 2 === a && Ye(v, r, e, $, n, t) : bb(Da(v), r, e, $, n, t, 1); + break + } + } + } + function Ve(v) { + var r = v.prev + , e = v + , $ = v.next; + if (ca(r, e, $) >= 0) + return !1; + for (var n = v.next.next; n !== v.prev; ) { + if (Ta(r.x, r.y, e.x, e.y, $.x, $.y, n.x, n.y) && ca(n.prev, n, n.next) >= 0) + return !1; + n = n.next + } + return !0 + } + function We(v, r, e, $) { + var n = v.prev + , t = v + , a = v.next; + if (ca(n, t, a) >= 0) + return !1; + for (var i = n.x < t.x ? n.x < a.x ? n.x : a.x : t.x < a.x ? t.x : a.x, h = n.y < t.y ? n.y < a.y ? n.y : a.y : t.y < a.y ? t.y : a.y, x = n.x > t.x ? n.x > a.x ? n.x : a.x : t.x > a.x ? t.x : a.x, o = n.y > t.y ? n.y > a.y ? n.y : a.y : t.y > a.y ? t.y : a.y, w = Sb(i, h, r, e, $), l = Sb(x, o, r, e, $), u = v.prevZ, s = v.nextZ; u && u.z >= w && s && s.z <= l; ) { + if (u !== v.prev && u !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, u.x, u.y) && ca(u.prev, u, u.next) >= 0) + return !1; + if (u = u.prevZ, + s !== v.prev && s !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, s.x, s.y) && ca(s.prev, s, s.next) >= 0) + return !1; + s = s.nextZ + } + for (; u && u.z >= w; ) { + if (u !== v.prev && u !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, u.x, u.y) && ca(u.prev, u, u.next) >= 0) + return !1; + u = u.prevZ + } + for (; s && s.z <= l; ) { + if (s !== v.prev && s !== v.next && Ta(n.x, n.y, t.x, t.y, a.x, a.y, s.x, s.y) && ca(s.prev, s, s.next) >= 0) + return !1; + s = s.nextZ + } + return !0 + } + function Xe(v, r, e) { + var $ = v; + do { + var n = $.prev + , t = $.next.next; + !nb(n, t) && Wc(n, $, $.next, t) && cb(n, t) && cb(t, n) && (r.push(n.i / e), + r.push($.i / e), + r.push(t.i / e), + db($), + db($.next), + $ = v = t), + $ = $.next + } while ($ !== v); + return Da($) + } + function Ye(v, r, e, $, n, t) { + var a = v; + do { + for (var i = a.next.next; i !== a.prev; ) { + if (a.i !== i.i && ff(a, i)) { + var h = Xc(a, i); + return a = Da(a, a.next), + h = Da(h, h.next), + bb(a, r, e, $, n, t), + void bb(h, r, e, $, n, t) + } + i = i.next + } + a = a.next + } while (a !== v) + } + function Ze(v, r, e, $) { + var n, t, a, i = []; + for (n = 0, + t = r.length; n < t; n++) + (a = Vc(v, r[n] * $, n < t - 1 ? r[n + 1] * $ : v.length, $, !1)) === a.next && (a.steiner = !0), + i.push(ef(a)); + for (i.sort($e), + n = 0; n < i.length; n++) + _e(i[n], e), + e = Da(e, e.next); + return e + } + function $e(v, r) { + return v.x - r.x + } + function _e(v, r) { + if (r = af(v, r)) { + var e = Xc(r, v); + Da(r, r.next), + Da(e, e.next) + } + } + function af(v, r) { + var e, $ = r, n = v.x, t = v.y, a = -1 / 0; + do { + if (t <= $.y && t >= $.next.y && $.next.y !== $.y) { + var i = $.x + (t - $.y) * ($.next.x - $.x) / ($.next.y - $.y); + if (i <= n && i > a) { + if (a = i, + i === n) { + if (t === $.y) + return $; + if (t === $.next.y) + return $.next + } + e = $.x < $.next.x ? $ : $.next + } + } + $ = $.next + } while ($ !== r); + if (!e) + return null; + if (n === a) + return e; + var h, x = e, o = e.x, w = e.y, l = 1 / 0; + $ = e; + do { + n >= $.x && $.x >= o && n !== $.x && Ta(t < w ? n : a, t, o, w, t < w ? a : n, t, $.x, $.y) && (h = Math.abs(t - $.y) / (n - $.x), + cb($, v) && (h < l || h === l && ($.x > e.x || $.x === e.x && bf(e, $))) && (e = $, + l = h)), + $ = $.next + } while ($ !== x); + return e + } + function bf(v, r) { + return ca(v.prev, v, r.prev) < 0 && ca(r.next, v, v.next) < 0 + } + function cf(v, r, e, $) { + var n = v; + do { + null === n.z && (n.z = Sb(n.x, n.y, r, e, $)), + n.prevZ = n.prev, + n.nextZ = n.next, + n = n.next + } while (n !== v); + n.prevZ.nextZ = null, + n.prevZ = null, + df(n) + } + function df(v) { + var r, e, $, n, t, a, i, h, x = 1; + do { + for (e = v, + v = null, + t = null, + a = 0; e; ) { + for (a++, + $ = e, + i = 0, + r = 0; r < x && (i++, + $ = $.nextZ); r++) + ; + for (h = x; i > 0 || h > 0 && $; ) + 0 !== i && (0 === h || !$ || e.z <= $.z) ? (n = e, + e = e.nextZ, + i--) : (n = $, + $ = $.nextZ, + h--), + t ? t.nextZ = n : v = n, + n.prevZ = t, + t = n; + e = $ + } + t.nextZ = null, + x *= 2 + } while (a > 1); + return v + } + function Sb(v, r, e, $, n) { + return (v = 1431655765 & ((v = 858993459 & ((v = 252645135 & ((v = 16711935 & ((v = 32767 * (v - e) * n) | v << 8)) | v << 4)) | v << 2)) | v << 1)) | (r = 1431655765 & ((r = 858993459 & ((r = 252645135 & ((r = 16711935 & ((r = 32767 * (r - $) * n) | r << 8)) | r << 4)) | r << 2)) | r << 1)) << 1 + } + function ef(v) { + var r = v + , e = v; + do { + (r.x < e.x || r.x === e.x && r.y < e.y) && (e = r), + r = r.next + } while (r !== v); + return e + } + function Ta(v, r, e, $, n, t, a, i) { + return (n - a) * (r - i) - (v - a) * (t - i) >= 0 && (v - a) * ($ - i) - (e - a) * (r - i) >= 0 && (e - a) * (t - i) - (n - a) * ($ - i) >= 0 + } + function ff(v, r) { + return v.next.i !== r.i && v.prev.i !== r.i && !gf(v, r) && (cb(v, r) && cb(r, v) && hf(v, r) && (ca(v.prev, v, r.prev) || ca(v, r.prev, r)) || nb(v, r) && ca(v.prev, v, v.next) > 0 && ca(r.prev, r, r.next) > 0) + } + function ca(v, r, e) { + return (r.y - v.y) * (e.x - r.x) - (r.x - v.x) * (e.y - r.y) + } + function nb(v, r) { + return v.x === r.x && v.y === r.y + } + function Wc(v, r, e, $) { + var n = pb(ca(v, r, e)) + , t = pb(ca(v, r, $)) + , a = pb(ca(e, $, v)) + , i = pb(ca(e, $, r)); + return n !== t && a !== i || !(0 !== n || !ob(v, e, r)) || !(0 !== t || !ob(v, $, r)) || !(0 !== a || !ob(e, v, $)) || !(0 !== i || !ob(e, r, $)) + } + function ob(v, r, e) { + return r.x <= Math.max(v.x, e.x) && r.x >= Math.min(v.x, e.x) && r.y <= Math.max(v.y, e.y) && r.y >= Math.min(v.y, e.y) + } + function pb(v) { + return v > 0 ? 1 : v < 0 ? -1 : 0 + } + function gf(v, r) { + var e = v; + do { + if (e.i !== v.i && e.next.i !== v.i && e.i !== r.i && e.next.i !== r.i && Wc(e, e.next, v, r)) + return !0; + e = e.next + } while (e !== v); + return !1 + } + function cb(v, r) { + return ca(v.prev, v, v.next) < 0 ? ca(v, r, v.next) >= 0 && ca(v, v.prev, r) >= 0 : ca(v, r, v.prev) < 0 || ca(v, v.next, r) < 0 + } + function hf(v, r) { + var e = v + , $ = !1 + , n = (v.x + r.x) / 2 + , t = (v.y + r.y) / 2; + do { + e.y > t != e.next.y > t && e.next.y !== e.y && n < (e.next.x - e.x) * (t - e.y) / (e.next.y - e.y) + e.x && ($ = !$), + e = e.next + } while (e !== v); + return $ + } + function Xc(v, r) { + var e = new Tb(v.i,v.x,v.y) + , $ = new Tb(r.i,r.x,r.y) + , n = v.next + , t = r.prev; + return v.next = r, + r.prev = v, + e.next = n, + n.prev = e, + $.next = e, + e.prev = $, + t.next = $, + $.prev = t, + $ + } + function Yc(v, r, e, $) { + var n = new Tb(v,r,e); + return $ ? (n.next = $.next, + n.prev = $, + $.next.prev = n, + $.next = n) : (n.prev = n, + n.next = n), + n + } + function db(v) { + v.next.prev = v.prev, + v.prev.next = v.next, + v.prevZ && (v.prevZ.nextZ = v.nextZ), + v.nextZ && (v.nextZ.prevZ = v.prevZ) + } + function Tb(v, r, e) { + this.i = v, + this.x = r, + this.y = e, + this.prev = null, + this.next = null, + this.z = null, + this.prevZ = null, + this.nextZ = null, + this.steiner = !1 + } + function Ub(v, r, e, $) { + for (var n = 0, t = r, a = e - $; t < e; t += $) + n += (v[a] - v[t]) * (v[t + 1] + v[a + 1]), + a = t; + return n + } + (Ue = mb).default = mb, + mb.deviation = function(v, r, e, $) { + var n = r && r.length + , t = n ? r[0] * e : v.length + , a = Math.abs(Ub(v, 0, t, e)); + if (n) + for (var i = 0, h = r.length; i < h; i++) { + var x = r[i] * e + , o = i < h - 1 ? r[i + 1] * e : v.length; + a -= Math.abs(Ub(v, x, o, e)) + } + var w = 0; + for (i = 0; i < $.length; i += 3) { + var l = $[i] * e + , u = $[i + 1] * e + , s = $[i + 2] * e; + w += Math.abs((v[l] - v[s]) * (v[u + 1] - v[l + 1]) - (v[l] - v[u]) * (v[s + 1] - v[l + 1])) + } + return 0 === a && 0 === w ? 0 : Math.abs((w - a) / a) + } + , + mb.flatten = function(v) { + for (var r = v[0][0].length, e = { + vertices: [], + holes: [], + dimensions: r + }, $ = 0, n = 0; n < v.length; n++) { + for (var t = 0; t < v[n].length; t++) + for (var a = 0; a < r; a++) + e.vertices.push(v[n][t][a]); + n > 0 && ($ += v[n - 1].length, + e.holes.push($)) + } + return e + } + ; + var jf = function() { + var o = this + , e = { + exports: this + }; + return function(n) { + var r = "object" == typeof o && o && !o.nodeType && o + , t = "object" == typeof e && e && !e.nodeType && e + , i = "object" == typeof Hc && Hc; + i.global !== i && i.window !== i && i.self !== i || (n = i); + var u, f, c = 2147483647, l = 36, s = 1, a = 26, p = 38, h = 700, d = 72, v = 128, g = "-", w = /^xn--/, x = /[^\x20-\x7E]/, b = /[\x2E\u3002\uFF0E\uFF61]/g, C = { + overflow: "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }, y = l - s, j = Math.floor, A = String.fromCharCode; + function $(o) { + throw new RangeError(C[o]) + } + function I(o, e) { + for (var n = o.length, r = []; n--; ) + r[n] = e(o[n]); + return r + } + function E(o, e) { + var n = o.split("@") + , r = ""; + return n.length > 1 && (r = n[0] + "@", + o = n[1]), + r + I((o = o.replace(b, ".")).split("."), e).join(".") + } + function F(o) { + for (var e, n, r = [], t = 0, i = o.length; t < i; ) + (e = o.charCodeAt(t++)) >= 55296 && e <= 56319 && t < i ? 56320 == (64512 & (n = o.charCodeAt(t++))) ? r.push(((1023 & e) << 10) + (1023 & n) + 65536) : (r.push(e), + t--) : r.push(e); + return r + } + function O(o) { + return I(o, function(o) { + var e = ""; + return o > 65535 && (e += A((o -= 65536) >>> 10 & 1023 | 55296), + o = 56320 | 1023 & o), + e += A(o) + }).join("") + } + function S(o, e) { + return o + 22 + 75 * (o < 26) - ((0 != e) << 5) + } + function T(o, e, n) { + var r = 0; + for (o = n ? j(o / h) : o >> 1, + o += j(o / e); o > y * a >> 1; r += l) + o = j(o / y); + return j(r + (y + 1) * o / (o + p)) + } + function m(o) { + var e, n, r, t, i, u, f, p, h, w, x, b = [], C = o.length, y = 0, A = v, I = d; + for ((n = o.lastIndexOf(g)) < 0 && (n = 0), + r = 0; r < n; ++r) + o.charCodeAt(r) >= 128 && $("not-basic"), + b.push(o.charCodeAt(r)); + for (t = n > 0 ? n + 1 : 0; t < C; ) { + for (i = y, + u = 1, + f = l; t >= C && $("invalid-input"), + ((p = (x = o.charCodeAt(t++)) - 48 < 10 ? x - 22 : x - 65 < 26 ? x - 65 : x - 97 < 26 ? x - 97 : l) >= l || p > j((c - y) / u)) && $("overflow"), + y += p * u, + !(p < (h = f <= I ? s : f >= I + a ? a : f - I)); f += l) + u > j(c / (w = l - h)) && $("overflow"), + u *= w; + I = T(y - i, e = b.length + 1, 0 == i), + j(y / e) > c - A && $("overflow"), + A += j(y / e), + y %= e, + b.splice(y++, 0, A) + } + return O(b) + } + function L(o) { + var e, n, r, t, i, u, f, p, h, w, x, b, C, y, I, E = []; + for (b = (o = F(o)).length, + e = v, + n = 0, + i = d, + u = 0; u < b; ++u) + (x = o[u]) < 128 && E.push(A(x)); + for (r = t = E.length, + t && E.push(g); r < b; ) { + for (f = c, + u = 0; u < b; ++u) + (x = o[u]) >= e && x < f && (f = x); + for (f - e > j((c - n) / (C = r + 1)) && $("overflow"), + n += (f - e) * C, + e = f, + u = 0; u < b; ++u) + if ((x = o[u]) < e && ++n > c && $("overflow"), + x == e) { + for (p = n, + h = l; !(p < (w = h <= i ? s : h >= i + a ? a : h - i)); h += l) + I = p - w, + y = l - w, + E.push(A(S(w + I % y, 0))), + p = j(I / y); + E.push(A(S(p, 0))), + i = T(n, C, r == t), + n = 0, + ++r + } + ++n, + ++e + } + return E.join("") + } + if (u = { + version: "1.4.1", + ucs2: { + decode: F, + encode: O + }, + decode: m, + encode: L, + toASCII: function(o) { + return E(o, function(o) { + return x.test(o) ? "xn--" + L(o) : o + }) + }, + toUnicode: function(o) { + return E(o, function(o) { + return w.test(o) ? m(o.slice(4).toLowerCase()) : o + }) + } + }, + r && t) { + if (e.exports == r) + t.exports = u; + else + for (f in u) + u.hasOwnProperty(f) && (r[f] = u[f]); + } else + n.punycode = u + }(this), + e.exports + } + .call({}); + var va = {}; + va = { + isString: function(n) { + return "string" == typeof n + }, + isObject: function(n) { + return "object" == typeof n && null !== n + }, + isNull: function(n) { + return null === n + }, + isNullOrUndefined: function(n) { + return null == n + } + }; + var kf, lf, mf = false; + function nf(r, e) { + return Object.prototype.hasOwnProperty.call(r, e) + } + function of() { + if (mf) + return; + mf = true; + kf = {}; + kf = function(r, e, t, a) { + e = e || "&", + t = t || "="; + var n = {}; + if ("string" != typeof r || 0 === r.length) + return n; + var o = /\+/g; + r = r.split(e); + var s = 1e3; + a && "number" == typeof a.maxKeys && (s = a.maxKeys); + var p = r.length; + s > 0 && p > s && (p = s); + for (var $ = 0; $ < p; ++$) { + var y, v, c, i, u = r[$].replace(o, "%20"), f = u.indexOf(t); + f >= 0 ? (y = u.substr(0, f), + v = u.substr(f + 1)) : (y = u, + v = ""), + c = decodeURIComponent(y), + i = decodeURIComponent(v), + nf(n, c) ? lf(n[c]) ? n[c].push(i) : n[c] = [n[c], i] : n[c] = i + } + return n + } + ; + lf = Array.isArray || function(r) { + return "[object Array]" === Object.prototype.toString.call(r) + } + } + var pf, eb, qf, rf, sf = false; + function Zc(r, e) { + if (r.map) + return r.map(e); + for (var t = [], n = 0; n < r.length; n++) + t.push(e(r[n], n)); + return t + } + function tf() { + if (sf) + return; + sf = true; + pf = {}; + eb = function(r) { + switch (typeof r) { + case "string": + return r; + case "boolean": + return r ? "true" : "false"; + case "number": + return isFinite(r) ? r : ""; + default: + return ""; + } + } + ; + pf = function(r, e, t, n) { + return e = e || "&", + t = t || "=", + null === r && (r = void 0), + "object" == typeof r ? Zc(rf(r), function(n) { + var i = encodeURIComponent(eb(n)) + t; + return qf(r[n]) ? Zc(r[n], function(r) { + return i + encodeURIComponent(eb(r)) + }).join(e) : i + encodeURIComponent(eb(r[n])) + }).join(e) : n ? encodeURIComponent(eb(n)) + t + encodeURIComponent(eb(r)) : "" + } + ; + qf = Array.isArray || function(r) { + return "[object Array]" === Object.prototype.toString.call(r) + } + ; + rf = Object.keys || function(r) { + var e = []; + for (var t in r) + Object.prototype.hasOwnProperty.call(r, t) && e.push(t); + return e + } + } + var $c, uf, c = ($c = (of(), + kf)); + var d = (uf = (tf(), + pf)); + var vf = qb; + var wf = Hf; + var xf = Gf; + function sa() { + this.protocol = null, + this.slashes = null, + this.auth = null, + this.host = null, + this.port = null, + this.hostname = null, + this.hash = null, + this.search = null, + this.query = null, + this.pathname = null, + this.path = null, + this.href = null + } + var yf = /^([a-z0-9.+-]+:)/i + , zf = /:[0-9]*$/ + , Af = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/ + , Bf = ["<", ">", "\"", "`", " ", "\r", "\n", "\t"] + , Cf = ["{", "}", "|", "\\", "^", "`"].concat(Bf) + , Vb = ["'"].concat(Cf) + , _c = ["%", "/", "?", ";", "#"].concat(Vb) + , ad = ["/", "?", "#"] + , Df = 255 + , bd = /^[+a-z0-9A-Z_-]{0,63}$/ + , Ef = /^([+a-z0-9A-Z_-]{0,63})(.*)$/ + , Ff = { + javascript: !0, + "javascript:": !0 + } + , Wb = { + javascript: !0, + "javascript:": !0 + } + , Ua = { + http: !0, + https: !0, + ftp: !0, + gopher: !0, + file: !0, + "http:": !0, + "https:": !0, + "ftp:": !0, + "gopher:": !0, + "file:": !0 + }; + function qb(t, h, r) { + if (t && va.isObject(t) && t instanceof sa) + return t; + var s = new sa; + return s.parse(t, h, r), + s + } + function Gf(t) { + return va.isString(t) && (t = qb(t)), + t instanceof sa ? t.format() : sa.prototype.format.call(t) + } + function Hf(t, h) { + return qb(t, !1, !0).resolve(h) + } + sa.prototype.parse = function(t, h, r) { + if (!va.isString(t)) + throw new TypeError("Parameter 'url' must be a string, not " + typeof t); + var s = t.indexOf("?") + , a = -1 !== s && s < t.indexOf("#") ? "?" : "#" + , e = t.split(a); + e[0] = e[0].replace(/\\/g, "/"); + var o = t = e.join(a); + if (o = o.trim(), + !r && 1 === t.split("#").length) { + var $ = Af.exec(o); + if ($) + return this.path = o, + this.href = o, + this.pathname = $[1], + $[2] ? (this.search = $[2], + this.query = h ? $c(this.search.substr(1)) : this.search.substr(1)) : h && (this.search = "", + this.query = {}), + this + } + var n = yf.exec(o); + if (n) { + var i = (n = n[0]).toLowerCase(); + this.protocol = i, + o = o.substr(n.length) + } + if (r || n || o.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var l = "//" === o.substr(0, 2); + !l || n && Wb[n] || (o = o.substr(2), + this.slashes = !0) + } + if (!Wb[n] && (l || n && !Ua[n])) { + for (var p, u, c = -1, v = 0; v < ad.length; v++) { + -1 !== (d = o.indexOf(ad[v])) && (-1 === c || d < c) && (c = d) + } + -1 !== (u = -1 === c ? o.lastIndexOf("@") : o.lastIndexOf("@", c)) && (p = o.slice(0, u), + o = o.slice(u + 1), + this.auth = decodeURIComponent(p)), + c = -1; + for (v = 0; v < _c.length; v++) { + var d; + -1 !== (d = o.indexOf(_c[v])) && (-1 === c || d < c) && (c = d) + } + -1 === c && (c = o.length), + this.host = o.slice(0, c), + o = o.slice(c), + this.parseHost(), + this.hostname = this.hostname || ""; + var f = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1]; + if (!f) + for (var m = this.hostname.split(/\./), F = (v = 0, + m.length); v < F; v++) { + var Z = m[v]; + if (Z && !Z.match(bd)) { + for (var g = "", y = 0, P = Z.length; y < P; y++) + Z.charCodeAt(y) > 127 ? g += "x" : g += Z[y]; + if (!g.match(bd)) { + var x = m.slice(0, v) + , b = m.slice(v + 1) + , q = Z.match(Ef); + q && (x.push(q[1]), + b.unshift(q[2])), + b.length && (o = "/" + b.join(".") + o), + this.hostname = x.join("."); + break + } + } + } + this.hostname.length > Df ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), + f || (this.hostname = jf.toASCII(this.hostname)); + var O = this.port ? ":" + this.port : "" + , j = this.hostname || ""; + this.host = j + O, + this.href += this.host, + f && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), + "/" !== o[0] && (o = "/" + o)) + } + if (!Ff[i]) + for (v = 0, + F = Vb.length; v < F; v++) { + var U = Vb[v]; + if (-1 !== o.indexOf(U)) { + var C = encodeURIComponent(U); + C === U && (C = escape(U)), + o = o.split(U).join(C) + } + } + var A = o.indexOf("#"); + -1 !== A && (this.hash = o.substr(A), + o = o.slice(0, A)); + var w = o.indexOf("?"); + if (-1 !== w ? (this.search = o.substr(w), + this.query = o.substr(w + 1), + h && (this.query = $c(this.query)), + o = o.slice(0, w)) : h && (this.search = "", + this.query = {}), + o && (this.pathname = o), + Ua[i] && this.hostname && !this.pathname && (this.pathname = "/"), + this.pathname || this.search) { + O = this.pathname || ""; + var E = this.search || ""; + this.path = O + E + } + return this.href = this.format(), + this + } + , + sa.prototype.format = function() { + var t = this.auth || ""; + t && (t = (t = encodeURIComponent(t)).replace(/%3A/i, ":"), + t += "@"); + var h = this.protocol || "" + , r = this.pathname || "" + , s = this.hash || "" + , a = !1 + , e = ""; + this.host ? a = t + this.host : this.hostname && (a = t + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), + this.port && (a += ":" + this.port)), + this.query && va.isObject(this.query) && Object.keys(this.query).length && (e = uf(this.query)); + var o = this.search || e && "?" + e || ""; + return h && ":" !== h.substr(-1) && (h += ":"), + this.slashes || (!h || Ua[h]) && !1 !== a ? (a = "//" + (a || ""), + r && "/" !== r.charAt(0) && (r = "/" + r)) : a || (a = ""), + s && "#" !== s.charAt(0) && (s = "#" + s), + o && "?" !== o.charAt(0) && (o = "?" + o), + h + a + (r = r.replace(/[?#]/g, function(t) { + return encodeURIComponent(t) + })) + (o = o.replace("#", "%23")) + s + } + , + sa.prototype.resolve = function(t) { + return this.resolveObject(qb(t, !1, !0)).format() + } + , + sa.prototype.resolveObject = function(t) { + if (va.isString(t)) { + var h = new sa; + h.parse(t, !1, !0), + t = h + } + for (var r = new sa, s = Object.keys(this), a = 0; a < s.length; a++) { + var e = s[a]; + r[e] = this[e] + } + if (r.hash = t.hash, + "" === t.href) + return r.href = r.format(), + r; + if (t.slashes && !t.protocol) { + for (var o = Object.keys(t), $ = 0; $ < o.length; $++) { + var n = o[$]; + "protocol" !== n && (r[n] = t[n]) + } + return Ua[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = "/"), + r.href = r.format(), + r + } + if (t.protocol && t.protocol !== r.protocol) { + if (!Ua[t.protocol]) { + for (var i = Object.keys(t), l = 0; l < i.length; l++) { + var p = i[l]; + r[p] = t[p] + } + return r.href = r.format(), + r + } + if (r.protocol = t.protocol, + t.host || Wb[t.protocol]) + r.pathname = t.pathname; + else { + for (var u = (t.pathname || "").split("/"); u.length && !(t.host = u.shift()); ) + ; + t.host || (t.host = ""), + t.hostname || (t.hostname = ""), + "" !== u[0] && u.unshift(""), + u.length < 2 && u.unshift(""), + r.pathname = u.join("/") + } + if (r.search = t.search, + r.query = t.query, + r.host = t.host || "", + r.auth = t.auth, + r.hostname = t.hostname || t.host, + r.port = t.port, + r.pathname || r.search) { + var c = r.pathname || "" + , v = r.search || ""; + r.path = c + v + } + return r.slashes = r.slashes || t.slashes, + r.href = r.format(), + r + } + var d = r.pathname && "/" === r.pathname.charAt(0) + , f = t.host || t.pathname && "/" === t.pathname.charAt(0) + , m = f || d || r.host && t.pathname + , F = m + , Z = r.pathname && r.pathname.split("/") || [] + , g = (u = t.pathname && t.pathname.split("/") || [], + r.protocol && !Ua[r.protocol]); + if (g && (r.hostname = "", + r.port = null, + r.host && ("" === Z[0] ? Z[0] = r.host : Z.unshift(r.host)), + r.host = "", + t.protocol && (t.hostname = null, + t.port = null, + t.host && ("" === u[0] ? u[0] = t.host : u.unshift(t.host)), + t.host = null), + m = m && ("" === u[0] || "" === Z[0])), + f) + r.host = t.host || "" === t.host ? t.host : r.host, + r.hostname = t.hostname || "" === t.hostname ? t.hostname : r.hostname, + r.search = t.search, + r.query = t.query, + Z = u; + else if (u.length) + Z || (Z = []), + Z.pop(), + Z = Z.concat(u), + r.search = t.search, + r.query = t.query; + else if (!va.isNullOrUndefined(t.search)) { + if (g) + r.hostname = r.host = Z.shift(), + (q = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = q.shift(), + r.host = r.hostname = q.shift()); + return r.search = t.search, + r.query = t.query, + va.isNull(r.pathname) && va.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), + r.href = r.format(), + r + } + if (!Z.length) + return r.pathname = null, + r.search ? r.path = "/" + r.search : r.path = null, + r.href = r.format(), + r; + for (var y = Z.slice(-1)[0], P = (r.host || t.host || Z.length > 1) && ("." === y || ".." === y) || "" === y, x = 0, b = Z.length; b >= 0; b--) + "." === (y = Z[b]) ? Z.splice(b, 1) : ".." === y ? (Z.splice(b, 1), + x++) : x && (Z.splice(b, 1), + x--); + if (!m && !F) + for (; x--; x) + Z.unshift(".."); + !m || "" === Z[0] || Z[0] && "/" === Z[0].charAt(0) || Z.unshift(""), + P && "/" !== Z.join("/").substr(-1) && Z.push(""); + var q, O = "" === Z[0] || Z[0] && "/" === Z[0].charAt(0); + g && (r.hostname = r.host = O ? "" : Z.length ? Z.shift() : "", + (q = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = q.shift(), + r.host = r.hostname = q.shift())); + return (m = m || r.host && Z.length) && !O && Z.unshift(""), + Z.length ? r.pathname = Z.join("/") : (r.pathname = null, + r.path = null), + va.isNull(r.pathname) && va.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), + r.auth = t.auth || r.auth, + r.slashes = r.slashes || t.slashes, + r.href = r.format(), + r + } + , + sa.prototype.parseHost = function() { + var t = this.host + , h = zf.exec(t); + h && (":" !== (h = h[0]) && (this.port = h.substr(1)), + t = t.substr(0, t.length - h.length)), + t && (this.hostname = t) + } + ; + var rb = Kb(Re); + var cd = Kb(Ue); + var If = { + parse: vf, + format: xf, + resolve: wf + }; + aa.RETINA_PREFIX = /@([0-9\.]+)x/, + aa.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1; + var dd, Jf = !1, ed = "6.0.1"; + function Kf($) { + var e; + if (!Jf) { + if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) { + var r = ["\n %c %c %c PixiJS " + ed + " - \u2730 " + $ + " \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n", "background: #ff66a5; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff66a5; background: #030307; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "background: #ffc3dc; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;"]; + (e = self.console).log.apply(e, r) + } else + self.console && self.console.log("PixiJS " + ed + " - " + $ + " - http://www.pixijs.com/"); + Jf = !0 + } + } + function Lf() { + return void 0 === dd && (dd = function() { + var $ = { + stencil: !0, + failIfMajorPerformanceCaveat: aa.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT + }; + try { + if (!self.WebGLRenderingContext) + return !1; + var e = document.createElement("canvas") + , r = e.getContext("webgl", $) || e.getContext("experimental-webgl", $) + , a = !(!r || !r.getContextAttributes().stencil); + if (r) { + var v = r.getExtension("WEBGL_lose_context"); + v && v.loseContext() + } + return r = null, + a + } catch (g) { + return !1 + } + }()), + dd + } + function Xb($, e) { + return void 0 === e && (e = []), + e[0] = ($ >> 16 & 255) / 255, + e[1] = ($ >> 8 & 255) / 255, + e[2] = (255 & $) / 255, + e + } + function Mf($) { + var e = $.toString(16); + return "#" + (e = "000000".substr(0, 6 - e.length) + e) + } + function Nf() { + for (var $ = [], e = [], r = 0; r < 32; r++) + $[r] = r, + e[r] = r; + $[K.NORMAL_NPM] = K.NORMAL, + $[K.ADD_NPM] = K.ADD, + $[K.SCREEN_NPM] = K.SCREEN, + e[K.NORMAL] = K.NORMAL_NPM, + e[K.ADD] = K.ADD_NPM, + e[K.SCREEN] = K.SCREEN_NPM; + var a = []; + return a.push(e), + a.push($), + a + } + var Of = Nf(); + function fd($, e) { + if (1 === e) + return (255 * e << 24) + $; + if (0 === e) + return 0; + var r = $ >> 16 & 255 + , a = $ >> 8 & 255 + , v = 255 & $; + return (255 * e << 24) + ((r = r * e + .5 | 0) << 16) + ((a = a * e + .5 | 0) << 8) + (v = v * e + .5 | 0) + } + var e = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array + }; + function sb($) { + return $ += 0 === $ ? 1 : 0, + --$, + $ |= $ >>> 1, + $ |= $ >>> 2, + $ |= $ >>> 4, + $ |= $ >>> 8, + ($ |= $ >>> 16) + 1 + } + function gd($) { + return !($ & $ - 1 || !$) + } + function hd($) { + var e = ($ > 65535 ? 1 : 0) << 4 + , r = (($ >>>= e) > 255 ? 1 : 0) << 3; + return e |= r, + e |= r = (($ >>>= r) > 15 ? 1 : 0) << 2, + (e |= r = (($ >>>= r) > 3 ? 1 : 0) << 1) | ($ >>>= r) >> 1 + } + function tb($, e, r) { + var a, v = $.length; + if (!(e >= v || 0 === r)) { + var g = v - (r = e + r > v ? v - e : r); + for (a = e; a < g; ++a) + $[a] = $[a + r]; + $.length = g + } + } + var Pf = 0; + function ub() { + return ++Pf + } + var id = {}; + function Va($, e, r) { + if (void 0 === r && (r = 3), + !id[e]) { + var a = new Error().stack; + void 0 === a ? console.warn("PixiJS Deprecation Warning: ", e + "\nDeprecated since v" + $) : (a = a.split("\n").splice(r).join("\n"), + console.groupCollapsed ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", e + "\nDeprecated since v" + $), + console.warn(a), + console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", e + "\nDeprecated since v" + $), + console.warn(a))), + id[e] = !0 + } + } + var jd = {} + , ya = Object.create(null) + , Ka = Object.create(null); + var f = function() { + function $($, e, r) { + this.canvas = document.createElement("canvas"), + this.context = this.canvas.getContext("2d"), + this.resolution = r || aa.RESOLUTION, + this.resize($, e) + } + return $.prototype.clear = function() { + this.context.setTransform(1, 0, 0, 1, 0, 0), + this.context.clearRect(0, 0, this.canvas.width, this.canvas.height) + } + , + $.prototype.resize = function($, e) { + this.canvas.width = $ * this.resolution, + this.canvas.height = e * this.resolution + } + , + $.prototype.destroy = function() { + this.context = null, + this.canvas = null + } + , + Object.defineProperty($.prototype, "width", { + get: function() { + return this.canvas.width + }, + set: function($) { + this.canvas.width = $ + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty($.prototype, "height", { + get: function() { + return this.canvas.height + }, + set: function($) { + this.canvas.height = $ + }, + enumerable: !1, + configurable: !0 + }), + $ + }(); + var Yb; + function Qf($, e) { + if (void 0 === e && (e = self.location), + 0 === $.indexOf("data:")) + return ""; + e = e || self.location, + Yb || (Yb = document.createElement("a")), + Yb.href = $; + var r = If.parse(Yb.href) + , a = !r.port && "" === e.port || r.port === e.port; + return r.hostname === e.hostname && a && r.protocol === e.protocol ? "" : "anonymous" + } + function kd($, e) { + var r = aa.RETINA_PREFIX.exec($); + return r ? parseFloat(r[1]) : void 0 !== e ? e : 1 + } + var ka = function() { + function t(t) { + this.items = [], + this._name = t, + this._aliasCount = 0 + } + return t.prototype.emit = function(t, e, n, i, r, s, o, u) { + if (arguments.length > 8) + throw new Error("max arguments reached"); + var h = this.name + , p = this.items; + this._aliasCount++; + for (var a = 0, m = p.length; a < m; a++) + p[a][h](t, e, n, i, r, s, o, u); + return p === this.items && this._aliasCount--, + this + } + , + t.prototype.ensureNonAliasedItems = function() { + this._aliasCount > 0 && this.items.length > 1 && (this._aliasCount = 0, + this.items = this.items.slice(0)) + } + , + t.prototype.add = function(t) { + return t[this._name] && (this.ensureNonAliasedItems(), + this.remove(t), + this.items.push(t)), + this + } + , + t.prototype.remove = function(t) { + var e = this.items.indexOf(t); + return -1 !== e && (this.ensureNonAliasedItems(), + this.items.splice(e, 1)), + this + } + , + t.prototype.contains = function(t) { + return -1 !== this.items.indexOf(t) + } + , + t.prototype.removeAll = function() { + return this.ensureNonAliasedItems(), + this.items.length = 0, + this + } + , + t.prototype.destroy = function() { + this.removeAll(), + this.items = null, + this._name = null + } + , + Object.defineProperty(t.prototype, "empty", { + get: function() { + return 0 === this.items.length + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "name", { + get: function() { + return this._name + }, + enumerable: !1, + configurable: !0 + }), + t + }(); + Object.defineProperties(ka.prototype, { + dispatch: { + value: ka.prototype.emit + }, + run: { + value: ka.prototype.emit + } + }); + var Rf, vb; + aa.TARGET_FPMS = .06, + function(t) { + t[t.INTERACTION = 50] = "INTERACTION", + t[t.HIGH = 25] = "HIGH", + t[t.NORMAL = 0] = "NORMAL", + t[t.LOW = -25] = "LOW", + t[t.UTILITY = -50] = "UTILITY" + }(vb || (Rf = vb = {}, + Rf)); + var Zb = function() { + function t(t, e, i, s) { + void 0 === e && (e = null), + void 0 === i && (i = 0), + void 0 === s && (s = !1), + this.next = null, + this.previous = null, + this._destroyed = !1, + this.fn = t, + this.context = e, + this.priority = i, + this.once = s + } + return t.prototype.match = function(t, e) { + return void 0 === e && (e = null), + this.fn === t && this.context === e + } + , + t.prototype.emit = function(t) { + this.fn && (this.context ? this.fn.call(this.context, t) : this.fn(t)); + var e = this.next; + return this.once && this.destroy(!0), + this._destroyed && (this.next = null), + e + } + , + t.prototype.connect = function(t) { + this.previous = t, + t.next && (t.next.previous = this), + this.next = t.next, + t.next = this + } + , + t.prototype.destroy = function(t) { + void 0 === t && (t = !1), + this._destroyed = !0, + this.fn = null, + this.context = null, + this.previous && (this.previous.next = this.next), + this.next && (this.next.previous = this.previous); + var e = this.next; + return this.next = t ? null : e, + this.previous = null, + e + } + , + t + }() + , Ea = function() { + function t() { + var t = this; + this.autoStart = !1, + this.deltaTime = 1, + this.lastTime = -1, + this.speed = 1, + this.started = !1, + this._requestId = null, + this._maxElapsedMS = 100, + this._minElapsedMS = 0, + this._protected = !1, + this._lastFrame = -1, + this._head = new Zb(null,null,1 / 0), + this.deltaMS = 1 / aa.TARGET_FPMS, + this.elapsedMS = 1 / aa.TARGET_FPMS, + this._tick = function(e) { + t._requestId = null, + t.started && (t.update(e), + t.started && null === t._requestId && t._head.next && (t._requestId = requestAnimationFrame(t._tick))) + } + } + return t.prototype._requestIfNeeded = function() { + null === this._requestId && this._head.next && (this.lastTime = performance.now(), + this._lastFrame = this.lastTime, + this._requestId = requestAnimationFrame(this._tick)) + } + , + t.prototype._cancelIfNeeded = function() { + null !== this._requestId && (cancelAnimationFrame(this._requestId), + this._requestId = null) + } + , + t.prototype._startIfPossible = function() { + this.started ? this._requestIfNeeded() : this.autoStart && this.start() + } + , + t.prototype.add = function(t, e, i) { + return void 0 === i && (i = vb.NORMAL), + this._addListener(new Zb(t,e,i)) + } + , + t.prototype.addOnce = function(t, e, i) { + return void 0 === i && (i = vb.NORMAL), + this._addListener(new Zb(t,e,i,!0)) + } + , + t.prototype._addListener = function(t) { + var e = this._head.next + , i = this._head; + if (e) { + for (; e; ) { + if (t.priority > e.priority) { + t.connect(i); + break + } + i = e, + e = e.next + } + t.previous || t.connect(i) + } else + t.connect(i); + return this._startIfPossible(), + this + } + , + t.prototype.remove = function(t, e) { + for (var i = this._head.next; i; ) + i = i.match(t, e) ? i.destroy() : i.next; + return this._head.next || this._cancelIfNeeded(), + this + } + , + Object.defineProperty(t.prototype, "count", { + get: function() { + if (!this._head) + return 0; + for (var t = 0, e = this._head; e = e.next; ) + t++; + return t + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.start = function() { + this.started || (this.started = !0, + this._requestIfNeeded()) + } + , + t.prototype.stop = function() { + this.started && (this.started = !1, + this._cancelIfNeeded()) + } + , + t.prototype.destroy = function() { + if (!this._protected) { + this.stop(); + for (var t = this._head.next; t; ) + t = t.destroy(!0); + this._head.destroy(), + this._head = null + } + } + , + t.prototype.update = function(t) { + var e; + if (void 0 === t && (t = performance.now()), + t > this.lastTime) { + if ((e = this.elapsedMS = t - this.lastTime) > this._maxElapsedMS && (e = this._maxElapsedMS), + e *= this.speed, + this._minElapsedMS) { + var i = t - this._lastFrame | 0; + if (i < this._minElapsedMS) + return; + this._lastFrame = t - i % this._minElapsedMS + } + this.deltaMS = e, + this.deltaTime = this.deltaMS * aa.TARGET_FPMS; + for (var s = this._head, r = s.next; r; ) + r = r.emit(this.deltaTime); + s.next || this._cancelIfNeeded() + } else + this.deltaTime = this.deltaMS = this.elapsedMS = 0; + this.lastTime = t + } + , + Object.defineProperty(t.prototype, "FPS", { + get: function() { + return 1e3 / this.elapsedMS + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "minFPS", { + get: function() { + return 1e3 / this._maxElapsedMS + }, + set: function(t) { + var e = Math.min(this.maxFPS, t) + , i = Math.min(Math.max(0, e) / 1e3, aa.TARGET_FPMS); + this._maxElapsedMS = 1 / i + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "maxFPS", { + get: function() { + return this._minElapsedMS ? Math.round(1e3 / this._minElapsedMS) : 0 + }, + set: function(t) { + if (0 === t) + this._minElapsedMS = 0; + else { + var e = Math.max(this.minFPS, t); + this._minElapsedMS = 1 / (e / 1e3) + } + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "shared", { + get: function() { + if (!t._shared) { + var e = t._shared = new t; + e.autoStart = !0, + e._protected = !0 + } + return t._shared + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "system", { + get: function() { + if (!t._system) { + var e = t._system = new t; + e.autoStart = !0, + e._protected = !0 + } + return t._system + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , g = function() { + function t() {} + return t.init = function(t) { + var e = this; + t = Object.assign({ + autoStart: !0, + sharedTicker: !1 + }, t), + Object.defineProperty(this, "ticker", { + set: function(t) { + this._ticker && this._ticker.remove(this.render, this), + this._ticker = t, + t && t.add(this.render, this, vb.LOW) + }, + get: function() { + return this._ticker + } + }), + this.stop = function() { + e._ticker.stop() + } + , + this.start = function() { + e._ticker.start() + } + , + this._ticker = null, + this.ticker = t.sharedTicker ? Ea.shared : new Ea, + t.autoStart && this.start() + } + , + t.destroy = function() { + if (this._ticker) { + var t = this._ticker; + this.ticker = null, + t.destroy() + } + } + , + t + }(); + var Sf, fa, wb = 2 * Math.PI, Tf = 180 / Math.PI, Uf = Math.PI / 180; + !function(t) { + t[t.POLY = 0] = "POLY", + t[t.RECT = 1] = "RECT", + t[t.CIRC = 2] = "CIRC", + t[t.ELIP = 3] = "ELIP", + t[t.RREC = 4] = "RREC" + }(fa || (Sf = fa = {}, + Sf)); + var da = function() { + function t(t, i, s, o) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + this.x = Number(t), + this.y = Number(i), + this.width = Number(s), + this.height = Number(o), + this.type = fa.RECT + } + return Object.defineProperty(t.prototype, "left", { + get: function() { + return this.x + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "right", { + get: function() { + return this.x + this.width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "top", { + get: function() { + return this.y + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "bottom", { + get: function() { + return this.y + this.height + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "EMPTY", { + get: function() { + return new t(0,0,0,0) + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.clone = function() { + return new t(this.x,this.y,this.width,this.height) + } + , + t.prototype.copyFrom = function(t) { + return this.x = t.x, + this.y = t.y, + this.width = t.width, + this.height = t.height, + this + } + , + t.prototype.copyTo = function(t) { + return t.x = this.x, + t.y = this.y, + t.width = this.width, + t.height = this.height, + t + } + , + t.prototype.contains = function(t, i) { + return !(this.width <= 0 || this.height <= 0) && t >= this.x && t < this.x + this.width && i >= this.y && i < this.y + this.height + } + , + t.prototype.pad = function(t, i) { + return void 0 === t && (t = 0), + void 0 === i && (i = t), + this.x -= t, + this.y -= i, + this.width += 2 * t, + this.height += 2 * i, + this + } + , + t.prototype.fit = function(t) { + var i = Math.max(this.x, t.x) + , s = Math.min(this.x + this.width, t.x + t.width) + , o = Math.max(this.y, t.y) + , h = Math.min(this.y + this.height, t.y + t.height); + return this.x = i, + this.width = Math.max(s - i, 0), + this.y = o, + this.height = Math.max(h - o, 0), + this + } + , + t.prototype.ceil = function(t, i) { + void 0 === t && (t = 1), + void 0 === i && (i = .001); + var s = Math.ceil((this.x + this.width - i) * t) / t + , o = Math.ceil((this.y + this.height - i) * t) / t; + return this.x = Math.floor((this.x + i) * t) / t, + this.y = Math.floor((this.y + i) * t) / t, + this.width = s - this.x, + this.height = o - this.y, + this + } + , + t.prototype.enlarge = function(t) { + var i = Math.min(this.x, t.x) + , s = Math.max(this.x + this.width, t.x + t.width) + , o = Math.min(this.y, t.y) + , h = Math.max(this.y + this.height, t.y + t.height); + return this.x = i, + this.width = s - i, + this.y = o, + this.height = h - o, + this + } + , + t.prototype.toString = function() { + return "[@pixi/math:Rectangle x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]" + } + , + t + }() + , Vf = function() { + function t(t, i, s) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + this.x = t, + this.y = i, + this.radius = s, + this.type = fa.CIRC + } + return t.prototype.clone = function() { + return new t(this.x,this.y,this.radius) + } + , + t.prototype.contains = function(t, i) { + if (this.radius <= 0) + return !1; + var s = this.radius * this.radius + , o = this.x - t + , h = this.y - i; + return (o *= o) + (h *= h) <= s + } + , + t.prototype.getBounds = function() { + return new da(this.x - this.radius,this.y - this.radius,2 * this.radius,2 * this.radius) + } + , + t.prototype.toString = function() { + return "[@pixi/math:Circle x=" + this.x + " y=" + this.y + " radius=" + this.radius + "]" + } + , + t + }() + , Wf = function() { + function t(t, i, s, o) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + this.x = t, + this.y = i, + this.width = s, + this.height = o, + this.type = fa.ELIP + } + return t.prototype.clone = function() { + return new t(this.x,this.y,this.width,this.height) + } + , + t.prototype.contains = function(t, i) { + if (this.width <= 0 || this.height <= 0) + return !1; + var s = (t - this.x) / this.width + , o = (i - this.y) / this.height; + return (s *= s) + (o *= o) <= 1 + } + , + t.prototype.getBounds = function() { + return new da(this.x - this.width,this.y - this.height,this.width,this.height) + } + , + t.prototype.toString = function() { + return "[@pixi/math:Ellipse x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]" + } + , + t + }() + , $b = function() { + function t() { + for (var t = arguments, i = [], s = 0; s < arguments.length; s++) + i[s] = t[s]; + var o = Array.isArray(i[0]) ? i[0] : i; + if ("number" != typeof o[0]) { + for (var h = [], r = 0, e = o.length; r < e; r++) + h.push(o[r].x, o[r].y); + o = h + } + this.points = o, + this.type = fa.POLY, + this.closeStroke = !0 + } + return t.prototype.clone = function() { + var i = new t(this.points.slice()); + return i.closeStroke = this.closeStroke, + i + } + , + t.prototype.contains = function(t, i) { + for (var s = !1, o = this.points.length / 2, h = 0, r = o - 1; h < o; r = h++) { + var e = this.points[2 * h] + , n = this.points[2 * h + 1] + , a = this.points[2 * r] + , $ = this.points[2 * r + 1]; + n > i != $ > i && t < (i - n) / ($ - n) * (a - e) + e && (s = !s) + } + return s + } + , + t.prototype.toString = function() { + return "[@pixi/math:PolygoncloseStroke=" + this.closeStroke + "points=" + this.points.reduce(function(t, i) { + return t + ", " + i + }, "") + "]" + } + , + t + }() + , Xf = function() { + function t(t, i, s, o, h) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + void 0 === h && (h = 20), + this.x = t, + this.y = i, + this.width = s, + this.height = o, + this.radius = h, + this.type = fa.RREC + } + return t.prototype.clone = function() { + return new t(this.x,this.y,this.width,this.height,this.radius) + } + , + t.prototype.contains = function(t, i) { + if (this.width <= 0 || this.height <= 0) + return !1; + if (t >= this.x && t <= this.x + this.width && i >= this.y && i <= this.y + this.height) { + if (i >= this.y + this.radius && i <= this.y + this.height - this.radius || t >= this.x + this.radius && t <= this.x + this.width - this.radius) + return !0; + var s = t - (this.x + this.radius) + , o = i - (this.y + this.radius) + , h = this.radius * this.radius; + if (s * s + o * o <= h) + return !0; + if ((s = t - (this.x + this.width - this.radius)) * s + o * o <= h) + return !0; + if (s * s + (o = i - (this.y + this.height - this.radius)) * o <= h) + return !0; + if ((s = t - (this.x + this.radius)) * s + o * o <= h) + return !0 + } + return !1 + } + , + t.prototype.toString = function() { + return "[@pixi/math:RoundedRectangle x=" + this.x + " y=" + this.y + "width=" + this.width + " height=" + this.height + " radius=" + this.radius + "]" + } + , + t + }() + , ra = function() { + function t(t, i) { + void 0 === t && (t = 0), + void 0 === i && (i = 0), + this.x = t, + this.y = i + } + return t.prototype.clone = function() { + return new t(this.x,this.y) + } + , + t.prototype.copyFrom = function(t) { + return this.set(t.x, t.y), + this + } + , + t.prototype.copyTo = function(t) { + return t.set(this.x, this.y), + t + } + , + t.prototype.equals = function(t) { + return t.x === this.x && t.y === this.y + } + , + t.prototype.set = function(t, i) { + return void 0 === t && (t = 0), + void 0 === i && (i = t), + this.x = t, + this.y = i, + this + } + , + t.prototype.toString = function() { + return "[@pixi/math:Point x=" + this.x + " y=" + this.y + "]" + } + , + t + }() + , xb = function() { + function t(t, i, s, o) { + void 0 === s && (s = 0), + void 0 === o && (o = 0), + this._x = s, + this._y = o, + this.cb = t, + this.scope = i + } + return t.prototype.clone = function(i, s) { + return void 0 === i && (i = this.cb), + void 0 === s && (s = this.scope), + new t(i,s,this._x,this._y) + } + , + t.prototype.set = function(t, i) { + return void 0 === t && (t = 0), + void 0 === i && (i = t), + this._x === t && this._y === i || (this._x = t, + this._y = i, + this.cb.call(this.scope)), + this + } + , + t.prototype.copyFrom = function(t) { + return this._x === t.x && this._y === t.y || (this._x = t.x, + this._y = t.y, + this.cb.call(this.scope)), + this + } + , + t.prototype.copyTo = function(t) { + return t.set(this._x, this._y), + t + } + , + t.prototype.equals = function(t) { + return t.x === this._x && t.y === this._y + } + , + t.prototype.toString = function() { + return "[@pixi/math:ObservablePoint x=0 y=0 scope=" + this.scope + "]" + } + , + Object.defineProperty(t.prototype, "x", { + get: function() { + return this._x + }, + set: function(t) { + this._x !== t && (this._x = t, + this.cb.call(this.scope)) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "y", { + get: function() { + return this._y + }, + set: function(t) { + this._y !== t && (this._y = t, + this.cb.call(this.scope)) + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , la = function() { + function t(t, i, s, o, h, r) { + void 0 === t && (t = 1), + void 0 === i && (i = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 1), + void 0 === h && (h = 0), + void 0 === r && (r = 0), + this.array = null, + this.a = t, + this.b = i, + this.c = s, + this.d = o, + this.tx = h, + this.ty = r + } + return t.prototype.fromArray = function(t) { + this.a = t[0], + this.b = t[1], + this.c = t[3], + this.d = t[4], + this.tx = t[2], + this.ty = t[5] + } + , + t.prototype.set = function(t, i, s, o, h, r) { + return this.a = t, + this.b = i, + this.c = s, + this.d = o, + this.tx = h, + this.ty = r, + this + } + , + t.prototype.toArray = function(t, i) { + this.array || (this.array = new Float32Array(9)); + var s = i || this.array; + return t ? (s[0] = this.a, + s[1] = this.b, + s[2] = 0, + s[3] = this.c, + s[4] = this.d, + s[5] = 0, + s[6] = this.tx, + s[7] = this.ty, + s[8] = 1) : (s[0] = this.a, + s[1] = this.c, + s[2] = this.tx, + s[3] = this.b, + s[4] = this.d, + s[5] = this.ty, + s[6] = 0, + s[7] = 0, + s[8] = 1), + s + } + , + t.prototype.apply = function(t, i) { + i = i || new ra; + var s = t.x + , o = t.y; + return i.x = this.a * s + this.c * o + this.tx, + i.y = this.b * s + this.d * o + this.ty, + i + } + , + t.prototype.applyInverse = function(t, i) { + i = i || new ra; + var s = 1 / (this.a * this.d + this.c * -this.b) + , o = t.x + , h = t.y; + return i.x = this.d * s * o + -this.c * s * h + (this.ty * this.c - this.tx * this.d) * s, + i.y = this.a * s * h + -this.b * s * o + (-this.ty * this.a + this.tx * this.b) * s, + i + } + , + t.prototype.translate = function(t, i) { + return this.tx += t, + this.ty += i, + this + } + , + t.prototype.scale = function(t, i) { + return this.a *= t, + this.d *= i, + this.c *= t, + this.b *= i, + this.tx *= t, + this.ty *= i, + this + } + , + t.prototype.rotate = function(t) { + var i = Math.cos(t) + , s = Math.sin(t) + , o = this.a + , h = this.c + , r = this.tx; + return this.a = o * i - this.b * s, + this.b = o * s + this.b * i, + this.c = h * i - this.d * s, + this.d = h * s + this.d * i, + this.tx = r * i - this.ty * s, + this.ty = r * s + this.ty * i, + this + } + , + t.prototype.append = function(t) { + var i = this.a + , s = this.b + , o = this.c + , h = this.d; + return this.a = t.a * i + t.b * o, + this.b = t.a * s + t.b * h, + this.c = t.c * i + t.d * o, + this.d = t.c * s + t.d * h, + this.tx = t.tx * i + t.ty * o + this.tx, + this.ty = t.tx * s + t.ty * h + this.ty, + this + } + , + t.prototype.setTransform = function(t, i, s, o, h, r, e, n, a) { + return this.a = Math.cos(e + a) * h, + this.b = Math.sin(e + a) * h, + this.c = -Math.sin(e - n) * r, + this.d = Math.cos(e - n) * r, + this.tx = t - (s * this.a + o * this.c), + this.ty = i - (s * this.b + o * this.d), + this + } + , + t.prototype.prepend = function(t) { + var i = this.tx; + if (1 !== t.a || 0 !== t.b || 0 !== t.c || 1 !== t.d) { + var s = this.a + , o = this.c; + this.a = s * t.a + this.b * t.c, + this.b = s * t.b + this.b * t.d, + this.c = o * t.a + this.d * t.c, + this.d = o * t.b + this.d * t.d + } + return this.tx = i * t.a + this.ty * t.c + t.tx, + this.ty = i * t.b + this.ty * t.d + t.ty, + this + } + , + t.prototype.decompose = function(t) { + var i = this.a + , s = this.b + , o = this.c + , h = this.d + , r = t.pivot + , e = -Math.atan2(-o, h) + , n = Math.atan2(s, i) + , a = Math.abs(e + n); + return a < 1e-5 || Math.abs(wb - a) < 1e-5 ? (t.rotation = n, + t.skew.x = t.skew.y = 0) : (t.rotation = 0, + t.skew.x = e, + t.skew.y = n), + t.scale.x = Math.sqrt(i * i + s * s), + t.scale.y = Math.sqrt(o * o + h * h), + t.position.x = this.tx + (r.x * i + r.y * o), + t.position.y = this.ty + (r.x * s + r.y * h), + t + } + , + t.prototype.invert = function() { + var t = this.a + , i = this.b + , s = this.c + , o = this.d + , h = this.tx + , r = t * o - i * s; + return this.a = o / r, + this.b = -i / r, + this.c = -s / r, + this.d = t / r, + this.tx = (s * this.ty - o * h) / r, + this.ty = -(t * this.ty - i * h) / r, + this + } + , + t.prototype.identity = function() { + return this.a = 1, + this.b = 0, + this.c = 0, + this.d = 1, + this.tx = 0, + this.ty = 0, + this + } + , + t.prototype.clone = function() { + var i = new t; + return i.a = this.a, + i.b = this.b, + i.c = this.c, + i.d = this.d, + i.tx = this.tx, + i.ty = this.ty, + i + } + , + t.prototype.copyTo = function(t) { + return t.a = this.a, + t.b = this.b, + t.c = this.c, + t.d = this.d, + t.tx = this.tx, + t.ty = this.ty, + t + } + , + t.prototype.copyFrom = function(t) { + return this.a = t.a, + this.b = t.b, + this.c = t.c, + this.d = t.d, + this.tx = t.tx, + this.ty = t.ty, + this + } + , + t.prototype.toString = function() { + return "[@pixi/math:Matrix a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + "]" + } + , + Object.defineProperty(t, "IDENTITY", { + get: function() { + return new t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "TEMP_MATRIX", { + get: function() { + return new t + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , La = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1] + , Ma = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1] + , Na = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1] + , Oa = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1] + , _b = [] + , ld = [] + , yb = Math.sign; + function Yf() { + for (var t = 0; t < 16; t++) { + var i = []; + _b.push(i); + for (var s = 0; s < 16; s++) + for (var o = yb(La[t] * La[s] + Na[t] * Ma[s]), h = yb(Ma[t] * La[s] + Oa[t] * Ma[s]), r = yb(La[t] * Na[s] + Na[t] * Oa[s]), e = yb(Ma[t] * Na[s] + Oa[t] * Oa[s]), n = 0; n < 16; n++) + if (La[n] === o && Ma[n] === h && Na[n] === r && Oa[n] === e) { + i.push(n); + break + } + } + for (t = 0; t < 16; t++) { + var a = new la; + a.set(La[t], Ma[t], Na[t], Oa[t], 0, 0), + ld.push(a) + } + } + Yf(); + var ea = { + E: 0, + SE: 1, + S: 2, + SW: 3, + W: 4, + NW: 5, + N: 6, + NE: 7, + MIRROR_VERTICAL: 8, + MAIN_DIAGONAL: 10, + MIRROR_HORIZONTAL: 12, + REVERSE_DIAGONAL: 14, + uX: function(t) { + return La[t] + }, + uY: function(t) { + return Ma[t] + }, + vX: function(t) { + return Na[t] + }, + vY: function(t) { + return Oa[t] + }, + inv: function(t) { + return 8 & t ? 15 & t : 7 & -t + }, + add: function(t, i) { + return _b[t][i] + }, + sub: function(t, i) { + return _b[t][ea.inv(i)] + }, + rotate180: function(t) { + return 4 ^ t + }, + isVertical: function(t) { + return 2 == (3 & t) + }, + byDirection: function(t, i) { + return 2 * Math.abs(t) <= Math.abs(i) ? i >= 0 ? ea.S : ea.N : 2 * Math.abs(i) <= Math.abs(t) ? t > 0 ? ea.E : ea.W : i > 0 ? t > 0 ? ea.SE : ea.SW : t > 0 ? ea.NE : ea.NW + }, + matrixAppendRotationInv: function(t, i, s, o) { + void 0 === s && (s = 0), + void 0 === o && (o = 0); + var h = ld[ea.inv(i)]; + h.tx = s, + h.ty = o, + t.append(h) + } + } + , Zf = function() { + function t() { + this.worldTransform = new la, + this.localTransform = new la, + this.position = new xb(this.onChange,this,0,0), + this.scale = new xb(this.onChange,this,1,1), + this.pivot = new xb(this.onChange,this,0,0), + this.skew = new xb(this.updateSkew,this,0,0), + this._rotation = 0, + this._cx = 1, + this._sx = 0, + this._cy = 0, + this._sy = 1, + this._localID = 0, + this._currentLocalID = 0, + this._worldID = 0, + this._parentID = 0 + } + return t.prototype.onChange = function() { + this._localID++ + } + , + t.prototype.updateSkew = function() { + this._cx = Math.cos(this._rotation + this.skew.y), + this._sx = Math.sin(this._rotation + this.skew.y), + this._cy = -Math.sin(this._rotation - this.skew.x), + this._sy = Math.cos(this._rotation - this.skew.x), + this._localID++ + } + , + t.prototype.toString = function() { + return "[@pixi/math:Transform position=(" + this.position.x + ", " + this.position.y + ") rotation=" + this.rotation + " scale=(" + this.scale.x + ", " + this.scale.y + ") skew=(" + this.skew.x + ", " + this.skew.y + ") ]" + } + , + t.prototype.updateLocalTransform = function() { + var t = this.localTransform; + this._localID !== this._currentLocalID && (t.a = this._cx * this.scale.x, + t.b = this._sx * this.scale.x, + t.c = this._cy * this.scale.y, + t.d = this._sy * this.scale.y, + t.tx = this.position.x - (this.pivot.x * t.a + this.pivot.y * t.c), + t.ty = this.position.y - (this.pivot.x * t.b + this.pivot.y * t.d), + this._currentLocalID = this._localID, + this._parentID = -1) + } + , + t.prototype.updateTransform = function(t) { + var i = this.localTransform; + if (this._localID !== this._currentLocalID && (i.a = this._cx * this.scale.x, + i.b = this._sx * this.scale.x, + i.c = this._cy * this.scale.y, + i.d = this._sy * this.scale.y, + i.tx = this.position.x - (this.pivot.x * i.a + this.pivot.y * i.c), + i.ty = this.position.y - (this.pivot.x * i.b + this.pivot.y * i.d), + this._currentLocalID = this._localID, + this._parentID = -1), + this._parentID !== t._worldID) { + var s = t.worldTransform + , o = this.worldTransform; + o.a = i.a * s.a + i.b * s.c, + o.b = i.a * s.b + i.b * s.d, + o.c = i.c * s.a + i.d * s.c, + o.d = i.c * s.b + i.d * s.d, + o.tx = i.tx * s.a + i.ty * s.c + s.tx, + o.ty = i.tx * s.b + i.ty * s.d + s.ty, + this._parentID = t._worldID, + this._worldID++ + } + } + , + t.prototype.setFromMatrix = function(t) { + t.decompose(this), + this._localID++ + } + , + Object.defineProperty(t.prototype, "rotation", { + get: function() { + return this._rotation + }, + set: function(t) { + this._rotation !== t && (this._rotation = t, + this.updateSkew()) + }, + enumerable: !1, + configurable: !0 + }), + t.IDENTITY = new t, + t + }(); + aa.PREFER_ENV = Ha.any ? Aa.WEBGL : Aa.WEBGL2, + aa.STRICT_TEXTURE_CACHE = !1; + var zb = []; + function ac(t, e) { + if (!t) + return null; + var r = ""; + if ("string" == typeof t) { + var i = /\.(\w{3,4})(?:$|\?|#)/i.exec(t); + i && (r = i[1].toLowerCase()) + } + for (var o = zb.length - 1; o >= 0; --o) { + var n = zb[o]; + if (n.test && n.test(t, r)) + return new n(t,e) + } + throw new Error("Unrecognized source type to auto-detect Resource") + } + var $f = function(t, e) { + return ($f = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, e) { + t.__proto__ = e + } + || function(t, e) { + for (var r in e) + e.hasOwnProperty(r) && (t[r] = e[r]) + } + )(t, e) + }; + function ba(t, e) { + function r() { + this.constructor = t + } + $f(t, e), + t.prototype = null === e ? Object.create(e) : (r.prototype = e.prototype, + new r) + } + var Wa = function() { + function t(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = 0), + this._width = t, + this._height = e, + this.destroyed = !1, + this.internal = !1, + this.onResize = new ka("setRealSize"), + this.onUpdate = new ka("update"), + this.onError = new ka("onError") + } + return t.prototype.bind = function(t) { + this.onResize.add(t), + this.onUpdate.add(t), + this.onError.add(t), + (this._width || this._height) && this.onResize.emit(this._width, this._height) + } + , + t.prototype.unbind = function(t) { + this.onResize.remove(t), + this.onUpdate.remove(t), + this.onError.remove(t) + } + , + t.prototype.resize = function(t, e) { + t === this._width && e === this._height || (this._width = t, + this._height = e, + this.onResize.emit(t, e)) + } + , + Object.defineProperty(t.prototype, "valid", { + get: function() { + return !!this._width && !!this._height + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.update = function() { + this.destroyed || this.onUpdate.emit() + } + , + t.prototype.load = function() { + return Promise.resolve(this) + } + , + Object.defineProperty(t.prototype, "width", { + get: function() { + return this._width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "height", { + get: function() { + return this._height + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.style = function(t, e, r) { + return !1 + } + , + t.prototype.dispose = function() {} + , + t.prototype.destroy = function() { + this.destroyed || (this.destroyed = !0, + this.dispose(), + this.onError.removeAll(), + this.onError = null, + this.onResize.removeAll(), + this.onResize = null, + this.onUpdate.removeAll(), + this.onUpdate = null) + } + , + t.test = function(t, e) { + return !1 + } + , + t + }() + , Ab = function(t) { + function e(e, r) { + var i = this + , o = r || {} + , n = o.width + , s = o.height; + if (!n || !s) + throw new Error("BufferResource width or height invalid"); + return (i = t.call(this, n, s) || this).data = e, + i + } + return ba(e, t), + e.prototype.upload = function(t, e, r) { + var i = t.gl; + return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.alphaMode === Ia.UNPACK), + r.width === e.width && r.height === e.height ? i.texSubImage2D(e.target, 0, 0, 0, e.width, e.height, e.format, e.type, this.data) : (r.width = e.width, + r.height = e.height, + i.texImage2D(e.target, 0, r.internalFormat, e.width, e.height, 0, e.format, r.type, this.data)), + !0 + } + , + e.prototype.dispose = function() { + this.data = null + } + , + e.test = function(t) { + return t instanceof Float32Array || t instanceof Uint8Array || t instanceof Uint32Array + } + , + e + }(Wa) + , _f = { + scaleMode: Ca.NEAREST, + format: kb.RGBA, + alphaMode: Ia.NPM + } + , ia = function(t) { + function e(e, r) { + void 0 === e && (e = null), + void 0 === r && (r = null); + var i = t.call(this) || this + , o = (r = r || {}).alphaMode + , n = r.mipmap + , s = r.anisotropicLevel + , a = r.scaleMode + , u = r.width + , h = r.height + , $ = r.wrapMode + , p = r.format + , l = r.type + , c = r.target + , d = r.resolution + , f = r.resourceOptions; + return !e || e instanceof Wa || ((e = ac(e, f)).internal = !0), + i.width = u || 0, + i.height = h || 0, + i.resolution = d || aa.RESOLUTION, + i.mipmap = void 0 !== n ? n : aa.MIPMAP_TEXTURES, + i.anisotropicLevel = void 0 !== s ? s : aa.ANISOTROPIC_LEVEL, + i.wrapMode = $ || aa.WRAP_MODE, + i.scaleMode = void 0 !== a ? a : aa.SCALE_MODE, + i.format = p || kb.RGBA, + i.type = l || ua.UNSIGNED_BYTE, + i.target = c || Sa.TEXTURE_2D, + i.alphaMode = void 0 !== o ? o : Ia.UNPACK, + i.uid = ub(), + i.touched = 0, + i.isPowerOfTwo = !1, + i._refreshPOT(), + i._glTextures = {}, + i.dirtyId = 0, + i.dirtyStyleId = 0, + i.cacheId = null, + i.valid = u > 0 && h > 0, + i.textureCacheIds = [], + i.destroyed = !1, + i.resource = null, + i._batchEnabled = 0, + i._batchLocation = 0, + i.parentTextureArray = null, + i.setResource(e), + i + } + return ba(e, t), + Object.defineProperty(e.prototype, "realWidth", { + get: function() { + return Math.ceil(this.width * this.resolution - 1e-4) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "realHeight", { + get: function() { + return Math.ceil(this.height * this.resolution - 1e-4) + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.setStyle = function(t, e) { + var r; + return void 0 !== t && t !== this.scaleMode && (this.scaleMode = t, + r = !0), + void 0 !== e && e !== this.mipmap && (this.mipmap = e, + r = !0), + r && this.dirtyStyleId++, + this + } + , + e.prototype.setSize = function(t, e, r) { + return this.resolution = r || this.resolution, + this.width = t, + this.height = e, + this._refreshPOT(), + this.update(), + this + } + , + e.prototype.setRealSize = function(t, e, r) { + return this.resolution = r || this.resolution, + this.width = t / this.resolution, + this.height = e / this.resolution, + this._refreshPOT(), + this.update(), + this + } + , + e.prototype._refreshPOT = function() { + this.isPowerOfTwo = gd(this.realWidth) && gd(this.realHeight) + } + , + e.prototype.setResolution = function(t) { + var e = this.resolution; + return e === t ? this : (this.resolution = t, + this.valid && (this.width = this.width * e / t, + this.height = this.height * e / t, + this.emit("update", this)), + this._refreshPOT(), + this) + } + , + e.prototype.setResource = function(t) { + if (this.resource === t) + return this; + if (this.resource) + throw new Error("Resource can be set only once"); + return t.bind(this), + this.resource = t, + this + } + , + e.prototype.update = function() { + this.valid ? (this.dirtyId++, + this.dirtyStyleId++, + this.emit("update", this)) : this.width > 0 && this.height > 0 && (this.valid = !0, + this.emit("loaded", this), + this.emit("update", this)) + } + , + e.prototype.onError = function(t) { + this.emit("error", this, t) + } + , + e.prototype.destroy = function() { + this.resource && (this.resource.unbind(this), + this.resource.internal && this.resource.destroy(), + this.resource = null), + this.cacheId && (delete Ka[this.cacheId], + delete ya[this.cacheId], + this.cacheId = null), + this.dispose(), + e.removeFromCache(this), + this.textureCacheIds = null, + this.destroyed = !0 + } + , + e.prototype.dispose = function() { + this.emit("dispose", this) + } + , + e.prototype.castToBaseTexture = function() { + return this + } + , + e.from = function(t, r, i) { + void 0 === i && (i = aa.STRICT_TEXTURE_CACHE); + var o = "string" == typeof t + , n = null; + if (o) + n = t; + else { + if (!t._pixiId) { + var s = r && r.pixiIdPrefix || "pixiid"; + t._pixiId = s + "_" + ub() + } + n = t._pixiId + } + var a = Ka[n]; + if (o && i && !a) + throw new Error("The cacheId \"" + n + "\" does not exist in BaseTextureCache."); + return a || ((a = new e(t,r)).cacheId = n, + e.addToCache(a, n)), + a + } + , + e.fromBuffer = function(t, r, i, o) { + t = t || new Float32Array(r * i * 4); + var n = new Ab(t,{ + width: r, + height: i + }) + , s = t instanceof Float32Array ? ua.FLOAT : ua.UNSIGNED_BYTE; + return new e(n,Object.assign(_f, o || { + width: r, + height: i, + type: s + })) + } + , + e.addToCache = function(t, e) { + e && (-1 === t.textureCacheIds.indexOf(e) && t.textureCacheIds.push(e), + Ka[e] && console.warn("BaseTexture added to the cache with an id [" + e + "] that already had an entry"), + Ka[e] = t) + } + , + e.removeFromCache = function(t) { + if ("string" == typeof t) { + var e = Ka[t]; + if (e) { + var r = e.textureCacheIds.indexOf(t); + return r > -1 && e.textureCacheIds.splice(r, 1), + delete Ka[t], + e + } + } else if (t && t.textureCacheIds) { + for (var i = 0; i < t.textureCacheIds.length; ++i) + delete Ka[t.textureCacheIds[i]]; + return t.textureCacheIds.length = 0, + t + } + return null + } + , + e._globalBatch = 0, + e + }(rb.d) + , bc = function(t) { + function e(e, r) { + var i = this + , o = r || {} + , n = o.width + , s = o.height; + (i = t.call(this, n, s) || this).items = [], + i.itemDirtyIds = []; + for (var a = 0; a < e; a++) { + var u = new ia; + i.items.push(u), + i.itemDirtyIds.push(-2) + } + return i.length = e, + i._load = null, + i.baseTexture = null, + i + } + return ba(e, t), + e.prototype.initFromArray = function(t, e) { + for (var r = 0; r < this.length; r++) + t[r] && (t[r].castToBaseTexture ? this.addBaseTextureAt(t[r].castToBaseTexture(), r) : t[r]instanceof Wa ? this.addResourceAt(t[r], r) : this.addResourceAt(ac(t[r], e), r)) + } + , + e.prototype.dispose = function() { + for (var t = 0, e = this.length; t < e; t++) + this.items[t].destroy(); + this.items = null, + this.itemDirtyIds = null, + this._load = null + } + , + e.prototype.addResourceAt = function(t, e) { + if (!this.items[e]) + throw new Error("Index " + e + " is out of bounds"); + return t.valid && !this.valid && this.resize(t.width, t.height), + this.items[e].setResource(t), + this + } + , + e.prototype.bind = function(e) { + if (null !== this.baseTexture) + throw new Error("Only one base texture per TextureArray is allowed"); + t.prototype.bind.call(this, e); + for (var r = 0; r < this.length; r++) + this.items[r].parentTextureArray = e, + this.items[r].on("update", e.update, e) + } + , + e.prototype.unbind = function(e) { + t.prototype.unbind.call(this, e); + for (var r = 0; r < this.length; r++) + this.items[r].parentTextureArray = null, + this.items[r].off("update", e.update, e) + } + , + e.prototype.load = function() { + var t = this; + if (this._load) + return this._load; + var e = this.items.map(function(t) { + return t.resource + }).filter(function(t) { + return t + }).map(function(t) { + return t.load() + }); + return this._load = Promise.all(e).then(function() { + var e = t.items[0] + , r = e.realWidth + , i = e.realHeight; + return t.resize(r, i), + Promise.resolve(t) + }), + this._load + } + , + e + }(Wa) + , md = function(t) { + function e(e, r) { + var i, o, n = this, s = r || {}, a = s.width, u = s.height; + return Array.isArray(e) ? (i = e, + o = e.length) : o = e, + n = t.call(this, o, { + width: a, + height: u + }) || this, + i && n.initFromArray(i, r), + n + } + return ba(e, t), + e.prototype.addBaseTextureAt = function(t, e) { + if (!t.resource) + throw new Error("ArrayResource does not support RenderTexture"); + return this.addResourceAt(t.resource, e), + this + } + , + e.prototype.bind = function(e) { + t.prototype.bind.call(this, e), + e.target = Sa.TEXTURE_2D_ARRAY + } + , + e.prototype.upload = function(t, e, r) { + var i = this.length + , o = this.itemDirtyIds + , n = this.items + , s = t.gl; + r.dirtyId < 0 && s.texImage3D(s.TEXTURE_2D_ARRAY, 0, e.format, this._width, this._height, i, 0, e.format, e.type, null); + for (var a = 0; a < i; a++) { + var u = n[a]; + o[a] < u.dirtyId && (o[a] = u.dirtyId, + u.valid && s.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, a, u.resource.width, u.resource.height, 1, e.format, e.type, u.resource.source)) + } + return !0 + } + , + e + }(bc) + , za = function(t) { + function e(e) { + var r = this + , i = e + , o = i.naturalWidth || i.videoWidth || i.width + , n = i.naturalHeight || i.videoHeight || i.height; + return (r = t.call(this, o, n) || this).source = e, + r.noSubImage = !1, + r + } + return ba(e, t), + e.crossOrigin = function(t, e, r) { + void 0 === r && 0 !== e.indexOf("data:") ? t.crossOrigin = Qf(e) : !1 !== r && (t.crossOrigin = "string" == typeof r ? r : "anonymous") + } + , + e.prototype.upload = function(t, e, r, i) { + var o = t.gl + , n = e.realWidth + , s = e.realHeight; + return i = i || this.source, + o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.alphaMode === Ia.UNPACK), + this.noSubImage || e.target !== o.TEXTURE_2D || r.width !== n || r.height !== s ? (r.width = n, + r.height = s, + o.texImage2D(e.target, 0, e.format, e.format, e.type, i)) : o.texSubImage2D(o.TEXTURE_2D, 0, 0, 0, e.format, e.type, i), + !0 + } + , + e.prototype.update = function() { + if (!this.destroyed) { + var e = this.source + , r = e.naturalWidth || e.videoWidth || e.width + , i = e.naturalHeight || e.videoHeight || e.height; + this.resize(r, i), + t.prototype.update.call(this) + } + } + , + e.prototype.dispose = function() { + this.source = null + } + , + e + }(Wa) + , cc = function(t) { + function e(e) { + return t.call(this, e) || this + } + return ba(e, t), + e.test = function(t) { + var e = self.OffscreenCanvas; + return !!(e && t instanceof e) || self.HTMLCanvasElement && t instanceof HTMLCanvasElement + } + , + e + }(za) + , nd = function(t) { + function e(r, i) { + var o = this + , n = i || {} + , s = n.width + , a = n.height + , u = n.autoLoad + , h = n.linkBaseTexture; + if (r && r.length !== e.SIDES) + throw new Error("Invalid length. Got " + r.length + ", expected 6"); + o = t.call(this, 6, { + width: s, + height: a + }) || this; + for (var $ = 0; $ < e.SIDES; $++) + o.items[$].target = Sa.TEXTURE_CUBE_MAP_POSITIVE_X + $; + return o.linkBaseTexture = !1 !== h, + r && o.initFromArray(r, i), + !1 !== u && o.load(), + o + } + return ba(e, t), + e.prototype.bind = function(e) { + t.prototype.bind.call(this, e), + e.target = Sa.TEXTURE_CUBE_MAP + } + , + e.prototype.addBaseTextureAt = function(t, e, r) { + if (void 0 === r && (r = this.linkBaseTexture), + !this.items[e]) + throw new Error("Index " + e + " is out of bounds"); + if (!this.linkBaseTexture || t.parentTextureArray || Object.keys(t._glTextures).length > 0) { + if (!t.resource) + throw new Error("CubeResource does not support copying of renderTexture."); + this.addResourceAt(t.resource, e) + } else + t.target = Sa.TEXTURE_CUBE_MAP_POSITIVE_X + e, + t.parentTextureArray = this.baseTexture, + this.items[e] = t; + return t.valid && !this.valid && this.resize(t.realWidth, t.realHeight), + this.items[e] = t, + this + } + , + e.prototype.upload = function(t, r, i) { + for (var o = this.itemDirtyIds, n = 0; n < e.SIDES; n++) { + var s = this.items[n]; + o[n] < s.dirtyId && (s.valid && s.resource ? (s.resource.upload(t, s, i), + o[n] = s.dirtyId) : o[n] < -1 && (t.gl.texImage2D(s.target, 0, i.internalFormat, r.realWidth, r.realHeight, 0, r.format, i.type, null), + o[n] = -1)) + } + return !0 + } + , + e.test = function(t) { + return Array.isArray(t) && t.length === e.SIDES + } + , + e.SIDES = 6, + e + }(bc) + , dc = function(t) { + function e(e, r) { + var i = this; + if (r = r || {}, + !(e instanceof HTMLImageElement)) { + var o = new Image; + za.crossOrigin(o, e, r.crossorigin), + o.src = e, + e = o + } + return i = t.call(this, e) || this, + !e.complete && i._width && i._height && (i._width = 0, + i._height = 0), + i.url = e.src, + i._process = null, + i.preserveBitmap = !1, + i.createBitmap = (void 0 !== r.createBitmap ? r.createBitmap : aa.CREATE_IMAGE_BITMAP) && !!self.createImageBitmap, + i.alphaMode = "number" == typeof r.alphaMode ? r.alphaMode : null, + i.bitmap = null, + i._load = null, + !1 !== r.autoLoad && i.load(), + i + } + return ba(e, t), + e.prototype.load = function(t) { + var e = this; + return this._load ? this._load : (void 0 !== t && (this.createBitmap = t), + this._load = new Promise(function(t, r) { + var i = e.source; + e.url = i.src; + var o = function() { + e.destroyed || (i.onload = null, + i.onerror = null, + e.resize(i.width, i.height), + e._load = null, + e.createBitmap ? t(e.process()) : t(e)) + }; + i.complete && i.src ? o() : (i.onload = o, + i.onerror = function(t) { + r(t), + e.onError.emit(t) + } + ) + } + ), + this._load) + } + , + e.prototype.process = function() { + var t = this + , e = this.source; + return null !== this._process ? this._process : null === this.bitmap && self.createImageBitmap ? (this._process = self.createImageBitmap(e, 0, 0, e.width, e.height, { + premultiplyAlpha: this.alphaMode === Ia.UNPACK ? "premultiply" : "none" + }).then(function(e) { + return t.destroyed ? Promise.reject() : (t.bitmap = e, + t.update(), + t._process = null, + Promise.resolve(t)) + }), + this._process) : Promise.resolve(this) + } + , + e.prototype.upload = function(e, r, i) { + if ("number" == typeof this.alphaMode && (r.alphaMode = this.alphaMode), + !this.createBitmap) + return t.prototype.upload.call(this, e, r, i); + if (!this.bitmap && (this.process(), + !this.bitmap)) + return !1; + if (t.prototype.upload.call(this, e, r, i, this.bitmap), + !this.preserveBitmap) { + var o = !0 + , n = r._glTextures; + for (var s in n) { + var a = n[s]; + if (a !== i && a.dirtyId !== r.dirtyId) { + o = !1; + break + } + } + o && (this.bitmap.close && this.bitmap.close(), + this.bitmap = null) + } + return !0 + } + , + e.prototype.dispose = function() { + this.source.onload = null, + this.source.onerror = null, + t.prototype.dispose.call(this), + this.bitmap && (this.bitmap.close(), + this.bitmap = null), + this._process = null, + this._load = null + } + , + e.test = function(t) { + return "string" == typeof t || t instanceof HTMLImageElement + } + , + e + }(za) + , od = function(t) { + function e(e, r) { + var i = this; + return r = r || {}, + (i = t.call(this, document.createElement("canvas")) || this)._width = 0, + i._height = 0, + i.svg = e, + i.scale = r.scale || 1, + i._overrideWidth = r.width, + i._overrideHeight = r.height, + i._resolve = null, + i._crossorigin = r.crossorigin, + i._load = null, + !1 !== r.autoLoad && i.load(), + i + } + return ba(e, t), + e.prototype.load = function() { + var t = this; + return this._load ? this._load : (this._load = new Promise(function(e) { + if (t._resolve = function() { + t.resize(t.source.width, t.source.height), + e(t) + } + , + /^\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i, + e + }(za) + , pd = function(t) { + function e(r, i) { + var o = this; + if (i = i || {}, + !(r instanceof HTMLVideoElement)) { + var n = document.createElement("video"); + n.setAttribute("preload", "auto"), + n.setAttribute("webkit-playsinline", ""), + n.setAttribute("playsinline", ""), + "string" == typeof r && (r = [r]); + var s = r[0].src || r[0]; + za.crossOrigin(n, s, i.crossorigin); + for (var a = 0; a < r.length; ++a) { + var u = document.createElement("source") + , h = r[a] + , $ = h.src + , p = h.mime + , l = ($ = $ || r[a]).split("?").shift().toLowerCase() + , c = l.substr(l.lastIndexOf(".") + 1); + p = p || e.MIME_TYPES[c] || "video/" + c, + u.src = $, + u.type = p, + n.appendChild(u) + } + r = n + } + return (o = t.call(this, r) || this).noSubImage = !0, + o._autoUpdate = !0, + o._isConnectedToTicker = !1, + o._updateFPS = i.updateFPS || 0, + o._msToNextUpdate = 0, + o.autoPlay = !1 !== i.autoPlay, + o._load = null, + o._resolve = null, + o._onCanPlay = o._onCanPlay.bind(o), + o._onError = o._onError.bind(o), + !1 !== i.autoLoad && o.load(), + o + } + return ba(e, t), + e.prototype.update = function(e) { + if (!this.destroyed) { + var r = Ea.shared.elapsedMS * this.source.playbackRate; + this._msToNextUpdate = Math.floor(this._msToNextUpdate - r), + (!this._updateFPS || this._msToNextUpdate <= 0) && (t.prototype.update.call(this), + this._msToNextUpdate = this._updateFPS ? Math.floor(1e3 / this._updateFPS) : 0) + } + } + , + e.prototype.load = function() { + var t = this; + if (this._load) + return this._load; + var e = this.source; + return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0), + e.addEventListener("play", this._onPlayStart.bind(this)), + e.addEventListener("pause", this._onPlayStop.bind(this)), + this._isSourceReady() ? this._onCanPlay() : (e.addEventListener("canplay", this._onCanPlay), + e.addEventListener("canplaythrough", this._onCanPlay), + e.addEventListener("error", this._onError, !0)), + this._load = new Promise(function(r) { + t.valid ? r(t) : (t._resolve = r, + e.load()) + } + ), + this._load + } + , + e.prototype._onError = function(t) { + this.source.removeEventListener("error", this._onError, !0), + this.onError.emit(t) + } + , + e.prototype._isSourcePlaying = function() { + var t = this.source; + return t.currentTime > 0 && !1 === t.paused && !1 === t.ended && t.readyState > 2 + } + , + e.prototype._isSourceReady = function() { + var t = this.source; + return 3 === t.readyState || 4 === t.readyState + } + , + e.prototype._onPlayStart = function() { + this.valid || this._onCanPlay(), + this.autoUpdate && !this._isConnectedToTicker && (Ea.shared.add(this.update, this), + this._isConnectedToTicker = !0) + } + , + e.prototype._onPlayStop = function() { + this._isConnectedToTicker && (Ea.shared.remove(this.update, this), + this._isConnectedToTicker = !1) + } + , + e.prototype._onCanPlay = function() { + var t = this.source; + t.removeEventListener("canplay", this._onCanPlay), + t.removeEventListener("canplaythrough", this._onCanPlay); + var e = this.valid; + this.resize(t.videoWidth, t.videoHeight), + !e && this._resolve && (this._resolve(this), + this._resolve = null), + this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && t.play() + } + , + e.prototype.dispose = function() { + this._isConnectedToTicker && Ea.shared.remove(this.update, this); + var e = this.source; + e && (e.removeEventListener("error", this._onError, !0), + e.pause(), + e.src = "", + e.load()), + t.prototype.dispose.call(this) + } + , + Object.defineProperty(e.prototype, "autoUpdate", { + get: function() { + return this._autoUpdate + }, + set: function(t) { + t !== this._autoUpdate && (this._autoUpdate = t, + !this._autoUpdate && this._isConnectedToTicker ? (Ea.shared.remove(this.update, this), + this._isConnectedToTicker = !1) : this._autoUpdate && !this._isConnectedToTicker && this._isSourcePlaying() && (Ea.shared.add(this.update, this), + this._isConnectedToTicker = !0)) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "updateFPS", { + get: function() { + return this._updateFPS + }, + set: function(t) { + t !== this._updateFPS && (this._updateFPS = t) + }, + enumerable: !1, + configurable: !0 + }), + e.test = function(t, r) { + return self.HTMLVideoElement && t instanceof HTMLVideoElement || e.TYPES.indexOf(r) > -1 + } + , + e.TYPES = ["mp4", "m4v", "webm", "ogg", "ogv", "h264", "avi", "mov"], + e.MIME_TYPES = { + ogv: "video/ogg", + mov: "video/quicktime", + m4v: "video/mp4" + }, + e + }(za) + , qd = function(t) { + function e(e) { + return t.call(this, e) || this + } + return ba(e, t), + e.test = function(t) { + return !!self.createImageBitmap && t instanceof ImageBitmap + } + , + e + }(za); + zb.push(dc, qd, cc, pd, od, Ab, nd, md); + var rd = { + __proto__: null, + Resource: Wa, + BaseImageResource: za, + INSTALLED: zb, + autoDetectResource: ac, + AbstractMultiResource: bc, + ArrayResource: md, + BufferResource: Ab, + CanvasResource: cc, + CubeResource: nd, + ImageResource: dc, + SVGResource: od, + VideoResource: pd, + ImageBitmapResource: qd + } + , pa = function() { + function t(t) { + this.renderer = t + } + return t.prototype.destroy = function() { + this.renderer = null + } + , + t + }() + , ag = function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return ba(e, t), + e.prototype.upload = function(t, e, r) { + var i = t.gl; + return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.alphaMode === Ia.UNPACK), + r.width === e.width && r.height === e.height ? i.texSubImage2D(e.target, 0, 0, 0, e.width, e.height, e.format, e.type, this.data) : (r.width = e.width, + r.height = e.height, + i.texImage2D(e.target, 0, 1 === t.context.webGLVersion ? i.DEPTH_COMPONENT : i.DEPTH_COMPONENT16, e.width, e.height, 0, e.format, e.type, this.data)), + !0 + } + , + e + }(Ab) + , ec = function() { + function t(t, e) { + this.width = Math.ceil(t || 100), + this.height = Math.ceil(e || 100), + this.stencil = !1, + this.depth = !1, + this.dirtyId = 0, + this.dirtyFormat = 0, + this.dirtySize = 0, + this.depthTexture = null, + this.colorTextures = [], + this.glFramebuffers = {}, + this.disposeRunner = new ka("disposeFramebuffer"), + this.multisample = _a.NONE + } + return Object.defineProperty(t.prototype, "colorTexture", { + get: function() { + return this.colorTextures[0] + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.addColorTexture = function(t, e) { + return void 0 === t && (t = 0), + this.colorTextures[t] = e || new ia(null,{ + scaleMode: Ca.NEAREST, + resolution: 1, + mipmap: $a.OFF, + width: this.width, + height: this.height + }), + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.addDepthTexture = function(t) { + return this.depthTexture = t || new ia(new ag(null,{ + width: this.width, + height: this.height + }),{ + scaleMode: Ca.NEAREST, + resolution: 1, + width: this.width, + height: this.height, + mipmap: $a.OFF, + format: kb.DEPTH_COMPONENT, + type: ua.UNSIGNED_SHORT + }), + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.enableDepth = function() { + return this.depth = !0, + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.enableStencil = function() { + return this.stencil = !0, + this.dirtyId++, + this.dirtyFormat++, + this + } + , + t.prototype.resize = function(t, e) { + if (t = Math.ceil(t), + e = Math.ceil(e), + t !== this.width || e !== this.height) { + this.width = t, + this.height = e, + this.dirtyId++, + this.dirtySize++; + for (var r = 0; r < this.colorTextures.length; r++) { + var i = this.colorTextures[r] + , o = i.resolution; + i.setSize(t / o, e / o) + } + if (this.depthTexture) { + o = this.depthTexture.resolution; + this.depthTexture.setSize(t / o, e / o) + } + } + } + , + t.prototype.dispose = function() { + this.disposeRunner.emit(this, !1) + } + , + t.prototype.destroyDepthTexture = function() { + this.depthTexture && (this.depthTexture.destroy(), + this.depthTexture = null, + ++this.dirtyId, + ++this.dirtyFormat) + } + , + t + }() + , sd = function(t) { + function e(e) { + var r = this; + "number" == typeof e && (e = { + width: arguments[0], + height: arguments[1], + scaleMode: arguments[2], + resolution: arguments[3] + }); + r = t.call(this, null, e) || this; + var i = e || {} + , o = i.width + , n = i.height; + return r.mipmap = 0, + r.width = Math.ceil(o) || 100, + r.height = Math.ceil(n) || 100, + r.valid = !0, + r.clearColor = [0, 0, 0, 0], + r.framebuffer = new ec(r.width * r.resolution,r.height * r.resolution).addColorTexture(0, r), + r.maskStack = [], + r.filterStack = [{}], + r + } + return ba(e, t), + e.prototype.resize = function(t, e) { + t = Math.ceil(t), + e = Math.ceil(e), + this.framebuffer.resize(t * this.resolution, e * this.resolution) + } + , + e.prototype.dispose = function() { + this.framebuffer.dispose(), + t.prototype.dispose.call(this) + } + , + e.prototype.destroy = function() { + t.prototype.destroy.call(this), + this.framebuffer.destroyDepthTexture(), + this.framebuffer = null + } + , + e + }(ia) + , td = function() { + function t() { + this.x0 = 0, + this.y0 = 0, + this.x1 = 1, + this.y1 = 0, + this.x2 = 1, + this.y2 = 1, + this.x3 = 0, + this.y3 = 1, + this.uvsFloat32 = new Float32Array(8) + } + return t.prototype.set = function(t, e, r) { + var i = e.width + , o = e.height; + if (r) { + var n = t.width / 2 / i + , s = t.height / 2 / o + , a = t.x / i + n + , u = t.y / o + s; + r = ea.add(r, ea.NW), + this.x0 = a + n * ea.uX(r), + this.y0 = u + s * ea.uY(r), + r = ea.add(r, 2), + this.x1 = a + n * ea.uX(r), + this.y1 = u + s * ea.uY(r), + r = ea.add(r, 2), + this.x2 = a + n * ea.uX(r), + this.y2 = u + s * ea.uY(r), + r = ea.add(r, 2), + this.x3 = a + n * ea.uX(r), + this.y3 = u + s * ea.uY(r) + } else + this.x0 = t.x / i, + this.y0 = t.y / o, + this.x1 = (t.x + t.width) / i, + this.y1 = t.y / o, + this.x2 = (t.x + t.width) / i, + this.y2 = (t.y + t.height) / o, + this.x3 = t.x / i, + this.y3 = (t.y + t.height) / o; + this.uvsFloat32[0] = this.x0, + this.uvsFloat32[1] = this.y0, + this.uvsFloat32[2] = this.x1, + this.uvsFloat32[3] = this.y1, + this.uvsFloat32[4] = this.x2, + this.uvsFloat32[5] = this.y2, + this.uvsFloat32[6] = this.x3, + this.uvsFloat32[7] = this.y3 + } + , + t.prototype.toString = function() { + return "[@pixi/core:TextureUvs x0=" + this.x0 + " y0=" + this.y0 + " x1=" + this.x1 + " y1=" + this.y1 + " x2=" + this.x2 + " y2=" + this.y2 + " x3=" + this.x3 + " y3=" + this.y3 + "]" + } + , + t + }() + , ud = new td + , oa = function(t) { + function e(r, i, o, n, s, a) { + var u = t.call(this) || this; + if (u.noFrame = !1, + i || (u.noFrame = !0, + i = new da(0,0,1,1)), + r instanceof e && (r = r.baseTexture), + u.baseTexture = r, + u._frame = i, + u.trim = n, + u.valid = !1, + u._uvs = ud, + u.uvMatrix = null, + u.orig = o || i, + u._rotate = Number(s || 0), + !0 === s) + u._rotate = 2; + else if (u._rotate % 2 != 0) + throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually"); + return u.defaultAnchor = a ? new ra(a.x,a.y) : new ra(0,0), + u._updateID = 0, + u.textureCacheIds = [], + r.valid ? u.noFrame ? r.valid && u.onBaseTextureUpdated(r) : u.frame = i : r.once("loaded", u.onBaseTextureUpdated, u), + u.noFrame && r.on("update", u.onBaseTextureUpdated, u), + u + } + return ba(e, t), + e.prototype.update = function() { + this.baseTexture.resource && this.baseTexture.resource.update() + } + , + e.prototype.onBaseTextureUpdated = function(t) { + if (this.noFrame) { + if (!this.baseTexture.valid) + return; + this._frame.width = t.width, + this._frame.height = t.height, + this.valid = !0, + this.updateUvs() + } else + this.frame = this._frame; + this.emit("update", this) + } + , + e.prototype.destroy = function(t) { + if (this.baseTexture) { + if (t) { + var r = this.baseTexture.resource; + r && r.url && ya[r.url] && e.removeFromCache(r.url), + this.baseTexture.destroy() + } + this.baseTexture.off("loaded", this.onBaseTextureUpdated, this), + this.baseTexture.off("update", this.onBaseTextureUpdated, this), + this.baseTexture = null + } + this._frame = null, + this._uvs = null, + this.trim = null, + this.orig = null, + this.valid = !1, + e.removeFromCache(this), + this.textureCacheIds = null + } + , + e.prototype.clone = function() { + return new e(this.baseTexture,this.frame.clone(),this.orig.clone(),this.trim && this.trim.clone(),this.rotate,this.defaultAnchor) + } + , + e.prototype.updateUvs = function() { + this._uvs === ud && (this._uvs = new td), + this._uvs.set(this._frame, this.baseTexture, this.rotate), + this._updateID++ + } + , + e.from = function(t, r, i) { + void 0 === r && (r = {}), + void 0 === i && (i = aa.STRICT_TEXTURE_CACHE); + var o = "string" == typeof t + , n = null; + if (o) + n = t; + else { + if (!t._pixiId) { + var s = r && r.pixiIdPrefix || "pixiid"; + t._pixiId = s + "_" + ub() + } + n = t._pixiId + } + var a = ya[n]; + if (o && i && !a) + throw new Error("The cacheId \"" + n + "\" does not exist in TextureCache."); + return a || (r.resolution || (r.resolution = kd(t)), + (a = new e(new ia(t,r))).baseTexture.cacheId = n, + ia.addToCache(a.baseTexture, n), + e.addToCache(a, n)), + a + } + , + e.fromURL = function(t, r) { + var i = Object.assign({ + autoLoad: !1 + }, null == r ? void 0 : r.resourceOptions) + , o = e.from(t, Object.assign({ + resourceOptions: i + }, r), !1) + , n = o.baseTexture.resource; + return o.baseTexture.valid ? Promise.resolve(o) : n.load().then(function() { + return Promise.resolve(o) + }) + } + , + e.fromBuffer = function(t, r, i, o) { + return new e(ia.fromBuffer(t, r, i, o)) + } + , + e.fromLoader = function(t, r, i, o) { + var n = new ia(t,Object.assign({ + scaleMode: aa.SCALE_MODE, + resolution: kd(r) + }, o)) + , s = n.resource; + s instanceof dc && (s.url = r); + var a = new e(n); + return i || (i = r), + ia.addToCache(a.baseTexture, i), + e.addToCache(a, i), + i !== r && (ia.addToCache(a.baseTexture, r), + e.addToCache(a, r)), + a.baseTexture.valid ? Promise.resolve(a) : new Promise(function(t) { + a.baseTexture.once("loaded", function() { + return t(a) + }) + } + ) + } + , + e.addToCache = function(t, e) { + e && (-1 === t.textureCacheIds.indexOf(e) && t.textureCacheIds.push(e), + ya[e] && console.warn("Texture added to the cache with an id [" + e + "] that already had an entry"), + ya[e] = t) + } + , + e.removeFromCache = function(t) { + if ("string" == typeof t) { + var e = ya[t]; + if (e) { + var r = e.textureCacheIds.indexOf(t); + return r > -1 && e.textureCacheIds.splice(r, 1), + delete ya[t], + e + } + } else if (t && t.textureCacheIds) { + for (var i = 0; i < t.textureCacheIds.length; ++i) + ya[t.textureCacheIds[i]] === t && delete ya[t.textureCacheIds[i]]; + return t.textureCacheIds.length = 0, + t + } + return null + } + , + Object.defineProperty(e.prototype, "resolution", { + get: function() { + return this.baseTexture.resolution + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "frame", { + get: function() { + return this._frame + }, + set: function(t) { + this._frame = t, + this.noFrame = !1; + var e = t.x + , r = t.y + , i = t.width + , o = t.height + , n = e + i > this.baseTexture.width + , s = r + o > this.baseTexture.height; + if (n || s) { + var a = n && s ? "and" : "or" + , u = "X: " + e + " + " + i + " = " + (e + i) + " > " + this.baseTexture.width + , h = "Y: " + r + " + " + o + " = " + (r + o) + " > " + this.baseTexture.height; + throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: " + u + " " + a + " " + h) + } + this.valid = i && o && this.baseTexture.valid, + this.trim || this.rotate || (this.orig = t), + this.valid && this.updateUvs() + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "rotate", { + get: function() { + return this._rotate + }, + set: function(t) { + this._rotate = t, + this.valid && this.updateUvs() + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "width", { + get: function() { + return this.orig.width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "height", { + get: function() { + return this.orig.height + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.castToBaseTexture = function() { + return this.baseTexture + } + , + e + }(rb.d); + function bg() { + var t = document.createElement("canvas"); + t.width = 16, + t.height = 16; + var e = t.getContext("2d"); + return e.fillStyle = "white", + e.fillRect(0, 0, 16, 16), + new oa(new ia(new cc(t))) + } + function Bb(t) { + t.destroy = function() {} + , + t.on = function() {} + , + t.once = function() {} + , + t.emit = function() {} + } + oa.EMPTY = new oa(new ia()), + Bb(oa.EMPTY), + Bb(oa.EMPTY.baseTexture), + oa.WHITE = bg(), + Bb(oa.WHITE), + Bb(oa.WHITE.baseTexture); + var fc = function(t) { + function e(e, r) { + var i = t.call(this, e, r) || this; + return i.valid = !0, + i.filterFrame = null, + i.filterPoolKey = null, + i.updateUvs(), + i + } + return ba(e, t), + Object.defineProperty(e.prototype, "framebuffer", { + get: function() { + return this.baseTexture.framebuffer + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.resize = function(t, e, r) { + void 0 === r && (r = !0), + t = Math.ceil(t), + e = Math.ceil(e), + this.valid = t > 0 && e > 0, + this._frame.width = this.orig.width = t, + this._frame.height = this.orig.height = e, + r && this.baseTexture.resize(t, e), + this.updateUvs() + } + , + e.prototype.setResolution = function(t) { + var e = this.baseTexture; + e.resolution !== t && (e.setResolution(t), + this.resize(e.width, e.height, !1)) + } + , + e.create = function(t) { + for (var r = arguments, i = [], o = 1; o < arguments.length; o++) + i[o - 1] = r[o]; + return "number" == typeof t && (Va("6.0.0", "Arguments (width, height, scaleMode, resolution) have been deprecated."), + t = { + width: t, + height: i[0], + scaleMode: i[1], + resolution: i[2] + }), + new e(new sd(t)) + } + , + e + }(oa) + , cg = function() { + function t(t) { + this.texturePool = {}, + this.textureOptions = t || {}, + this.enableFullScreen = !1, + this._pixelsWidth = 0, + this._pixelsHeight = 0 + } + return t.prototype.createTexture = function(t, e) { + var r = new sd(Object.assign({ + width: t, + height: e, + resolution: 1 + }, this.textureOptions)); + return new fc(r) + } + , + t.prototype.getOptimalTexture = function(e, r, i) { + void 0 === i && (i = 1); + var o = t.SCREEN_KEY; + e *= i, + r *= i, + this.enableFullScreen && e === this._pixelsWidth && r === this._pixelsHeight || (o = (65535 & (e = sb(e))) << 16 | 65535 & (r = sb(r))), + this.texturePool[o] || (this.texturePool[o] = []); + var n = this.texturePool[o].pop(); + return n || (n = this.createTexture(e, r)), + n.filterPoolKey = o, + n.setResolution(i), + n + } + , + t.prototype.getFilterTexture = function(t, e) { + var r = this.getOptimalTexture(t.width, t.height, e || t.resolution); + return r.filterFrame = t.filterFrame, + r + } + , + t.prototype.returnTexture = function(t) { + var e = t.filterPoolKey; + t.filterFrame = null, + this.texturePool[e].push(t) + } + , + t.prototype.returnFilterTexture = function(t) { + this.returnTexture(t) + } + , + t.prototype.clear = function(t) { + if (t = !1 !== t) + for (var e in this.texturePool) { + var r = this.texturePool[e]; + if (r) + for (var i = 0; i < r.length; i++) + r[i].destroy(!0) + } + this.texturePool = {} + } + , + t.prototype.setScreenSize = function(e) { + if (e.width !== this._pixelsWidth || e.height !== this._pixelsHeight) { + var r = t.SCREEN_KEY + , i = this.texturePool[r]; + if (this.enableFullScreen = e.width > 0 && e.height > 0, + i) + for (var o = 0; o < i.length; o++) + i[o].destroy(!0); + this.texturePool[r] = [], + this._pixelsWidth = e.width, + this._pixelsHeight = e.height + } + } + , + t.SCREEN_KEY = "screen", + t + }() + , vd = function() { + function t(t, e, r, i, o, n, s) { + void 0 === e && (e = 0), + void 0 === r && (r = !1), + void 0 === i && (i = 5126), + this.buffer = t, + this.size = e, + this.normalized = r, + this.type = i, + this.stride = o, + this.start = n, + this.instance = s + } + return t.prototype.destroy = function() { + this.buffer = null + } + , + t.from = function(e, r, i, o, n) { + return new t(e,r,i,o,n) + } + , + t + }() + , dg = 0 + , ta = function() { + function t(t, e, r) { + void 0 === e && (e = !0), + void 0 === r && (r = !1), + this.data = t || new Float32Array(1), + this._glBuffers = {}, + this._updateID = 0, + this.index = r, + this.static = e, + this.id = dg++, + this.disposeRunner = new ka("disposeBuffer") + } + return t.prototype.update = function(t) { + this.data = t || this.data, + this._updateID++ + } + , + t.prototype.dispose = function() { + this.disposeRunner.emit(this, !1) + } + , + t.prototype.destroy = function() { + this.dispose(), + this.data = null + } + , + t.from = function(e) { + return e instanceof Array && (e = new Float32Array(e)), + new t(e) + } + , + t + }(); + function wd(t) { + if (4 === t.BYTES_PER_ELEMENT) + return t instanceof Float32Array ? "Float32Array" : t instanceof Uint32Array ? "Uint32Array" : "Int32Array"; + if (2 === t.BYTES_PER_ELEMENT) { + if (t instanceof Uint16Array) + return "Uint16Array" + } else if (1 === t.BYTES_PER_ELEMENT && t instanceof Uint8Array) + return "Uint8Array"; + return null + } + var eg = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array + }; + function fg(t, e) { + for (var r = 0, i = 0, o = {}, n = 0; n < t.length; n++) + i += e[n], + r += t[n].length; + var s = new ArrayBuffer(4 * r) + , a = null + , u = 0; + for (n = 0; n < t.length; n++) { + var h = e[n] + , $ = t[n] + , p = wd($); + o[p] || (o[p] = new eg[p](s)), + a = o[p]; + for (var l = 0; l < $.length; l++) { + a[(l / h | 0) * i + u + l % h] = $[l] + } + u += h + } + return new Float32Array(s) + } + var xd = { + 5126: 4, + 5123: 2, + 5121: 1 + } + , gg = 0 + , hg = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array, + Uint16Array: Uint16Array + } + , gc = function() { + function t(t, e) { + void 0 === t && (t = []), + void 0 === e && (e = {}), + this.buffers = t, + this.indexBuffer = null, + this.attributes = e, + this.glVertexArrayObjects = {}, + this.id = gg++, + this.instanced = !1, + this.instanceCount = 1, + this.disposeRunner = new ka("disposeGeometry"), + this.refCount = 0 + } + return t.prototype.addAttribute = function(t, e, r, i, o, n, s, a) { + if (void 0 === r && (r = 0), + void 0 === i && (i = !1), + void 0 === a && (a = !1), + !e) + throw new Error("You must pass a buffer when creating an attribute"); + e instanceof ta || (e instanceof Array && (e = new Float32Array(e)), + e = new ta(e)); + var u = t.split("|"); + if (u.length > 1) { + for (var h = 0; h < u.length; h++) + this.addAttribute(u[h], e, r, i, o); + return this + } + var $ = this.buffers.indexOf(e); + return -1 === $ && (this.buffers.push(e), + $ = this.buffers.length - 1), + this.attributes[t] = new vd($,r,i,o,n,s,a), + this.instanced = this.instanced || a, + this + } + , + t.prototype.getAttribute = function(t) { + return this.attributes[t] + } + , + t.prototype.getBuffer = function(t) { + return this.buffers[this.getAttribute(t).buffer] + } + , + t.prototype.addIndex = function(t) { + return t instanceof ta || (t instanceof Array && (t = new Uint16Array(t)), + t = new ta(t)), + t.index = !0, + this.indexBuffer = t, + -1 === this.buffers.indexOf(t) && this.buffers.push(t), + this + } + , + t.prototype.getIndex = function() { + return this.indexBuffer + } + , + t.prototype.interleave = function() { + if (1 === this.buffers.length || 2 === this.buffers.length && this.indexBuffer) + return this; + var t, e = [], r = [], i = new ta; + for (t in this.attributes) { + var o = this.attributes[t] + , n = this.buffers[o.buffer]; + e.push(n.data), + r.push(o.size * xd[o.type] / 4), + o.buffer = 0 + } + for (i.data = fg(e, r), + t = 0; t < this.buffers.length; t++) + this.buffers[t] !== this.indexBuffer && this.buffers[t].destroy(); + return this.buffers = [i], + this.indexBuffer && this.buffers.push(this.indexBuffer), + this + } + , + t.prototype.getSize = function() { + for (var t in this.attributes) { + var e = this.attributes[t]; + return this.buffers[e.buffer].data.length / (e.stride / 4 || e.size) + } + return 0 + } + , + t.prototype.dispose = function() { + this.disposeRunner.emit(this, !1) + } + , + t.prototype.destroy = function() { + this.dispose(), + this.buffers = null, + this.indexBuffer = null, + this.attributes = null + } + , + t.prototype.clone = function() { + for (var e = new t, r = 0; r < this.buffers.length; r++) + e.buffers[r] = new ta(this.buffers[r].data.slice(0)); + for (var r in this.attributes) { + var i = this.attributes[r]; + e.attributes[r] = new vd(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance) + } + return this.indexBuffer && (e.indexBuffer = e.buffers[this.buffers.indexOf(this.indexBuffer)], + e.indexBuffer.index = !0), + e + } + , + t.merge = function(e) { + for (var r, i = new t, o = [], n = [], s = [], a = 0; a < e.length; a++) { + r = e[a]; + for (var u = 0; u < r.buffers.length; u++) + n[u] = n[u] || 0, + n[u] += r.buffers[u].data.length, + s[u] = 0 + } + for (a = 0; a < r.buffers.length; a++) + o[a] = new hg[wd(r.buffers[a].data)](n[a]), + i.buffers[a] = new ta(o[a]); + for (a = 0; a < e.length; a++) { + r = e[a]; + for (u = 0; u < r.buffers.length; u++) + o[u].set(r.buffers[u].data, s[u]), + s[u] += r.buffers[u].data.length + } + if (i.attributes = r.attributes, + r.indexBuffer) { + i.indexBuffer = i.buffers[r.buffers.indexOf(r.indexBuffer)], + i.indexBuffer.index = !0; + var h = 0 + , $ = 0 + , p = 0 + , l = 0; + for (a = 0; a < r.buffers.length; a++) + if (r.buffers[a] !== r.indexBuffer) { + l = a; + break + } + for (var a in r.attributes) { + var c = r.attributes[a]; + (0 | c.buffer) === l && ($ += c.size * xd[c.type] / 4) + } + for (a = 0; a < e.length; a++) { + var d = e[a].indexBuffer.data; + for (u = 0; u < d.length; u++) + i.indexBuffer.data[u + p] += h; + h += r.buffers[l].data.length / $, + p += d.length + } + } + return i + } + , + t + }() + , ig = function(t) { + function e() { + var e = t.call(this) || this; + return e.addAttribute("aVertexPosition", new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])).addIndex([0, 1, 3, 2]), + e + } + return ba(e, t), + e + }(gc) + , jg = function(t) { + function e() { + var e = t.call(this) || this; + return e.vertices = new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]), + e.uvs = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), + e.vertexBuffer = new ta(e.vertices), + e.uvBuffer = new ta(e.uvs), + e.addAttribute("aVertexPosition", e.vertexBuffer).addAttribute("aTextureCoord", e.uvBuffer).addIndex([0, 1, 2, 0, 2, 3]), + e + } + return ba(e, t), + e.prototype.map = function(t, e) { + var r = 0 + , i = 0; + return this.uvs[0] = r, + this.uvs[1] = i, + this.uvs[2] = r + e.width / t.width, + this.uvs[3] = i, + this.uvs[4] = r + e.width / t.width, + this.uvs[5] = i + e.height / t.height, + this.uvs[6] = r, + this.uvs[7] = i + e.height / t.height, + r = e.x, + i = e.y, + this.vertices[0] = r, + this.vertices[1] = i, + this.vertices[2] = r + e.width, + this.vertices[3] = i, + this.vertices[4] = r + e.width, + this.vertices[5] = i + e.height, + this.vertices[6] = r, + this.vertices[7] = i + e.height, + this.invalidate(), + this + } + , + e.prototype.invalidate = function() { + return this.vertexBuffer._updateID++, + this.uvBuffer._updateID++, + this + } + , + e + }(gc) + , kg = 0 + , Pa = function() { + function t(t, e) { + this.uniforms = t, + this.group = !0, + this.syncUniforms = {}, + this.dirtyId = 0, + this.id = kg++, + this.static = !!e + } + return t.prototype.update = function() { + this.dirtyId++ + } + , + t.prototype.add = function(e, r, i) { + this.uniforms[e] = new t(r,i) + } + , + t.from = function(e, r) { + return new t(e,r) + } + , + t + }() + , lg = function() { + function t() { + this.renderTexture = null, + this.target = null, + this.legacy = !1, + this.resolution = 1, + this.sourceFrame = new da, + this.destinationFrame = new da, + this.bindingSourceFrame = new da, + this.bindingDestinationFrame = new da, + this.filters = [], + this.transform = null + } + return t.prototype.clear = function() { + this.target = null, + this.filters = null, + this.renderTexture = null + } + , + t + }() + , Cb = [new ra, new ra, new ra, new ra] + , hc = new la + , yd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.defaultFilterStack = [{}], + r.texturePool = new cg, + r.texturePool.setScreenSize(e.view), + r.statePool = [], + r.quad = new ig, + r.quadUv = new jg, + r.tempRect = new da, + r.activeState = {}, + r.globalUniforms = new Pa({ + outputFrame: new da, + inputSize: new Float32Array(4), + inputPixel: new Float32Array(4), + inputClamp: new Float32Array(4), + resolution: 1, + filterArea: new Float32Array(4), + filterClamp: new Float32Array(4) + },!0), + r.forceClear = !1, + r.useMaxPadding = !1, + r + } + return ba(e, t), + e.prototype.push = function(t, e) { + for (var r = this.renderer, i = this.defaultFilterStack, o = this.statePool.pop() || new lg, n = this.renderer.renderTexture, s = e[0].resolution, a = e[0].padding, u = e[0].autoFit, h = e[0].legacy, $ = 1; $ < e.length; $++) { + var p = e[$]; + s = Math.min(s, p.resolution), + a = this.useMaxPadding ? Math.max(a, p.padding) : a + p.padding, + u = u && p.autoFit, + h = h || p.legacy + } + if (1 === i.length && (this.defaultFilterStack[0].renderTexture = n.current), + i.push(o), + o.resolution = s, + o.legacy = h, + o.target = t, + o.sourceFrame.copyFrom(t.filterArea || t.getBounds(!0)), + o.sourceFrame.pad(a), + u) { + var l = this.tempRect.copyFrom(n.sourceFrame); + r.projection.transform && this.transformAABB(hc.copyFrom(r.projection.transform).invert(), l), + o.sourceFrame.fit(l) + } + this.roundFrame(o.sourceFrame, n.current ? n.current.resolution : r.resolution, n.sourceFrame, n.destinationFrame, r.projection.transform), + o.renderTexture = this.getOptimalFilterTexture(o.sourceFrame.width, o.sourceFrame.height, s), + o.filters = e, + o.destinationFrame.width = o.renderTexture.width, + o.destinationFrame.height = o.renderTexture.height; + var c = this.tempRect; + c.x = 0, + c.y = 0, + c.width = o.sourceFrame.width, + c.height = o.sourceFrame.height, + o.renderTexture.filterFrame = o.sourceFrame, + o.bindingSourceFrame.copyFrom(n.sourceFrame), + o.bindingDestinationFrame.copyFrom(n.destinationFrame), + o.transform = r.projection.transform, + r.projection.transform = null, + n.bind(o.renderTexture, o.sourceFrame, c), + r.framebuffer.clear(0, 0, 0, 0) + } + , + e.prototype.pop = function() { + var t = this.defaultFilterStack + , e = t.pop() + , r = e.filters; + this.activeState = e; + var i = this.globalUniforms.uniforms; + i.outputFrame = e.sourceFrame, + i.resolution = e.resolution; + var o = i.inputSize + , n = i.inputPixel + , s = i.inputClamp; + if (o[0] = e.destinationFrame.width, + o[1] = e.destinationFrame.height, + o[2] = 1 / o[0], + o[3] = 1 / o[1], + n[0] = o[0] * e.resolution, + n[1] = o[1] * e.resolution, + n[2] = 1 / n[0], + n[3] = 1 / n[1], + s[0] = .5 * n[2], + s[1] = .5 * n[3], + s[2] = e.sourceFrame.width * o[2] - .5 * n[2], + s[3] = e.sourceFrame.height * o[3] - .5 * n[3], + e.legacy) { + var a = i.filterArea; + a[0] = e.destinationFrame.width, + a[1] = e.destinationFrame.height, + a[2] = e.sourceFrame.x, + a[3] = e.sourceFrame.y, + i.filterClamp = i.inputClamp + } + this.globalUniforms.update(); + var u = t[t.length - 1]; + if (e.renderTexture.framebuffer.multisample > 1 && this.renderer.framebuffer.blit(), + 1 === r.length) + r[0].apply(this, e.renderTexture, u.renderTexture, Ja.BLEND, e), + this.returnFilterTexture(e.renderTexture); + else { + var h = e.renderTexture + , $ = this.getOptimalFilterTexture(h.width, h.height, e.resolution); + $.filterFrame = h.filterFrame; + var p = 0; + for (p = 0; p < r.length - 1; ++p) { + r[p].apply(this, h, $, Ja.CLEAR, e); + var l = h; + h = $, + $ = l + } + r[p].apply(this, h, u.renderTexture, Ja.BLEND, e), + this.returnFilterTexture(h), + this.returnFilterTexture($) + } + e.clear(), + this.statePool.push(e) + } + , + e.prototype.bindAndClear = function(t, e) { + void 0 === e && (e = Ja.CLEAR); + var r = this.renderer + , i = r.renderTexture + , o = r.state; + if (t === this.defaultFilterStack[this.defaultFilterStack.length - 1].renderTexture ? this.renderer.projection.transform = this.activeState.transform : this.renderer.projection.transform = null, + t && t.filterFrame) { + var n = this.tempRect; + n.x = 0, + n.y = 0, + n.width = t.filterFrame.width, + n.height = t.filterFrame.height, + i.bind(t, t.filterFrame, n) + } else + t !== this.defaultFilterStack[this.defaultFilterStack.length - 1].renderTexture ? i.bind(t) : this.renderer.renderTexture.bind(t, this.activeState.bindingSourceFrame, this.activeState.bindingDestinationFrame); + var s = 1 & o.stateId || this.forceClear; + (e === Ja.CLEAR || e === Ja.BLIT && s) && this.renderer.framebuffer.clear(0, 0, 0, 0) + } + , + e.prototype.applyFilter = function(t, e, r, i) { + var o = this.renderer; + o.state.set(t.state), + this.bindAndClear(r, i), + t.uniforms.uSampler = e, + t.uniforms.filterGlobals = this.globalUniforms, + o.shader.bind(t), + t.legacy ? (this.quadUv.map(e._frame, e.filterFrame), + o.geometry.bind(this.quadUv), + o.geometry.draw(Ba.TRIANGLES)) : (o.geometry.bind(this.quad), + o.geometry.draw(Ba.TRIANGLE_STRIP)) + } + , + e.prototype.calculateSpriteMatrix = function(t, e) { + var r = this.activeState + , i = r.sourceFrame + , o = r.destinationFrame + , n = e._texture.orig + , s = t.set(o.width, 0, 0, o.height, i.x, i.y) + , a = e.worldTransform.copyTo(la.TEMP_MATRIX); + return a.invert(), + s.prepend(a), + s.scale(1 / n.width, 1 / n.height), + s.translate(e.anchor.x, e.anchor.y), + s + } + , + e.prototype.destroy = function() { + this.texturePool.clear(!1) + } + , + e.prototype.getOptimalFilterTexture = function(t, e, r) { + return void 0 === r && (r = 1), + this.texturePool.getOptimalTexture(t, e, r) + } + , + e.prototype.getFilterTexture = function(t, e) { + if ("number" == typeof t) { + var r = t; + t = e, + e = r + } + t = t || this.activeState.renderTexture; + var i = this.texturePool.getOptimalTexture(t.width, t.height, e || t.resolution); + return i.filterFrame = t.filterFrame, + i + } + , + e.prototype.returnFilterTexture = function(t) { + this.texturePool.returnTexture(t) + } + , + e.prototype.emptyPool = function() { + this.texturePool.clear(!0) + } + , + e.prototype.resize = function() { + this.texturePool.setScreenSize(this.renderer.view) + } + , + e.prototype.transformAABB = function(t, e) { + var r = Cb[0] + , i = Cb[1] + , o = Cb[2] + , n = Cb[3]; + r.set(e.left, e.top), + i.set(e.left, e.bottom), + o.set(e.right, e.top), + n.set(e.right, e.bottom), + t.apply(r, r), + t.apply(i, i), + t.apply(o, o), + t.apply(n, n); + var s = Math.min(r.x, i.x, o.x, n.x) + , a = Math.min(r.y, i.y, o.y, n.y) + , u = Math.max(r.x, i.x, o.x, n.x) + , h = Math.max(r.y, i.y, o.y, n.y); + e.x = s, + e.y = a, + e.width = u - s, + e.height = h - a + } + , + e.prototype.roundFrame = function(t, e, r, i, o) { + if (o) { + var n = o.a + , s = o.b + , a = o.c + , u = o.d; + if (!(0 === s && 0 === a || 0 === n && 0 === u)) + return + } + (o = o ? hc.copyFrom(o) : hc.identity()).translate(-r.x, -r.y).scale(i.width / r.width, i.height / r.height).translate(i.x, i.y), + this.transformAABB(o, t), + t.ceil(e), + this.transformAABB(o.invert(), t) + } + , + e + }(pa) + , zd = function() { + function t(t) { + this.renderer = t + } + return t.prototype.flush = function() {} + , + t.prototype.destroy = function() { + this.renderer = null + } + , + t.prototype.start = function() {} + , + t.prototype.stop = function() { + this.flush() + } + , + t.prototype.render = function(t) {} + , + t + }() + , Ad = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.emptyRenderer = new zd(e), + r.currentRenderer = r.emptyRenderer, + r + } + return ba(e, t), + e.prototype.setObjectRenderer = function(t) { + this.currentRenderer !== t && (this.currentRenderer.stop(), + this.currentRenderer = t, + this.currentRenderer.start()) + } + , + e.prototype.flush = function() { + this.setObjectRenderer(this.emptyRenderer) + } + , + e.prototype.reset = function() { + this.setObjectRenderer(this.emptyRenderer) + } + , + e.prototype.copyBoundTextures = function(t, e) { + for (var r = this.renderer.texture.boundTextures, i = e - 1; i >= 0; --i) + t[i] = r[i] || null, + t[i] && (t[i]._batchLocation = i) + } + , + e.prototype.boundArray = function(t, e, r, i) { + for (var o = t.elements, n = t.ids, s = t.count, a = 0, u = 0; u < s; u++) { + var h = o[u] + , $ = h._batchLocation; + if ($ >= 0 && $ < i && e[$] === h) + n[u] = $; + else + for (; a < i; ) { + var p = e[a]; + if (!p || p._batchEnabled !== r || p._batchLocation !== a) { + n[u] = a, + h._batchLocation = a, + e[a] = h; + break + } + a++ + } + } + } + , + e + }(pa) + , Bd = 0 + , Cd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.webGLVersion = 1, + r.extensions = {}, + r.supports = { + uint32Indices: !1 + }, + r.handleContextLost = r.handleContextLost.bind(r), + r.handleContextRestored = r.handleContextRestored.bind(r), + e.view.addEventListener("webglcontextlost", r.handleContextLost, !1), + e.view.addEventListener("webglcontextrestored", r.handleContextRestored, !1), + r + } + return ba(e, t), + Object.defineProperty(e.prototype, "isLost", { + get: function() { + return !this.gl || this.gl.isContextLost() + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.contextChange = function(t) { + this.gl = t, + this.renderer.gl = t, + this.renderer.CONTEXT_UID = Bd++, + t.isContextLost() && t.getExtension("WEBGL_lose_context") && t.getExtension("WEBGL_lose_context").restoreContext() + } + , + e.prototype.initFromContext = function(t) { + this.gl = t, + this.validateContext(t), + this.renderer.gl = t, + this.renderer.CONTEXT_UID = Bd++, + this.renderer.runners.contextChange.emit(t) + } + , + e.prototype.initFromOptions = function(t) { + var e = this.createContext(this.renderer.view, t); + this.initFromContext(e) + } + , + e.prototype.createContext = function(t, e) { + var r; + if (aa.PREFER_ENV >= Aa.WEBGL2 && (r = t.getContext("webgl2", e)), + r) + this.webGLVersion = 2; + else if (this.webGLVersion = 1, + !(r = t.getContext("webgl", e) || t.getContext("experimental-webgl", e))) + throw new Error("This browser does not support WebGL. Try using the canvas renderer"); + return this.gl = r, + this.getExtensions(), + this.gl + } + , + e.prototype.getExtensions = function() { + var t = this.gl + , e = { + anisotropicFiltering: t.getExtension("EXT_texture_filter_anisotropic"), + floatTextureLinear: t.getExtension("OES_texture_float_linear"), + s3tc: t.getExtension("WEBGL_compressed_texture_s3tc"), + s3tc_sRGB: t.getExtension("WEBGL_compressed_texture_s3tc_srgb"), + etc: t.getExtension("WEBGL_compressed_texture_etc"), + etc1: t.getExtension("WEBGL_compressed_texture_etc1"), + pvrtc: t.getExtension("WEBGL_compressed_texture_pvrtc") || t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"), + atc: t.getExtension("WEBGL_compressed_texture_atc"), + astc: t.getExtension("WEBGL_compressed_texture_astc") + }; + 1 === this.webGLVersion ? Object.assign(this.extensions, e, { + drawBuffers: t.getExtension("WEBGL_draw_buffers"), + depthTexture: t.getExtension("WEBGL_depth_texture"), + loseContext: t.getExtension("WEBGL_lose_context"), + vertexArrayObject: t.getExtension("OES_vertex_array_object") || t.getExtension("MOZ_OES_vertex_array_object") || t.getExtension("WEBKIT_OES_vertex_array_object"), + uint32ElementIndex: t.getExtension("OES_element_index_uint"), + floatTexture: t.getExtension("OES_texture_float"), + floatTextureLinear: t.getExtension("OES_texture_float_linear"), + textureHalfFloat: t.getExtension("OES_texture_half_float"), + textureHalfFloatLinear: t.getExtension("OES_texture_half_float_linear") + }) : 2 === this.webGLVersion && Object.assign(this.extensions, e, { + colorBufferFloat: t.getExtension("EXT_color_buffer_float") + }) + } + , + e.prototype.handleContextLost = function(t) { + t.preventDefault() + } + , + e.prototype.handleContextRestored = function() { + this.renderer.runners.contextChange.emit(this.gl) + } + , + e.prototype.destroy = function() { + var t = this.renderer.view; + t.removeEventListener("webglcontextlost", this.handleContextLost), + t.removeEventListener("webglcontextrestored", this.handleContextRestored), + this.gl.useProgram(null), + this.extensions.loseContext && this.extensions.loseContext.loseContext() + } + , + e.prototype.postrender = function() { + this.renderer.renderingToScreen && this.gl.flush() + } + , + e.prototype.validateContext = function(t) { + var e = t.getContextAttributes() + , r = "WebGL2RenderingContext"in self && t instanceof self.WebGL2RenderingContext; + r && (this.webGLVersion = 2), + e.stencil || console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly"); + var i = r || !!t.getExtension("OES_element_index_uint"); + this.supports.uint32Indices = i, + i || console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly") + } + , + e + }(pa) + , mg = function() { + return function(t) { + this.framebuffer = t, + this.stencil = null, + this.dirtyId = 0, + this.dirtyFormat = 0, + this.dirtySize = 0, + this.multisample = _a.NONE, + this.msaaBuffer = null, + this.blitFramebuffer = null + } + }() + , ng = new da + , Dd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.managedFramebuffers = [], + r.unknownFramebuffer = new ec(10,10), + r.msaaSamples = null, + r + } + return ba(e, t), + e.prototype.contextChange = function() { + var t = this.gl = this.renderer.gl; + if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, + this.current = this.unknownFramebuffer, + this.viewport = new da, + this.hasMRT = !0, + this.writeDepthTexture = !0, + this.disposeAll(!0), + 1 === this.renderer.context.webGLVersion) { + var e = this.renderer.context.extensions.drawBuffers + , r = this.renderer.context.extensions.depthTexture; + aa.PREFER_ENV === Aa.WEBGL_LEGACY && (e = null, + r = null), + e ? t.drawBuffers = function(t) { + return e.drawBuffersWEBGL(t) + } + : (this.hasMRT = !1, + t.drawBuffers = function() {} + ), + r || (this.writeDepthTexture = !1) + } else + this.msaaSamples = t.getInternalformatParameter(t.RENDERBUFFER, t.RGBA8, t.SAMPLES) + } + , + e.prototype.bind = function(t, e) { + var r = this.gl; + if (t) { + var i = t.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(t); + this.current !== t && (this.current = t, + r.bindFramebuffer(r.FRAMEBUFFER, i.framebuffer)), + i.dirtyId !== t.dirtyId && (i.dirtyId = t.dirtyId, + i.dirtyFormat !== t.dirtyFormat ? (i.dirtyFormat = t.dirtyFormat, + this.updateFramebuffer(t)) : i.dirtySize !== t.dirtySize && (i.dirtySize = t.dirtySize, + this.resizeFramebuffer(t))); + for (var o = 0; o < t.colorTextures.length; o++) { + var n = t.colorTextures[o]; + this.renderer.texture.unbind(n.parentTextureArray || n) + } + t.depthTexture && this.renderer.texture.unbind(t.depthTexture), + e ? this.setViewport(e.x, e.y, e.width, e.height) : this.setViewport(0, 0, t.width, t.height) + } else + this.current && (this.current = null, + r.bindFramebuffer(r.FRAMEBUFFER, null)), + e ? this.setViewport(e.x, e.y, e.width, e.height) : this.setViewport(0, 0, this.renderer.width, this.renderer.height) + } + , + e.prototype.setViewport = function(t, e, r, i) { + var o = this.viewport; + o.width === r && o.height === i && o.x === t && o.y === e || (o.x = t, + o.y = e, + o.width = r, + o.height = i, + this.gl.viewport(t, e, r, i)) + } + , + Object.defineProperty(e.prototype, "size", { + get: function() { + return this.current ? { + x: 0, + y: 0, + width: this.current.width, + height: this.current.height + } : { + x: 0, + y: 0, + width: this.renderer.width, + height: this.renderer.height + } + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.clear = function(t, e, r, i, o) { + void 0 === o && (o = Qb.COLOR | Qb.DEPTH); + var n = this.gl; + n.clearColor(t, e, r, i), + n.clear(o) + } + , + e.prototype.initFramebuffer = function(t) { + var e = this.gl + , r = new mg(e.createFramebuffer()); + return r.multisample = this.detectSamples(t.multisample), + t.glFramebuffers[this.CONTEXT_UID] = r, + this.managedFramebuffers.push(t), + t.disposeRunner.add(this), + r + } + , + e.prototype.resizeFramebuffer = function(t) { + var e = this.gl + , r = t.glFramebuffers[this.CONTEXT_UID]; + r.stencil && (e.bindRenderbuffer(e.RENDERBUFFER, r.stencil), + e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, t.width, t.height)); + for (var i = t.colorTextures, o = 0; o < i.length; o++) + this.renderer.texture.bind(i[o], 0); + t.depthTexture && this.renderer.texture.bind(t.depthTexture, 0) + } + , + e.prototype.updateFramebuffer = function(t) { + var e = this.gl + , r = t.glFramebuffers[this.CONTEXT_UID] + , i = t.colorTextures.length; + e.drawBuffers || (i = Math.min(i, 1)), + r.multisample > 1 && (r.msaaBuffer = e.createRenderbuffer(), + e.bindRenderbuffer(e.RENDERBUFFER, r.msaaBuffer), + e.renderbufferStorageMultisample(e.RENDERBUFFER, r.multisample, e.RGBA8, t.width, t.height), + e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.RENDERBUFFER, r.msaaBuffer)); + for (var o = [], n = 0; n < i; n++) + if (!(0 === n && r.multisample > 1)) { + var s = t.colorTextures[n] + , a = s.parentTextureArray || s; + this.renderer.texture.bind(a, 0), + e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + n, s.target, a._glTextures[this.CONTEXT_UID].texture, 0), + o.push(e.COLOR_ATTACHMENT0 + n) + } + if ((o.length > 1 && e.drawBuffers(o), + t.depthTexture) && this.writeDepthTexture) { + var u = t.depthTexture; + this.renderer.texture.bind(u, 0), + e.framebufferTexture2D(e.FRAMEBUFFER, e.DEPTH_ATTACHMENT, e.TEXTURE_2D, u._glTextures[this.CONTEXT_UID].texture, 0) + } + r.stencil || !t.stencil && !t.depth || (r.stencil = e.createRenderbuffer(), + e.bindRenderbuffer(e.RENDERBUFFER, r.stencil), + e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, t.width, t.height), + t.depthTexture || e.framebufferRenderbuffer(e.FRAMEBUFFER, e.DEPTH_STENCIL_ATTACHMENT, e.RENDERBUFFER, r.stencil)) + } + , + e.prototype.detectSamples = function(t) { + var e = this.msaaSamples + , r = _a.NONE; + if (t <= 1 || null === e) + return r; + for (var i = 0; i < e.length; i++) + if (e[i] <= t) { + r = e[i]; + break + } + return 1 === r && (r = _a.NONE), + r + } + , + e.prototype.blit = function(t, e, r) { + var i = this.current + , o = this.renderer + , n = this.gl + , s = this.CONTEXT_UID; + if (2 === o.context.webGLVersion && i) { + var a = i.glFramebuffers[s]; + if (a) { + if (!t) { + if (a.multisample <= 1) + return; + a.blitFramebuffer || (a.blitFramebuffer = new ec(i.width,i.height), + a.blitFramebuffer.addColorTexture(0, i.colorTextures[0])), + (t = a.blitFramebuffer).width = i.width, + t.height = i.height + } + e || ((e = ng).width = i.width, + e.height = i.height), + r || (r = e); + var u = e.width === r.width && e.height === r.height; + this.bind(t), + n.bindFramebuffer(n.READ_FRAMEBUFFER, a.framebuffer), + n.blitFramebuffer(e.x, e.y, e.width, e.height, r.x, r.y, r.width, r.height, n.COLOR_BUFFER_BIT, u ? n.NEAREST : n.LINEAR) + } + } + } + , + e.prototype.disposeFramebuffer = function(t, e) { + var r = t.glFramebuffers[this.CONTEXT_UID] + , i = this.gl; + if (r) { + delete t.glFramebuffers[this.CONTEXT_UID]; + var o = this.managedFramebuffers.indexOf(t); + o >= 0 && this.managedFramebuffers.splice(o, 1), + t.disposeRunner.remove(this), + e || (i.deleteFramebuffer(r.framebuffer), + r.stencil && i.deleteRenderbuffer(r.stencil)) + } + } + , + e.prototype.disposeAll = function(t) { + var e = this.managedFramebuffers; + this.managedFramebuffers = []; + for (var r = 0; r < e.length; r++) + this.disposeFramebuffer(e[r], t) + } + , + e.prototype.forceStencil = function() { + var t = this.current; + if (t) { + var e = t.glFramebuffers[this.CONTEXT_UID]; + if (e && !e.stencil) { + t.enableStencil(); + var r = t.width + , i = t.height + , o = this.gl + , n = o.createRenderbuffer(); + o.bindRenderbuffer(o.RENDERBUFFER, n), + o.renderbufferStorage(o.RENDERBUFFER, o.DEPTH_STENCIL, r, i), + e.stencil = n, + o.framebufferRenderbuffer(o.FRAMEBUFFER, o.DEPTH_STENCIL_ATTACHMENT, o.RENDERBUFFER, n) + } + } + } + , + e.prototype.reset = function() { + this.current = this.unknownFramebuffer, + this.viewport = new da + } + , + e + }(pa) + , og = function() { + return function(t) { + this.buffer = t || null, + this.updateID = -1, + this.byteLength = -1, + this.refCount = 0 + } + }() + , ic = { + 5126: 4, + 5123: 2, + 5121: 1 + } + , Ed = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r._activeGeometry = null, + r._activeVao = null, + r.hasVao = !0, + r.hasInstance = !0, + r.canUseUInt32ElementIndex = !1, + r.managedGeometries = {}, + r.managedBuffers = {}, + r + } + return ba(e, t), + e.prototype.contextChange = function() { + this.disposeAll(!0); + var t = this.gl = this.renderer.gl + , e = this.renderer.context; + if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, + 2 !== e.webGLVersion) { + var r = this.renderer.context.extensions.vertexArrayObject; + aa.PREFER_ENV === Aa.WEBGL_LEGACY && (r = null), + r ? (t.createVertexArray = function() { + return r.createVertexArrayOES() + } + , + t.bindVertexArray = function(t) { + return r.bindVertexArrayOES(t) + } + , + t.deleteVertexArray = function(t) { + return r.deleteVertexArrayOES(t) + } + ) : (this.hasVao = !1, + t.createVertexArray = function() { + return null + } + , + t.bindVertexArray = function() { + return null + } + , + t.deleteVertexArray = function() { + return null + } + ) + } + if (2 !== e.webGLVersion) { + var i = t.getExtension("ANGLE_instanced_arrays"); + i ? (t.vertexAttribDivisor = function(t, e) { + return i.vertexAttribDivisorANGLE(t, e) + } + , + t.drawElementsInstanced = function(t, e, r, o, n) { + return i.drawElementsInstancedANGLE(t, e, r, o, n) + } + , + t.drawArraysInstanced = function(t, e, r, o) { + return i.drawArraysInstancedANGLE(t, e, r, o) + } + ) : this.hasInstance = !1 + } + this.canUseUInt32ElementIndex = 2 === e.webGLVersion || !!e.extensions.uint32ElementIndex + } + , + e.prototype.bind = function(t, e) { + e = e || this.renderer.shader.shader; + var r = this.gl + , i = t.glVertexArrayObjects[this.CONTEXT_UID] + , o = !1; + i || (this.managedGeometries[t.id] = t, + t.disposeRunner.add(this), + t.glVertexArrayObjects[this.CONTEXT_UID] = i = {}, + o = !0); + var n = i[e.program.id] || this.initGeometryVao(t, e.program, o); + this._activeGeometry = t, + this._activeVao !== n && (this._activeVao = n, + this.hasVao ? r.bindVertexArray(n) : this.activateVao(t, e.program)), + this.updateBuffers() + } + , + e.prototype.reset = function() { + this.unbind() + } + , + e.prototype.updateBuffers = function() { + for (var t = this._activeGeometry, e = this.gl, r = 0; r < t.buffers.length; r++) { + var i = t.buffers[r] + , o = i._glBuffers[this.CONTEXT_UID]; + if (i._updateID !== o.updateID) { + o.updateID = i._updateID; + var n = i.index ? e.ELEMENT_ARRAY_BUFFER : e.ARRAY_BUFFER; + if (e.bindBuffer(n, o.buffer), + this._boundBuffer = o, + o.byteLength >= i.data.byteLength) + e.bufferSubData(n, 0, i.data); + else { + var s = i.static ? e.STATIC_DRAW : e.DYNAMIC_DRAW; + o.byteLength = i.data.byteLength, + e.bufferData(n, i.data, s) + } + } + } + } + , + e.prototype.checkCompatibility = function(t, e) { + var r = t.attributes + , i = e.attributeData; + for (var o in i) + if (!r[o]) + throw new Error("shader and geometry incompatible, geometry missing the \"" + o + "\" attribute") + } + , + e.prototype.getSignature = function(t, e) { + var r = t.attributes + , i = e.attributeData + , o = ["g", t.id]; + for (var n in r) + i[n] && o.push(n); + return o.join("-") + } + , + e.prototype.initGeometryVao = function(t, e, r) { + void 0 === r && (r = !0), + this.checkCompatibility(t, e); + var i = this.gl + , o = this.CONTEXT_UID + , n = this.getSignature(t, e) + , s = t.glVertexArrayObjects[this.CONTEXT_UID] + , a = s[n]; + if (a) + return s[e.id] = a, + a; + var u = t.buffers + , h = t.attributes + , $ = {} + , p = {}; + for (var l in u) + $[l] = 0, + p[l] = 0; + for (var l in h) + !h[l].size && e.attributeData[l] ? h[l].size = e.attributeData[l].size : h[l].size || console.warn("PIXI Geometry attribute '" + l + "' size cannot be determined (likely the bound shader does not have the attribute)"), + $[h[l].buffer] += h[l].size * ic[h[l].type]; + for (var l in h) { + var c = h[l] + , d = c.size; + void 0 === c.stride && ($[c.buffer] === d * ic[c.type] ? c.stride = 0 : c.stride = $[c.buffer]), + void 0 === c.start && (c.start = p[c.buffer], + p[c.buffer] += d * ic[c.type]) + } + a = i.createVertexArray(), + i.bindVertexArray(a); + for (var f = 0; f < u.length; f++) { + var m = u[f]; + m._glBuffers[o] || (m._glBuffers[o] = new og(i.createBuffer()), + this.managedBuffers[m.id] = m, + m.disposeRunner.add(this)), + r && m._glBuffers[o].refCount++ + } + return this.activateVao(t, e), + this._activeVao = a, + s[e.id] = a, + s[n] = a, + a + } + , + e.prototype.disposeBuffer = function(t, e) { + if (this.managedBuffers[t.id]) { + delete this.managedBuffers[t.id]; + var r = t._glBuffers[this.CONTEXT_UID] + , i = this.gl; + t.disposeRunner.remove(this), + r && (e || i.deleteBuffer(r.buffer), + delete t._glBuffers[this.CONTEXT_UID]) + } + } + , + e.prototype.disposeGeometry = function(t, e) { + if (this.managedGeometries[t.id]) { + delete this.managedGeometries[t.id]; + var r = t.glVertexArrayObjects[this.CONTEXT_UID] + , i = this.gl + , o = t.buffers; + if (t.disposeRunner.remove(this), + r) { + for (var n = 0; n < o.length; n++) { + var s = o[n]._glBuffers[this.CONTEXT_UID]; + s.refCount--, + 0 !== s.refCount || e || this.disposeBuffer(o[n], e) + } + if (!e) + for (var a in r) + if ("g" === a[0]) { + var u = r[a]; + this._activeVao === u && this.unbind(), + i.deleteVertexArray(u) + } + delete t.glVertexArrayObjects[this.CONTEXT_UID] + } + } + } + , + e.prototype.disposeAll = function(t) { + for (var e = Object.keys(this.managedGeometries), r = 0; r < e.length; r++) + this.disposeGeometry(this.managedGeometries[e[r]], t); + e = Object.keys(this.managedBuffers); + for (r = 0; r < e.length; r++) + this.disposeBuffer(this.managedBuffers[e[r]], t) + } + , + e.prototype.activateVao = function(t, e) { + var r = this.gl + , i = this.CONTEXT_UID + , o = t.buffers + , n = t.attributes; + t.indexBuffer && r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, t.indexBuffer._glBuffers[i].buffer); + var s = null; + for (var a in n) { + var u = n[a] + , h = o[u.buffer]._glBuffers[i]; + if (e.attributeData[a]) { + s !== h && (r.bindBuffer(r.ARRAY_BUFFER, h.buffer), + s = h); + var $ = e.attributeData[a].location; + if (r.enableVertexAttribArray($), + r.vertexAttribPointer($, u.size, u.type || r.FLOAT, u.normalized, u.stride, u.start), + u.instance) { + if (!this.hasInstance) + throw new Error("geometry error, GPU Instancing is not supported on this device"); + r.vertexAttribDivisor($, 1) + } + } + } + } + , + e.prototype.draw = function(t, e, r, i) { + var o = this.gl + , n = this._activeGeometry; + if (n.indexBuffer) { + var s = n.indexBuffer.data.BYTES_PER_ELEMENT + , a = 2 === s ? o.UNSIGNED_SHORT : o.UNSIGNED_INT; + 2 === s || 4 === s && this.canUseUInt32ElementIndex ? n.instanced ? o.drawElementsInstanced(t, e || n.indexBuffer.data.length, a, (r || 0) * s, i || 1) : o.drawElements(t, e || n.indexBuffer.data.length, a, (r || 0) * s) : console.warn("unsupported index buffer type: uint32") + } else + n.instanced ? o.drawArraysInstanced(t, r, e || n.getSize(), i || 1) : o.drawArrays(t, r, e || n.getSize()); + return this + } + , + e.prototype.unbind = function() { + this.gl.bindVertexArray(null), + this._activeVao = null, + this._activeGeometry = null + } + , + e + }(pa) + , pg = function() { + function t(t) { + void 0 === t && (t = null), + this.type = qa.NONE, + this.autoDetect = !0, + this.maskObject = t || null, + this.pooled = !1, + this.isMaskData = !0, + this._stencilCounter = 0, + this._scissorCounter = 0, + this._scissorRect = null, + this._target = null + } + return t.prototype.reset = function() { + this.pooled && (this.maskObject = null, + this.type = qa.NONE, + this.autoDetect = !0), + this._target = null + } + , + t.prototype.copyCountersOrReset = function(t) { + t ? (this._stencilCounter = t._stencilCounter, + this._scissorCounter = t._scissorCounter, + this._scissorRect = t._scissorRect) : (this._stencilCounter = 0, + this._scissorCounter = 0, + this._scissorRect = null) + } + , + t + }(); + function Fd(t, e, r) { + var i = t.createShader(e); + return t.shaderSource(i, r), + t.compileShader(i), + i + } + function Gd(t, e, r, i) { + var o = Fd(t, t.VERTEX_SHADER, e) + , n = Fd(t, t.FRAGMENT_SHADER, r) + , s = t.createProgram(); + if (t.attachShader(s, o), + t.attachShader(s, n), + i) + for (var a in i) + t.bindAttribLocation(s, i[a], a); + return t.linkProgram(s), + t.getProgramParameter(s, t.LINK_STATUS) || (t.getShaderParameter(o, t.COMPILE_STATUS) || (console.warn(e), + console.error(t.getShaderInfoLog(o))), + t.getShaderParameter(n, t.COMPILE_STATUS) || (console.warn(r), + console.error(t.getShaderInfoLog(n))), + console.error("Pixi.js Error: Could not initialize shader."), + console.error("gl.VALIDATE_STATUS", t.getProgramParameter(s, t.VALIDATE_STATUS)), + console.error("gl.getError()", t.getError()), + "" !== t.getProgramInfoLog(s) && console.warn("Pixi.js Warning: gl.getProgramInfoLog()", t.getProgramInfoLog(s)), + t.deleteProgram(s), + s = null), + t.deleteShader(o), + t.deleteShader(n), + s + } + function jc(t) { + for (var e = new Array(t), r = 0; r < e.length; r++) + e[r] = !1; + return e + } + function Hd(t, e) { + switch (t) { + case "float": + return 0; + case "vec2": + return new Float32Array(2 * e); + case "vec3": + return new Float32Array(3 * e); + case "vec4": + return new Float32Array(4 * e); + case "int": + case "uint": + case "sampler2D": + case "sampler2DArray": + return 0; + case "ivec2": + return new Int32Array(2 * e); + case "ivec3": + return new Int32Array(3 * e); + case "ivec4": + return new Int32Array(4 * e); + case "uvec2": + return new Uint32Array(2 * e); + case "uvec3": + return new Uint32Array(3 * e); + case "uvec4": + return new Uint32Array(4 * e); + case "bool": + return !1; + case "bvec2": + return jc(2 * e); + case "bvec3": + return jc(3 * e); + case "bvec4": + return jc(4 * e); + case "mat2": + return new Float32Array([1, 0, 0, 1]); + case "mat3": + return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); + case "mat4": + return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]); + } + return null + } + var Id, Jd = {}, Db = Jd; + function Kd() { + if (Db === Jd || Db && Db.isContextLost()) { + var t = document.createElement("canvas") + , e = void 0; + aa.PREFER_ENV >= Aa.WEBGL2 && (e = t.getContext("webgl2", {})), + e || ((e = t.getContext("webgl", {}) || t.getContext("experimental-webgl", {})) ? e.getExtension("WEBGL_draw_buffers") : e = null), + Db = e + } + return Db + } + function qg() { + if (!Id) { + Id = xa.MEDIUM; + var t = Kd(); + if (t && t.getShaderPrecisionFormat) { + var e = t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT); + Id = e.precision ? xa.HIGH : xa.MEDIUM + } + } + return Id + } + function Ld(t, e, r) { + if ("precision" !== t.substring(0, 9)) { + var i = e; + return e === xa.HIGH && r !== xa.HIGH && (i = xa.MEDIUM), + "precision " + i + " float;\n" + t + } + return r !== xa.HIGH && "precision highp" === t.substring(0, 15) ? t.replace("precision highp", "precision mediump") : t + } + var rg = { + float: 1, + vec2: 2, + vec3: 3, + vec4: 4, + int: 1, + ivec2: 2, + ivec3: 3, + ivec4: 4, + uint: 1, + uvec2: 2, + uvec3: 3, + uvec4: 4, + bool: 1, + bvec2: 2, + bvec3: 3, + bvec4: 4, + mat2: 4, + mat3: 9, + mat4: 16, + sampler2D: 1 + }; + function sg(t) { + return rg[t] + } + var kc = null + , Md = { + FLOAT: "float", + FLOAT_VEC2: "vec2", + FLOAT_VEC3: "vec3", + FLOAT_VEC4: "vec4", + INT: "int", + INT_VEC2: "ivec2", + INT_VEC3: "ivec3", + INT_VEC4: "ivec4", + UNSIGNED_INT: "uint", + UNSIGNED_INT_VEC2: "uvec2", + UNSIGNED_INT_VEC3: "uvec3", + UNSIGNED_INT_VEC4: "uvec4", + BOOL: "bool", + BOOL_VEC2: "bvec2", + BOOL_VEC3: "bvec3", + BOOL_VEC4: "bvec4", + FLOAT_MAT2: "mat2", + FLOAT_MAT3: "mat3", + FLOAT_MAT4: "mat4", + SAMPLER_2D: "sampler2D", + INT_SAMPLER_2D: "sampler2D", + UNSIGNED_INT_SAMPLER_2D: "sampler2D", + SAMPLER_CUBE: "samplerCube", + INT_SAMPLER_CUBE: "samplerCube", + UNSIGNED_INT_SAMPLER_CUBE: "samplerCube", + SAMPLER_2D_ARRAY: "sampler2DArray", + INT_SAMPLER_2D_ARRAY: "sampler2DArray", + UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray" + }; + function Nd(t, e) { + if (!kc) { + var r = Object.keys(Md); + kc = {}; + for (var i = 0; i < r.length; ++i) { + var o = r[i]; + kc[t[o]] = Md[o] + } + } + return kc[e] + } + var lc = [{ + test: function(t) { + return "float" === t.type && 1 === t.size + }, + code: function(t) { + return "\n if(uv[\"" + t + "\"] !== ud[\"" + t + "\"].value)\n {\n ud[\"" + t + "\"].value = uv[\"" + t + "\"]\n gl.uniform1f(ud[\"" + t + "\"].location, uv[\"" + t + "\"])\n }\n " + } + }, { + test: function(t) { + return ("sampler2D" === t.type || "samplerCube" === t.type || "sampler2DArray" === t.type) && 1 === t.size && !t.isArray + }, + code: function(t) { + return "t = syncData.textureCount++;\n\n renderer.texture.bind(uv[\"" + t + "\"], t);\n\n if(ud[\"" + t + "\"].value !== t)\n {\n ud[\"" + t + "\"].value = t;\n gl.uniform1i(ud[\"" + t + "\"].location, t);\n; // eslint-disable-line max-len\n }" + } + }, { + test: function(t, e) { + return "mat3" === t.type && 1 === t.size && void 0 !== e.a + }, + code: function(t) { + return "\n gl.uniformMatrix3fv(ud[\"" + t + "\"].location, false, uv[\"" + t + "\"].toArray(true));\n " + } + }, { + test: function(t, e) { + return "vec2" === t.type && 1 === t.size && void 0 !== e.x + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[\"" + t + "\"].location, v.x, v.y);\n }" + } + }, { + test: function(t) { + return "vec2" === t.type && 1 === t.size + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud[\"" + t + "\"].location, v[0], v[1]);\n }\n " + } + }, { + test: function(t, e) { + return "vec4" === t.type && 1 === t.size && void 0 !== e.width + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[\"" + t + "\"].location, v.x, v.y, v.width, v.height)\n }" + } + }, { + test: function(t) { + return "vec4" === t.type && 1 === t.size + }, + code: function(t) { + return "\n cv = ud[\"" + t + "\"].value;\n v = uv[\"" + t + "\"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud[\"" + t + "\"].location, v[0], v[1], v[2], v[3])\n }" + } + }] + , tg = { + float: "\n if(cv !== v)\n {\n cv.v = v;\n gl.uniform1f(location, v)\n }", + vec2: "\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1])\n }", + vec3: "\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }", + vec4: "gl.uniform4f(location, v[0], v[1], v[2], v[3])", + int: "gl.uniform1i(location, v)", + ivec2: "gl.uniform2i(location, v[0], v[1])", + ivec3: "gl.uniform3i(location, v[0], v[1], v[2])", + ivec4: "gl.uniform4i(location, v[0], v[1], v[2], v[3])", + uint: "gl.uniform1ui(location, v)", + uvec2: "gl.uniform2ui(location, v[0], v[1])", + uvec3: "gl.uniform3ui(location, v[0], v[1], v[2])", + uvec4: "gl.uniform4ui(location, v[0], v[1], v[2], v[3])", + bool: "gl.uniform1i(location, v)", + bvec2: "gl.uniform2i(location, v[0], v[1])", + bvec3: "gl.uniform3i(location, v[0], v[1], v[2])", + bvec4: "gl.uniform4i(location, v[0], v[1], v[2], v[3])", + mat2: "gl.uniformMatrix2fv(location, false, v)", + mat3: "gl.uniformMatrix3fv(location, false, v)", + mat4: "gl.uniformMatrix4fv(location, false, v)", + sampler2D: "gl.uniform1i(location, v)", + samplerCube: "gl.uniform1i(location, v)", + sampler2DArray: "gl.uniform1i(location, v)" + } + , ug = { + float: "gl.uniform1fv(location, v)", + vec2: "gl.uniform2fv(location, v)", + vec3: "gl.uniform3fv(location, v)", + vec4: "gl.uniform4fv(location, v)", + mat4: "gl.uniformMatrix4fv(location, false, v)", + mat3: "gl.uniformMatrix3fv(location, false, v)", + mat2: "gl.uniformMatrix2fv(location, false, v)", + int: "gl.uniform1iv(location, v)", + ivec2: "gl.uniform2iv(location, v)", + ivec3: "gl.uniform3iv(location, v)", + ivec4: "gl.uniform4iv(location, v)", + uint: "gl.uniform1uiv(location, v)", + uvec2: "gl.uniform2uiv(location, v)", + uvec3: "gl.uniform3uiv(location, v)", + uvec4: "gl.uniform4uiv(location, v)", + bool: "gl.uniform1iv(location, v)", + bvec2: "gl.uniform2iv(location, v)", + bvec3: "gl.uniform3iv(location, v)", + bvec4: "gl.uniform4iv(location, v)", + sampler2D: "gl.uniform1iv(location, v)", + samplerCube: "gl.uniform1iv(location, v)", + sampler2DArray: "gl.uniform1iv(location, v)" + }; + function vg(t, e) { + var r = ["\n var v = null;\n var cv = null\n var t = 0;\n var gl = renderer.gl\n "]; + for (var i in t.uniforms) { + var o = e[i]; + if (o) { + for (var n = t.uniforms[i], s = !1, a = 0; a < lc.length; a++) + if (lc[a].test(o, n)) { + r.push(lc[a].code(i, n)), + s = !0; + break + } + if (!s) { + var u = (1 === o.size ? tg : ug)[o.type].replace("location", "ud[\"" + i + "\"].location"); + r.push("\n cv = ud[\"" + i + "\"].value;\n v = uv[\"" + i + "\"];\n " + u + ";") + } + } else + t.uniforms[i].group && r.push("\n renderer.shader.syncUniformGroup(uv[\"" + i + "\"], syncData);\n ") + } + return new Function("ud","uv","renderer","syncData",r.join("\n")) + } + var mc, wg = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join("\n"); + function xg(t) { + for (var e = "", r = 0; r < t; ++r) + r > 0 && (e += "\nelse "), + r < t - 1 && (e += "if(test == " + r + ".0){}"); + return e + } + function yg(t, e) { + if (0 === t) + throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`"); + for (var r = e.createShader(e.FRAGMENT_SHADER); ; ) { + var i = wg.replace(/%forloop%/gi, xg(t)); + if (e.shaderSource(r, i), + e.compileShader(r), + e.getShaderParameter(r, e.COMPILE_STATUS)) + break; + t = t / 2 | 0 + } + return t + } + function zg() { + if ("boolean" == typeof mc) + return mc; + try { + var t = new Function("param1","param2","param3","return param1[param2] === param3;"); + mc = !0 === t({ + a: "b" + }, "a", "b") + } catch (e) { + mc = !1 + } + return mc + } + var Ag = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}" + , Bg = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n" + , Cg = 0 + , Eb = {} + , nc = function() { + function t(e, r, i) { + void 0 === i && (i = "pixi-shader"), + this.id = Cg++, + this.vertexSrc = e || t.defaultVertexSrc, + this.fragmentSrc = r || t.defaultFragmentSrc, + this.vertexSrc = this.vertexSrc.trim(), + this.fragmentSrc = this.fragmentSrc.trim(), + "#version" !== this.vertexSrc.substring(0, 8) && (i = i.replace(/\s+/g, "-"), + Eb[i] ? (Eb[i]++, + i += "-" + Eb[i]) : Eb[i] = 1, + this.vertexSrc = "#define SHADER_NAME " + i + "\n" + this.vertexSrc, + this.fragmentSrc = "#define SHADER_NAME " + i + "\n" + this.fragmentSrc, + this.vertexSrc = Ld(this.vertexSrc, aa.PRECISION_VERTEX, xa.HIGH), + this.fragmentSrc = Ld(this.fragmentSrc, aa.PRECISION_FRAGMENT, qg())), + this.extractData(this.vertexSrc, this.fragmentSrc), + this.glPrograms = {}, + this.syncUniforms = null + } + return t.prototype.extractData = function(t, e) { + var r = Kd(); + if (r) { + var i = Gd(r, t, e); + this.attributeData = this.getAttributeData(i, r), + this.uniformData = this.getUniformData(i, r), + r.deleteProgram(i) + } else + this.uniformData = {}, + this.attributeData = {} + } + , + t.prototype.getAttributeData = function(t, e) { + for (var r = {}, i = [], o = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES), n = 0; n < o; n++) { + var s = e.getActiveAttrib(t, n) + , a = Nd(e, s.type) + , u = { + type: a, + name: s.name, + size: sg(a), + location: 0 + }; + r[s.name] = u, + i.push(u) + } + i.sort(function(t, e) { + return t.name > e.name ? 1 : -1 + }); + for (n = 0; n < i.length; n++) + i[n].location = n; + return r + } + , + t.prototype.getUniformData = function(t, e) { + for (var r = {}, i = e.getProgramParameter(t, e.ACTIVE_UNIFORMS), o = 0; o < i; o++) { + var n = e.getActiveUniform(t, o) + , s = n.name.replace(/\[.*?\]$/, "") + , a = n.name.match(/\[.*?\]$/) + , u = Nd(e, n.type); + r[s] = { + type: u, + size: n.size, + isArray: a, + value: Hd(u, n.size) + } + } + return r + } + , + Object.defineProperty(t, "defaultVertexSrc", { + get: function() { + return Bg + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "defaultFragmentSrc", { + get: function() { + return Ag + }, + enumerable: !1, + configurable: !0 + }), + t.from = function(e, r, i) { + var o = e + r + , n = jd[o]; + return n || (jd[o] = n = new t(e,r,i)), + n + } + , + t + }() + , oc = function() { + function t(t, e) { + for (var r in this.program = t, + this.uniformGroup = e ? e instanceof Pa ? e : new Pa(e) : new Pa({}), + t.uniformData) + this.uniformGroup.uniforms[r]instanceof Array && (this.uniformGroup.uniforms[r] = new Float32Array(this.uniformGroup.uniforms[r])) + } + return t.prototype.checkUniformExists = function(t, e) { + if (e.uniforms[t]) + return !0; + for (var r in e.uniforms) { + var i = e.uniforms[r]; + if (i.group && this.checkUniformExists(t, i)) + return !0 + } + return !1 + } + , + t.prototype.destroy = function() { + this.uniformGroup = null + } + , + Object.defineProperty(t.prototype, "uniforms", { + get: function() { + return this.uniformGroup.uniforms + }, + enumerable: !1, + configurable: !0 + }), + t.from = function(e, r, i) { + return new t(nc.from(e, r),i) + } + , + t + }() + , pc = 0 + , qc = 1 + , rc = 2 + , sc = 3 + , tc = 4 + , uc = 5 + , Fb = function() { + function t() { + this.data = 0, + this.blendMode = K.NORMAL, + this.polygonOffset = 0, + this.blend = !0, + this.depthMask = !0 + } + return Object.defineProperty(t.prototype, "blend", { + get: function() { + return !!(this.data & 1 << pc) + }, + set: function(t) { + !!(this.data & 1 << pc) !== t && (this.data ^= 1 << pc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "offsets", { + get: function() { + return !!(this.data & 1 << qc) + }, + set: function(t) { + !!(this.data & 1 << qc) !== t && (this.data ^= 1 << qc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "culling", { + get: function() { + return !!(this.data & 1 << rc) + }, + set: function(t) { + !!(this.data & 1 << rc) !== t && (this.data ^= 1 << rc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "depthTest", { + get: function() { + return !!(this.data & 1 << sc) + }, + set: function(t) { + !!(this.data & 1 << sc) !== t && (this.data ^= 1 << sc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "depthMask", { + get: function() { + return !!(this.data & 1 << uc) + }, + set: function(t) { + !!(this.data & 1 << uc) !== t && (this.data ^= 1 << uc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "clockwiseFrontFace", { + get: function() { + return !!(this.data & 1 << tc) + }, + set: function(t) { + !!(this.data & 1 << tc) !== t && (this.data ^= 1 << tc) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "blendMode", { + get: function() { + return this._blendMode + }, + set: function(t) { + this.blend = t !== K.NONE, + this._blendMode = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "polygonOffset", { + get: function() { + return this._polygonOffset + }, + set: function(t) { + this.offsets = !!t, + this._polygonOffset = t + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.toString = function() { + return "[@pixi/core:State blendMode=" + this.blendMode + " clockwiseFrontFace=" + this.clockwiseFrontFace + " culling=" + this.culling + " depthMask=" + this.depthMask + " polygonOffset=" + this.polygonOffset + "]" + } + , + t.for2d = function() { + var e = new t; + return e.depthTest = !1, + e.blend = !0, + e + } + , + t + }() + , Dg = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n" + , Eg = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n" + , Fg = function(t) { + function e(r, i, o) { + var n = this + , s = nc.from(r || e.defaultVertexSrc, i || e.defaultFragmentSrc); + return (n = t.call(this, s, o) || this).padding = 0, + n.resolution = aa.FILTER_RESOLUTION, + n.enabled = !0, + n.autoFit = !0, + n.legacy = !!n.program.attributeData.aTextureCoord, + n.state = new Fb, + n + } + return ba(e, t), + e.prototype.apply = function(t, e, r, i, o) { + t.applyFilter(this, e, r, i) + } + , + Object.defineProperty(e.prototype, "blendMode", { + get: function() { + return this.state.blendMode + }, + set: function(t) { + this.state.blendMode = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e, "defaultVertexSrc", { + get: function() { + return Dg + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e, "defaultFragmentSrc", { + get: function() { + return Eg + }, + enumerable: !1, + configurable: !0 + }), + e + }(oc) + , Gg = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n" + , Hg = "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n" + , Od = new la + , Ig = function() { + function t(t, e) { + this._texture = t, + this.mapCoord = new la, + this.uClampFrame = new Float32Array(4), + this.uClampOffset = new Float32Array(2), + this._textureID = -1, + this._updateID = 0, + this.clampOffset = 0, + this.clampMargin = void 0 === e ? .5 : e, + this.isSimple = !1 + } + return Object.defineProperty(t.prototype, "texture", { + get: function() { + return this._texture + }, + set: function(t) { + this._texture = t, + this._textureID = -1 + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.multiplyUvs = function(t, e) { + void 0 === e && (e = t); + for (var r = this.mapCoord, i = 0; i < t.length; i += 2) { + var o = t[i] + , n = t[i + 1]; + e[i] = o * r.a + n * r.c + r.tx, + e[i + 1] = o * r.b + n * r.d + r.ty + } + return e + } + , + t.prototype.update = function(t) { + var e = this._texture; + if (!e || !e.valid) + return !1; + if (!t && this._textureID === e._updateID) + return !1; + this._textureID = e._updateID, + this._updateID++; + var r = e._uvs; + this.mapCoord.set(r.x1 - r.x0, r.y1 - r.y0, r.x3 - r.x0, r.y3 - r.y0, r.x0, r.y0); + var i = e.orig + , o = e.trim; + o && (Od.set(i.width / o.width, 0, 0, i.height / o.height, -o.x / o.width, -o.y / o.height), + this.mapCoord.append(Od)); + var n = e.baseTexture + , s = this.uClampFrame + , a = this.clampMargin / n.resolution + , u = this.clampOffset; + return s[0] = (e._frame.x + a + u) / n.width, + s[1] = (e._frame.y + a + u) / n.height, + s[2] = (e._frame.x + e._frame.width - a + u) / n.width, + s[3] = (e._frame.y + e._frame.height - a + u) / n.height, + this.uClampOffset[0] = u / n.realWidth, + this.uClampOffset[1] = u / n.realHeight, + this.isSimple = e._frame.width === n.width && e._frame.height === n.height && 0 === e.rotate, + !0 + } + , + t + }() + , Jg = function(t) { + function e(e) { + var r = this + , i = new la; + return r = t.call(this, Gg, Hg) || this, + e.renderable = !1, + r.maskSprite = e, + r.maskMatrix = i, + r + } + return ba(e, t), + e.prototype.apply = function(t, e, r, i) { + var o = this.maskSprite + , n = o._texture; + n.valid && (n.uvMatrix || (n.uvMatrix = new Ig(n,0)), + n.uvMatrix.update(), + this.uniforms.npmAlpha = n.baseTexture.alphaMode ? 0 : 1, + this.uniforms.mask = n, + this.uniforms.otherMatrix = t.calculateSpriteMatrix(this.maskMatrix, o).prepend(n.uvMatrix.mapCoord), + this.uniforms.alpha = o.worldAlpha, + this.uniforms.maskClamp = n.uvMatrix.uClampFrame, + t.applyFilter(this, e, r, i)) + } + , + e + }(Fg) + , Pd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.enableScissor = !0, + r.alphaMaskPool = [], + r.maskDataPool = [], + r.maskStack = [], + r.alphaMaskIndex = 0, + r + } + return ba(e, t), + e.prototype.setMaskStack = function(t) { + this.maskStack = t, + this.renderer.scissor.setMaskStack(t), + this.renderer.stencil.setMaskStack(t) + } + , + e.prototype.push = function(t, e) { + var r = e; + if (!r.isMaskData) { + var i = this.maskDataPool.pop() || new pg; + i.pooled = !0, + i.maskObject = e, + r = i + } + switch (r.autoDetect && this.detect(r), + r.copyCountersOrReset(this.maskStack[this.maskStack.length - 1]), + r._target = t, + r.type) { + case qa.SCISSOR: + this.maskStack.push(r), + this.renderer.scissor.push(r); + break; + case qa.STENCIL: + this.maskStack.push(r), + this.renderer.stencil.push(r); + break; + case qa.SPRITE: + r.copyCountersOrReset(null), + this.pushSpriteMask(r), + this.maskStack.push(r); + } + } + , + e.prototype.pop = function(t) { + var e = this.maskStack.pop(); + if (e && e._target === t) { + switch (e.type) { + case qa.SCISSOR: + this.renderer.scissor.pop(); + break; + case qa.STENCIL: + this.renderer.stencil.pop(e.maskObject); + break; + case qa.SPRITE: + this.popSpriteMask(); + } + e.reset(), + e.pooled && this.maskDataPool.push(e) + } + } + , + e.prototype.detect = function(t) { + var e = t.maskObject; + if (e.isSprite) + t.type = qa.SPRITE; + else if (t.type = qa.STENCIL, + this.enableScissor && e.isFastRect && e.isFastRect()) { + var r = e.worldTransform + , i = Math.atan2(r.b, r.a) + , o = Math.atan2(r.d, r.c); + i = Math.round(i * (180 / Math.PI) * 100), + o = ((o = Math.round(o * (180 / Math.PI) * 100) - i) % 18e3 + 18e3) % 18e3, + 0 === (i = (i % 9e3 + 9e3) % 9e3) && 9e3 === o && (t.type = qa.SCISSOR) + } + } + , + e.prototype.pushSpriteMask = function(t) { + var e = t.maskObject + , r = t._target + , i = this.alphaMaskPool[this.alphaMaskIndex]; + i || (i = this.alphaMaskPool[this.alphaMaskIndex] = [new Jg(e)]), + i[0].resolution = this.renderer.resolution, + i[0].maskSprite = e; + var o = r.filterArea; + r.filterArea = e.getBounds(!0), + this.renderer.filter.push(r, i), + r.filterArea = o, + this.alphaMaskIndex++ + } + , + e.prototype.popSpriteMask = function() { + this.renderer.filter.pop(), + this.alphaMaskIndex-- + } + , + e + }(pa) + , Qd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.maskStack = [], + r.glConst = 0, + r + } + return ba(e, t), + e.prototype.getStackLength = function() { + return this.maskStack.length + } + , + e.prototype.setMaskStack = function(t) { + var e = this.renderer.gl + , r = this.getStackLength(); + this.maskStack = t; + var i = this.getStackLength(); + i !== r && (0 === i ? e.disable(this.glConst) : (e.enable(this.glConst), + this._useCurrent())) + } + , + e.prototype._useCurrent = function() {} + , + e.prototype.destroy = function() { + t.prototype.destroy.call(this), + this.maskStack = null + } + , + e + }(pa) + , Rd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.glConst = WebGLRenderingContext.SCISSOR_TEST, + r + } + return ba(e, t), + e.prototype.getStackLength = function() { + var t = this.maskStack[this.maskStack.length - 1]; + return t ? t._scissorCounter : 0 + } + , + e.prototype.push = function(t) { + var e = t.maskObject; + e.renderable = !0; + var r = t._scissorRect + , i = e.getBounds(!0) + , o = this.renderer.gl; + e.renderable = !1, + r ? i.fit(r) : o.enable(o.SCISSOR_TEST), + t._scissorCounter++, + t._scissorRect = i, + this._useCurrent() + } + , + e.prototype.pop = function() { + var t = this.renderer.gl; + this.getStackLength() > 0 ? this._useCurrent() : t.disable(t.SCISSOR_TEST) + } + , + e.prototype._useCurrent = function() { + var t = this.maskStack[this.maskStack.length - 1]._scissorRect + , e = this.renderer.renderTexture.current + , r = this.renderer.projection + , i = r.transform + , o = r.sourceFrame + , n = r.destinationFrame + , s = e ? e.resolution : this.renderer.resolution + , a = n.width / o.width + , u = n.height / o.height + , h = ((t.x - o.x) * a + n.x) * s + , $ = ((t.y - o.y) * u + n.y) * s + , p = t.width * a * s + , l = t.height * u * s; + i && (h += i.tx * s, + $ += i.ty * s), + e || ($ = this.renderer.height - l - $), + this.renderer.gl.scissor(h, $, p, l) + } + , + e + }(Qd) + , Sd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.glConst = WebGLRenderingContext.STENCIL_TEST, + r + } + return ba(e, t), + e.prototype.getStackLength = function() { + var t = this.maskStack[this.maskStack.length - 1]; + return t ? t._stencilCounter : 0 + } + , + e.prototype.push = function(t) { + var e = t.maskObject + , r = this.renderer.gl + , i = t._stencilCounter; + 0 === i && (this.renderer.framebuffer.forceStencil(), + r.enable(r.STENCIL_TEST)), + t._stencilCounter++, + r.colorMask(!1, !1, !1, !1), + r.stencilFunc(r.EQUAL, i, this._getBitwiseMask()), + r.stencilOp(r.KEEP, r.KEEP, r.INCR), + e.renderable = !0, + e.render(this.renderer), + this.renderer.batch.flush(), + this.renderer.framebuffer.blit(), + e.renderable = !1, + this._useCurrent() + } + , + e.prototype.pop = function(t) { + var e = this.renderer.gl; + 0 === this.getStackLength() ? (e.disable(e.STENCIL_TEST), + e.clear(e.STENCIL_BUFFER_BIT), + e.clearStencil(0)) : (e.colorMask(!1, !1, !1, !1), + e.stencilOp(e.KEEP, e.KEEP, e.DECR), + t.renderable = !0, + t.render(this.renderer), + this.renderer.batch.flush(), + t.renderable = !1, + this._useCurrent()) + } + , + e.prototype._useCurrent = function() { + var t = this.renderer.gl; + t.colorMask(!0, !0, !0, !0), + t.stencilFunc(t.EQUAL, this.getStackLength(), this._getBitwiseMask()), + t.stencilOp(t.KEEP, t.KEEP, t.KEEP) + } + , + e.prototype._getBitwiseMask = function() { + return (1 << this.getStackLength()) - 1 + } + , + e + }(Qd) + , Td = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.destinationFrame = null, + r.sourceFrame = null, + r.defaultFrame = null, + r.projectionMatrix = new la, + r.transform = null, + r + } + return ba(e, t), + e.prototype.update = function(t, e, r, i) { + this.destinationFrame = t || this.destinationFrame || this.defaultFrame, + this.sourceFrame = e || this.sourceFrame || t, + this.calculateProjection(this.destinationFrame, this.sourceFrame, r, i), + this.transform && this.projectionMatrix.append(this.transform); + var o = this.renderer; + o.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix, + o.globalUniforms.update(), + o.shader.shader && o.shader.syncUniformGroup(o.shader.shader.uniforms.globals) + } + , + e.prototype.calculateProjection = function(t, e, r, i) { + var o = this.projectionMatrix + , n = i ? -1 : 1; + o.identity(), + o.a = 1 / e.width * 2, + o.d = n * (1 / e.height * 2), + o.tx = -1 - e.x * o.a, + o.ty = -n - e.y * o.d + } + , + e.prototype.setTransform = function(t) {} + , + e + }(pa) + , Qa = new da + , fb = new da + , Ud = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.clearColor = e._backgroundColorRgba, + r.defaultMaskStack = [], + r.current = null, + r.sourceFrame = new da, + r.destinationFrame = new da, + r.viewportFrame = new da, + r + } + return ba(e, t), + e.prototype.bind = function(t, e, r) { + void 0 === t && (t = null); + var i, o, n, s = this.renderer; + this.current = t, + t ? (n = (i = t.baseTexture).resolution, + e || (Qa.width = t.frame.width, + Qa.height = t.frame.height, + e = Qa), + r || (fb.x = t.frame.x, + fb.y = t.frame.y, + fb.width = e.width, + fb.height = e.height, + r = fb), + o = i.framebuffer) : (n = s.resolution, + e || (Qa.width = s.screen.width, + Qa.height = s.screen.height, + e = Qa), + r || ((r = Qa).width = e.width, + r.height = e.height)); + var a = this.viewportFrame; + a.x = r.x * n, + a.y = r.y * n, + a.width = r.width * n, + a.height = r.height * n, + t || (a.y = s.view.height - (a.y + a.height)), + this.renderer.framebuffer.bind(o, a), + this.renderer.projection.update(r, e, n, !o), + t ? this.renderer.mask.setMaskStack(i.maskStack) : this.renderer.mask.setMaskStack(this.defaultMaskStack), + this.sourceFrame.copyFrom(e), + this.destinationFrame.copyFrom(r) + } + , + e.prototype.clear = function(t, e) { + t = this.current ? t || this.current.baseTexture.clearColor : t || this.clearColor; + var r = this.destinationFrame + , i = this.current ? this.current.baseTexture : this.renderer.screen + , o = r.width !== i.width || r.height !== i.height; + if (o) { + var n = this.viewportFrame + , s = n.x + , a = n.y + , u = n.width + , h = n.height; + this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST), + this.renderer.gl.scissor(s, a, u, h) + } + this.renderer.framebuffer.clear(t[0], t[1], t[2], t[3], e), + o && this.renderer.scissor.pop() + } + , + e.prototype.resize = function() { + this.bind(null) + } + , + e.prototype.reset = function() { + this.bind(null) + } + , + e + }(pa) + , h = function() { + return function() {} + }() + , Kg = function() { + function t(t, e) { + this.program = t, + this.uniformData = e, + this.uniformGroups = {} + } + return t.prototype.destroy = function() { + this.uniformData = null, + this.uniformGroups = null, + this.program = null + } + , + t + }() + , Lg = 0 + , Vd = { + textureCount: 0 + } + , Wd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.destroyed = !1, + r.systemCheck(), + r.gl = null, + r.shader = null, + r.program = null, + r.cache = {}, + r.id = Lg++, + r + } + return ba(e, t), + e.prototype.systemCheck = function() { + if (!zg()) + throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.") + } + , + e.prototype.contextChange = function(t) { + this.gl = t, + this.reset() + } + , + e.prototype.bind = function(t, e) { + t.uniforms.globals = this.renderer.globalUniforms; + var r = t.program + , i = r.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(t); + return this.shader = t, + this.program !== r && (this.program = r, + this.gl.useProgram(i.program)), + e || (Vd.textureCount = 0, + this.syncUniformGroup(t.uniformGroup, Vd)), + i + } + , + e.prototype.setUniforms = function(t) { + var e = this.shader.program + , r = e.glPrograms[this.renderer.CONTEXT_UID]; + e.syncUniforms(r.uniformData, t, this.renderer) + } + , + e.prototype.syncUniformGroup = function(t, e) { + var r = this.getglProgram(); + t.static && t.dirtyId === r.uniformGroups[t.id] || (r.uniformGroups[t.id] = t.dirtyId, + this.syncUniforms(t, r, e)) + } + , + e.prototype.syncUniforms = function(t, e, r) { + (t.syncUniforms[this.shader.program.id] || this.createSyncGroups(t))(e.uniformData, t.uniforms, this.renderer, r) + } + , + e.prototype.createSyncGroups = function(t) { + var e = this.getSignature(t, this.shader.program.uniformData); + return this.cache[e] || (this.cache[e] = vg(t, this.shader.program.uniformData)), + t.syncUniforms[this.shader.program.id] = this.cache[e], + t.syncUniforms[this.shader.program.id] + } + , + e.prototype.getSignature = function(t, e) { + var r = t.uniforms + , i = []; + for (var o in r) + i.push(o), + e[o] && i.push(e[o].type); + return i.join("-") + } + , + e.prototype.getglProgram = function() { + return this.shader ? this.shader.program.glPrograms[this.renderer.CONTEXT_UID] : null + } + , + e.prototype.generateShader = function(t) { + var e = this.gl + , r = t.program + , i = {}; + for (var o in r.attributeData) + i[o] = r.attributeData[o].location; + var n = Gd(e, r.vertexSrc, r.fragmentSrc, i) + , s = {}; + for (var o in r.uniformData) { + var a = r.uniformData[o]; + s[o] = { + location: e.getUniformLocation(n, o), + value: Hd(a.type, a.size) + } + } + var u = new Kg(n,s); + return r.glPrograms[this.renderer.CONTEXT_UID] = u, + u + } + , + e.prototype.reset = function() { + this.program = null, + this.shader = null + } + , + e.prototype.destroy = function() { + this.destroyed = !0 + } + , + e + }(pa); + function Mg(t, e) { + return void 0 === e && (e = []), + e[K.NORMAL] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.ADD] = [t.ONE, t.ONE], + e[K.MULTIPLY] = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SCREEN] = [t.ONE, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.OVERLAY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.DARKEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.LIGHTEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.COLOR_DODGE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.COLOR_BURN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.HARD_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SOFT_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.DIFFERENCE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.EXCLUSION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.HUE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SATURATION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.COLOR] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.LUMINOSITY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.NONE] = [0, 0], + e[K.NORMAL_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.ADD_NPM] = [t.SRC_ALPHA, t.ONE, t.ONE, t.ONE], + e[K.SCREEN_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], + e[K.SRC_IN] = [t.DST_ALPHA, t.ZERO], + e[K.SRC_OUT] = [t.ONE_MINUS_DST_ALPHA, t.ZERO], + e[K.SRC_ATOP] = [t.DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], + e[K.DST_OVER] = [t.ONE_MINUS_DST_ALPHA, t.ONE], + e[K.DST_IN] = [t.ZERO, t.SRC_ALPHA], + e[K.DST_OUT] = [t.ZERO, t.ONE_MINUS_SRC_ALPHA], + e[K.DST_ATOP] = [t.ONE_MINUS_DST_ALPHA, t.SRC_ALPHA], + e[K.XOR] = [t.ONE_MINUS_DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], + e[K.SUBTRACT] = [t.ONE, t.ONE, t.ONE, t.ONE, t.FUNC_REVERSE_SUBTRACT, t.FUNC_ADD], + e + } + var Xd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.gl = null, + r.stateId = 0, + r.polygonOffset = 0, + r.blendMode = K.NONE, + r._blendEq = !1, + r.map = [], + r.checks = [], + r.defaultState = new Fb, + r.defaultState.blend = !0, + r + } + return ba(e, t), + e.prototype.contextChange = function(t) { + this.gl = t, + this.blendModes = Mg(t), + this.set(this.defaultState), + this.reset() + } + , + e.prototype.set = function(t) { + if (t = t || this.defaultState, + this.stateId !== t.data) { + for (var e = this.stateId ^ t.data, r = 0; e; ) + 1 & e && this.map[r].call(this, !!(t.data & 1 << r)), + e >>= 1, + r++; + this.stateId = t.data + } + for (r = 0; r < this.checks.length; r++) + this.checks[r](this, t) + } + , + e.prototype.forceState = function(t) { + t = t || this.defaultState; + for (var e = 0; e < this.map.length; e++) + this.map[e].call(this, !!(t.data & 1 << e)); + for (e = 0; e < this.checks.length; e++) + this.checks[e](this, t); + this.stateId = t.data + } + , + e.prototype.setBlend = function(t) { + this.updateCheck(e.checkBlendMode, t), + this.gl[t ? "enable" : "disable"](this.gl.BLEND) + } + , + e.prototype.setOffset = function(t) { + this.updateCheck(e.checkPolygonOffset, t), + this.gl[t ? "enable" : "disable"](this.gl.POLYGON_OFFSET_FILL) + } + , + e.prototype.setDepthTest = function(t) { + this.gl[t ? "enable" : "disable"](this.gl.DEPTH_TEST) + } + , + e.prototype.setDepthMask = function(t) { + this.gl.depthMask(t) + } + , + e.prototype.setCullFace = function(t) { + this.gl[t ? "enable" : "disable"](this.gl.CULL_FACE) + } + , + e.prototype.setFrontFace = function(t) { + this.gl.frontFace(this.gl[t ? "CW" : "CCW"]) + } + , + e.prototype.setBlendMode = function(t) { + if (t !== this.blendMode) { + this.blendMode = t; + var e = this.blendModes[t] + , r = this.gl; + 2 === e.length ? r.blendFunc(e[0], e[1]) : r.blendFuncSeparate(e[0], e[1], e[2], e[3]), + 6 === e.length ? (this._blendEq = !0, + r.blendEquationSeparate(e[4], e[5])) : this._blendEq && (this._blendEq = !1, + r.blendEquationSeparate(r.FUNC_ADD, r.FUNC_ADD)) + } + } + , + e.prototype.setPolygonOffset = function(t, e) { + this.gl.polygonOffset(t, e) + } + , + e.prototype.reset = function() { + this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1), + this.forceState(this.defaultState), + this._blendEq = !0, + this.blendMode = -1, + this.setBlendMode(0) + } + , + e.prototype.updateCheck = function(t, e) { + var r = this.checks.indexOf(t); + e && -1 === r ? this.checks.push(t) : e || -1 === r || this.checks.splice(r, 1) + } + , + e.checkBlendMode = function(t, e) { + t.setBlendMode(e.blendMode) + } + , + e.checkPolygonOffset = function(t, e) { + t.setPolygonOffset(1, e.polygonOffset) + } + , + e + }(pa) + , Yd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.count = 0, + r.checkCount = 0, + r.maxIdle = aa.GC_MAX_IDLE, + r.checkCountMax = aa.GC_MAX_CHECK_COUNT, + r.mode = aa.GC_MODE, + r + } + return ba(e, t), + e.prototype.postrender = function() { + this.renderer.renderingToScreen && (this.count++, + this.mode !== Tc.MANUAL && (this.checkCount++, + this.checkCount > this.checkCountMax && (this.checkCount = 0, + this.run()))) + } + , + e.prototype.run = function() { + for (var t = this.renderer.texture, e = t.managedTextures, r = !1, i = 0; i < e.length; i++) { + var o = e[i]; + !o.framebuffer && this.count - o.touched > this.maxIdle && (t.destroyTexture(o, !0), + e[i] = null, + r = !0) + } + if (r) { + var n = 0; + for (i = 0; i < e.length; i++) + null !== e[i] && (e[n++] = e[i]); + e.length = n + } + } + , + e.prototype.unload = function(t) { + var e = this.renderer.texture + , r = t._texture; + r && !r.framebuffer && e.destroyTexture(r); + for (var i = t.children.length - 1; i >= 0; i--) + this.unload(t.children[i]) + } + , + e + }(pa) + , vc = function() { + return function(t) { + this.texture = t, + this.width = -1, + this.height = -1, + this.dirtyId = -1, + this.dirtyStyleId = -1, + this.mipmap = !1, + this.wrapMode = 33071, + this.type = 6408, + this.internalFormat = 5121 + } + }() + , Zd = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.boundTextures = [], + r.currentLocation = -1, + r.managedTextures = [], + r._unknownBoundTextures = !1, + r.unknownTexture = new ia, + r + } + return ba(e, t), + e.prototype.contextChange = function() { + var t = this.gl = this.renderer.gl; + this.CONTEXT_UID = this.renderer.CONTEXT_UID, + this.webGLVersion = this.renderer.context.webGLVersion; + var e = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS); + this.boundTextures.length = e; + for (var r = 0; r < e; r++) + this.boundTextures[r] = null; + this.emptyTextures = {}; + var i = new vc(t.createTexture()); + t.bindTexture(t.TEXTURE_2D, i.texture), + t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, new Uint8Array(4)), + this.emptyTextures[t.TEXTURE_2D] = i, + this.emptyTextures[t.TEXTURE_CUBE_MAP] = new vc(t.createTexture()), + t.bindTexture(t.TEXTURE_CUBE_MAP, this.emptyTextures[t.TEXTURE_CUBE_MAP].texture); + for (r = 0; r < 6; r++) + t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + r, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, null); + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MAG_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MIN_FILTER, t.LINEAR); + for (r = 0; r < this.boundTextures.length; r++) + this.bind(null, r) + } + , + e.prototype.bind = function(t, e) { + void 0 === e && (e = 0); + var r = this.gl; + if (t) { + if ((t = t.castToBaseTexture()).parentTextureArray) + return; + if (t.valid) { + t.touched = this.renderer.textureGC.count; + var i = t._glTextures[this.CONTEXT_UID] || this.initTexture(t); + this.boundTextures[e] !== t && (this.currentLocation !== e && (this.currentLocation = e, + r.activeTexture(r.TEXTURE0 + e)), + r.bindTexture(t.target, i.texture)), + i.dirtyId !== t.dirtyId && (this.currentLocation !== e && (this.currentLocation = e, + r.activeTexture(r.TEXTURE0 + e)), + this.updateTexture(t)), + this.boundTextures[e] = t + } + } else + this.currentLocation !== e && (this.currentLocation = e, + r.activeTexture(r.TEXTURE0 + e)), + r.bindTexture(r.TEXTURE_2D, this.emptyTextures[r.TEXTURE_2D].texture), + this.boundTextures[e] = null + } + , + e.prototype.reset = function() { + this._unknownBoundTextures = !0, + this.currentLocation = -1; + for (var t = 0; t < this.boundTextures.length; t++) + this.boundTextures[t] = this.unknownTexture + } + , + e.prototype.unbind = function(t) { + var e = this.gl + , r = this.boundTextures; + if (this._unknownBoundTextures) { + this._unknownBoundTextures = !1; + for (var i = 0; i < r.length; i++) + r[i] === this.unknownTexture && this.bind(null, i) + } + for (i = 0; i < r.length; i++) + r[i] === t && (this.currentLocation !== i && (e.activeTexture(e.TEXTURE0 + i), + this.currentLocation = i), + e.bindTexture(t.target, this.emptyTextures[t.target].texture), + r[i] = null) + } + , + e.prototype.initTexture = function(t) { + var e = new vc(this.gl.createTexture()); + return e.dirtyId = -1, + t._glTextures[this.CONTEXT_UID] = e, + this.managedTextures.push(t), + t.on("dispose", this.destroyTexture, this), + e + } + , + e.prototype.initTextureType = function(t, e) { + if (e.internalFormat = t.format, + e.type = t.type, + 2 === this.webGLVersion) { + var r = this.renderer.gl; + t.type === r.FLOAT && t.format === r.RGBA && (e.internalFormat = r.RGBA32F), + t.type === ua.HALF_FLOAT && (e.type = r.HALF_FLOAT), + e.type === r.HALF_FLOAT && t.format === r.RGBA && (e.internalFormat = r.RGBA16F) + } + } + , + e.prototype.updateTexture = function(t) { + var e = t._glTextures[this.CONTEXT_UID]; + if (e) { + var r = this.renderer; + if (this.initTextureType(t, e), + t.resource && t.resource.upload(r, t, e)) + ; + else { + var i = t.realWidth + , o = t.realHeight + , n = r.gl; + (e.width !== i || e.height !== o || e.dirtyId < 0) && (e.width = i, + e.height = o, + n.texImage2D(t.target, 0, e.internalFormat, i, o, 0, t.format, e.type, null)) + } + t.dirtyStyleId !== e.dirtyStyleId && this.updateTextureStyle(t), + e.dirtyId = t.dirtyId + } + } + , + e.prototype.destroyTexture = function(t, e) { + var r = this.gl; + if ((t = t.castToBaseTexture())._glTextures[this.CONTEXT_UID] && (this.unbind(t), + r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture), + t.off("dispose", this.destroyTexture, this), + delete t._glTextures[this.CONTEXT_UID], + !e)) { + var i = this.managedTextures.indexOf(t); + -1 !== i && tb(this.managedTextures, i, 1) + } + } + , + e.prototype.updateTextureStyle = function(t) { + var e = t._glTextures[this.CONTEXT_UID]; + e && (t.mipmap !== $a.POW2 && 2 === this.webGLVersion || t.isPowerOfTwo ? e.mipmap = t.mipmap >= 1 : e.mipmap = !1, + 2 === this.webGLVersion || t.isPowerOfTwo ? e.wrapMode = t.wrapMode : e.wrapMode = Rb.CLAMP, + t.resource && t.resource.style(this.renderer, t, e) || this.setStyle(t, e), + e.dirtyStyleId = t.dirtyStyleId) + } + , + e.prototype.setStyle = function(t, e) { + var r = this.gl; + if (e.mipmap && t.mipmap !== $a.ON_MANUAL && r.generateMipmap(t.target), + r.texParameteri(t.target, r.TEXTURE_WRAP_S, e.wrapMode), + r.texParameteri(t.target, r.TEXTURE_WRAP_T, e.wrapMode), + e.mipmap) { + r.texParameteri(t.target, r.TEXTURE_MIN_FILTER, t.scaleMode === Ca.LINEAR ? r.LINEAR_MIPMAP_LINEAR : r.NEAREST_MIPMAP_NEAREST); + var i = this.renderer.context.extensions.anisotropicFiltering; + if (i && t.anisotropicLevel > 0 && t.scaleMode === Ca.LINEAR) { + var o = Math.min(t.anisotropicLevel, r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)); + r.texParameterf(t.target, i.TEXTURE_MAX_ANISOTROPY_EXT, o) + } + } else + r.texParameteri(t.target, r.TEXTURE_MIN_FILTER, t.scaleMode === Ca.LINEAR ? r.LINEAR : r.NEAREST); + r.texParameteri(t.target, r.TEXTURE_MAG_FILTER, t.scaleMode === Ca.LINEAR ? r.LINEAR : r.NEAREST) + } + , + e + }(pa) + , $d = { + __proto__: null, + FilterSystem: yd, + BatchSystem: Ad, + ContextSystem: Cd, + FramebufferSystem: Dd, + GeometrySystem: Ed, + MaskSystem: Pd, + ScissorSystem: Rd, + StencilSystem: Sd, + ProjectionSystem: Td, + RenderTextureSystem: Ud, + ShaderSystem: Wd, + StateSystem: Xd, + TextureGCSystem: Yd, + TextureSystem: Zd + } + , wc = new la + , Ng = function(t) { + function e(e, r) { + void 0 === e && (e = jb.UNKNOWN); + var i = t.call(this) || this; + return r = Object.assign({}, aa.RENDER_OPTIONS, r), + i.options = r, + i.type = e, + i.screen = new da(0,0,r.width,r.height), + i.view = r.view || document.createElement("canvas"), + i.resolution = r.resolution || aa.RESOLUTION, + i.useContextAlpha = r.useContextAlpha, + i.autoDensity = !!r.autoDensity, + i.preserveDrawingBuffer = r.preserveDrawingBuffer, + i.clearBeforeRender = r.clearBeforeRender, + i._backgroundColor = 0, + i._backgroundColorRgba = [0, 0, 0, 1], + i._backgroundColorString = "#000000", + i.backgroundColor = r.backgroundColor || i._backgroundColor, + i.backgroundAlpha = r.backgroundAlpha, + void 0 !== r.transparent && (Va("6.0.0", "Option transparent is deprecated, please use backgroundAlpha instead."), + i.useContextAlpha = r.transparent, + i.backgroundAlpha = r.transparent ? 0 : 1), + i._lastObjectRendered = null, + i.plugins = {}, + i + } + return ba(e, t), + e.prototype.initPlugins = function(t) { + for (var e in t) + this.plugins[e] = new t[e](this) + } + , + Object.defineProperty(e.prototype, "width", { + get: function() { + return this.view.width + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "height", { + get: function() { + return this.view.height + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.resize = function(t, e) { + this.screen.width = t, + this.screen.height = e, + this.view.width = t * this.resolution, + this.view.height = e * this.resolution, + this.autoDensity && (this.view.style.width = t + "px", + this.view.style.height = e + "px"), + this.emit("resize", t, e) + } + , + e.prototype.generateTexture = function(t, e, r, i) { + 0 === (i = i || t.getLocalBounds(null, !0)).width && (i.width = 1), + 0 === i.height && (i.height = 1); + var o = fc.create({ + width: 0 | i.width, + height: 0 | i.height, + scaleMode: e, + resolution: r + }); + return wc.tx = -i.x, + wc.ty = -i.y, + this.render(t, { + renderTexture: o, + clear: !1, + transform: wc, + skipUpdateTransform: !!t.parent + }), + o + } + , + e.prototype.destroy = function(t) { + for (var e in this.plugins) + this.plugins[e].destroy(), + this.plugins[e] = null; + t && this.view.parentNode && this.view.parentNode.removeChild(this.view); + this.plugins = null, + this.type = jb.UNKNOWN, + this.view = null, + this.screen = null, + this._tempDisplayObjectParent = null, + this.options = null, + this._backgroundColorRgba = null, + this._backgroundColorString = null, + this._lastObjectRendered = null + } + , + Object.defineProperty(e.prototype, "backgroundColor", { + get: function() { + return this._backgroundColor + }, + set: function(t) { + this._backgroundColor = t, + this._backgroundColorString = Mf(t), + Xb(t, this._backgroundColorRgba) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "backgroundAlpha", { + get: function() { + return this._backgroundColorRgba[3] + }, + set: function(t) { + this._backgroundColorRgba[3] = t + }, + enumerable: !1, + configurable: !0 + }), + e + }(rb.d) + , i = function(t) { + function e(r) { + var i = t.call(this, jb.WEBGL, r) || this; + return r = i.options, + i.gl = null, + i.CONTEXT_UID = 0, + i.runners = { + destroy: new ka("destroy"), + contextChange: new ka("contextChange"), + reset: new ka("reset"), + update: new ka("update"), + postrender: new ka("postrender"), + prerender: new ka("prerender"), + resize: new ka("resize") + }, + i.globalUniforms = new Pa({ + projectionMatrix: new la + },!0), + i.addSystem(Pd, "mask").addSystem(Cd, "context").addSystem(Xd, "state").addSystem(Wd, "shader").addSystem(Zd, "texture").addSystem(Ed, "geometry").addSystem(Dd, "framebuffer").addSystem(Rd, "scissor").addSystem(Sd, "stencil").addSystem(Td, "projection").addSystem(Yd, "textureGC").addSystem(yd, "filter").addSystem(Ud, "renderTexture").addSystem(Ad, "batch"), + i.initPlugins(e.__plugins), + r.context ? i.context.initFromContext(r.context) : i.context.initFromOptions({ + alpha: !!i.useContextAlpha, + antialias: r.antialias, + premultipliedAlpha: i.useContextAlpha && "notMultiplied" !== i.useContextAlpha, + stencil: !0, + preserveDrawingBuffer: r.preserveDrawingBuffer, + powerPreference: i.options.powerPreference + }), + i.renderingToScreen = !0, + Kf(2 === i.context.webGLVersion ? "WebGL 2" : "WebGL 1"), + i.resize(i.options.width, i.options.height), + i + } + return ba(e, t), + e.create = function(t) { + if (Lf()) + return new e(t); + throw new Error("WebGL unsupported in this browser, use \"pixi.js-legacy\" for fallback canvas2d support.") + } + , + e.prototype.addSystem = function(t, e) { + e || (e = t.name); + var r = new t(this); + if (this[e]) + throw new Error("Whoops! The name \"" + e + "\" is already in use"); + for (var i in this[e] = r, + this.runners) + this.runners[i].add(r); + return this + } + , + e.prototype.render = function(t, e) { + var r, i, o, n; + if (e && (e instanceof fc ? (Va("6.0.0", "Renderer#render arguments changed, use options instead."), + r = e, + i = arguments[2], + o = arguments[3], + n = arguments[4]) : (r = e.renderTexture, + i = e.clear, + o = e.transform, + n = e.skipUpdateTransform)), + this.renderingToScreen = !r, + this.runners.prerender.emit(), + this.emit("prerender"), + this.projection.transform = o, + !this.context.isLost) { + if (r || (this._lastObjectRendered = t), + !n) { + var s = t.enableTempParent(); + t.updateTransform(), + t.disableTempParent(s) + } + this.renderTexture.bind(r), + this.batch.currentRenderer.start(), + (void 0 !== i ? i : this.clearBeforeRender) && this.renderTexture.clear(), + t.render(this), + this.batch.currentRenderer.flush(), + r && r.baseTexture.update(), + this.runners.postrender.emit(), + this.projection.transform = null, + this.emit("postrender") + } + } + , + e.prototype.resize = function(e, r) { + t.prototype.resize.call(this, e, r), + this.runners.resize.emit(e, r) + } + , + e.prototype.reset = function() { + return this.runners.reset.emit(), + this + } + , + e.prototype.clear = function() { + this.renderTexture.bind(), + this.renderTexture.clear() + } + , + e.prototype.destroy = function(e) { + for (var r in this.runners.destroy.emit(), + this.runners) + this.runners[r].destroy(); + t.prototype.destroy.call(this, e), + this.gl = null + } + , + Object.defineProperty(e.prototype, "extract", { + get: function() { + return Va("6.0.0", "Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."), + this.plugins.extract + }, + enumerable: !1, + configurable: !0 + }), + e.registerPlugin = function(t, r) { + e.__plugins = e.__plugins || {}, + e.__plugins[t] = r + } + , + e + }(Ng); + var xc = function() { + return function() { + this.texArray = null, + this.blend = 0, + this.type = Ba.TRIANGLES, + this.start = 0, + this.size = 0, + this.data = null + } + }() + , yc = function() { + function t() { + this.elements = [], + this.ids = [], + this.count = 0 + } + return t.prototype.clear = function() { + for (var t = 0; t < this.count; t++) + this.elements[t] = null; + this.count = 0 + } + , + t + }() + , Og = function() { + function t(t) { + "number" == typeof t ? this.rawBinaryData = new ArrayBuffer(t) : t instanceof Uint8Array ? this.rawBinaryData = t.buffer : this.rawBinaryData = t, + this.uint32View = new Uint32Array(this.rawBinaryData), + this.float32View = new Float32Array(this.rawBinaryData) + } + return Object.defineProperty(t.prototype, "int8View", { + get: function() { + return this._int8View || (this._int8View = new Int8Array(this.rawBinaryData)), + this._int8View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "uint8View", { + get: function() { + return this._uint8View || (this._uint8View = new Uint8Array(this.rawBinaryData)), + this._uint8View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "int16View", { + get: function() { + return this._int16View || (this._int16View = new Int16Array(this.rawBinaryData)), + this._int16View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "uint16View", { + get: function() { + return this._uint16View || (this._uint16View = new Uint16Array(this.rawBinaryData)), + this._uint16View + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t.prototype, "int32View", { + get: function() { + return this._int32View || (this._int32View = new Int32Array(this.rawBinaryData)), + this._int32View + }, + enumerable: !1, + configurable: !0 + }), + t.prototype.view = function(t) { + return this[t + "View"] + } + , + t.prototype.destroy = function() { + this.rawBinaryData = null, + this._int8View = null, + this._uint8View = null, + this._int16View = null, + this._uint16View = null, + this._int32View = null, + this.uint32View = null, + this.float32View = null + } + , + t.sizeOf = function(t) { + switch (t) { + case "int8": + case "uint8": + return 1; + case "int16": + case "uint16": + return 2; + case "int32": + case "uint32": + case "float32": + return 4; + default: + throw new Error(t + " isn't a valid view type"); + } + } + , + t + }() + , Pg = function(t) { + function e(e) { + var r = t.call(this, e) || this; + return r.shaderGenerator = null, + r.geometryClass = null, + r.vertexSize = null, + r.state = Fb.for2d(), + r.size = 4 * aa.SPRITE_BATCH_SIZE, + r._vertexCount = 0, + r._indexCount = 0, + r._bufferedElements = [], + r._bufferedTextures = [], + r._bufferSize = 0, + r._shader = null, + r._packedGeometries = [], + r._packedGeometryPoolSize = 2, + r._flushId = 0, + r._aBuffers = {}, + r._iBuffers = {}, + r.MAX_TEXTURES = 1, + r.renderer.on("prerender", r.onPrerender, r), + e.runners.contextChange.add(r), + r._dcIndex = 0, + r._aIndex = 0, + r._iIndex = 0, + r._attributeBuffer = null, + r._indexBuffer = null, + r._tempBoundTextures = [], + r + } + return ba(e, t), + e.prototype.contextChange = function() { + var t = this.renderer.gl; + aa.PREFER_ENV === Aa.WEBGL_LEGACY ? this.MAX_TEXTURES = 1 : (this.MAX_TEXTURES = Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), aa.SPRITE_MAX_TEXTURES), + this.MAX_TEXTURES = yg(this.MAX_TEXTURES, t)), + this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES); + for (var e = 0; e < this._packedGeometryPoolSize; e++) + this._packedGeometries[e] = new this.geometryClass; + this.initFlushBuffers() + } + , + e.prototype.initFlushBuffers = function() { + for (var t = e._drawCallPool, r = e._textureArrayPool, i = this.size / 4, o = Math.floor(i / this.MAX_TEXTURES) + 1; t.length < i; ) + t.push(new xc); + for (; r.length < o; ) + r.push(new yc); + for (var n = 0; n < this.MAX_TEXTURES; n++) + this._tempBoundTextures[n] = null + } + , + e.prototype.onPrerender = function() { + this._flushId = 0 + } + , + e.prototype.render = function(t) { + t._texture.valid && (this._vertexCount + t.vertexData.length / 2 > this.size && this.flush(), + this._vertexCount += t.vertexData.length / 2, + this._indexCount += t.indices.length, + this._bufferedTextures[this._bufferSize] = t._texture.baseTexture, + this._bufferedElements[this._bufferSize++] = t) + } + , + e.prototype.buildTexturesAndDrawCalls = function() { + var t = this._bufferedTextures + , r = this.MAX_TEXTURES + , i = e._textureArrayPool + , o = this.renderer.batch + , n = this._tempBoundTextures + , s = this.renderer.textureGC.count + , a = ++ia._globalBatch + , u = 0 + , h = i[0] + , $ = 0; + o.copyBoundTextures(n, r); + for (var p = 0; p < this._bufferSize; ++p) { + var l = t[p]; + t[p] = null, + l._batchEnabled !== a && (h.count >= r && (o.boundArray(h, n, a, r), + this.buildDrawCalls(h, $, p), + $ = p, + h = i[++u], + ++a), + l._batchEnabled = a, + l.touched = s, + h.elements[h.count++] = l) + } + h.count > 0 && (o.boundArray(h, n, a, r), + this.buildDrawCalls(h, $, this._bufferSize), + ++u, + ++a); + for (p = 0; p < n.length; p++) + n[p] = null; + ia._globalBatch = a + } + , + e.prototype.buildDrawCalls = function(t, r, i) { + var o = this._bufferedElements + , n = this._attributeBuffer + , s = this._indexBuffer + , a = this.vertexSize + , u = e._drawCallPool + , h = this._dcIndex + , $ = this._aIndex + , p = this._iIndex + , l = u[h]; + l.start = this._iIndex, + l.texArray = t; + for (var c = r; c < i; ++c) { + var d = o[c] + , f = d._texture.baseTexture + , m = Of[f.alphaMode ? 1 : 0][d.blendMode]; + o[c] = null, + r < c && l.blend !== m && (l.size = p - l.start, + r = c, + (l = u[++h]).texArray = t, + l.start = p), + this.packInterleavedGeometry(d, n, s, $, p), + $ += d.vertexData.length / 2 * a, + p += d.indices.length, + l.blend = m + } + r < i && (l.size = p - l.start, + ++h), + this._dcIndex = h, + this._aIndex = $, + this._iIndex = p + } + , + e.prototype.bindAndClearTexArray = function(t) { + for (var e = this.renderer.texture, r = 0; r < t.count; r++) + e.bind(t.elements[r], t.ids[r]), + t.elements[r] = null; + t.count = 0 + } + , + e.prototype.updateGeometry = function() { + var t = this._packedGeometries + , e = this._attributeBuffer + , r = this._indexBuffer; + aa.CAN_UPLOAD_SAME_BUFFER ? (t[this._flushId]._buffer.update(e.rawBinaryData), + t[this._flushId]._indexBuffer.update(r), + this.renderer.geometry.updateBuffers()) : (this._packedGeometryPoolSize <= this._flushId && (this._packedGeometryPoolSize++, + t[this._flushId] = new this.geometryClass), + t[this._flushId]._buffer.update(e.rawBinaryData), + t[this._flushId]._indexBuffer.update(r), + this.renderer.geometry.bind(t[this._flushId]), + this.renderer.geometry.updateBuffers(), + this._flushId++) + } + , + e.prototype.drawBatches = function() { + for (var t = this._dcIndex, r = this.renderer, i = r.gl, o = r.state, n = e._drawCallPool, s = null, a = 0; a < t; a++) { + var u = n[a] + , h = u.texArray + , $ = u.type + , p = u.size + , l = u.start + , c = u.blend; + s !== h && (s = h, + this.bindAndClearTexArray(h)), + this.state.blendMode = c, + o.set(this.state), + i.drawElements($, p, i.UNSIGNED_SHORT, 2 * l) + } + } + , + e.prototype.flush = function() { + 0 !== this._vertexCount && (this._attributeBuffer = this.getAttributeBuffer(this._vertexCount), + this._indexBuffer = this.getIndexBuffer(this._indexCount), + this._aIndex = 0, + this._iIndex = 0, + this._dcIndex = 0, + this.buildTexturesAndDrawCalls(), + this.updateGeometry(), + this.drawBatches(), + this._bufferSize = 0, + this._vertexCount = 0, + this._indexCount = 0) + } + , + e.prototype.start = function() { + this.renderer.state.set(this.state), + this.renderer.shader.bind(this._shader), + aa.CAN_UPLOAD_SAME_BUFFER && this.renderer.geometry.bind(this._packedGeometries[this._flushId]) + } + , + e.prototype.stop = function() { + this.flush() + } + , + e.prototype.destroy = function() { + for (var e = 0; e < this._packedGeometryPoolSize; e++) + this._packedGeometries[e] && this._packedGeometries[e].destroy(); + this.renderer.off("prerender", this.onPrerender, this), + this._aBuffers = null, + this._iBuffers = null, + this._packedGeometries = null, + this._attributeBuffer = null, + this._indexBuffer = null, + this._shader && (this._shader.destroy(), + this._shader = null), + t.prototype.destroy.call(this) + } + , + e.prototype.getAttributeBuffer = function(t) { + var e = sb(Math.ceil(t / 8)) + , r = hd(e) + , i = 8 * e; + this._aBuffers.length <= r && (this._iBuffers.length = r + 1); + var o = this._aBuffers[i]; + return o || (this._aBuffers[i] = o = new Og(i * this.vertexSize * 4)), + o + } + , + e.prototype.getIndexBuffer = function(t) { + var e = sb(Math.ceil(t / 12)) + , r = hd(e) + , i = 12 * e; + this._iBuffers.length <= r && (this._iBuffers.length = r + 1); + var o = this._iBuffers[r]; + return o || (this._iBuffers[r] = o = new Uint16Array(i)), + o + } + , + e.prototype.packInterleavedGeometry = function(t, e, r, i, o) { + for (var n = e.uint32View, s = e.float32View, a = i / this.vertexSize, u = t.uvs, h = t.indices, $ = t.vertexData, p = t._texture.baseTexture._batchLocation, l = Math.min(t.worldAlpha, 1), c = l < 1 && t._texture.baseTexture.alphaMode ? fd(t._tintRGB, l) : t._tintRGB + (255 * l << 24), d = 0; d < $.length; d += 2) + s[i++] = $[d], + s[i++] = $[d + 1], + s[i++] = u[d], + s[i++] = u[d + 1], + n[i++] = c, + s[i++] = p; + for (d = 0; d < h.length; d++) + r[o++] = a + h[d] + } + , + e._drawCallPool = [], + e._textureArrayPool = [], + e + }(zd) + , Qg = function() { + function t(t, e) { + if (this.vertexSrc = t, + this.fragTemplate = e, + this.programCache = {}, + this.defaultGroupCache = {}, + e.indexOf("%count%") < 0) + throw new Error("Fragment template must contain \"%count%\"."); + if (e.indexOf("%forloop%") < 0) + throw new Error("Fragment template must contain \"%forloop%\".") + } + return t.prototype.generateShader = function(t) { + if (!this.programCache[t]) { + for (var e = new Int32Array(t), r = 0; r < t; r++) + e[r] = r; + this.defaultGroupCache[t] = Pa.from({ + uSamplers: e + }, !0); + var i = this.fragTemplate; + i = (i = i.replace(/%count%/gi, "" + t)).replace(/%forloop%/gi, this.generateSampleSrc(t)), + this.programCache[t] = new nc(this.vertexSrc,i) + } + var o = { + tint: new Float32Array([1, 1, 1, 1]), + translationMatrix: new la, + default: this.defaultGroupCache[t] + }; + return new oc(this.programCache[t],o) + } + , + t.prototype.generateSampleSrc = function(t) { + var e = ""; + e += "\n", + e += "\n"; + for (var r = 0; r < t; r++) + r > 0 && (e += "\nelse "), + r < t - 1 && (e += "if(vTextureId < " + r + ".5)"), + e += "\n{", + e += "\n\tcolor = texture2D(uSamplers[" + r + "], vTextureCoord);", + e += "\n}"; + return e += "\n", + e += "\n" + } + , + t + }() + , _d = function(t) { + function e(e) { + void 0 === e && (e = !1); + var r = t.call(this) || this; + return r._buffer = new ta(null,e,!1), + r._indexBuffer = new ta(null,e,!0), + r.addAttribute("aVertexPosition", r._buffer, 2, !1, ua.FLOAT).addAttribute("aTextureCoord", r._buffer, 2, !1, ua.FLOAT).addAttribute("aColor", r._buffer, 4, !0, ua.UNSIGNED_BYTE).addAttribute("aTextureId", r._buffer, 1, !0, ua.FLOAT).addIndex(r._indexBuffer), + r + } + return ba(e, t), + e + }(gc) + , ae = "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n" + , be = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n" + , Rg = function() { + function t() {} + return t.create = function(t) { + var e = Object.assign({ + vertex: ae, + fragment: be, + geometryClass: _d, + vertexSize: 6 + }, t) + , r = e.vertex + , i = e.fragment + , o = e.vertexSize + , n = e.geometryClass; + return function(t) { + function e(e) { + var s = t.call(this, e) || this; + return s.shaderGenerator = new Qg(r,i), + s.geometryClass = n, + s.vertexSize = o, + s + } + return ba(e, t), + e + }(Pg) + } + , + Object.defineProperty(t, "defaultVertexSrc", { + get: function() { + return ae + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(t, "defaultFragmentTemplate", { + get: function() { + return be + }, + enumerable: !1, + configurable: !0 + }), + t + }() + , j = Rg.create() + , Sg = {} + , Tg = function(t) { + Object.defineProperty(Sg, t, { + get: function() { + return Va("6.0.0", "PIXI.systems." + t + " has moved to PIXI." + t), + rd[t] + } + }) + }; + for (var ce in rd) + Tg(ce); + var Ug = {} + , Vg = function(t) { + Object.defineProperty(Ug, t, { + get: function() { + return Va("6.0.0", "PIXI.resources." + t + " has moved to PIXI." + t), + $d[t] + } + }) + }; + for (var ce in $d) + Vg(ce); + aa.SORTABLE_CHILDREN = !1; + var Gb = function() { + function t() { + this.minX = 1 / 0, + this.minY = 1 / 0, + this.maxX = -1 / 0, + this.maxY = -1 / 0, + this.rect = null, + this.updateID = -1 + } + return t.prototype.isEmpty = function() { + return this.minX > this.maxX || this.minY > this.maxY + } + , + t.prototype.clear = function() { + this.minX = 1 / 0, + this.minY = 1 / 0, + this.maxX = -1 / 0, + this.maxY = -1 / 0 + } + , + t.prototype.getRectangle = function(t) { + return this.minX > this.maxX || this.minY > this.maxY ? da.EMPTY : ((t = t || new da(0,0,1,1)).x = this.minX, + t.y = this.minY, + t.width = this.maxX - this.minX, + t.height = this.maxY - this.minY, + t) + } + , + t.prototype.addPoint = function(t) { + this.minX = Math.min(this.minX, t.x), + this.maxX = Math.max(this.maxX, t.x), + this.minY = Math.min(this.minY, t.y), + this.maxY = Math.max(this.maxY, t.y) + } + , + t.prototype.addPointMatrix = function(t, e) { + var i = t.a + , r = t.b + , n = t.c + , s = t.d + , o = t.tx + , a = t.ty + , h = i * e.x + n * e.y + o + , l = r * e.x + s * e.y + a; + this.minX = Math.min(this.minX, h), + this.maxX = Math.max(this.maxX, h), + this.minY = Math.min(this.minY, l), + this.maxY = Math.max(this.maxY, l) + } + , + t.prototype.addQuad = function(t) { + var e = this.minX + , i = this.minY + , r = this.maxX + , n = this.maxY + , s = t[0] + , o = t[1]; + e = s < e ? s : e, + i = o < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + e = (s = t[2]) < e ? s : e, + i = (o = t[3]) < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + e = (s = t[4]) < e ? s : e, + i = (o = t[5]) < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + e = (s = t[6]) < e ? s : e, + i = (o = t[7]) < i ? o : i, + r = s > r ? s : r, + n = o > n ? o : n, + this.minX = e, + this.minY = i, + this.maxX = r, + this.maxY = n + } + , + t.prototype.addFrame = function(t, e, i, r, n) { + this.addFrameMatrix(t.worldTransform, e, i, r, n) + } + , + t.prototype.addFrameMatrix = function(t, e, i, r, n) { + var s = t.a + , o = t.b + , a = t.c + , h = t.d + , l = t.tx + , d = t.ty + , p = this.minX + , m = this.minY + , u = this.maxX + , c = this.maxY + , f = s * e + a * i + l + , y = o * e + h * i + d; + p = f < p ? f : p, + m = y < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + p = (f = s * r + a * i + l) < p ? f : p, + m = (y = o * r + h * i + d) < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + p = (f = s * e + a * n + l) < p ? f : p, + m = (y = o * e + h * n + d) < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + p = (f = s * r + a * n + l) < p ? f : p, + m = (y = o * r + h * n + d) < m ? y : m, + u = f > u ? f : u, + c = y > c ? y : c, + this.minX = p, + this.minY = m, + this.maxX = u, + this.maxY = c + } + , + t.prototype.addVertexData = function(t, e, i) { + for (var r = this.minX, n = this.minY, s = this.maxX, o = this.maxY, a = e; a < i; a += 2) { + var h = t[a] + , l = t[a + 1]; + r = h < r ? h : r, + n = l < n ? l : n, + s = h > s ? h : s, + o = l > o ? l : o + } + this.minX = r, + this.minY = n, + this.maxX = s, + this.maxY = o + } + , + t.prototype.addVertices = function(t, e, i, r) { + this.addVerticesMatrix(t.worldTransform, e, i, r) + } + , + t.prototype.addVerticesMatrix = function(t, e, i, r, n, s) { + void 0 === n && (n = 0), + void 0 === s && (s = n); + for (var o = t.a, a = t.b, h = t.c, l = t.d, d = t.tx, p = t.ty, m = this.minX, u = this.minY, c = this.maxX, f = this.maxY, y = i; y < r; y += 2) { + var x = e[y] + , b = e[y + 1] + , $ = o * x + h * b + d + , v = l * b + a * x + p; + m = Math.min(m, $ - n), + c = Math.max(c, $ + n), + u = Math.min(u, v - s), + f = Math.max(f, v + s) + } + this.minX = m, + this.minY = u, + this.maxX = c, + this.maxY = f + } + , + t.prototype.addBounds = function(t) { + var e = this.minX + , i = this.minY + , r = this.maxX + , n = this.maxY; + this.minX = t.minX < e ? t.minX : e, + this.minY = t.minY < i ? t.minY : i, + this.maxX = t.maxX > r ? t.maxX : r, + this.maxY = t.maxY > n ? t.maxY : n + } + , + t.prototype.addBoundsMask = function(t, e) { + var i = t.minX > e.minX ? t.minX : e.minX + , r = t.minY > e.minY ? t.minY : e.minY + , n = t.maxX < e.maxX ? t.maxX : e.maxX + , s = t.maxY < e.maxY ? t.maxY : e.maxY; + if (i <= n && r <= s) { + var o = this.minX + , a = this.minY + , h = this.maxX + , l = this.maxY; + this.minX = i < o ? i : o, + this.minY = r < a ? r : a, + this.maxX = n > h ? n : h, + this.maxY = s > l ? s : l + } + } + , + t.prototype.addBoundsMatrix = function(t, e) { + this.addFrameMatrix(e, t.minX, t.minY, t.maxX, t.maxY) + } + , + t.prototype.addBoundsArea = function(t, e) { + var i = t.minX > e.x ? t.minX : e.x + , r = t.minY > e.y ? t.minY : e.y + , n = t.maxX < e.x + e.width ? t.maxX : e.x + e.width + , s = t.maxY < e.y + e.height ? t.maxY : e.y + e.height; + if (i <= n && r <= s) { + var o = this.minX + , a = this.minY + , h = this.maxX + , l = this.maxY; + this.minX = i < o ? i : o, + this.minY = r < a ? r : a, + this.maxX = n > h ? n : h, + this.maxY = s > l ? s : l + } + } + , + t.prototype.pad = function(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = t), + this.isEmpty() || (this.minX -= t, + this.maxX += t, + this.minY -= e, + this.maxY += e) + } + , + t.prototype.addFramePad = function(t, e, i, r, n, s) { + t -= n, + e -= s, + i += n, + r += s, + this.minX = this.minX < t ? this.minX : t, + this.maxX = this.maxX > i ? this.maxX : i, + this.minY = this.minY < e ? this.minY : e, + this.maxY = this.maxY > r ? this.maxY : r + } + , + t + }() + , Wg = function(t, e) { + return (Wg = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, e) { + t.__proto__ = e + } + || function(t, e) { + for (var i in e) + e.hasOwnProperty(i) && (t[i] = e[i]) + } + )(t, e) + }; + function zc(t, e) { + function i() { + this.constructor = t + } + Wg(t, e), + t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, + new i) + } + var Hb = function(t) { + function e() { + var e = t.call(this) || this; + return e.tempDisplayObjectParent = null, + e.transform = new Zf, + e.alpha = 1, + e.visible = !0, + e.renderable = !0, + e.parent = null, + e.worldAlpha = 1, + e._lastSortedIndex = 0, + e._zIndex = 0, + e.filterArea = null, + e.filters = null, + e._enabledFilters = null, + e._bounds = new Gb, + e._localBounds = null, + e._boundsID = 0, + e._boundsRect = null, + e._localBoundsRect = null, + e._mask = null, + e._destroyed = !1, + e.isSprite = !1, + e.isMask = !1, + e + } + return zc(e, t), + e.mixin = function(t) { + for (var i = Object.keys(t), r = 0; r < i.length; ++r) { + var n = i[r]; + Object.defineProperty(e.prototype, n, Object.getOwnPropertyDescriptor(t, n)) + } + } + , + e.prototype._recursivePostUpdateTransform = function() { + this.parent ? (this.parent._recursivePostUpdateTransform(), + this.transform.updateTransform(this.parent.transform)) : this.transform.updateTransform(this._tempDisplayObjectParent.transform) + } + , + e.prototype.updateTransform = function() { + this._boundsID++, + this.transform.updateTransform(this.parent.transform), + this.worldAlpha = this.alpha * this.parent.worldAlpha + } + , + e.prototype.getBounds = function(t, e) { + return t || (this.parent ? (this._recursivePostUpdateTransform(), + this.updateTransform()) : (this.parent = this._tempDisplayObjectParent, + this.updateTransform(), + this.parent = null)), + this._bounds.updateID !== this._boundsID && (this.calculateBounds(), + this._bounds.updateID = this._boundsID), + e || (this._boundsRect || (this._boundsRect = new da), + e = this._boundsRect), + this._bounds.getRectangle(e) + } + , + e.prototype.getLocalBounds = function(t) { + t || (this._localBoundsRect || (this._localBoundsRect = new da), + t = this._localBoundsRect), + this._localBounds || (this._localBounds = new Gb); + var e = this.transform + , i = this.parent; + this.parent = null, + this.transform = this._tempDisplayObjectParent.transform; + var r = this._bounds + , n = this._boundsID; + this._bounds = this._localBounds; + var s = this.getBounds(!1, t); + return this.parent = i, + this.transform = e, + this._bounds = r, + this._bounds.updateID += this._boundsID - n, + s + } + , + e.prototype.toGlobal = function(t, e, i) { + return void 0 === i && (i = !1), + i || (this._recursivePostUpdateTransform(), + this.parent ? this.displayObjectUpdateTransform() : (this.parent = this._tempDisplayObjectParent, + this.displayObjectUpdateTransform(), + this.parent = null)), + this.worldTransform.apply(t, e) + } + , + e.prototype.toLocal = function(t, e, i, r) { + return e && (t = e.toGlobal(t, i, r)), + r || (this._recursivePostUpdateTransform(), + this.parent ? this.displayObjectUpdateTransform() : (this.parent = this._tempDisplayObjectParent, + this.displayObjectUpdateTransform(), + this.parent = null)), + this.worldTransform.applyInverse(t, i) + } + , + e.prototype.setParent = function(t) { + if (!t || !t.addChild) + throw new Error("setParent: Argument must be a Container"); + return t.addChild(this), + t + } + , + e.prototype.setTransform = function(t, e, i, r, n, s, o, a, h) { + return void 0 === t && (t = 0), + void 0 === e && (e = 0), + void 0 === i && (i = 1), + void 0 === r && (r = 1), + void 0 === n && (n = 0), + void 0 === s && (s = 0), + void 0 === o && (o = 0), + void 0 === a && (a = 0), + void 0 === h && (h = 0), + this.position.x = t, + this.position.y = e, + this.scale.x = i || 1, + this.scale.y = r || 1, + this.rotation = n, + this.skew.x = s, + this.skew.y = o, + this.pivot.x = a, + this.pivot.y = h, + this + } + , + e.prototype.destroy = function(t) { + this.parent && this.parent.removeChild(this), + this.removeAllListeners(), + this.transform = null, + this.parent = null, + this._bounds = null, + this._mask = null, + this.filters = null, + this.filterArea = null, + this.hitArea = null, + this.interactive = !1, + this.interactiveChildren = !1, + this._destroyed = !0 + } + , + Object.defineProperty(e.prototype, "_tempDisplayObjectParent", { + get: function() { + return null === this.tempDisplayObjectParent && (this.tempDisplayObjectParent = new Xg), + this.tempDisplayObjectParent + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.enableTempParent = function() { + var t = this.parent; + return this.parent = this._tempDisplayObjectParent, + t + } + , + e.prototype.disableTempParent = function(t) { + this.parent = t + } + , + Object.defineProperty(e.prototype, "x", { + get: function() { + return this.position.x + }, + set: function(t) { + this.transform.position.x = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "y", { + get: function() { + return this.position.y + }, + set: function(t) { + this.transform.position.y = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "worldTransform", { + get: function() { + return this.transform.worldTransform + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "localTransform", { + get: function() { + return this.transform.localTransform + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "position", { + get: function() { + return this.transform.position + }, + set: function(t) { + this.transform.position.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "scale", { + get: function() { + return this.transform.scale + }, + set: function(t) { + this.transform.scale.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "pivot", { + get: function() { + return this.transform.pivot + }, + set: function(t) { + this.transform.pivot.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "skew", { + get: function() { + return this.transform.skew + }, + set: function(t) { + this.transform.skew.copyFrom(t) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "rotation", { + get: function() { + return this.transform.rotation + }, + set: function(t) { + this.transform.rotation = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "angle", { + get: function() { + return this.transform.rotation * Tf + }, + set: function(t) { + this.transform.rotation = t * Uf + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "zIndex", { + get: function() { + return this._zIndex + }, + set: function(t) { + this._zIndex = t, + this.parent && (this.parent.sortDirty = !0) + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "worldVisible", { + get: function() { + var t = this; + do { + if (!t.visible) + return !1; + t = t.parent + } while (t); + return !0 + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "mask", { + get: function() { + return this._mask + }, + set: function(t) { + var e; + this._mask && ((e = this._mask.maskObject || this._mask).renderable = !0, + e.isMask = !1); + (this._mask = t, + this._mask) && ((e = this._mask.maskObject || this._mask).renderable = !1, + e.isMask = !0) + }, + enumerable: !1, + configurable: !0 + }), + e + }(rb.d) + , Xg = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.sortDirty = null, + e + } + return zc(e, t), + e + }(Hb); + function Yg(t, e) { + return t.zIndex === e.zIndex ? t._lastSortedIndex - e._lastSortedIndex : t.zIndex - e.zIndex + } + Hb.prototype.displayObjectUpdateTransform = Hb.prototype.updateTransform; + var Ac = function(t) { + function e() { + var e = t.call(this) || this; + return e.children = [], + e.sortableChildren = aa.SORTABLE_CHILDREN, + e.sortDirty = !1, + e + } + return zc(e, t), + e.prototype.onChildrenChange = function(t) {} + , + e.prototype.addChild = function() { + for (var t = arguments, e = [], i = 0; i < arguments.length; i++) + e[i] = t[i]; + if (e.length > 1) + for (var r = 0; r < e.length; r++) + this.addChild(e[r]); + else { + var n = e[0]; + n.parent && n.parent.removeChild(n), + n.parent = this, + this.sortDirty = !0, + n.transform._parentID = -1, + this.children.push(n), + this._boundsID++, + this.onChildrenChange(this.children.length - 1), + this.emit("childAdded", n, this, this.children.length - 1), + n.emit("added", this) + } + return e[0] + } + , + e.prototype.addChildAt = function(t, e) { + if (e < 0 || e > this.children.length) + throw new Error(t + "addChildAt: The index " + e + " supplied is out of bounds " + this.children.length); + return t.parent && t.parent.removeChild(t), + t.parent = this, + this.sortDirty = !0, + t.transform._parentID = -1, + this.children.splice(e, 0, t), + this._boundsID++, + this.onChildrenChange(e), + t.emit("added", this), + this.emit("childAdded", t, this, e), + t + } + , + e.prototype.swapChildren = function(t, e) { + if (t !== e) { + var i = this.getChildIndex(t) + , r = this.getChildIndex(e); + this.children[i] = e, + this.children[r] = t, + this.onChildrenChange(i < r ? i : r) + } + } + , + e.prototype.getChildIndex = function(t) { + var e = this.children.indexOf(t); + if (-1 === e) + throw new Error("The supplied DisplayObject must be a child of the caller"); + return e + } + , + e.prototype.setChildIndex = function(t, e) { + if (e < 0 || e >= this.children.length) + throw new Error("The index " + e + " supplied is out of bounds " + this.children.length); + var i = this.getChildIndex(t); + tb(this.children, i, 1), + this.children.splice(e, 0, t), + this.onChildrenChange(e) + } + , + e.prototype.getChildAt = function(t) { + if (t < 0 || t >= this.children.length) + throw new Error("getChildAt: Index (" + t + ") does not exist."); + return this.children[t] + } + , + e.prototype.removeChild = function() { + for (var t = arguments, e = [], i = 0; i < arguments.length; i++) + e[i] = t[i]; + if (e.length > 1) + for (var r = 0; r < e.length; r++) + this.removeChild(e[r]); + else { + var n = e[0] + , s = this.children.indexOf(n); + if (-1 === s) + return null; + n.parent = null, + n.transform._parentID = -1, + tb(this.children, s, 1), + this._boundsID++, + this.onChildrenChange(s), + n.emit("removed", this), + this.emit("childRemoved", n, this, s) + } + return e[0] + } + , + e.prototype.removeChildAt = function(t) { + var e = this.getChildAt(t); + return e.parent = null, + e.transform._parentID = -1, + tb(this.children, t, 1), + this._boundsID++, + this.onChildrenChange(t), + e.emit("removed", this), + this.emit("childRemoved", e, this, t), + e + } + , + e.prototype.removeChildren = function(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = this.children.length); + var i, r = t, n = e - r; + if (n > 0 && n <= e) { + i = this.children.splice(r, n); + for (var s = 0; s < i.length; ++s) + i[s].parent = null, + i[s].transform && (i[s].transform._parentID = -1); + this._boundsID++, + this.onChildrenChange(t); + for (s = 0; s < i.length; ++s) + i[s].emit("removed", this), + this.emit("childRemoved", i[s], this, s); + return i + } + if (0 === n && 0 === this.children.length) + return []; + throw new RangeError("removeChildren: numeric values are outside the acceptable range.") + } + , + e.prototype.sortChildren = function() { + for (var t = !1, e = 0, i = this.children.length; e < i; ++e) { + var r = this.children[e]; + r._lastSortedIndex = e, + t || 0 === r.zIndex || (t = !0) + } + t && this.children.length > 1 && this.children.sort(Yg), + this.sortDirty = !1 + } + , + e.prototype.updateTransform = function() { + this.sortableChildren && this.sortDirty && this.sortChildren(), + this._boundsID++, + this.transform.updateTransform(this.parent.transform), + this.worldAlpha = this.alpha * this.parent.worldAlpha; + for (var t = 0, e = this.children.length; t < e; ++t) { + var i = this.children[t]; + i.visible && i.updateTransform() + } + } + , + e.prototype.calculateBounds = function() { + this._bounds.clear(), + this._calculateBounds(); + for (var t = 0; t < this.children.length; t++) { + var e = this.children[t]; + if (e.visible && e.renderable) + if (e.calculateBounds(), + e._mask) { + var i = e._mask.maskObject || e._mask; + i.calculateBounds(), + this._bounds.addBoundsMask(e._bounds, i._bounds) + } else + e.filterArea ? this._bounds.addBoundsArea(e._bounds, e.filterArea) : this._bounds.addBounds(e._bounds) + } + this._bounds.updateID = this._boundsID + } + , + e.prototype.getLocalBounds = function(e, i) { + void 0 === i && (i = !1); + var r = t.prototype.getLocalBounds.call(this, e); + if (!i) + for (var n = 0, s = this.children.length; n < s; ++n) { + var o = this.children[n]; + o.visible && o.updateTransform() + } + return r + } + , + e.prototype._calculateBounds = function() {} + , + e.prototype.render = function(t) { + if (this.visible && !(this.worldAlpha <= 0) && this.renderable) + if (this._mask || this.filters && this.filters.length) + this.renderAdvanced(t); + else { + this._render(t); + for (var e = 0, i = this.children.length; e < i; ++e) + this.children[e].render(t) + } + } + , + e.prototype.renderAdvanced = function(t) { + t.batch.flush(); + var e = this.filters + , i = this._mask; + if (e) { + this._enabledFilters || (this._enabledFilters = []), + this._enabledFilters.length = 0; + for (var r = 0; r < e.length; r++) + e[r].enabled && this._enabledFilters.push(e[r]); + this._enabledFilters.length && t.filter.push(this, this._enabledFilters) + } + i && t.mask.push(this, this._mask), + this._render(t); + r = 0; + for (var n = this.children.length; r < n; r++) + this.children[r].render(t); + t.batch.flush(), + i && t.mask.pop(this), + e && this._enabledFilters && this._enabledFilters.length && t.filter.pop() + } + , + e.prototype._render = function(t) {} + , + e.prototype.destroy = function(e) { + t.prototype.destroy.call(this), + this.sortDirty = !1; + var i = "boolean" == typeof e ? e : e && e.children + , r = this.removeChildren(0, this.children.length); + if (i) + for (var n = 0; n < r.length; ++n) + r[n].destroy(e) + } + , + Object.defineProperty(e.prototype, "width", { + get: function() { + return this.scale.x * this.getLocalBounds().width + }, + set: function(t) { + var e = this.getLocalBounds().width; + this.scale.x = 0 !== e ? t / e : 1, + this._width = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "height", { + get: function() { + return this.scale.y * this.getLocalBounds().height + }, + set: function(t) { + var e = this.getLocalBounds().height; + this.scale.y = 0 !== e ? t / e : 1, + this._height = t + }, + enumerable: !1, + configurable: !0 + }), + e + }(Hb); + Ac.prototype.containerUpdateTransform = Ac.prototype.updateTransform; + (function(t) { + t.MITER = "miter", + t.BEVEL = "bevel", + t.ROUND = "round" + } + )(Fa || (ve = Fa = {}, + ve)), + function(t) { + t.BUTT = "butt", + t.ROUND = "round", + t.SQUARE = "square" + }(Ga || (ue = Ga = {}, + ue)); + var gb = { + adaptive: !0, + maxLength: 10, + minSegments: 8, + maxSegments: 2048, + epsilon: 1e-4, + _segmentsCount: function(t, e) { + if (void 0 === e && (e = 20), + !this.adaptive || !t || isNaN(t)) + return e; + var r = Math.ceil(t / this.maxLength); + return r < this.minSegments ? r = this.minSegments : r > this.maxSegments && (r = this.maxSegments), + r + } + } + , de = function() { + function t() { + this.color = 16777215, + this.alpha = 1, + this.texture = oa.WHITE, + this.matrix = null, + this.visible = !1, + this.reset() + } + return t.prototype.clone = function() { + var e = new t; + return e.color = this.color, + e.alpha = this.alpha, + e.texture = this.texture, + e.matrix = this.matrix, + e.visible = this.visible, + e + } + , + t.prototype.reset = function() { + this.color = 16777215, + this.alpha = 1, + this.texture = oa.WHITE, + this.matrix = null, + this.visible = !1 + } + , + t.prototype.destroy = function() { + this.texture = null, + this.matrix = null + } + , + t + }() + , Zg = function(t, e) { + return (Zg = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, e) { + t.__proto__ = e + } + || function(t, e) { + for (var r in e) + e.hasOwnProperty(r) && (t[r] = e[r]) + } + )(t, e) + }; + function Bc(t, e) { + function r() { + this.constructor = t + } + Zg(t, e), + t.prototype = null === e ? Object.create(e) : (r.prototype = e.prototype, + new r) + } + var ee = { + build: function(t) { + t.points = t.shape.points.slice() + }, + triangulate: function(t, e) { + var r = t.points + , i = t.holes + , a = e.points + , n = e.indices; + if (r.length >= 6) { + for (var s = [], h = 0; h < i.length; h++) { + var o = i[h]; + s.push(r.length / 2), + r = r.concat(o.points) + } + var l = cd.d(r, s, 2); + if (!l) + return; + var $ = a.length / 2; + for (h = 0; h < l.length; h += 3) + n.push(l[h] + $), + n.push(l[h + 1] + $), + n.push(l[h + 2] + $); + for (h = 0; h < r.length; h++) + a.push(r[h]) + } + } + } + , fe = { + build: function(t) { + var e, r, i = t.shape, a = t.points, n = i.x, s = i.y; + if (a.length = 0, + t.type === fa.CIRC) + e = i.radius, + r = i.radius; + else { + var h = t.shape; + e = h.width, + r = h.height + } + if (0 !== e && 0 !== r) { + var o = Math.floor(30 * Math.sqrt(i.radius)) || Math.floor(15 * Math.sqrt(e + r)); + o /= 2.3; + for (var l = 2 * Math.PI / o, $ = 0; $ < o - .5; $++) + a.push(n + Math.sin(-l * $) * e, s + Math.cos(-l * $) * r); + a.push(a[0], a[1]) + } + }, + triangulate: function(t, e) { + var r = t.points + , i = e.points + , a = e.indices + , n = i.length / 2 + , s = n + , h = t.shape + , o = t.matrix + , l = h.x + , $ = h.y; + i.push(t.matrix ? o.a * l + o.c * $ + o.tx : l, t.matrix ? o.b * l + o.d * $ + o.ty : $); + for (var u = 0; u < r.length; u += 2) + i.push(r[u], r[u + 1]), + a.push(n++, s, n) + } + } + , $g = { + build: function(t) { + var e = t.shape + , r = e.x + , i = e.y + , a = e.width + , n = e.height + , s = t.points; + s.length = 0, + s.push(r, i, r + a, i, r + a, i + n, r, i + n) + }, + triangulate: function(t, e) { + var r = t.points + , i = e.points + , a = i.length / 2; + i.push(r[0], r[1], r[2], r[3], r[6], r[7], r[4], r[5]), + e.indices.push(a, a + 1, a + 2, a + 1, a + 2, a + 3) + } + }; + function Xa(t, e, r) { + return t + (e - t) * r + } + function Ib(t, e, r, i, a, n, s) { + void 0 === s && (s = []); + for (var h = s, o = 0, l = 0, $ = 0, u = 0, p = 0, c = 0, d = 0, v = 0; d <= 20; ++d) + o = Xa(t, r, v = d / 20), + l = Xa(e, i, v), + $ = Xa(r, a, v), + u = Xa(i, n, v), + p = Xa(o, $, v), + c = Xa(l, u, v), + h.push(p, c); + return h + } + var _g = { + build: function(t) { + var e = t.shape + , r = t.points + , i = e.x + , a = e.y + , n = e.width + , s = e.height + , h = Math.max(0, Math.min(e.radius, Math.min(n, s) / 2)); + r.length = 0, + h ? (Ib(i, a + h, i, a, i + h, a, r), + Ib(i + n - h, a, i + n, a, i + n, a + h, r), + Ib(i + n, a + s - h, i + n, a + s, i + n - h, a + s, r), + Ib(i + h, a + s, i, a + s, i, a + s - h, r)) : r.push(i, a, i + n, a, i + n, a + s, i, a + s) + }, + triangulate: function(t, e) { + for (var r = t.points, i = e.points, a = e.indices, n = i.length / 2, s = cd.d(r, null, 2), h = 0, o = s.length; h < o; h += 3) + a.push(s[h] + n), + a.push(s[h + 1] + n), + a.push(s[h + 2] + n); + for (h = 0, + o = r.length; h < o; h++) + i.push(r[h], r[++h]) + } + }; + function ge(t, e, r, i, a, n, s, h) { + var o, l; + s ? (o = i, + l = -r) : (o = -i, + l = r); + var $ = t - r * a + o + , u = e - i * a + l + , p = t + r * n + o + , c = e + i * n + l; + return h.push($, u), + h.push(p, c), + 2 + } + function Ya(t, e, r, i, a, n, s, h) { + var o = r - t + , l = i - e + , $ = Math.atan2(o, l) + , u = Math.atan2(a - t, n - e); + h && $ < u ? $ += 2 * Math.PI : !h && $ > u && (u += 2 * Math.PI); + var p = $ + , c = u - $ + , d = Math.abs(c) + , v = Math.sqrt(o * o + l * l) + , f = 1 + (15 * d * Math.sqrt(v) / Math.PI >> 0) + , y = c / f; + if (p += y, + h) { + s.push(t, e), + s.push(r, i); + for (var g = 1, q = p; g < f; g++, + q += y) + s.push(t, e), + s.push(t + Math.sin(q) * v, e + Math.cos(q) * v); + s.push(t, e), + s.push(a, n) + } else { + s.push(r, i), + s.push(t, e); + for (g = 1, + q = p; g < f; g++, + q += y) + s.push(t + Math.sin(q) * v, e + Math.cos(q) * v), + s.push(t, e); + s.push(a, n), + s.push(t, e) + } + return 2 * f + } + function ah(t, e) { + var r = t.shape + , i = t.points || r.points.slice() + , a = e.closePointEps; + if (0 !== i.length) { + var n = t.lineStyle + , s = new ra(i[0],i[1]) + , h = new ra(i[i.length - 2],i[i.length - 1]) + , o = r.type !== fa.POLY || r.closeStroke + , l = Math.abs(s.x - h.x) < a && Math.abs(s.y - h.y) < a; + if (o) { + i = i.slice(), + l && (i.pop(), + i.pop(), + h.set(i[i.length - 2], i[i.length - 1])); + var $ = .5 * (s.x + h.x) + , u = .5 * (h.y + s.y); + i.unshift($, u), + i.push($, u) + } + var p = e.points + , c = i.length / 2 + , d = i.length + , v = p.length / 2 + , f = n.width / 2 + , y = f * f + , g = n.miterLimit * n.miterLimit + , q = i[0] + , m = i[1] + , Q = i[2] + , x = i[3] + , b = 0 + , _ = 0 + , P = -(m - x) + , S = q - Q + , A = 0 + , w = 0 + , L = Math.sqrt(P * P + S * S); + P /= L, + S /= L, + P *= f, + S *= f; + var E = n.alignment + , C = 2 * (1 - E) + , M = 2 * E; + o || (n.cap === Ga.ROUND ? d += Ya(q - P * (C - M) * .5, m - S * (C - M) * .5, q - P * C, m - S * C, q + P * M, m + S * M, p, !0) + 2 : n.cap === Ga.SQUARE && (d += ge(q, m, P, S, C, M, !0, p))), + p.push(q - P * C, m - S * C), + p.push(q + P * M, m + S * M); + for (var D = 1; D < c - 1; ++D) { + q = i[2 * (D - 1)], + m = i[2 * (D - 1) + 1], + Q = i[2 * D], + x = i[2 * D + 1], + b = i[2 * (D + 1)], + _ = i[2 * (D + 1) + 1], + P = -(m - x), + S = q - Q, + P /= L = Math.sqrt(P * P + S * S), + S /= L, + P *= f, + S *= f, + A = -(x - _), + w = Q - b, + A /= L = Math.sqrt(A * A + w * w), + w /= L, + A *= f, + w *= f; + var I = Q - q + , T = m - x + , R = Q - b + , O = _ - x + , N = T * R - O * I + , B = N < 0; + if (Math.abs(N) < .1) + p.push(Q - P * C, x - S * C), + p.push(Q + P * M, x + S * M); + else { + var U = (-P + q) * (-S + x) - (-P + Q) * (-S + m) + , H = (-A + b) * (-w + x) - (-A + Q) * (-w + _) + , F = (I * H - R * U) / N + , G = (O * U - T * H) / N + , z = (F - Q) * (F - Q) + (G - x) * (G - x) + , j = Q + (F - Q) * C + , W = x + (G - x) * C + , k = Q - (F - Q) * M + , V = x - (G - x) * M + , J = B ? C : M; + z <= Math.min(I * I + T * T, R * R + O * O) + J * J * y ? n.join === Fa.BEVEL || z / y > g ? (B ? (p.push(j, W), + p.push(Q + P * M, x + S * M), + p.push(j, W), + p.push(Q + A * M, x + w * M)) : (p.push(Q - P * C, x - S * C), + p.push(k, V), + p.push(Q - A * C, x - w * C), + p.push(k, V)), + d += 2) : n.join === Fa.ROUND ? B ? (p.push(j, W), + p.push(Q + P * M, x + S * M), + d += Ya(Q, x, Q + P * M, x + S * M, Q + A * M, x + w * M, p, !0) + 4, + p.push(j, W), + p.push(Q + A * M, x + w * M)) : (p.push(Q - P * C, x - S * C), + p.push(k, V), + d += Ya(Q, x, Q - P * C, x - S * C, Q - A * C, x - w * C, p, !1) + 4, + p.push(Q - A * C, x - w * C), + p.push(k, V)) : (p.push(j, W), + p.push(k, V)) : (p.push(Q - P * C, x - S * C), + p.push(Q + P * M, x + S * M), + n.join === Fa.BEVEL || z / y > g || (n.join === Fa.ROUND ? d += B ? Ya(Q, x, Q + P * M, x + S * M, Q + A * M, x + w * M, p, !0) + 2 : Ya(Q, x, Q - P * C, x - S * C, Q - A * C, x - w * C, p, !1) + 2 : (B ? (p.push(k, V), + p.push(k, V)) : (p.push(j, W), + p.push(j, W)), + d += 2)), + p.push(Q - A * C, x - w * C), + p.push(Q + A * M, x + w * M), + d += 2) + } + } + q = i[2 * (c - 2)], + m = i[2 * (c - 2) + 1], + Q = i[2 * (c - 1)], + P = -(m - (x = i[2 * (c - 1) + 1])), + S = q - Q, + P /= L = Math.sqrt(P * P + S * S), + S /= L, + P *= f, + S *= f, + p.push(Q - P * C, x - S * C), + p.push(Q + P * M, x + S * M), + o || (n.cap === Ga.ROUND ? d += Ya(Q - P * (C - M) * .5, x - S * (C - M) * .5, Q - P * C, x - S * C, Q + P * M, x + S * M, p, !1) + 2 : n.cap === Ga.SQUARE && (d += ge(Q, x, P, S, C, M, !1, p))); + var Y = e.indices + , X = gb.epsilon * gb.epsilon; + for (D = v; D < d + v - 2; ++D) + q = p[2 * D], + m = p[2 * D + 1], + Q = p[2 * (D + 1)], + x = p[2 * (D + 1) + 1], + b = p[2 * (D + 2)], + _ = p[2 * (D + 2) + 1], + Math.abs(q * (x - _) + Q * (_ - m) + b * (m - x)) < X || Y.push(D, D + 1, D + 2) + } + } + function bh(t, e) { + var r = 0 + , i = t.shape + , a = t.points || i.points + , n = i.type !== fa.POLY || i.closeStroke; + if (0 !== a.length) { + var s = e.points + , h = e.indices + , o = a.length / 2 + , l = s.length / 2 + , $ = l; + for (s.push(a[0], a[1]), + r = 1; r < o; r++) + s.push(a[2 * r], a[2 * r + 1]), + h.push($, $ + 1), + $++; + n && h.push($, l) + } + } + function he(t, e) { + t.lineStyle.native ? bh(t, e) : ah(t, e) + } + var hb, ie = function() { + function t() {} + return t.curveTo = function(t, e, r, i, a, n) { + var s = n[n.length - 2] + , h = n[n.length - 1] - e + , o = s - t + , l = i - e + , $ = r - t + , u = Math.abs(h * $ - o * l); + if (u < 1e-8 || 0 === a) + return n[n.length - 2] === t && n[n.length - 1] === e || n.push(t, e), + null; + var p = h * h + o * o + , c = l * l + $ * $ + , d = h * l + o * $ + , v = a * Math.sqrt(p) / u + , f = a * Math.sqrt(c) / u + , y = v * d / p + , g = f * d / c + , q = v * $ + f * o + , m = v * l + f * h + , Q = o * (f + y) + , x = h * (f + y) + , b = $ * (v + g) + , _ = l * (v + g); + return { + cx: q + t, + cy: m + e, + radius: a, + startAngle: Math.atan2(x - m, Q - q), + endAngle: Math.atan2(_ - m, b - q), + anticlockwise: o * l > $ * h + } + } + , + t.arc = function(t, e, r, i, a, n, s, h, o) { + for (var l = s - n, $ = gb._segmentsCount(Math.abs(l) * a, 40 * Math.ceil(Math.abs(l) / wb)), u = l / (2 * $), p = 2 * u, c = Math.cos(u), d = Math.sin(u), v = $ - 1, f = v % 1 / v, y = 0; y <= v; ++y) { + var g = u + n + p * (y + f * y) + , q = Math.cos(g) + , m = -Math.sin(g); + o.push((c * q + d * m) * a + r, (c * -m + d * q) * a + i) + } + } + , + t + }(), ch = function() { + function t() {} + return t.curveLength = function(t, e, r, i, a, n, s, h) { + for (var o = 0, l = 0, $ = 0, u = 0, p = 0, c = 0, d = 0, v = 0, f = 0, y = 0, g = 0, q = t, m = e, Q = 1; Q <= 10; ++Q) + y = q - (v = (d = (c = (p = 1 - (l = Q / 10)) * p) * p) * t + 3 * c * l * r + 3 * p * ($ = l * l) * a + (u = $ * l) * s), + g = m - (f = d * e + 3 * c * l * i + 3 * p * $ * n + u * h), + q = v, + m = f, + o += Math.sqrt(y * y + g * g); + return o + } + , + t.curveTo = function(e, r, i, a, n, s, h) { + var o = h[h.length - 2] + , l = h[h.length - 1]; + h.length -= 2; + var $ = gb._segmentsCount(t.curveLength(o, l, e, r, i, a, n, s)) + , u = 0 + , p = 0 + , c = 0 + , d = 0 + , v = 0; + h.push(o, l); + for (var f = 1, y = 0; f <= $; ++f) + c = (p = (u = 1 - (y = f / $)) * u) * u, + v = (d = y * y) * y, + h.push(c * o + 3 * p * y * e + 3 * u * d * i + v * n, c * l + 3 * p * y * r + 3 * u * d * a + v * s) + } + , + t + }(), dh = function() { + function t() {} + return t.curveLength = function(t, e, r, i, a, n) { + var s = t - 2 * r + a + , h = e - 2 * i + n + , o = 2 * r - 2 * t + , l = 2 * i - 2 * e + , $ = 4 * (s * s + h * h) + , u = 4 * (s * o + h * l) + , p = o * o + l * l + , c = 2 * Math.sqrt($ + u + p) + , d = Math.sqrt($) + , v = 2 * $ * d + , f = 2 * Math.sqrt(p) + , y = u / d; + return (v * c + d * u * (c - f) + (4 * p * $ - u * u) * Math.log((2 * d + y + c) / (y + f))) / (4 * v) + } + , + t.curveTo = function(e, r, i, a, n) { + for (var s = n[n.length - 2], h = n[n.length - 1], o = gb._segmentsCount(t.curveLength(s, h, e, r, i, a)), l = 0, $ = 0, u = 1; u <= o; ++u) { + var p = u / o; + l = s + (e - s) * p, + $ = h + (r - h) * p, + n.push(l + (e + (i - e) * p - l) * p, $ + (r + (a - r) * p - $) * p) + } + } + , + t + }(), eh = function() { + function t() { + this.reset() + } + return t.prototype.begin = function(t, e, r) { + this.reset(), + this.style = t, + this.start = e, + this.attribStart = r + } + , + t.prototype.end = function(t, e) { + this.attribSize = e - this.attribStart, + this.size = t - this.start + } + , + t.prototype.reset = function() { + this.style = null, + this.size = 0, + this.start = 0, + this.attribStart = 0, + this.attribSize = 0 + } + , + t + }(), Cc = ((hb = {})[fa.POLY] = ee, + hb[fa.CIRC] = fe, + hb[fa.ELIP] = fe, + hb[fa.RECT] = $g, + hb[fa.RREC] = _g, + hb), je = [], Jb = [], ke = function() { + function t(t, e, r, i) { + void 0 === e && (e = null), + void 0 === r && (r = null), + void 0 === i && (i = null), + this.shape = t, + this.lineStyle = r, + this.fillStyle = e, + this.matrix = i, + this.type = t.type, + this.points = [], + this.holes = [] + } + return t.prototype.clone = function() { + return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix) + } + , + t.prototype.destroy = function() { + this.shape = null, + this.holes.length = 0, + this.holes = null, + this.points.length = 0, + this.points = null, + this.lineStyle = null, + this.fillStyle = null + } + , + t + }(), Za = new ra, fh = new Gb, gh = function(t) { + function e() { + var e = t.call(this) || this; + return e.uvsFloat32 = null, + e.indicesUint16 = null, + e.points = [], + e.colors = [], + e.uvs = [], + e.indices = [], + e.textureIds = [], + e.graphicsData = [], + e.dirty = 0, + e.batchDirty = -1, + e.cacheDirty = -1, + e.clearDirty = 0, + e.drawCalls = [], + e.batches = [], + e.shapeIndex = 0, + e._bounds = new Gb, + e.boundsDirty = -1, + e.boundsPadding = 0, + e.batchable = !1, + e.indicesUint16 = null, + e.uvsFloat32 = null, + e.closePointEps = 1e-4, + e + } + return Bc(e, t), + Object.defineProperty(e.prototype, "bounds", { + get: function() { + return this.boundsDirty !== this.dirty && (this.boundsDirty = this.dirty, + this.calculateBounds()), + this._bounds + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.invalidate = function() { + this.boundsDirty = -1, + this.dirty++, + this.batchDirty++, + this.shapeIndex = 0, + this.points.length = 0, + this.colors.length = 0, + this.uvs.length = 0, + this.indices.length = 0, + this.textureIds.length = 0; + for (var t = 0; t < this.drawCalls.length; t++) + this.drawCalls[t].texArray.clear(), + Jb.push(this.drawCalls[t]); + this.drawCalls.length = 0; + for (t = 0; t < this.batches.length; t++) { + var e = this.batches[t]; + e.reset(), + je.push(e) + } + this.batches.length = 0 + } + , + e.prototype.clear = function() { + return this.graphicsData.length > 0 && (this.invalidate(), + this.clearDirty++, + this.graphicsData.length = 0), + this + } + , + e.prototype.drawShape = function(t, e, r, i) { + void 0 === e && (e = null), + void 0 === r && (r = null), + void 0 === i && (i = null); + var a = new ke(t,e,r,i); + return this.graphicsData.push(a), + this.dirty++, + this + } + , + e.prototype.drawHole = function(t, e) { + if (void 0 === e && (e = null), + !this.graphicsData.length) + return null; + var r = new ke(t,null,null,e) + , i = this.graphicsData[this.graphicsData.length - 1]; + return r.lineStyle = i.lineStyle, + i.holes.push(r), + this.dirty++, + this + } + , + e.prototype.destroy = function() { + t.prototype.destroy.call(this); + for (var e = 0; e < this.graphicsData.length; ++e) + this.graphicsData[e].destroy(); + this.points.length = 0, + this.points = null, + this.colors.length = 0, + this.colors = null, + this.uvs.length = 0, + this.uvs = null, + this.indices.length = 0, + this.indices = null, + this.indexBuffer.destroy(), + this.indexBuffer = null, + this.graphicsData.length = 0, + this.graphicsData = null, + this.drawCalls.length = 0, + this.drawCalls = null, + this.batches.length = 0, + this.batches = null, + this._bounds = null + } + , + e.prototype.containsPoint = function(t) { + for (var e = this.graphicsData, r = 0; r < e.length; ++r) { + var i = e[r]; + if (i.fillStyle.visible && i.shape && (i.matrix ? i.matrix.applyInverse(t, Za) : Za.copyFrom(t), + i.shape.contains(Za.x, Za.y))) { + var a = !1; + if (i.holes) + for (var n = 0; n < i.holes.length; n++) { + if (i.holes[n].shape.contains(Za.x, Za.y)) { + a = !0; + break + } + } + if (!a) + return !0 + } + } + return !1 + } + , + e.prototype.updateBatches = function(t) { + if (this.graphicsData.length) { + if (this.validateBatching()) { + this.cacheDirty = this.dirty; + var e = this.uvs + , r = this.graphicsData + , i = null + , a = null; + this.batches.length > 0 && (a = (i = this.batches[this.batches.length - 1]).style); + for (var n = this.shapeIndex; n < r.length; n++) { + this.shapeIndex++; + var s = r[n] + , h = s.fillStyle + , o = s.lineStyle; + Cc[s.type].build(s), + s.matrix && this.transformPoints(s.points, s.matrix); + for (var l = 0; l < 2; l++) { + var $ = 0 === l ? h : o; + if ($.visible) { + var u = $.texture.baseTexture + , p = this.indices.length + , c = this.points.length / 2; + u.wrapMode = Rb.REPEAT, + 0 === l ? this.processFill(s) : this.processLine(s); + var d = this.points.length / 2 - c; + 0 !== d && (i && !this._compareStyles(a, $) && (i.end(p, c), + i = null), + i || ((i = je.pop() || new eh).begin($, p, c), + this.batches.push(i), + a = $), + this.addUvs(this.points, e, $.texture, c, d, $.matrix)) + } + } + } + var v = this.indices.length + , f = this.points.length / 2; + if (i && i.end(v, f), + 0 !== this.batches.length) { + if (this.indicesUint16 && this.indices.length === this.indicesUint16.length) + this.indicesUint16.set(this.indices); + else { + var y = f > 65535 && t; + this.indicesUint16 = y ? new Uint32Array(this.indices) : new Uint16Array(this.indices) + } + this.batchable = this.isBatchable(), + this.batchable ? this.packBatches() : this.buildDrawCalls() + } else + this.batchable = !0 + } + } else + this.batchable = !0 + } + , + e.prototype._compareStyles = function(t, e) { + return !(!t || !e) && t.texture.baseTexture === e.texture.baseTexture && t.color + t.alpha === e.color + e.alpha && !!t.native == !!e.native + } + , + e.prototype.validateBatching = function() { + if (this.dirty === this.cacheDirty || !this.graphicsData.length) + return !1; + for (var t = 0, e = this.graphicsData.length; t < e; t++) { + var r = this.graphicsData[t] + , i = r.fillStyle + , a = r.lineStyle; + if (i && !i.texture.baseTexture.valid) + return !1; + if (a && !a.texture.baseTexture.valid) + return !1 + } + return !0 + } + , + e.prototype.packBatches = function() { + this.batchDirty++, + this.uvsFloat32 = new Float32Array(this.uvs); + for (var t = this.batches, e = 0, r = t.length; e < r; e++) + for (var i = t[e], a = 0; a < i.size; a++) { + var n = i.start + a; + this.indicesUint16[n] = this.indicesUint16[n] - i.attribStart + } + } + , + e.prototype.isBatchable = function() { + if (this.points.length > 131070) + return !1; + for (var t = this.batches, r = 0; r < t.length; r++) + if (t[r].style.native) + return !1; + return this.points.length < 2 * e.BATCHABLE_SIZE + } + , + e.prototype.buildDrawCalls = function() { + for (var t = ++ia._globalBatch, e = 0; e < this.drawCalls.length; e++) + this.drawCalls[e].texArray.clear(), + Jb.push(this.drawCalls[e]); + this.drawCalls.length = 0; + var r = this.colors + , i = this.textureIds + , a = Jb.pop(); + a || ((a = new xc).texArray = new yc), + a.texArray.count = 0, + a.start = 0, + a.size = 0, + a.type = Ba.TRIANGLES; + var n = 0 + , s = null + , h = 0 + , o = !1 + , l = Ba.TRIANGLES + , $ = 0; + this.drawCalls.push(a); + for (e = 0; e < this.batches.length; e++) { + var u = this.batches[e] + , p = u.style + , c = p.texture.baseTexture; + o !== !!p.native && (l = (o = !!p.native) ? Ba.LINES : Ba.TRIANGLES, + s = null, + n = 8, + t++), + s !== c && (s = c, + c._batchEnabled !== t && (8 === n && (t++, + n = 0, + a.size > 0 && ((a = Jb.pop()) || ((a = new xc).texArray = new yc), + this.drawCalls.push(a)), + a.start = $, + a.size = 0, + a.texArray.count = 0, + a.type = l), + c.touched = 1, + c._batchEnabled = t, + c._batchLocation = n, + c.wrapMode = 10497, + a.texArray.elements[a.texArray.count++] = c, + n++)), + a.size += u.size, + $ += u.size, + h = c._batchLocation, + this.addColors(r, p.color, p.alpha, u.attribSize), + this.addTextureIds(i, h, u.attribSize) + } + ia._globalBatch = t, + this.packAttributes() + } + , + e.prototype.packAttributes = function() { + for (var t = this.points, e = this.uvs, r = this.colors, i = this.textureIds, a = new ArrayBuffer(3 * t.length * 4), n = new Float32Array(a), s = new Uint32Array(a), h = 0, o = 0; o < t.length / 2; o++) + n[h++] = t[2 * o], + n[h++] = t[2 * o + 1], + n[h++] = e[2 * o], + n[h++] = e[2 * o + 1], + s[h++] = r[o], + n[h++] = i[o]; + this._buffer.update(a), + this._indexBuffer.update(this.indicesUint16) + } + , + e.prototype.processFill = function(t) { + t.holes.length ? (this.processHoles(t.holes), + ee.triangulate(t, this)) : Cc[t.type].triangulate(t, this) + } + , + e.prototype.processLine = function(t) { + he(t, this); + for (var e = 0; e < t.holes.length; e++) + he(t.holes[e], this) + } + , + e.prototype.processHoles = function(t) { + for (var e = 0; e < t.length; e++) { + var r = t[e]; + Cc[r.type].build(r), + r.matrix && this.transformPoints(r.points, r.matrix) + } + } + , + e.prototype.calculateBounds = function() { + var t = this._bounds + , e = fh + , r = la.IDENTITY; + this._bounds.clear(), + e.clear(); + for (var i = 0; i < this.graphicsData.length; i++) { + var a = this.graphicsData[i] + , n = a.shape + , s = a.type + , h = a.lineStyle + , o = a.matrix || la.IDENTITY + , l = 0; + if (h && h.visible) { + var $ = h.alignment; + l = h.width, + s === fa.POLY ? l *= .5 + Math.abs(.5 - $) : l *= Math.max(0, $) + } + if (r !== o && (e.isEmpty() || (t.addBoundsMatrix(e, r), + e.clear()), + r = o), + s === fa.RECT || s === fa.RREC) { + var u = n; + e.addFramePad(u.x, u.y, u.x + u.width, u.y + u.height, l, l) + } else if (s === fa.CIRC) { + var p = n; + e.addFramePad(p.x, p.y, p.x, p.y, p.radius + l, p.radius + l) + } else if (s === fa.ELIP) { + var c = n; + e.addFramePad(c.x, c.y, c.x, c.y, c.width + l, c.height + l) + } else { + var d = n; + t.addVerticesMatrix(r, d.points, 0, d.points.length, l, l) + } + } + e.isEmpty() || t.addBoundsMatrix(e, r), + t.pad(this.boundsPadding, this.boundsPadding) + } + , + e.prototype.transformPoints = function(t, e) { + for (var r = 0; r < t.length / 2; r++) { + var i = t[2 * r] + , a = t[2 * r + 1]; + t[2 * r] = e.a * i + e.c * a + e.tx, + t[2 * r + 1] = e.b * i + e.d * a + e.ty + } + } + , + e.prototype.addColors = function(t, e, r, i) { + for (var a = fd((e >> 16) + (65280 & e) + ((255 & e) << 16), r); i-- > 0; ) + t.push(a) + } + , + e.prototype.addTextureIds = function(t, e, r) { + for (; r-- > 0; ) + t.push(e) + } + , + e.prototype.addUvs = function(t, e, r, i, a, n) { + void 0 === n && (n = null); + for (var s = 0, h = e.length, o = r.frame; s < a; ) { + var l = t[2 * (i + s)] + , $ = t[2 * (i + s) + 1]; + if (n) { + var u = n.a * l + n.c * $ + n.tx; + $ = n.b * l + n.d * $ + n.ty, + l = u + } + s++, + e.push(l / o.width, $ / o.height) + } + var p = r.baseTexture; + (o.width < p.width || o.height < p.height) && this.adjustUvs(e, r, h, a) + } + , + e.prototype.adjustUvs = function(t, e, r, i) { + for (var a = e.baseTexture, n = r + 2 * i, s = e.frame, h = s.width / a.width, o = s.height / a.height, l = s.x / s.width, $ = s.y / s.height, u = Math.floor(t[r] + 1e-6), p = Math.floor(t[r + 1] + 1e-6), c = r + 2; c < n; c += 2) + u = Math.min(u, Math.floor(t[c] + 1e-6)), + p = Math.min(p, Math.floor(t[c + 1] + 1e-6)); + l -= u, + $ -= p; + for (c = r; c < n; c += 2) + t[c] = (t[c] + l) * h, + t[c + 1] = (t[c + 1] + $) * o + } + , + e.BATCHABLE_SIZE = 100, + e + }(_d), hh = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.width = 0, + e.alignment = .5, + e.native = !1, + e.cap = Ga.BUTT, + e.join = Fa.MITER, + e.miterLimit = 10, + e + } + return Bc(e, t), + e.prototype.clone = function() { + var t = new e; + return t.color = this.color, + t.alpha = this.alpha, + t.texture = this.texture, + t.matrix = this.matrix, + t.visible = this.visible, + t.width = this.width, + t.alignment = this.alignment, + t.native = this.native, + t.cap = this.cap, + t.join = this.join, + t.miterLimit = this.miterLimit, + t + } + , + e.prototype.reset = function() { + t.prototype.reset.call(this), + this.color = 0, + this.alignment = .5, + this.width = 0, + this.native = !1 + } + , + e + }(de), ih = new Float32Array(3), Dc = {}, jh = function(t) { + function e(e) { + void 0 === e && (e = null); + var r = t.call(this) || this; + return r._geometry = e || new gh, + r._geometry.refCount++, + r.shader = null, + r.state = Fb.for2d(), + r._fillStyle = new de, + r._lineStyle = new hh, + r._matrix = null, + r._holeMode = !1, + r.currentPath = null, + r.batches = [], + r.batchTint = -1, + r.batchDirty = -1, + r.vertexData = null, + r.pluginName = "batch", + r._transformID = -1, + r.tint = 16777215, + r.blendMode = K.NORMAL, + r + } + return Bc(e, t), + Object.defineProperty(e.prototype, "geometry", { + get: function() { + return this._geometry + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.clone = function() { + return this.finishPoly(), + new e(this._geometry) + } + , + Object.defineProperty(e.prototype, "blendMode", { + get: function() { + return this.state.blendMode + }, + set: function(t) { + this.state.blendMode = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "tint", { + get: function() { + return this._tint + }, + set: function(t) { + this._tint = t + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "fill", { + get: function() { + return this._fillStyle + }, + enumerable: !1, + configurable: !0 + }), + Object.defineProperty(e.prototype, "line", { + get: function() { + return this._lineStyle + }, + enumerable: !1, + configurable: !0 + }), + e.prototype.lineStyle = function(t, e, r, i, a) { + return void 0 === t && (t = null), + void 0 === e && (e = 0), + void 0 === r && (r = 1), + void 0 === i && (i = .5), + void 0 === a && (a = !1), + "number" == typeof t && (t = { + width: t, + color: e, + alpha: r, + alignment: i, + native: a + }), + this.lineTextureStyle(t) + } + , + e.prototype.lineTextureStyle = function(t) { + t = Object.assign({ + width: 0, + texture: oa.WHITE, + color: t && t.texture ? 16777215 : 0, + alpha: 1, + matrix: null, + alignment: .5, + native: !1, + cap: Ga.BUTT, + join: Fa.MITER, + miterLimit: 10 + }, t), + this.currentPath && this.startPoly(); + var e = t.width > 0 && t.alpha > 0; + return e ? (t.matrix && (t.matrix = t.matrix.clone(), + t.matrix.invert()), + Object.assign(this._lineStyle, { + visible: e + }, t)) : this._lineStyle.reset(), + this + } + , + e.prototype.startPoly = function() { + if (this.currentPath) { + var t = this.currentPath.points + , e = this.currentPath.points.length; + e > 2 && (this.drawShape(this.currentPath), + this.currentPath = new $b, + this.currentPath.closeStroke = !1, + this.currentPath.points.push(t[e - 2], t[e - 1])) + } else + this.currentPath = new $b, + this.currentPath.closeStroke = !1 + } + , + e.prototype.finishPoly = function() { + this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), + this.currentPath = null) : this.currentPath.points.length = 0) + } + , + e.prototype.moveTo = function(t, e) { + return this.startPoly(), + this.currentPath.points[0] = t, + this.currentPath.points[1] = e, + this + } + , + e.prototype.lineTo = function(t, e) { + this.currentPath || this.moveTo(0, 0); + var r = this.currentPath.points + , i = r[r.length - 2] + , a = r[r.length - 1]; + return i === t && a === e || r.push(t, e), + this + } + , + e.prototype._initCurve = function(t, e) { + void 0 === t && (t = 0), + void 0 === e && (e = 0), + this.currentPath ? 0 === this.currentPath.points.length && (this.currentPath.points = [t, e]) : this.moveTo(t, e) + } + , + e.prototype.quadraticCurveTo = function(t, e, r, i) { + this._initCurve(); + var a = this.currentPath.points; + return 0 === a.length && this.moveTo(0, 0), + dh.curveTo(t, e, r, i, a), + this + } + , + e.prototype.bezierCurveTo = function(t, e, r, i, a, n) { + return this._initCurve(), + ch.curveTo(t, e, r, i, a, n, this.currentPath.points), + this + } + , + e.prototype.arcTo = function(t, e, r, i, a) { + this._initCurve(t, e); + var n = this.currentPath.points + , s = ie.curveTo(t, e, r, i, a, n); + if (s) { + var h = s.cx + , o = s.cy + , l = s.radius + , $ = s.startAngle + , u = s.endAngle + , p = s.anticlockwise; + this.arc(h, o, l, $, u, p) + } + return this + } + , + e.prototype.arc = function(t, e, r, i, a, n) { + if (void 0 === n && (n = !1), + i === a) + return this; + if (!n && a <= i ? a += wb : n && i <= a && (i += wb), + 0 === a - i) + return this; + var s = t + Math.cos(i) * r + , h = e + Math.sin(i) * r + , o = this._geometry.closePointEps + , l = this.currentPath ? this.currentPath.points : null; + if (l) { + var $ = Math.abs(l[l.length - 2] - s) + , u = Math.abs(l[l.length - 1] - h); + $ < o && u < o || l.push(s, h) + } else + this.moveTo(s, h), + l = this.currentPath.points; + return ie.arc(s, h, t, e, r, i, a, n, l), + this + } + , + e.prototype.beginFill = function(t, e) { + return void 0 === t && (t = 0), + void 0 === e && (e = 1), + this.beginTextureFill({ + texture: oa.WHITE, + color: t, + alpha: e + }) + } + , + e.prototype.beginTextureFill = function(t) { + t = Object.assign({ + texture: oa.WHITE, + color: 16777215, + alpha: 1, + matrix: null + }, t), + this.currentPath && this.startPoly(); + var e = t.alpha > 0; + return e ? (t.matrix && (t.matrix = t.matrix.clone(), + t.matrix.invert()), + Object.assign(this._fillStyle, { + visible: e + }, t)) : this._fillStyle.reset(), + this + } + , + e.prototype.endFill = function() { + return this.finishPoly(), + this._fillStyle.reset(), + this + } + , + e.prototype.drawRect = function(t, e, r, i) { + return this.drawShape(new da(t,e,r,i)) + } + , + e.prototype.drawRoundedRect = function(t, e, r, i, a) { + return this.drawShape(new Xf(t,e,r,i,a)) + } + , + e.prototype.drawCircle = function(t, e, r) { + return this.drawShape(new Vf(t,e,r)) + } + , + e.prototype.drawEllipse = function(t, e, r, i) { + return this.drawShape(new Wf(t,e,r,i)) + } + , + e.prototype.drawPolygon = function() { + for (var t, e = arguments, r = [], i = 0; i < arguments.length; i++) + r[i] = e[i]; + var a = !0 + , n = r[0]; + n.points ? (a = n.closeStroke, + t = n.points) : t = Array.isArray(r[0]) ? r[0] : r; + var s = new $b(t); + return s.closeStroke = a, + this.drawShape(s), + this + } + , + e.prototype.drawShape = function(t) { + return this._holeMode ? this._geometry.drawHole(t, this._matrix) : this._geometry.drawShape(t, this._fillStyle.clone(), this._lineStyle.clone(), this._matrix), + this + } + , + e.prototype.clear = function() { + return this._geometry.clear(), + this._lineStyle.reset(), + this._fillStyle.reset(), + this._boundsID++, + this._matrix = null, + this._holeMode = !1, + this.currentPath = null, + this + } + , + e.prototype.isFastRect = function() { + var t = this._geometry.graphicsData; + return 1 === t.length && t[0].shape.type === fa.RECT && !(t[0].lineStyle.visible && t[0].lineStyle.width) + } + , + e.prototype._render = function(t) { + this.finishPoly(); + var e = this._geometry + , r = t.context.supports.uint32Indices; + e.updateBatches(r), + e.batchable ? (this.batchDirty !== e.batchDirty && this._populateBatches(), + this._renderBatched(t)) : (t.batch.flush(), + this._renderDirect(t)) + } + , + e.prototype._populateBatches = function() { + var t = this._geometry + , e = this.blendMode + , r = t.batches.length; + this.batchTint = -1, + this._transformID = -1, + this.batchDirty = t.batchDirty, + this.batches.length = r, + this.vertexData = new Float32Array(t.points); + for (var i = 0; i < r; i++) { + var a = t.batches[i] + , n = a.style.color + , s = new Float32Array(this.vertexData.buffer,4 * a.attribStart * 2,2 * a.attribSize) + , h = new Float32Array(t.uvsFloat32.buffer,4 * a.attribStart * 2,2 * a.attribSize) + , o = { + vertexData: s, + blendMode: e, + indices: new Uint16Array(t.indicesUint16.buffer,2 * a.start,a.size), + uvs: h, + _batchRGB: Xb(n), + _tintRGB: n, + _texture: a.style.texture, + alpha: a.style.alpha, + worldAlpha: 1 + }; + this.batches[i] = o + } + } + , + e.prototype._renderBatched = function(t) { + if (this.batches.length) { + t.batch.setObjectRenderer(t.plugins[this.pluginName]), + this.calculateVertices(), + this.calculateTints(); + for (var e = 0, r = this.batches.length; e < r; e++) { + var i = this.batches[e]; + i.worldAlpha = this.worldAlpha * i.alpha, + t.plugins[this.pluginName].render(i) + } + } + } + , + e.prototype._renderDirect = function(t) { + var e = this._resolveDirectShader(t) + , r = this._geometry + , i = this.tint + , a = this.worldAlpha + , n = e.uniforms + , s = r.drawCalls; + n.translationMatrix = this.transform.worldTransform, + n.tint[0] = (i >> 16 & 255) / 255 * a, + n.tint[1] = (i >> 8 & 255) / 255 * a, + n.tint[2] = (255 & i) / 255 * a, + n.tint[3] = a, + t.shader.bind(e), + t.geometry.bind(r, e), + t.state.set(this.state); + for (var h = 0, o = s.length; h < o; h++) + this._renderDrawCallDirect(t, r.drawCalls[h]) + } + , + e.prototype._renderDrawCallDirect = function(t, e) { + for (var r = e.texArray, i = e.type, a = e.size, n = e.start, s = r.count, h = 0; h < s; h++) + t.texture.bind(r.elements[h], h); + t.geometry.draw(i, a, n) + } + , + e.prototype._resolveDirectShader = function(t) { + var e = this.shader + , r = this.pluginName; + if (!e) { + if (!Dc[r]) { + for (var i = t.plugins.batch.MAX_TEXTURES, a = new Int32Array(i), n = 0; n < i; n++) + a[n] = n; + var s = { + tint: new Float32Array([1, 1, 1, 1]), + translationMatrix: new la, + default: Pa.from({ + uSamplers: a + }, !0) + } + , h = t.plugins[r]._shader.program; + Dc[r] = new oc(h,s) + } + e = Dc[r] + } + return e + } + , + e.prototype._calculateBounds = function() { + this.finishPoly(); + var t = this._geometry; + if (t.graphicsData.length) { + var e = t.bounds + , r = e.minX + , i = e.minY + , a = e.maxX + , n = e.maxY; + this._bounds.addFrame(this.transform, r, i, a, n) + } + } + , + e.prototype.containsPoint = function(t) { + return this.worldTransform.applyInverse(t, e._TEMP_POINT), + this._geometry.containsPoint(e._TEMP_POINT) + } + , + e.prototype.calculateTints = function() { + if (this.batchTint !== this.tint) { + this.batchTint = this.tint; + for (var t = Xb(this.tint, ih), e = 0; e < this.batches.length; e++) { + var r = this.batches[e] + , i = r._batchRGB + , a = (t[0] * i[0] * 255 << 16) + (t[1] * i[1] * 255 << 8) + (0 | t[2] * i[2] * 255); + r._tintRGB = (a >> 16) + (65280 & a) + ((255 & a) << 16) + } + } + } + , + e.prototype.calculateVertices = function() { + var t = this.transform._worldID; + if (this._transformID !== t) { + this._transformID = t; + for (var e = this.transform.worldTransform, r = e.a, i = e.b, a = e.c, n = e.d, s = e.tx, h = e.ty, o = this._geometry.points, l = this.vertexData, $ = 0, u = 0; u < o.length; u += 2) { + var p = o[u] + , c = o[u + 1]; + l[$++] = r * p + a * c + s, + l[$++] = n * c + i * p + h + } + } + } + , + e.prototype.closePath = function() { + var t = this.currentPath; + return t && (t.closeStroke = !0), + this + } + , + e.prototype.setMatrix = function(t) { + return this._matrix = t, + this + } + , + e.prototype.beginHole = function() { + return this.finishPoly(), + this._holeMode = !0, + this + } + , + e.prototype.endHole = function() { + return this.finishPoly(), + this._holeMode = !1, + this + } + , + e.prototype.destroy = function(e) { + this._geometry.refCount--, + 0 === this._geometry.refCount && this._geometry.dispose(), + this._matrix = null, + this.currentPath = null, + this._lineStyle.destroy(), + this._lineStyle = null, + this._fillStyle.destroy(), + this._fillStyle = null, + this._geometry = null, + this.shader = null, + this.vertexData = null, + this.batches.length = 0, + this.batches = null, + t.prototype.destroy.call(this, e) + } + , + e._TEMP_POINT = new ra, + e + }(Ac); + var kh = Nb && Nb.__extends || function() { + var t = function(i, r) { + return (t = Object.setPrototypeOf || { + __proto__: [] + }instanceof Array && function(t, i) { + t.__proto__ = i + } + || function(t, i) { + for (var r in i) + Object.prototype.hasOwnProperty.call(i, r) && (t[r] = i[r]) + } + )(i, r) + }; + return function(i, r) { + if ("function" != typeof r && null !== r) + throw new TypeError("Class extends value " + String(r) + " is not a constructor or null"); + function o() { + this.constructor = i + } + t(i, r), + i.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, + new o) + } + }() + , lh = window.PIXI ? window.PIXI.Graphics : jh + , le = function(t) { + function i(i, r, o) { + void 0 === r && (r = {}); + var s = t.call(this) || this; + s.graphicsOptions = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: 0, + lineWidth: 1, + lineColor: 16777215 + }, + s.graphicsOptions = Object.assign(s.graphicsOptions, i), + s.physicsOptions = r; + var p = s.graphicsOptions.width / 2 + , n = s.graphicsOptions.height / 2; + return s.pivot.x = p, + s.pivot.y = n, + s._update = o, + s.graphicsOptions.radius ? s._body = ha.Bodies.circle(s.graphicsOptions.x, s.graphicsOptions.y, s.graphicsOptions.radius, s.physicsOptions) : s._body = ha.Bodies.rectangle(s.graphicsOptions.x + p, s.graphicsOptions.y + n, s.graphicsOptions.width, s.graphicsOptions.height, s.physicsOptions), + s + } + return kh(i, t), + Object.defineProperty(i.prototype, "body", { + get: function() { + return this._body + }, + enumerable: !1, + configurable: !0 + }), + i.prototype.update = function() { + this._update({ + position: this._body.position, + rotation: this._body.angle + }) + } + , + i + }(lh); + Nb.PhysicsGraphics = le; + var me = ma && ma.__assign || function() { + return (me = Object.assign || function(r) { + for (var n, e = 1, t = arguments.length; e < t; e++) + for (var a in n = arguments[e]) + Object.prototype.hasOwnProperty.call(n, a) && (r[a] = n[a]); + return r + } + ).apply(this, arguments) + } + , ne = ma && ma.__spreadArray || function(r, n) { + for (var e = 0, t = n.length, a = r.length; e < t; e++, + a++) + r[a] = n[e]; + return r + } + ; + function oe(r, n) { + return window[n] ? Promise.resolve(window[n]) : new Promise(function(e, t) { + var a = document.createElement("script"); + a.onload = function() { + e(n && window[n]) + } + , + a.onerror = function(r) { + a.onload = null, + a.onerror = null, + document.body.removeChild(a), + t(r) + } + , + a.src = r, + a.async = !0, + document.body.appendChild(a) + } + ) + } + ma.loadScript = oe; + var mh = function(r) { + r.App && (r.App.destroy({ + removeView: !0 + }), + window.PIXI.loader.destroy(), + r.App = null, + r.timerMap.forEach(function(r, n) { + window.clearInterval(r), + window.clearTimeout(r) + }), + r.timerMap.clear(), + r.soundMap = {}, + r.music.pause(), + r.music = null, + r.music = new Audio, + Object.keys(r.windowListener).map(function(n) { + var e = n.replace("Listener", ""); + window.removeEventListener(e, r.windowListener[n]) + })) + }; + ma.resetPygameZero = mh; + var Ec = { + aqua: "#00FFFF", + black: "#000000", + blue: "#0000FF", + fuchsia: "#FF00FF", + gray: "#808080", + green: "#008000", + lime: "#00FF00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + orange: "#FFA500", + purple: "#800080", + red: "#FF0000", + silver: "#C0C0C0", + teal: "#008080", + white: "#FFFFFF", + yellow: "#FFFF00" + }; + ma.ColorNameMap = Ec; + var nh = function(r) { + Math.round(r.view.width / 2), + Math.round(r.view.height / 2); + var n = { + transX: function(r, n) { + return void 0 === n && (n = !1), + r + }, + transY: function(r, n) { + return void 0 === n && (n = !1), + r + }, + transPos: function(r, e) { + return void 0 === e && (e = !1), + r ? [n.transX(r[0], e), n.transY(r[1], e)] : r + }, + transColor: function(r) { + return Array.isArray(r) ? window.PIXI.utils.rgb2hex(r) : r.match("#") ? window.PIXI.utils.string2hex(r) : Ec[r] ? window.PIXI.utils.string2hex(Ec[r]) : 16777215 + } + }; + return n + }; + function oh(r, n) { + Array.isArray(n) && (n.x = n[0], + n.y = n[1], + n.width = 0, + n.height = 0), + r.centerX = r.x + r.width / 2, + r.centerY = r.y + r.height / 2, + n.centerX = n.x + n.width / 2, + n.centerY = n.y + n.height / 2, + r.halfWidth = r.width / 2, + r.halfHeight = r.height / 2, + n.halfWidth = n.width / 2, + n.halfHeight = n.height / 2; + var e = r.centerX - n.centerX + , t = r.centerY - n.centerY + , a = r.halfWidth + n.halfWidth + , i = r.halfHeight + n.halfHeight; + return Math.abs(e) < a && Math.abs(t) < i + } + ma.translateTools = nh, + ma.hitTestRectangle = oh; + var Fc = {}; + function ph(r) { + function n(r) { + var n; + return Array.isArray(r) && (n = ne([], r), + r = n[0]), + new Promise(function(e, t) { + window.PIXI.utils.TextureCache[r] ? e(window.PIXI.utils.TextureCache[r]) : window.PIXI.loader.add(n || r).load(function() { + var n = window.PIXI.loader.resources[r].texture; + e(n) + }) + } + ) + } + return /\.json$/.test(r) ? Fc[r] ? n(Fc[r]) : fetch(r).then(function(r) { + return r.json() + }).then(function(e) { + var t = r.replace("index.json", "") + , a = e.map(function(r) { + return t + r + }); + return Fc[r] = a, + n(a) + }) : n(r) + } + ma.textureRecources = ph; + var ga = window.Sk + , qh = function(r) { + return ga.misceval.callsimOrSuspend(ga.builtins.property, new ga.builtin.func(r), new ga.builtin.func(function() {} + )) + }; + function pe(r, n) { + var e = function(e) { + for (var t = [], a = 1; a < arguments.length; a++) + t[a - 1] = arguments[a]; + n || (t = new ga.builtins.tuple(t)); + var i = new ga.builtin.dict(e); + return r(t, i) + }; + return e.co_kwargs = !0, + e + } + ma.defineGetter = qh, + ma.genkwaFunc = pe; + var qe = function(r, n) { + return ga.misceval.callsimOrSuspend(ga.builtins.property, new ga.builtin.func(function(e) { + return "function" == typeof r ? r(e) : ga.ffi.remapToPy(e[r][n]) + } + ), new ga.builtin.func(function(e, t) { + "function" == typeof n ? n(e, t) : e[r][n] = t.v + } + )) + }; + ma.defineProperty = qe; + var rh = function(r, n, e, t) { + return new ga.builtin.func(function(n) { + for (var a = [], i = 1; i < arguments.length; i++) + a[i - 1] = arguments[i]; + return ga.misceval.callsimOrSuspend(ga.misceval.buildClass(r, function(r, i) { + i.__init__ = new ga.builtin.func(function(r) { + r.graph = new window.PIXI.Graphics; + var e = r.graph; + t.apply(void 0, ne([n, e], a)); + var i = r.graph.width / 2 + , o = r.graph.height / 2 + , $ = r.graph.graphicsData[0].shape.x + , s = r.graph.graphicsData[0].shape.y; + r.graph.isCircle ? (r.graph.pivot.set(2 * i, 2 * o), + r.graph.position.set(2 * i, 2 * i)) : (r.graph.pivot.set($ + i, s + o), + r.graph.position.set($ + i, s + o)) + } + ), + i.rotation = qe(function(r) { + return ga.ffi.remapToPy(r.rotation) + }, function(r, n) { + r.physicGraphics ? ha.Body.setAngle(r.physicGraphics._body, n.v) : r.graph.rotation = n.v + }), + i.physicsImpostor = new ga.builtin.func(pe(function(r, n) { + n = ga.ffi.remapToJs(n); + var t = r[0] + , a = r[1] + , i = r[2]; + a = ga.ffi.remapToJs(a || n.is_static) || !1; + var o = !1; + i = ga.ffi.remapToJs(i || n.physicsOptions) || {}; + var $ = t.graph + , s = $.graphicsData + , p = $.width + , c = $.height + , u = $.line + , l = $.rotation + , h = {}; + t.graph.isCircle && (o = !0, + h.radius = s[0].shape.radius), + t.graph.isFilled && (h.fill = s[0].fillStyle.color), + t.physicGraphics = new le(me({ + x: s[0].shape.x, + y: s[0].shape.y, + width: p, + height: c, + lineWidth: u.width, + lineColor: u.color + }, h),me({ + isCircle: o, + isStatic: a + }, i),function(r) { + var n = r.position + , e = r.rotation; + t.graph.position = n, + t.graph.rotation = e + } + ), + ha.Body.setAngle(t.physicGraphics._body, l), + e.addToWorld(t.physicGraphics) + }, !0)) + })) + } + ) + }; + ma.upgradeGraphics = rh; + var sh = {}; + sh = { + scripts: { + start: "parcel build src/main.ts && parcel src/pygame-zero.ts -d ./dist", + server: "node server.js", + build: "parcel build src/main.ts --experimental-scope-hoisting --no-source-maps && parcel build src/pygame-zero.ts --no-source-maps" + }, + name: "skulpt-pygame-zero", + description: "This module provides most of the functions of pygame-zero for skulpt", + version: "0.3.4-alpha2", + main: "dist/main.js", + files: ["lib", "dist", "*.d.ts", "README.md", "README-zh.md"], + devDependencies: { + "alphanum-sort": "^1.0.2", + "ansi-styles": "^3.2.1", + argparse: "^1.0.10", + boolbase: "^1.0.0", + browserslist: "^4.16.3", + "call-bind": "^1.0.2", + "caller-callsite": "^2.0.0", + "caller-path": "^2.0.0", + callsites: "^2.0.0", + "caniuse-api": "^3.0.0", + "caniuse-lite": "^1.0.30001194", + chalk: "^2.4.2", + coa: "^2.0.2", + color: "^3.1.3", + "color-convert": "^1.9.3", + "color-name": "^1.1.3", + "color-string": "^1.5.4", + colorette: "^1.2.2", + cosmiconfig: "^5.2.1", + "css-color-names": "^0.0.4", + "css-declaration-sorter": "^4.0.1", + "css-select": "^2.1.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "^1.0.0-alpha.37", + "css-what": "^3.4.2", + cssesc: "^3.0.0", + "cssnano-preset-default": "^4.0.7", + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "cssnano-util-raw-cache": "^4.0.1", + "cssnano-util-same-parent": "^4.0.1", + csso: "^4.2.0", + "define-properties": "^1.1.3", + "dom-serializer": "^0.2.2", + domelementtype: "^1.3.1", + domutils: "^1.7.0", + "dot-prop": "^5.3.0", + "electron-to-chromium": "^1.3.678", + entities: "^2.2.0", + "error-ex": "^1.3.2", + "es-abstract": "^1.18.0-next.3", + "es-to-primitive": "^1.2.1", + escalade: "^3.1.1", + "escape-string-regexp": "^1.0.5", + esprima: "^4.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + has: "^1.0.3", + "has-bigints": "^1.0.1", + "has-flag": "^3.0.0", + "has-symbols": "^1.0.2", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "html-comment-regex": "^1.1.2", + "import-fresh": "^2.0.0", + "indexes-of": "^1.0.1", + "is-absolute-url": "^2.1.0", + "is-arrayish": "^0.2.1", + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-callable": "^1.2.3", + "is-color-stop": "^1.1.0", + "is-date-object": "^1.0.2", + "is-directory": "^0.3.1", + "is-negative-zero": "^2.0.1", + "is-number-object": "^1.0.4", + "is-obj": "^2.0.0", + "is-regex": "^1.1.2", + "is-resolvable": "^1.1.0", + "is-string": "^1.0.5", + "is-svg": "^3.0.0", + "is-symbol": "^1.0.3", + "js-yaml": "^3.14.1", + "json-parse-better-errors": "^1.0.2", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0", + "matter-js": "^0.16.1", + "mdn-data": "^2.0.4", + minimist: "^1.2.5", + mkdirp: "^0.5.5", + "node-releases": "^1.1.71", + "normalize-url": "^3.3.0", + "nth-check": "^1.0.2", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "object.getownpropertydescriptors": "^2.1.2", + "object.values": "^1.1.3", + "parse-json": "^4.0.0", + postcss: "^7.0.35", + "postcss-calc": "^7.0.5", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-selector-parser": "^3.1.2", + "postcss-svgo": "^4.0.2", + "postcss-unique-selectors": "^4.0.1", + "postcss-value-parser": "^3.3.1", + q: "^1.5.1", + "resolve-from": "^3.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0", + sax: "^1.2.4", + "simple-swizzle": "^0.2.2", + "source-map": "^0.6.1", + "sprintf-js": "^1.0.3", + stable: "^0.1.8", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + stylehacks: "^4.0.3", + "supports-color": "^6.1.0", + svgo: "^1.3.2", + timsort: "^0.3.0", + typescript: "^4.2.3", + "unbox-primitive": "^1.0.0", + uniq: "^1.0.1", + uniqs: "^2.0.0", + unquote: "^1.1.1", + "util-deprecate": "^1.0.2", + "util.promisify": "^1.0.1", + vendors: "^1.0.4", + "which-boxed-primitive": "^1.0.2" + }, + repository: { + type: "git", + url: "git+https://github.com/lipten/skulpt-pygame-zero.git" + }, + keywords: [], + author: "", + license: "ISC", + bugs: { + url: "https://github.com/lipten/skulpt-pygame-zero/issues" + }, + homepage: "https://github.com/lipten/skulpt-pygame-zero#readme", + _id: "skulpt-pygame-zero@0.2.3-alpha3", + dependencies: { + "@pixi/graphics": "^6.0.1" + } + }; + var th = Kb(sh); + var uh = window.Sk + , re = { + // "./pgzrun/__init__.js": "https://cdn.jsdelivr.net/npm/skulpt-pygame-zero@" + th.d.version + "/dist/pygame-zero.js" + "./pgzrun/__init__.js": "https://cdn.jsdelivr.net/gh/LIAO-wanting/skulpt_pj@main/src/pgzhelper/pygamezero.js" + } + , se = { + usePyGameZero: function(e) { + var n = this; + return function(t) { + return n.matchModelName(t) ? n.load(t) : e.call(this, t) + } + }, + load: function(e) { + return uh.misceval.promiseToSuspension(new Promise(function(n, t) { + oe("https://cdn.bootcdn.net/ajax/libs/pixi.js/5.3.4/pixi.min.js", "PIXI").then(function() { + fetch(re[e]).then(function(e) { + window.PIXI.utils.skipHello(); + var t = e.text(); + n(t) + }) + }) + } + )) + }, + matchModelName: function(e) { + return Object.keys(re).includes(e) + }, + setContainer: function(e) { + this.container = e + }, + reset: function() { + this._handleReset() + }, + _handleReset: function() {}, + _onRunning: function(e) { + this.app = e + }, + _moduleCache: { + App: null, + timerMap: new Map, + soundMap: {}, + music: new Audio, + windowListener: {} + } + }; + Lb.PyGameZero = se, + window.PyGameZero = se; + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = Lb + } else if (typeof define === "function" && define.amd) { + define(function() { + return Lb + }) + } +} +)(); diff --git a/mixly/common/main.js b/mixly/common/main.js new file mode 100644 index 00000000..38db5671 --- /dev/null +++ b/mixly/common/main.js @@ -0,0 +1,268 @@ +(() => { + const scriptUrl = new URL(document.currentScript.src); + const { href } = scriptUrl; + const commonDirPath = href.substring(0, href.lastIndexOf('/')); + window.COMMON_DIR_PATH = commonDirPath; + window.VIEW = scriptUrl.searchParams.get('view') || 'board'; + let config = {}; + try { + config = JSON.parse(localStorage.getItem('mixly3.0') ?? '{}'); + } catch (error) { + console.log(error); + } + const html = document.getElementsByTagName('html')[0]; + let { theme = 'light' } = config?.user ?? {}; + if (theme === 'auto') { + const themeMedia = window.matchMedia('(prefers-color-scheme: light)'); + theme = themeMedia.matches ? 'light' : 'dark'; + } + html.setAttribute('data-bs-theme', theme); +})(); + +LazyLoad.js([ + COMMON_DIR_PATH + '/blockly-core/base.js', + COMMON_DIR_PATH + '/modules/web-modules/jquery/jquery-3.7.1.min.js' +], function() { + /** + * 当前视图 + * @type {string} 主页面 home | 板卡页面 board + */ + goog.VIEW = VIEW; + + /** + * 当前环境 + * @type {string} electron | web + */ + goog.NOW_ENV = window?.process?.versions?.electron ? 'electron' : 'web'; + + /** + * 检测当前环境 + * @type {boolean} true - mixly Client; false - mixly Web + */ + goog.isElectron = goog.NOW_ENV === 'electron' ? true : false; + + /** + * @function 根据当前环境执行对应函数 + * @param type {string} 目标环境,electron | web | common + * @param func {function} 需要在目标环境下执行的函数 + * @return {void} + */ + goog.loadJs = (type, func) => { + if (type !== goog.NOW_ENV && type !== 'common') { + return; + } + func(); + } + + /** + * mixly文件夹相对于base.js的路径 + * @type {string} + */ + goog.MIXLY_DIR_PATH = ['../', '../modules/mixly-modules']; + if (goog.VIEW === 'home') { + goog.MIXLY_DIR_PATH.push('../../mixly-sw/mixly-modules'); + } + + /** + * 所有模块的信息所构成的列表,其中模块路径为其相对于blockly-core目录的相对路径 + * @type {array} + */ + goog.DEPENDENCIES = []; + + /** + * 缓存已请求成功的文本数据,防止重复请求 + * @type {object} + */ + goog.files = {}; + + goog.platform = () => { + const userAgent = navigator.userAgent; + if (!navigator.hid) return 'mobile'; + if (userAgent.indexOf('Windows NT') !== -1) return 'win32'; + if (userAgent.indexOf('Mac') !== -1) return 'darwin'; + if (userAgent.indexOf('X11') !== -1) return 'linux'; + if (userAgent.indexOf('Linux') !== -1) return 'linux'; + return 'unknown'; + } + + goog.fullPlatform = () => { + const userAgent = navigator.userAgent; + const platform = navigator.platform.toLowerCase(); + let os = 'unknown'; + if (platform.includes('win')) { + if (userAgent.indexOf('Windows NT 10.0') != -1) os = 'win10'; + else if (userAgent.indexOf('Windows NT 6.3') != -1) os = 'win8.1'; + else if (userAgent.indexOf('Windows NT 6.2') != -1) os = 'win8'; + else if (userAgent.indexOf('Windows NT 6.1') != -1) os = 'win7'; + else if (userAgent.indexOf('Windows NT 6.0') != -1) os = 'winvista'; + else if (userAgent.indexOf('Windows NT 5.1') != -1) os = 'winxp'; + } else if (!navigator.hid) { + os = 'android'; + } else if (platform.includes('iphone') || platform.includes('ipad') || platform.includes('ipod')) { + os = 'ios'; + } else if (platform.includes('mac')) { + os = 'darwin'; + } else if (platform.includes('linux')) { + os = 'linux'; + } + return os; + } + + /** + * @function 根据传入的相对路径异步获取文件数据 + * @param filePath {string} 文件所在的相对路径 + * @return {string | null} 请求成功返回请求文本,请求失败或请求超时时返回null + **/ + goog.readFile = async (filePath) => { + let str; + if (goog.files[filePath]) { + return goog.files[filePath]; + } + if (typeof nw === 'object') { + const fs = require('fs').promises; + const path = require('path'); + if (filePath.indexOf(window.location.origin) !== -1) { + filePath = filePath.replace(window.location.origin, nw.__dirname); + } else if (!filePath.indexOf('/')) { + filePath = path.resolve(nw.__dirname, './' + filePath); + } else { + let dirPath; + if (await fs.exists(nw.__filename) && await fs.stat(nw.__filename).isFile()) { + dirPath = path.resolve(nw.__filename, '../'); + } else { + dirPath = nw.__filename; + } + filePath = path.resolve(dirPath, './' + filePath); + } + str = await fs.readFile(filePath, 'utf-8'); + } else { + str = await new Promise((resolve, reject) => { + $.get(filePath, (data) => { + resolve(data); + }, 'text').fail(() => { + reject(`${filePath}获取失败`); + }); + }); + } + goog.files[filePath] = str; + return str; + } + + /** + * @function 根据传入的相对路径同步获取文件数据 + * @param filePath {string} 文件所在的相对路径 + * @return {string | null} 请求成功返回请求文本,请求失败或请求超时时返回null + **/ + goog.readFileSync = (filePath) => { + let str; + if (goog.files[filePath]) { + return goog.files[filePath]; + } + if (typeof nw === 'object') { + const fs = require('fs'); + const path = require('path'); + if (filePath.indexOf(window.location.origin) !== -1) { + filePath = filePath.replace(window.location.origin, nw.__dirname); + } else if (!filePath.indexOf('/')) { + filePath = path.resolve(nw.__dirname, './' + filePath); + } else { + let dirPath; + if (fs.existsSync(nw.__filename) && fs.statSync(nw.__filename).isFile()) { + dirPath = path.resolve(nw.__filename, '../'); + } else { + dirPath = nw.__filename; + } + filePath = path.resolve(dirPath, './' + filePath); + } + str = fs.readFileSync(filePath, 'utf-8'); + } else { + $.ajaxSettings.async = false; + $.get(filePath, (data) => { + str = data; + }, 'text').fail(() => { + console.log(filePath, '获取失败'); + }); + $.ajaxSettings.async = true; + } + goog.files[filePath] = str; + return str; + } + + /** + * @function 异步获取对应路径下JSON数据 + * @param filePath {string} JSON文件的相对路径 + * @param defaultConfig {object} 默认的JSON配置信息 + * @return {object | null} 当对应路径下文件不存在时将返回null + **/ + goog.readJson = async (filePath, defaultValue = {}) => { + let jsonStr = await goog.readFile(filePath) ?? ''; + try { + // 去除JSON字符串中的注释 + jsonStr = jsonStr.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? '' : m); + return { ...defaultValue, ...JSON.parse(jsonStr) }; + } catch (error) { + console.log(error); + } + return defaultValue; + } + + /** + * @function 同步获取对应路径下JSON数据 + * @param filePath {string} JSON文件的相对路径 + * @param defaultConfig {object} 默认的JSON配置信息 + * @return {object | null} 当对应路径下文件不存在时将返回null + **/ + goog.readJsonSync = (filePath, defaultValue = {}) => { + let jsonStr = goog.readFileSync(filePath) ?? ''; + try { + // 去除JSON字符串中的注释 + jsonStr = jsonStr.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? '' : m); + return { ...defaultValue, ...JSON.parse(jsonStr) }; + } catch (error) { + console.log(error); + } + return defaultValue; + } + + goog.get = goog.readFileSync; + goog.getJSON = goog.readJsonSync; + + /** + * @function 添加依赖项 + * @param dependencies {list} 依赖列表 + * @return {void} + **/ + goog.addDependencies = (dependencies) => { + if (typeof dependencies !== 'object') return; + for (let i = 0; i < dependencies.length; i++) { + const googPath = dependencies[i].path ?? null; + const googProvide = dependencies[i].provide ?? []; + const googRequire = dependencies[i].require ?? []; + if (!googPath || !googProvide || !googRequire) { + continue; + } + goog.addDependency(googPath, googProvide, googRequire); + } + } + + /** + * @function 将已有依赖加入到goog模块的依赖列表中,用于后续模块的加载 + * @return {void} + **/ + goog.initDependencies = () => { + for (let path of goog.MIXLY_DIR_PATH) { + const depsJson = goog.readJsonSync(goog.normalizePath_(goog.basePath + path + '/deps.json'), {}); + if (depsJson && typeof depsJson === 'object') { + for (let i in depsJson) { + depsJson[i].path = path + depsJson[i].path; + goog.DEPENDENCIES.push(depsJson[i]); + } + } + } + goog.addDependencies(goog.DEPENDENCIES); + } + + goog.initDependencies(); + goog.require('Mixly.Loader'); + +}); \ No newline at end of file diff --git a/mixly/common/media/blockly/1x1.gif b/mixly/common/media/blockly/1x1.gif new file mode 100644 index 00000000..30855112 Binary files /dev/null and b/mixly/common/media/blockly/1x1.gif differ diff --git a/mixly/common/media/blockly/click.mp3 b/mixly/common/media/blockly/click.mp3 new file mode 100644 index 00000000..4534b0dd Binary files /dev/null and b/mixly/common/media/blockly/click.mp3 differ diff --git a/mixly/common/media/blockly/click.ogg b/mixly/common/media/blockly/click.ogg new file mode 100644 index 00000000..e8ae42a6 Binary files /dev/null and b/mixly/common/media/blockly/click.ogg differ diff --git a/mixly/common/media/blockly/click.wav b/mixly/common/media/blockly/click.wav new file mode 100644 index 00000000..41a50cd7 Binary files /dev/null and b/mixly/common/media/blockly/click.wav differ diff --git a/mixly/common/media/blockly/delete-icon.svg b/mixly/common/media/blockly/delete-icon.svg new file mode 100644 index 00000000..1bd27ee7 --- /dev/null +++ b/mixly/common/media/blockly/delete-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mixly/common/media/blockly/delete.mp3 b/mixly/common/media/blockly/delete.mp3 new file mode 100644 index 00000000..442bd9c1 Binary files /dev/null and b/mixly/common/media/blockly/delete.mp3 differ diff --git a/mixly/common/media/blockly/delete.ogg b/mixly/common/media/blockly/delete.ogg new file mode 100644 index 00000000..67f84ac1 Binary files /dev/null and b/mixly/common/media/blockly/delete.ogg differ diff --git a/mixly/common/media/blockly/delete.wav b/mixly/common/media/blockly/delete.wav new file mode 100644 index 00000000..18debcf9 Binary files /dev/null and b/mixly/common/media/blockly/delete.wav differ diff --git a/mixly/common/media/blockly/disconnect.mp3 b/mixly/common/media/blockly/disconnect.mp3 new file mode 100644 index 00000000..8cfaff6c Binary files /dev/null and b/mixly/common/media/blockly/disconnect.mp3 differ diff --git a/mixly/common/media/blockly/disconnect.ogg b/mixly/common/media/blockly/disconnect.ogg new file mode 100644 index 00000000..467b527b Binary files /dev/null and b/mixly/common/media/blockly/disconnect.ogg differ diff --git a/mixly/common/media/blockly/disconnect.wav b/mixly/common/media/blockly/disconnect.wav new file mode 100644 index 00000000..af5c2544 Binary files /dev/null and b/mixly/common/media/blockly/disconnect.wav differ diff --git a/mixly/common/media/blockly/dropdown-arrow.svg b/mixly/common/media/blockly/dropdown-arrow.svg new file mode 100644 index 00000000..4e6ce19e --- /dev/null +++ b/mixly/common/media/blockly/dropdown-arrow.svg @@ -0,0 +1 @@ +dropdown-arrow \ No newline at end of file diff --git a/mixly/common/media/blockly/foldout-icon.svg b/mixly/common/media/blockly/foldout-icon.svg new file mode 100644 index 00000000..7aeb5b17 --- /dev/null +++ b/mixly/common/media/blockly/foldout-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mixly/common/media/blockly/handclosed.cur b/mixly/common/media/blockly/handclosed.cur new file mode 100644 index 00000000..4851755a Binary files /dev/null and b/mixly/common/media/blockly/handclosed.cur differ diff --git a/mixly/common/media/blockly/handdelete.cur b/mixly/common/media/blockly/handdelete.cur new file mode 100644 index 00000000..170320fc Binary files /dev/null and b/mixly/common/media/blockly/handdelete.cur differ diff --git a/mixly/common/media/blockly/handopen.cur b/mixly/common/media/blockly/handopen.cur new file mode 100644 index 00000000..da44588b Binary files /dev/null and b/mixly/common/media/blockly/handopen.cur differ diff --git a/mixly/common/media/blockly/pilcrow.png b/mixly/common/media/blockly/pilcrow.png new file mode 100644 index 00000000..f224c358 Binary files /dev/null and b/mixly/common/media/blockly/pilcrow.png differ diff --git a/mixly/common/media/blockly/quote0.png b/mixly/common/media/blockly/quote0.png new file mode 100644 index 00000000..c7820d60 Binary files /dev/null and b/mixly/common/media/blockly/quote0.png differ diff --git a/mixly/common/media/blockly/quote1.png b/mixly/common/media/blockly/quote1.png new file mode 100644 index 00000000..826583e0 Binary files /dev/null and b/mixly/common/media/blockly/quote1.png differ diff --git a/mixly/common/media/blockly/resize-handle.svg b/mixly/common/media/blockly/resize-handle.svg new file mode 100644 index 00000000..b46f177a --- /dev/null +++ b/mixly/common/media/blockly/resize-handle.svg @@ -0,0 +1,3 @@ + + + diff --git a/mixly/common/media/blockly/sprites.png b/mixly/common/media/blockly/sprites.png new file mode 100644 index 00000000..20aadb6c Binary files /dev/null and b/mixly/common/media/blockly/sprites.png differ diff --git a/mixly/common/media/blockly/sprites.svg b/mixly/common/media/blockly/sprites.svg new file mode 100644 index 00000000..3f09ef3a --- /dev/null +++ b/mixly/common/media/blockly/sprites.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mixly/common/media/blocks_icons/loop.png b/mixly/common/media/blocks_icons/loop.png new file mode 100644 index 00000000..e3f81030 Binary files /dev/null and b/mixly/common/media/blocks_icons/loop.png differ diff --git a/mixly/common/media/blynk/iot.png b/mixly/common/media/blynk/iot.png new file mode 100644 index 00000000..e9daa342 Binary files /dev/null and b/mixly/common/media/blynk/iot.png differ diff --git a/mixly/common/media/blynk/widget_accelerometer_sensor.png b/mixly/common/media/blynk/widget_accelerometer_sensor.png new file mode 100644 index 00000000..e31416e1 Binary files /dev/null and b/mixly/common/media/blynk/widget_accelerometer_sensor.png differ diff --git a/mixly/common/media/blynk/widget_bridge.png b/mixly/common/media/blynk/widget_bridge.png new file mode 100644 index 00000000..7225116d Binary files /dev/null and b/mixly/common/media/blynk/widget_bridge.png differ diff --git a/mixly/common/media/blynk/widget_email.png b/mixly/common/media/blynk/widget_email.png new file mode 100644 index 00000000..82e51e6a Binary files /dev/null and b/mixly/common/media/blynk/widget_email.png differ diff --git a/mixly/common/media/blynk/widget_gravity_sensor.png b/mixly/common/media/blynk/widget_gravity_sensor.png new file mode 100644 index 00000000..6df50bed Binary files /dev/null and b/mixly/common/media/blynk/widget_gravity_sensor.png differ diff --git a/mixly/common/media/blynk/widget_lcd.png b/mixly/common/media/blynk/widget_lcd.png new file mode 100644 index 00000000..4a8aee1d Binary files /dev/null and b/mixly/common/media/blynk/widget_lcd.png differ diff --git a/mixly/common/media/blynk/widget_lcd2.png b/mixly/common/media/blynk/widget_lcd2.png new file mode 100644 index 00000000..786b8b45 Binary files /dev/null and b/mixly/common/media/blynk/widget_lcd2.png differ diff --git a/mixly/common/media/blynk/widget_led.png b/mixly/common/media/blynk/widget_led.png new file mode 100644 index 00000000..948ed1dc Binary files /dev/null and b/mixly/common/media/blynk/widget_led.png differ diff --git a/mixly/common/media/blynk/widget_light_sensor.png b/mixly/common/media/blynk/widget_light_sensor.png new file mode 100644 index 00000000..5b5dcd5f Binary files /dev/null and b/mixly/common/media/blynk/widget_light_sensor.png differ diff --git a/mixly/common/media/blynk/widget_player.png b/mixly/common/media/blynk/widget_player.png new file mode 100644 index 00000000..e2efcb9f Binary files /dev/null and b/mixly/common/media/blynk/widget_player.png differ diff --git a/mixly/common/media/blynk/widget_push_notifications.png b/mixly/common/media/blynk/widget_push_notifications.png new file mode 100644 index 00000000..23a8db43 Binary files /dev/null and b/mixly/common/media/blynk/widget_push_notifications.png differ diff --git a/mixly/common/media/blynk/widget_rtc.png b/mixly/common/media/blynk/widget_rtc.png new file mode 100644 index 00000000..13b65373 Binary files /dev/null and b/mixly/common/media/blynk/widget_rtc.png differ diff --git a/mixly/common/media/blynk/widget_terminal.png b/mixly/common/media/blynk/widget_terminal.png new file mode 100644 index 00000000..496737e4 Binary files /dev/null and b/mixly/common/media/blynk/widget_terminal.png differ diff --git a/mixly/common/media/blynk/widget_timeinput.png b/mixly/common/media/blynk/widget_timeinput.png new file mode 100644 index 00000000..3eeaa32f Binary files /dev/null and b/mixly/common/media/blynk/widget_timeinput.png differ diff --git a/mixly/common/media/blynk/widget_video.png b/mixly/common/media/blynk/widget_video.png new file mode 100644 index 00000000..d7beab4d Binary files /dev/null and b/mixly/common/media/blynk/widget_video.png differ diff --git a/mixly/common/media/blynk/wifi_udp.png b/mixly/common/media/blynk/wifi_udp.png new file mode 100644 index 00000000..c5c6fcff Binary files /dev/null and b/mixly/common/media/blynk/wifi_udp.png differ diff --git a/mixly/common/media/btn/setting.png b/mixly/common/media/btn/setting.png new file mode 100644 index 00000000..158fc1c8 Binary files /dev/null and b/mixly/common/media/btn/setting.png differ diff --git a/mixly/common/media/mark/4Digitdisplay.png b/mixly/common/media/mark/4Digitdisplay.png new file mode 100644 index 00000000..85fce9e3 Binary files /dev/null and b/mixly/common/media/mark/4Digitdisplay.png differ diff --git a/mixly/common/media/mark/4Digitdisplay2.png b/mixly/common/media/mark/4Digitdisplay2.png new file mode 100644 index 00000000..2f9dbae7 Binary files /dev/null and b/mixly/common/media/mark/4Digitdisplay2.png differ diff --git a/mixly/common/media/mark/AIvoice.png b/mixly/common/media/mark/AIvoice.png new file mode 100644 index 00000000..395a9acf Binary files /dev/null and b/mixly/common/media/mark/AIvoice.png differ diff --git a/mixly/common/media/mark/AIvoice2.png b/mixly/common/media/mark/AIvoice2.png new file mode 100644 index 00000000..9f923c34 Binary files /dev/null and b/mixly/common/media/mark/AIvoice2.png differ diff --git a/mixly/common/media/mark/Matrix.png b/mixly/common/media/mark/Matrix.png new file mode 100644 index 00000000..b10ee8f6 Binary files /dev/null and b/mixly/common/media/mark/Matrix.png differ diff --git a/mixly/common/media/mark/Matrix2.png b/mixly/common/media/mark/Matrix2.png new file mode 100644 index 00000000..e708b30d Binary files /dev/null and b/mixly/common/media/mark/Matrix2.png differ diff --git a/mixly/common/media/mark/WIFI.png b/mixly/common/media/mark/WIFI.png new file mode 100644 index 00000000..cf269db8 Binary files /dev/null and b/mixly/common/media/mark/WIFI.png differ diff --git a/mixly/common/media/mark/WIFI2.png b/mixly/common/media/mark/WIFI2.png new file mode 100644 index 00000000..a9bf9597 Binary files /dev/null and b/mixly/common/media/mark/WIFI2.png differ diff --git a/mixly/common/media/mark/act.png b/mixly/common/media/mark/act.png new file mode 100644 index 00000000..5d835d6c Binary files /dev/null and b/mixly/common/media/mark/act.png differ diff --git a/mixly/common/media/mark/act2.png b/mixly/common/media/mark/act2.png new file mode 100644 index 00000000..a23fd0e7 Binary files /dev/null and b/mixly/common/media/mark/act2.png differ diff --git a/mixly/common/media/mark/actuator_extern.png b/mixly/common/media/mark/actuator_extern.png new file mode 100644 index 00000000..eef45ef0 Binary files /dev/null and b/mixly/common/media/mark/actuator_extern.png differ diff --git a/mixly/common/media/mark/actuator_new2.png b/mixly/common/media/mark/actuator_new2.png new file mode 100644 index 00000000..3eeb06ce Binary files /dev/null and b/mixly/common/media/mark/actuator_new2.png differ diff --git a/mixly/common/media/mark/actuator_onboard.png b/mixly/common/media/mark/actuator_onboard.png new file mode 100644 index 00000000..8250d4d1 Binary files /dev/null and b/mixly/common/media/mark/actuator_onboard.png differ diff --git a/mixly/common/media/mark/actuator_onboard2.png b/mixly/common/media/mark/actuator_onboard2.png new file mode 100644 index 00000000..3eeb06ce Binary files /dev/null and b/mixly/common/media/mark/actuator_onboard2.png differ diff --git a/mixly/common/media/mark/ai.png b/mixly/common/media/mark/ai.png new file mode 100644 index 00000000..901ccca0 Binary files /dev/null and b/mixly/common/media/mark/ai.png differ diff --git a/mixly/common/media/mark/ai2.png b/mixly/common/media/mark/ai2.png new file mode 100644 index 00000000..8df763c0 Binary files /dev/null and b/mixly/common/media/mark/ai2.png differ diff --git a/mixly/common/media/mark/algorithm.png b/mixly/common/media/mark/algorithm.png new file mode 100644 index 00000000..b1a8974b Binary files /dev/null and b/mixly/common/media/mark/algorithm.png differ diff --git a/mixly/common/media/mark/algorithm2.png b/mixly/common/media/mark/algorithm2.png new file mode 100644 index 00000000..4efb434b Binary files /dev/null and b/mixly/common/media/mark/algorithm2.png differ diff --git a/mixly/common/media/mark/av.png b/mixly/common/media/mark/av.png new file mode 100644 index 00000000..8812102b Binary files /dev/null and b/mixly/common/media/mark/av.png differ diff --git a/mixly/common/media/mark/av2.png b/mixly/common/media/mark/av2.png new file mode 100644 index 00000000..d1ff70ea Binary files /dev/null and b/mixly/common/media/mark/av2.png differ diff --git a/mixly/common/media/mark/blynk.png b/mixly/common/media/mark/blynk.png new file mode 100644 index 00000000..e7188472 Binary files /dev/null and b/mixly/common/media/mark/blynk.png differ diff --git a/mixly/common/media/mark/blynk2.png b/mixly/common/media/mark/blynk2.png new file mode 100644 index 00000000..038da536 Binary files /dev/null and b/mixly/common/media/mark/blynk2.png differ diff --git a/mixly/common/media/mark/camera.png b/mixly/common/media/mark/camera.png new file mode 100644 index 00000000..c03d02a7 Binary files /dev/null and b/mixly/common/media/mark/camera.png differ diff --git a/mixly/common/media/mark/camera2.png b/mixly/common/media/mark/camera2.png new file mode 100644 index 00000000..7152bffe Binary files /dev/null and b/mixly/common/media/mark/camera2.png differ diff --git a/mixly/common/media/mark/class.png b/mixly/common/media/mark/class.png new file mode 100644 index 00000000..4b035879 Binary files /dev/null and b/mixly/common/media/mark/class.png differ diff --git a/mixly/common/media/mark/class2.png b/mixly/common/media/mark/class2.png new file mode 100644 index 00000000..55ebfc81 Binary files /dev/null and b/mixly/common/media/mark/class2.png differ diff --git a/mixly/common/media/mark/comuni.png b/mixly/common/media/mark/comuni.png new file mode 100644 index 00000000..e6a1f205 Binary files /dev/null and b/mixly/common/media/mark/comuni.png differ diff --git a/mixly/common/media/mark/comuni2.png b/mixly/common/media/mark/comuni2.png new file mode 100644 index 00000000..1895b630 Binary files /dev/null and b/mixly/common/media/mark/comuni2.png differ diff --git a/mixly/common/media/mark/ctrl.png b/mixly/common/media/mark/ctrl.png new file mode 100644 index 00000000..bc45319d Binary files /dev/null and b/mixly/common/media/mark/ctrl.png differ diff --git a/mixly/common/media/mark/ctrl2.png b/mixly/common/media/mark/ctrl2.png new file mode 100644 index 00000000..d7363269 Binary files /dev/null and b/mixly/common/media/mark/ctrl2.png differ diff --git a/mixly/common/media/mark/ctrl3.png b/mixly/common/media/mark/ctrl3.png new file mode 100644 index 00000000..94895dd3 Binary files /dev/null and b/mixly/common/media/mark/ctrl3.png differ diff --git a/mixly/common/media/mark/ctrl4.png b/mixly/common/media/mark/ctrl4.png new file mode 100644 index 00000000..6e3c4870 Binary files /dev/null and b/mixly/common/media/mark/ctrl4.png differ diff --git a/mixly/common/media/mark/cv.png b/mixly/common/media/mark/cv.png new file mode 100644 index 00000000..c4b0d2d2 Binary files /dev/null and b/mixly/common/media/mark/cv.png differ diff --git a/mixly/common/media/mark/cv2.png b/mixly/common/media/mark/cv2.png new file mode 100644 index 00000000..b196f23e Binary files /dev/null and b/mixly/common/media/mark/cv2.png differ diff --git a/mixly/common/media/mark/data.png b/mixly/common/media/mark/data.png new file mode 100644 index 00000000..08681074 Binary files /dev/null and b/mixly/common/media/mark/data.png differ diff --git a/mixly/common/media/mark/data2.png b/mixly/common/media/mark/data2.png new file mode 100644 index 00000000..0d0ef5b9 Binary files /dev/null and b/mixly/common/media/mark/data2.png differ diff --git a/mixly/common/media/mark/database.png b/mixly/common/media/mark/database.png new file mode 100644 index 00000000..220e7229 Binary files /dev/null and b/mixly/common/media/mark/database.png differ diff --git a/mixly/common/media/mark/database2.png b/mixly/common/media/mark/database2.png new file mode 100644 index 00000000..5c7b246f Binary files /dev/null and b/mixly/common/media/mark/database2.png differ diff --git a/mixly/common/media/mark/default.png b/mixly/common/media/mark/default.png new file mode 100644 index 00000000..02d49c52 Binary files /dev/null and b/mixly/common/media/mark/default.png differ diff --git a/mixly/common/media/mark/default2.png b/mixly/common/media/mark/default2.png new file mode 100644 index 00000000..9add4480 Binary files /dev/null and b/mixly/common/media/mark/default2.png differ diff --git a/mixly/common/media/mark/dict.png b/mixly/common/media/mark/dict.png new file mode 100644 index 00000000..95baab5e Binary files /dev/null and b/mixly/common/media/mark/dict.png differ diff --git a/mixly/common/media/mark/dict2.png b/mixly/common/media/mark/dict2.png new file mode 100644 index 00000000..6d4436f9 Binary files /dev/null and b/mixly/common/media/mark/dict2.png differ diff --git a/mixly/common/media/mark/display_extern.png b/mixly/common/media/mark/display_extern.png new file mode 100644 index 00000000..1e524ba4 Binary files /dev/null and b/mixly/common/media/mark/display_extern.png differ diff --git a/mixly/common/media/mark/display_new2.png b/mixly/common/media/mark/display_new2.png new file mode 100644 index 00000000..08a82ef0 Binary files /dev/null and b/mixly/common/media/mark/display_new2.png differ diff --git a/mixly/common/media/mark/display_onboard.png b/mixly/common/media/mark/display_onboard.png new file mode 100644 index 00000000..079da76a Binary files /dev/null and b/mixly/common/media/mark/display_onboard.png differ diff --git a/mixly/common/media/mark/ds.png b/mixly/common/media/mark/ds.png new file mode 100644 index 00000000..97b9ed40 Binary files /dev/null and b/mixly/common/media/mark/ds.png differ diff --git a/mixly/common/media/mark/ds2.png b/mixly/common/media/mark/ds2.png new file mode 100644 index 00000000..7f0eb698 Binary files /dev/null and b/mixly/common/media/mark/ds2.png differ diff --git a/mixly/common/media/mark/event.png b/mixly/common/media/mark/event.png new file mode 100644 index 00000000..e6bd38d5 Binary files /dev/null and b/mixly/common/media/mark/event.png differ diff --git a/mixly/common/media/mark/event2.png b/mixly/common/media/mark/event2.png new file mode 100644 index 00000000..d3216047 Binary files /dev/null and b/mixly/common/media/mark/event2.png differ diff --git a/mixly/common/media/mark/factory3.png b/mixly/common/media/mark/factory3.png new file mode 100644 index 00000000..c4378c70 Binary files /dev/null and b/mixly/common/media/mark/factory3.png differ diff --git a/mixly/common/media/mark/factory4.png b/mixly/common/media/mark/factory4.png new file mode 100644 index 00000000..2f0adbf1 Binary files /dev/null and b/mixly/common/media/mark/factory4.png differ diff --git a/mixly/common/media/mark/file.png b/mixly/common/media/mark/file.png new file mode 100644 index 00000000..2cfaf2a2 Binary files /dev/null and b/mixly/common/media/mark/file.png differ diff --git a/mixly/common/media/mark/file2.png b/mixly/common/media/mark/file2.png new file mode 100644 index 00000000..c8d4dcd1 Binary files /dev/null and b/mixly/common/media/mark/file2.png differ diff --git a/mixly/common/media/mark/func.png b/mixly/common/media/mark/func.png new file mode 100644 index 00000000..78f2364f Binary files /dev/null and b/mixly/common/media/mark/func.png differ diff --git a/mixly/common/media/mark/func2.png b/mixly/common/media/mark/func2.png new file mode 100644 index 00000000..47c3d265 Binary files /dev/null and b/mixly/common/media/mark/func2.png differ diff --git a/mixly/common/media/mark/game.png b/mixly/common/media/mark/game.png new file mode 100644 index 00000000..0e67ae7f Binary files /dev/null and b/mixly/common/media/mark/game.png differ diff --git a/mixly/common/media/mark/game2.png b/mixly/common/media/mark/game2.png new file mode 100644 index 00000000..fa0044bc Binary files /dev/null and b/mixly/common/media/mark/game2.png differ diff --git a/mixly/common/media/mark/game3.png b/mixly/common/media/mark/game3.png new file mode 100644 index 00000000..3f8c6d11 Binary files /dev/null and b/mixly/common/media/mark/game3.png differ diff --git a/mixly/common/media/mark/game4.png b/mixly/common/media/mark/game4.png new file mode 100644 index 00000000..1d8a72b6 Binary files /dev/null and b/mixly/common/media/mark/game4.png differ diff --git a/mixly/common/media/mark/game5.png b/mixly/common/media/mark/game5.png new file mode 100644 index 00000000..6d07750c Binary files /dev/null and b/mixly/common/media/mark/game5.png differ diff --git a/mixly/common/media/mark/game6.png b/mixly/common/media/mark/game6.png new file mode 100644 index 00000000..be97fb5b Binary files /dev/null and b/mixly/common/media/mark/game6.png differ diff --git a/mixly/common/media/mark/hardware.png b/mixly/common/media/mark/hardware.png new file mode 100644 index 00000000..0c4fd3bb Binary files /dev/null and b/mixly/common/media/mark/hardware.png differ diff --git a/mixly/common/media/mark/hardware2.png b/mixly/common/media/mark/hardware2.png new file mode 100644 index 00000000..0882ef80 Binary files /dev/null and b/mixly/common/media/mark/hardware2.png differ diff --git a/mixly/common/media/mark/hear.png b/mixly/common/media/mark/hear.png new file mode 100644 index 00000000..746a7f26 Binary files /dev/null and b/mixly/common/media/mark/hear.png differ diff --git a/mixly/common/media/mark/hear2.png b/mixly/common/media/mark/hear2.png new file mode 100644 index 00000000..f413b33a Binary files /dev/null and b/mixly/common/media/mark/hear2.png differ diff --git a/mixly/common/media/mark/html.png b/mixly/common/media/mark/html.png new file mode 100644 index 00000000..075a4b9b Binary files /dev/null and b/mixly/common/media/mark/html.png differ diff --git a/mixly/common/media/mark/html2.png b/mixly/common/media/mark/html2.png new file mode 100644 index 00000000..f971eadb Binary files /dev/null and b/mixly/common/media/mark/html2.png differ diff --git a/mixly/common/media/mark/image.png b/mixly/common/media/mark/image.png new file mode 100644 index 00000000..d1540c40 Binary files /dev/null and b/mixly/common/media/mark/image.png differ diff --git a/mixly/common/media/mark/image2.png b/mixly/common/media/mark/image2.png new file mode 100644 index 00000000..2a7e78a1 Binary files /dev/null and b/mixly/common/media/mark/image2.png differ diff --git a/mixly/common/media/mark/inner.png b/mixly/common/media/mark/inner.png new file mode 100644 index 00000000..e988cef1 Binary files /dev/null and b/mixly/common/media/mark/inner.png differ diff --git a/mixly/common/media/mark/inner2.png b/mixly/common/media/mark/inner2.png new file mode 100644 index 00000000..95933c03 Binary files /dev/null and b/mixly/common/media/mark/inner2.png differ diff --git a/mixly/common/media/mark/inout.png b/mixly/common/media/mark/inout.png new file mode 100644 index 00000000..4deb9766 Binary files /dev/null and b/mixly/common/media/mark/inout.png differ diff --git a/mixly/common/media/mark/inout2.png b/mixly/common/media/mark/inout2.png new file mode 100644 index 00000000..9ee2f07b Binary files /dev/null and b/mixly/common/media/mark/inout2.png differ diff --git a/mixly/common/media/mark/iot.png b/mixly/common/media/mark/iot.png new file mode 100644 index 00000000..d76964f0 Binary files /dev/null and b/mixly/common/media/mark/iot.png differ diff --git a/mixly/common/media/mark/iot2.png b/mixly/common/media/mark/iot2.png new file mode 100644 index 00000000..6d3673e1 Binary files /dev/null and b/mixly/common/media/mark/iot2.png differ diff --git a/mixly/common/media/mark/iot3.png b/mixly/common/media/mark/iot3.png new file mode 100644 index 00000000..15fddb52 Binary files /dev/null and b/mixly/common/media/mark/iot3.png differ diff --git a/mixly/common/media/mark/lcd.png b/mixly/common/media/mark/lcd.png new file mode 100644 index 00000000..c4ce268c Binary files /dev/null and b/mixly/common/media/mark/lcd.png differ diff --git a/mixly/common/media/mark/lcd2.png b/mixly/common/media/mark/lcd2.png new file mode 100644 index 00000000..7e9da724 Binary files /dev/null and b/mixly/common/media/mark/lcd2.png differ diff --git a/mixly/common/media/mark/light.png b/mixly/common/media/mark/light.png new file mode 100644 index 00000000..6a3fbee5 Binary files /dev/null and b/mixly/common/media/mark/light.png differ diff --git a/mixly/common/media/mark/light2.png b/mixly/common/media/mark/light2.png new file mode 100644 index 00000000..7d8d6475 Binary files /dev/null and b/mixly/common/media/mark/light2.png differ diff --git a/mixly/common/media/mark/list.png b/mixly/common/media/mark/list.png new file mode 100644 index 00000000..b2e40811 Binary files /dev/null and b/mixly/common/media/mark/list.png differ diff --git a/mixly/common/media/mark/list2.png b/mixly/common/media/mark/list2.png new file mode 100644 index 00000000..54ea4047 Binary files /dev/null and b/mixly/common/media/mark/list2.png differ diff --git a/mixly/common/media/mark/list3.png b/mixly/common/media/mark/list3.png new file mode 100644 index 00000000..fd6776d3 Binary files /dev/null and b/mixly/common/media/mark/list3.png differ diff --git a/mixly/common/media/mark/list4.png b/mixly/common/media/mark/list4.png new file mode 100644 index 00000000..b000d419 Binary files /dev/null and b/mixly/common/media/mark/list4.png differ diff --git a/mixly/common/media/mark/logic.png b/mixly/common/media/mark/logic.png new file mode 100644 index 00000000..d643564c Binary files /dev/null and b/mixly/common/media/mark/logic.png differ diff --git a/mixly/common/media/mark/logic2.png b/mixly/common/media/mark/logic2.png new file mode 100644 index 00000000..b869b8f9 Binary files /dev/null and b/mixly/common/media/mark/logic2.png differ diff --git a/mixly/common/media/mark/machine_learning.png b/mixly/common/media/mark/machine_learning.png new file mode 100644 index 00000000..ee87f639 Binary files /dev/null and b/mixly/common/media/mark/machine_learning.png differ diff --git a/mixly/common/media/mark/machine_learning2.png b/mixly/common/media/mark/machine_learning2.png new file mode 100644 index 00000000..e59535cf Binary files /dev/null and b/mixly/common/media/mark/machine_learning2.png differ diff --git a/mixly/common/media/mark/math.png b/mixly/common/media/mark/math.png new file mode 100644 index 00000000..1f85522b Binary files /dev/null and b/mixly/common/media/mark/math.png differ diff --git a/mixly/common/media/mark/math2.png b/mixly/common/media/mark/math2.png new file mode 100644 index 00000000..f464c273 Binary files /dev/null and b/mixly/common/media/mark/math2.png differ diff --git a/mixly/common/media/mark/method.png b/mixly/common/media/mark/method.png new file mode 100644 index 00000000..5d23e4b2 Binary files /dev/null and b/mixly/common/media/mark/method.png differ diff --git a/mixly/common/media/mark/method2.png b/mixly/common/media/mark/method2.png new file mode 100644 index 00000000..184a0fb0 Binary files /dev/null and b/mixly/common/media/mark/method2.png differ diff --git a/mixly/common/media/mark/mixio.png b/mixly/common/media/mark/mixio.png new file mode 100644 index 00000000..54ea3d4e Binary files /dev/null and b/mixly/common/media/mark/mixio.png differ diff --git a/mixly/common/media/mark/mixio2.png b/mixly/common/media/mark/mixio2.png new file mode 100644 index 00000000..d0f0992e Binary files /dev/null and b/mixly/common/media/mark/mixio2.png differ diff --git a/mixly/common/media/mark/monitor.png b/mixly/common/media/mark/monitor.png new file mode 100644 index 00000000..61d77d4a Binary files /dev/null and b/mixly/common/media/mark/monitor.png differ diff --git a/mixly/common/media/mark/monitor2.png b/mixly/common/media/mark/monitor2.png new file mode 100644 index 00000000..a42ce740 Binary files /dev/null and b/mixly/common/media/mark/monitor2.png differ diff --git a/mixly/common/media/mark/motor.png b/mixly/common/media/mark/motor.png new file mode 100644 index 00000000..653a1ef4 Binary files /dev/null and b/mixly/common/media/mark/motor.png differ diff --git a/mixly/common/media/mark/motor2.png b/mixly/common/media/mark/motor2.png new file mode 100644 index 00000000..94aee44b Binary files /dev/null and b/mixly/common/media/mark/motor2.png differ diff --git a/mixly/common/media/mark/mqtt.png b/mixly/common/media/mark/mqtt.png new file mode 100644 index 00000000..2937defd Binary files /dev/null and b/mixly/common/media/mark/mqtt.png differ diff --git a/mixly/common/media/mark/mqtt2.png b/mixly/common/media/mark/mqtt2.png new file mode 100644 index 00000000..7201eb0b Binary files /dev/null and b/mixly/common/media/mark/mqtt2.png differ diff --git a/mixly/common/media/mark/music.png b/mixly/common/media/mark/music.png new file mode 100644 index 00000000..ed851411 Binary files /dev/null and b/mixly/common/media/mark/music.png differ diff --git a/mixly/common/media/mark/music2.png b/mixly/common/media/mark/music2.png new file mode 100644 index 00000000..c1013549 Binary files /dev/null and b/mixly/common/media/mark/music2.png differ diff --git a/mixly/common/media/mark/ndata.png b/mixly/common/media/mark/ndata.png new file mode 100644 index 00000000..35e86f4a Binary files /dev/null and b/mixly/common/media/mark/ndata.png differ diff --git a/mixly/common/media/mark/ndata2.png b/mixly/common/media/mark/ndata2.png new file mode 100644 index 00000000..9e6a23f0 Binary files /dev/null and b/mixly/common/media/mark/ndata2.png differ diff --git a/mixly/common/media/mark/net.png b/mixly/common/media/mark/net.png new file mode 100644 index 00000000..f808b964 Binary files /dev/null and b/mixly/common/media/mark/net.png differ diff --git a/mixly/common/media/mark/net2.png b/mixly/common/media/mark/net2.png new file mode 100644 index 00000000..83ff27fa Binary files /dev/null and b/mixly/common/media/mark/net2.png differ diff --git a/mixly/common/media/mark/net3.png b/mixly/common/media/mark/net3.png new file mode 100644 index 00000000..78dcdd73 Binary files /dev/null and b/mixly/common/media/mark/net3.png differ diff --git a/mixly/common/media/mark/object.png b/mixly/common/media/mark/object.png new file mode 100644 index 00000000..fc20c04c Binary files /dev/null and b/mixly/common/media/mark/object.png differ diff --git a/mixly/common/media/mark/object2.png b/mixly/common/media/mark/object2.png new file mode 100644 index 00000000..fe373ad5 Binary files /dev/null and b/mixly/common/media/mark/object2.png differ diff --git a/mixly/common/media/mark/oled.png b/mixly/common/media/mark/oled.png new file mode 100644 index 00000000..49d00525 Binary files /dev/null and b/mixly/common/media/mark/oled.png differ diff --git a/mixly/common/media/mark/oled2.png b/mixly/common/media/mark/oled2.png new file mode 100644 index 00000000..02604be8 Binary files /dev/null and b/mixly/common/media/mark/oled2.png differ diff --git a/mixly/common/media/mark/onenet.png b/mixly/common/media/mark/onenet.png new file mode 100644 index 00000000..24113b8e Binary files /dev/null and b/mixly/common/media/mark/onenet.png differ diff --git a/mixly/common/media/mark/onenet2.png b/mixly/common/media/mark/onenet2.png new file mode 100644 index 00000000..11eb857e Binary files /dev/null and b/mixly/common/media/mark/onenet2.png differ diff --git a/mixly/common/media/mark/port.png b/mixly/common/media/mark/port.png new file mode 100644 index 00000000..3cc5d14e Binary files /dev/null and b/mixly/common/media/mark/port.png differ diff --git a/mixly/common/media/mark/port2.png b/mixly/common/media/mark/port2.png new file mode 100644 index 00000000..a056271d Binary files /dev/null and b/mixly/common/media/mark/port2.png differ diff --git a/mixly/common/media/mark/property.png b/mixly/common/media/mark/property.png new file mode 100644 index 00000000..1070b69e Binary files /dev/null and b/mixly/common/media/mark/property.png differ diff --git a/mixly/common/media/mark/property2.png b/mixly/common/media/mark/property2.png new file mode 100644 index 00000000..693638c5 Binary files /dev/null and b/mixly/common/media/mark/property2.png differ diff --git a/mixly/common/media/mark/requests.png b/mixly/common/media/mark/requests.png new file mode 100644 index 00000000..382587a1 Binary files /dev/null and b/mixly/common/media/mark/requests.png differ diff --git a/mixly/common/media/mark/requests2.png b/mixly/common/media/mark/requests2.png new file mode 100644 index 00000000..53ddc0f5 Binary files /dev/null and b/mixly/common/media/mark/requests2.png differ diff --git a/mixly/common/media/mark/resources.png b/mixly/common/media/mark/resources.png new file mode 100644 index 00000000..44f98b4e Binary files /dev/null and b/mixly/common/media/mark/resources.png differ diff --git a/mixly/common/media/mark/resources2.png b/mixly/common/media/mark/resources2.png new file mode 100644 index 00000000..4d0dd2d3 Binary files /dev/null and b/mixly/common/media/mark/resources2.png differ diff --git a/mixly/common/media/mark/search.png b/mixly/common/media/mark/search.png new file mode 100644 index 00000000..7101a2af Binary files /dev/null and b/mixly/common/media/mark/search.png differ diff --git a/mixly/common/media/mark/search2.png b/mixly/common/media/mark/search2.png new file mode 100644 index 00000000..b58d4b3c Binary files /dev/null and b/mixly/common/media/mark/search2.png differ diff --git a/mixly/common/media/mark/sensor.png b/mixly/common/media/mark/sensor.png new file mode 100644 index 00000000..5613efbe Binary files /dev/null and b/mixly/common/media/mark/sensor.png differ diff --git a/mixly/common/media/mark/sensor2.png b/mixly/common/media/mark/sensor2.png new file mode 100644 index 00000000..a47c26a8 Binary files /dev/null and b/mixly/common/media/mark/sensor2.png differ diff --git a/mixly/common/media/mark/sensor3.png b/mixly/common/media/mark/sensor3.png new file mode 100644 index 00000000..3616d2a6 Binary files /dev/null and b/mixly/common/media/mark/sensor3.png differ diff --git a/mixly/common/media/mark/sensor4.png b/mixly/common/media/mark/sensor4.png new file mode 100644 index 00000000..f6502c7e Binary files /dev/null and b/mixly/common/media/mark/sensor4.png differ diff --git a/mixly/common/media/mark/sensor_extern.png b/mixly/common/media/mark/sensor_extern.png new file mode 100644 index 00000000..2c1181a8 Binary files /dev/null and b/mixly/common/media/mark/sensor_extern.png differ diff --git a/mixly/common/media/mark/sensor_new2.png b/mixly/common/media/mark/sensor_new2.png new file mode 100644 index 00000000..97100232 Binary files /dev/null and b/mixly/common/media/mark/sensor_new2.png differ diff --git a/mixly/common/media/mark/sensor_onboard.png b/mixly/common/media/mark/sensor_onboard.png new file mode 100644 index 00000000..491f36d3 Binary files /dev/null and b/mixly/common/media/mark/sensor_onboard.png differ diff --git a/mixly/common/media/mark/sensor_onboard2.png b/mixly/common/media/mark/sensor_onboard2.png new file mode 100644 index 00000000..97100232 Binary files /dev/null and b/mixly/common/media/mark/sensor_onboard2.png differ diff --git a/mixly/common/media/mark/set.png b/mixly/common/media/mark/set.png new file mode 100644 index 00000000..3f215bd0 Binary files /dev/null and b/mixly/common/media/mark/set.png differ diff --git a/mixly/common/media/mark/set2.png b/mixly/common/media/mark/set2.png new file mode 100644 index 00000000..681a9e75 Binary files /dev/null and b/mixly/common/media/mark/set2.png differ diff --git a/mixly/common/media/mark/store.png b/mixly/common/media/mark/store.png new file mode 100644 index 00000000..dfd33bf8 Binary files /dev/null and b/mixly/common/media/mark/store.png differ diff --git a/mixly/common/media/mark/store2.png b/mixly/common/media/mark/store2.png new file mode 100644 index 00000000..c725a288 Binary files /dev/null and b/mixly/common/media/mark/store2.png differ diff --git a/mixly/common/media/mark/system.png b/mixly/common/media/mark/system.png new file mode 100644 index 00000000..f342992f Binary files /dev/null and b/mixly/common/media/mark/system.png differ diff --git a/mixly/common/media/mark/system2.png b/mixly/common/media/mark/system2.png new file mode 100644 index 00000000..ab2bdf4e Binary files /dev/null and b/mixly/common/media/mark/system2.png differ diff --git a/mixly/common/media/mark/text.png b/mixly/common/media/mark/text.png new file mode 100644 index 00000000..c7ee9f7c Binary files /dev/null and b/mixly/common/media/mark/text.png differ diff --git a/mixly/common/media/mark/text2.png b/mixly/common/media/mark/text2.png new file mode 100644 index 00000000..2854d5c4 Binary files /dev/null and b/mixly/common/media/mark/text2.png differ diff --git a/mixly/common/media/mark/tft.png b/mixly/common/media/mark/tft.png new file mode 100644 index 00000000..2195d766 Binary files /dev/null and b/mixly/common/media/mark/tft.png differ diff --git a/mixly/common/media/mark/tft2.png b/mixly/common/media/mark/tft2.png new file mode 100644 index 00000000..f7960c0d Binary files /dev/null and b/mixly/common/media/mark/tft2.png differ diff --git a/mixly/common/media/mark/tool.png b/mixly/common/media/mark/tool.png new file mode 100644 index 00000000..67272d05 Binary files /dev/null and b/mixly/common/media/mark/tool.png differ diff --git a/mixly/common/media/mark/tool2.png b/mixly/common/media/mark/tool2.png new file mode 100644 index 00000000..e2c60f0c Binary files /dev/null and b/mixly/common/media/mark/tool2.png differ diff --git a/mixly/common/media/mark/tuple.png b/mixly/common/media/mark/tuple.png new file mode 100644 index 00000000..9c11befb Binary files /dev/null and b/mixly/common/media/mark/tuple.png differ diff --git a/mixly/common/media/mark/tuple2.png b/mixly/common/media/mark/tuple2.png new file mode 100644 index 00000000..17ef705e Binary files /dev/null and b/mixly/common/media/mark/tuple2.png differ diff --git a/mixly/common/media/mark/turtle.png b/mixly/common/media/mark/turtle.png new file mode 100644 index 00000000..ea1d4d79 Binary files /dev/null and b/mixly/common/media/mark/turtle.png differ diff --git a/mixly/common/media/mark/turtle2.png b/mixly/common/media/mark/turtle2.png new file mode 100644 index 00000000..7147da3a Binary files /dev/null and b/mixly/common/media/mark/turtle2.png differ diff --git a/mixly/common/media/mark/var.png b/mixly/common/media/mark/var.png new file mode 100644 index 00000000..935818df Binary files /dev/null and b/mixly/common/media/mark/var.png differ diff --git a/mixly/common/media/mark/var2.png b/mixly/common/media/mark/var2.png new file mode 100644 index 00000000..1c94e1d9 Binary files /dev/null and b/mixly/common/media/mark/var2.png differ diff --git a/mixly/common/media/mark/voice.png b/mixly/common/media/mark/voice.png new file mode 100644 index 00000000..7d9d9330 Binary files /dev/null and b/mixly/common/media/mark/voice.png differ diff --git a/mixly/common/media/mark/voice2.png b/mixly/common/media/mark/voice2.png new file mode 100644 index 00000000..f0848d17 Binary files /dev/null and b/mixly/common/media/mark/voice2.png differ diff --git a/mixly/common/media/mark/weather.png b/mixly/common/media/mark/weather.png new file mode 100644 index 00000000..28a4aeef Binary files /dev/null and b/mixly/common/media/mark/weather.png differ diff --git a/mixly/common/media/mark/weather2.png b/mixly/common/media/mark/weather2.png new file mode 100644 index 00000000..8e7bd7bc Binary files /dev/null and b/mixly/common/media/mark/weather2.png differ diff --git a/mixly/common/media/mixly.icns b/mixly/common/media/mixly.icns new file mode 100644 index 00000000..456186c8 Binary files /dev/null and b/mixly/common/media/mixly.icns differ diff --git a/mixly/common/media/mixly.png b/mixly/common/media/mixly.png new file mode 100644 index 00000000..d3e3dc94 Binary files /dev/null and b/mixly/common/media/mixly.png differ diff --git a/mixly/common/media/oled_icons/100.png b/mixly/common/media/oled_icons/100.png new file mode 100644 index 00000000..562207e7 Binary files /dev/null and b/mixly/common/media/oled_icons/100.png differ diff --git a/mixly/common/media/oled_icons/101.png b/mixly/common/media/oled_icons/101.png new file mode 100644 index 00000000..721d1fb0 Binary files /dev/null and b/mixly/common/media/oled_icons/101.png differ diff --git a/mixly/common/media/oled_icons/102.png b/mixly/common/media/oled_icons/102.png new file mode 100644 index 00000000..814f3e0c Binary files /dev/null and b/mixly/common/media/oled_icons/102.png differ diff --git a/mixly/common/media/oled_icons/103.png b/mixly/common/media/oled_icons/103.png new file mode 100644 index 00000000..4f764fd7 Binary files /dev/null and b/mixly/common/media/oled_icons/103.png differ diff --git a/mixly/common/media/oled_icons/104.png b/mixly/common/media/oled_icons/104.png new file mode 100644 index 00000000..9f9c522a Binary files /dev/null and b/mixly/common/media/oled_icons/104.png differ diff --git a/mixly/common/media/oled_icons/105.png b/mixly/common/media/oled_icons/105.png new file mode 100644 index 00000000..fae65d89 Binary files /dev/null and b/mixly/common/media/oled_icons/105.png differ diff --git a/mixly/common/media/oled_icons/106.png b/mixly/common/media/oled_icons/106.png new file mode 100644 index 00000000..b5edbcf5 Binary files /dev/null and b/mixly/common/media/oled_icons/106.png differ diff --git a/mixly/common/media/oled_icons/107.png b/mixly/common/media/oled_icons/107.png new file mode 100644 index 00000000..0f1d1ff5 Binary files /dev/null and b/mixly/common/media/oled_icons/107.png differ diff --git a/mixly/common/media/oled_icons/108.png b/mixly/common/media/oled_icons/108.png new file mode 100644 index 00000000..e59845fb Binary files /dev/null and b/mixly/common/media/oled_icons/108.png differ diff --git a/mixly/common/media/oled_icons/109.png b/mixly/common/media/oled_icons/109.png new file mode 100644 index 00000000..81aec12b Binary files /dev/null and b/mixly/common/media/oled_icons/109.png differ diff --git a/mixly/common/media/oled_icons/110.png b/mixly/common/media/oled_icons/110.png new file mode 100644 index 00000000..6388b699 Binary files /dev/null and b/mixly/common/media/oled_icons/110.png differ diff --git a/mixly/common/media/oled_icons/111.png b/mixly/common/media/oled_icons/111.png new file mode 100644 index 00000000..483b5027 Binary files /dev/null and b/mixly/common/media/oled_icons/111.png differ diff --git a/mixly/common/media/oled_icons/112.png b/mixly/common/media/oled_icons/112.png new file mode 100644 index 00000000..eabafd6d Binary files /dev/null and b/mixly/common/media/oled_icons/112.png differ diff --git a/mixly/common/media/oled_icons/113.png b/mixly/common/media/oled_icons/113.png new file mode 100644 index 00000000..74f6b250 Binary files /dev/null and b/mixly/common/media/oled_icons/113.png differ diff --git a/mixly/common/media/oled_icons/114.png b/mixly/common/media/oled_icons/114.png new file mode 100644 index 00000000..19a1b721 Binary files /dev/null and b/mixly/common/media/oled_icons/114.png differ diff --git a/mixly/common/media/oled_icons/115.png b/mixly/common/media/oled_icons/115.png new file mode 100644 index 00000000..5637f87f Binary files /dev/null and b/mixly/common/media/oled_icons/115.png differ diff --git a/mixly/common/media/oled_icons/116.png b/mixly/common/media/oled_icons/116.png new file mode 100644 index 00000000..a55b0062 Binary files /dev/null and b/mixly/common/media/oled_icons/116.png differ diff --git a/mixly/common/media/oled_icons/117.png b/mixly/common/media/oled_icons/117.png new file mode 100644 index 00000000..7a4d0c6b Binary files /dev/null and b/mixly/common/media/oled_icons/117.png differ diff --git a/mixly/common/media/oled_icons/118.png b/mixly/common/media/oled_icons/118.png new file mode 100644 index 00000000..db7ab939 Binary files /dev/null and b/mixly/common/media/oled_icons/118.png differ diff --git a/mixly/common/media/oled_icons/119.png b/mixly/common/media/oled_icons/119.png new file mode 100644 index 00000000..5d0d49fd Binary files /dev/null and b/mixly/common/media/oled_icons/119.png differ diff --git a/mixly/common/media/oled_icons/120.png b/mixly/common/media/oled_icons/120.png new file mode 100644 index 00000000..1d9ba11f Binary files /dev/null and b/mixly/common/media/oled_icons/120.png differ diff --git a/mixly/common/media/oled_icons/121.png b/mixly/common/media/oled_icons/121.png new file mode 100644 index 00000000..eb58218b Binary files /dev/null and b/mixly/common/media/oled_icons/121.png differ diff --git a/mixly/common/media/oled_icons/122.png b/mixly/common/media/oled_icons/122.png new file mode 100644 index 00000000..4aec08a9 Binary files /dev/null and b/mixly/common/media/oled_icons/122.png differ diff --git a/mixly/common/media/oled_icons/123.png b/mixly/common/media/oled_icons/123.png new file mode 100644 index 00000000..fa8c7904 Binary files /dev/null and b/mixly/common/media/oled_icons/123.png differ diff --git a/mixly/common/media/oled_icons/124.png b/mixly/common/media/oled_icons/124.png new file mode 100644 index 00000000..d9496b67 Binary files /dev/null and b/mixly/common/media/oled_icons/124.png differ diff --git a/mixly/common/media/oled_icons/125.png b/mixly/common/media/oled_icons/125.png new file mode 100644 index 00000000..0b5fac21 Binary files /dev/null and b/mixly/common/media/oled_icons/125.png differ diff --git a/mixly/common/media/oled_icons/126.png b/mixly/common/media/oled_icons/126.png new file mode 100644 index 00000000..a3806536 Binary files /dev/null and b/mixly/common/media/oled_icons/126.png differ diff --git a/mixly/common/media/oled_icons/127.png b/mixly/common/media/oled_icons/127.png new file mode 100644 index 00000000..f2f3bfa8 Binary files /dev/null and b/mixly/common/media/oled_icons/127.png differ diff --git a/mixly/common/media/oled_icons/128.png b/mixly/common/media/oled_icons/128.png new file mode 100644 index 00000000..37b49879 Binary files /dev/null and b/mixly/common/media/oled_icons/128.png differ diff --git a/mixly/common/media/oled_icons/129.png b/mixly/common/media/oled_icons/129.png new file mode 100644 index 00000000..5e8aebaf Binary files /dev/null and b/mixly/common/media/oled_icons/129.png differ diff --git a/mixly/common/media/oled_icons/130.png b/mixly/common/media/oled_icons/130.png new file mode 100644 index 00000000..8e6a2d70 Binary files /dev/null and b/mixly/common/media/oled_icons/130.png differ diff --git a/mixly/common/media/oled_icons/131.png b/mixly/common/media/oled_icons/131.png new file mode 100644 index 00000000..5ac0438d Binary files /dev/null and b/mixly/common/media/oled_icons/131.png differ diff --git a/mixly/common/media/oled_icons/132.png b/mixly/common/media/oled_icons/132.png new file mode 100644 index 00000000..c0702d98 Binary files /dev/null and b/mixly/common/media/oled_icons/132.png differ diff --git a/mixly/common/media/oled_icons/133.png b/mixly/common/media/oled_icons/133.png new file mode 100644 index 00000000..91f54452 Binary files /dev/null and b/mixly/common/media/oled_icons/133.png differ diff --git a/mixly/common/media/oled_icons/134.png b/mixly/common/media/oled_icons/134.png new file mode 100644 index 00000000..368e4fe7 Binary files /dev/null and b/mixly/common/media/oled_icons/134.png differ diff --git a/mixly/common/media/oled_icons/135.png b/mixly/common/media/oled_icons/135.png new file mode 100644 index 00000000..2b6cb083 Binary files /dev/null and b/mixly/common/media/oled_icons/135.png differ diff --git a/mixly/common/media/oled_icons/136.png b/mixly/common/media/oled_icons/136.png new file mode 100644 index 00000000..85336cb0 Binary files /dev/null and b/mixly/common/media/oled_icons/136.png differ diff --git a/mixly/common/media/oled_icons/137.png b/mixly/common/media/oled_icons/137.png new file mode 100644 index 00000000..2243846d Binary files /dev/null and b/mixly/common/media/oled_icons/137.png differ diff --git a/mixly/common/media/oled_icons/138.png b/mixly/common/media/oled_icons/138.png new file mode 100644 index 00000000..cd084851 Binary files /dev/null and b/mixly/common/media/oled_icons/138.png differ diff --git a/mixly/common/media/oled_icons/139.png b/mixly/common/media/oled_icons/139.png new file mode 100644 index 00000000..c56c7615 Binary files /dev/null and b/mixly/common/media/oled_icons/139.png differ diff --git a/mixly/common/media/oled_icons/140.png b/mixly/common/media/oled_icons/140.png new file mode 100644 index 00000000..17a0a119 Binary files /dev/null and b/mixly/common/media/oled_icons/140.png differ diff --git a/mixly/common/media/oled_icons/141.png b/mixly/common/media/oled_icons/141.png new file mode 100644 index 00000000..f3007282 Binary files /dev/null and b/mixly/common/media/oled_icons/141.png differ diff --git a/mixly/common/media/oled_icons/142.png b/mixly/common/media/oled_icons/142.png new file mode 100644 index 00000000..5ddb4fc4 Binary files /dev/null and b/mixly/common/media/oled_icons/142.png differ diff --git a/mixly/common/media/oled_icons/143.png b/mixly/common/media/oled_icons/143.png new file mode 100644 index 00000000..c525af88 Binary files /dev/null and b/mixly/common/media/oled_icons/143.png differ diff --git a/mixly/common/media/oled_icons/144.png b/mixly/common/media/oled_icons/144.png new file mode 100644 index 00000000..0ee9cdfc Binary files /dev/null and b/mixly/common/media/oled_icons/144.png differ diff --git a/mixly/common/media/oled_icons/145.png b/mixly/common/media/oled_icons/145.png new file mode 100644 index 00000000..7a847e97 Binary files /dev/null and b/mixly/common/media/oled_icons/145.png differ diff --git a/mixly/common/media/oled_icons/146.png b/mixly/common/media/oled_icons/146.png new file mode 100644 index 00000000..18273e99 Binary files /dev/null and b/mixly/common/media/oled_icons/146.png differ diff --git a/mixly/common/media/oled_icons/147.png b/mixly/common/media/oled_icons/147.png new file mode 100644 index 00000000..093c6711 Binary files /dev/null and b/mixly/common/media/oled_icons/147.png differ diff --git a/mixly/common/media/oled_icons/148.png b/mixly/common/media/oled_icons/148.png new file mode 100644 index 00000000..da1f3d38 Binary files /dev/null and b/mixly/common/media/oled_icons/148.png differ diff --git a/mixly/common/media/oled_icons/149.png b/mixly/common/media/oled_icons/149.png new file mode 100644 index 00000000..19cb4b30 Binary files /dev/null and b/mixly/common/media/oled_icons/149.png differ diff --git a/mixly/common/media/oled_icons/150.png b/mixly/common/media/oled_icons/150.png new file mode 100644 index 00000000..2063ffcc Binary files /dev/null and b/mixly/common/media/oled_icons/150.png differ diff --git a/mixly/common/media/oled_icons/151.png b/mixly/common/media/oled_icons/151.png new file mode 100644 index 00000000..4741737d Binary files /dev/null and b/mixly/common/media/oled_icons/151.png differ diff --git a/mixly/common/media/oled_icons/152.png b/mixly/common/media/oled_icons/152.png new file mode 100644 index 00000000..8af0d104 Binary files /dev/null and b/mixly/common/media/oled_icons/152.png differ diff --git a/mixly/common/media/oled_icons/153.png b/mixly/common/media/oled_icons/153.png new file mode 100644 index 00000000..4320671d Binary files /dev/null and b/mixly/common/media/oled_icons/153.png differ diff --git a/mixly/common/media/oled_icons/154.png b/mixly/common/media/oled_icons/154.png new file mode 100644 index 00000000..25bbd8fd Binary files /dev/null and b/mixly/common/media/oled_icons/154.png differ diff --git a/mixly/common/media/oled_icons/155.png b/mixly/common/media/oled_icons/155.png new file mode 100644 index 00000000..29d16a57 Binary files /dev/null and b/mixly/common/media/oled_icons/155.png differ diff --git a/mixly/common/media/oled_icons/156.png b/mixly/common/media/oled_icons/156.png new file mode 100644 index 00000000..22e93036 Binary files /dev/null and b/mixly/common/media/oled_icons/156.png differ diff --git a/mixly/common/media/oled_icons/157.png b/mixly/common/media/oled_icons/157.png new file mode 100644 index 00000000..c3ef6fa4 Binary files /dev/null and b/mixly/common/media/oled_icons/157.png differ diff --git a/mixly/common/media/oled_icons/158.png b/mixly/common/media/oled_icons/158.png new file mode 100644 index 00000000..fc772fac Binary files /dev/null and b/mixly/common/media/oled_icons/158.png differ diff --git a/mixly/common/media/oled_icons/159.png b/mixly/common/media/oled_icons/159.png new file mode 100644 index 00000000..97747301 Binary files /dev/null and b/mixly/common/media/oled_icons/159.png differ diff --git a/mixly/common/media/oled_icons/160.png b/mixly/common/media/oled_icons/160.png new file mode 100644 index 00000000..6379ca9b Binary files /dev/null and b/mixly/common/media/oled_icons/160.png differ diff --git a/mixly/common/media/oled_icons/161.png b/mixly/common/media/oled_icons/161.png new file mode 100644 index 00000000..a63c7a62 Binary files /dev/null and b/mixly/common/media/oled_icons/161.png differ diff --git a/mixly/common/media/oled_icons/162.png b/mixly/common/media/oled_icons/162.png new file mode 100644 index 00000000..ea480f19 Binary files /dev/null and b/mixly/common/media/oled_icons/162.png differ diff --git a/mixly/common/media/oled_icons/163.png b/mixly/common/media/oled_icons/163.png new file mode 100644 index 00000000..8536a28d Binary files /dev/null and b/mixly/common/media/oled_icons/163.png differ diff --git a/mixly/common/media/oled_icons/164.png b/mixly/common/media/oled_icons/164.png new file mode 100644 index 00000000..a56525c7 Binary files /dev/null and b/mixly/common/media/oled_icons/164.png differ diff --git a/mixly/common/media/oled_icons/165.png b/mixly/common/media/oled_icons/165.png new file mode 100644 index 00000000..b909e81f Binary files /dev/null and b/mixly/common/media/oled_icons/165.png differ diff --git a/mixly/common/media/oled_icons/166.png b/mixly/common/media/oled_icons/166.png new file mode 100644 index 00000000..8f5a8917 Binary files /dev/null and b/mixly/common/media/oled_icons/166.png differ diff --git a/mixly/common/media/oled_icons/167.png b/mixly/common/media/oled_icons/167.png new file mode 100644 index 00000000..c972b7a4 Binary files /dev/null and b/mixly/common/media/oled_icons/167.png differ diff --git a/mixly/common/media/oled_icons/168.png b/mixly/common/media/oled_icons/168.png new file mode 100644 index 00000000..250ced5c Binary files /dev/null and b/mixly/common/media/oled_icons/168.png differ diff --git a/mixly/common/media/oled_icons/169.png b/mixly/common/media/oled_icons/169.png new file mode 100644 index 00000000..dcb48dfc Binary files /dev/null and b/mixly/common/media/oled_icons/169.png differ diff --git a/mixly/common/media/oled_icons/170.png b/mixly/common/media/oled_icons/170.png new file mode 100644 index 00000000..cff3b11b Binary files /dev/null and b/mixly/common/media/oled_icons/170.png differ diff --git a/mixly/common/media/oled_icons/171.png b/mixly/common/media/oled_icons/171.png new file mode 100644 index 00000000..82da831c Binary files /dev/null and b/mixly/common/media/oled_icons/171.png differ diff --git a/mixly/common/media/oled_icons/172.png b/mixly/common/media/oled_icons/172.png new file mode 100644 index 00000000..7ba486e1 Binary files /dev/null and b/mixly/common/media/oled_icons/172.png differ diff --git a/mixly/common/media/oled_icons/173.png b/mixly/common/media/oled_icons/173.png new file mode 100644 index 00000000..918dcfca Binary files /dev/null and b/mixly/common/media/oled_icons/173.png differ diff --git a/mixly/common/media/oled_icons/174.png b/mixly/common/media/oled_icons/174.png new file mode 100644 index 00000000..009d1c26 Binary files /dev/null and b/mixly/common/media/oled_icons/174.png differ diff --git a/mixly/common/media/oled_icons/175.png b/mixly/common/media/oled_icons/175.png new file mode 100644 index 00000000..7a9156ff Binary files /dev/null and b/mixly/common/media/oled_icons/175.png differ diff --git a/mixly/common/media/oled_icons/176.png b/mixly/common/media/oled_icons/176.png new file mode 100644 index 00000000..27f5d374 Binary files /dev/null and b/mixly/common/media/oled_icons/176.png differ diff --git a/mixly/common/media/oled_icons/177.png b/mixly/common/media/oled_icons/177.png new file mode 100644 index 00000000..232db2cd Binary files /dev/null and b/mixly/common/media/oled_icons/177.png differ diff --git a/mixly/common/media/oled_icons/178.png b/mixly/common/media/oled_icons/178.png new file mode 100644 index 00000000..8d02f98f Binary files /dev/null and b/mixly/common/media/oled_icons/178.png differ diff --git a/mixly/common/media/oled_icons/179.png b/mixly/common/media/oled_icons/179.png new file mode 100644 index 00000000..f5cc14da Binary files /dev/null and b/mixly/common/media/oled_icons/179.png differ diff --git a/mixly/common/media/oled_icons/180.png b/mixly/common/media/oled_icons/180.png new file mode 100644 index 00000000..bbd35d21 Binary files /dev/null and b/mixly/common/media/oled_icons/180.png differ diff --git a/mixly/common/media/oled_icons/181.png b/mixly/common/media/oled_icons/181.png new file mode 100644 index 00000000..57f7e4e6 Binary files /dev/null and b/mixly/common/media/oled_icons/181.png differ diff --git a/mixly/common/media/oled_icons/182.png b/mixly/common/media/oled_icons/182.png new file mode 100644 index 00000000..c69769cd Binary files /dev/null and b/mixly/common/media/oled_icons/182.png differ diff --git a/mixly/common/media/oled_icons/183.png b/mixly/common/media/oled_icons/183.png new file mode 100644 index 00000000..3e98f716 Binary files /dev/null and b/mixly/common/media/oled_icons/183.png differ diff --git a/mixly/common/media/oled_icons/184.png b/mixly/common/media/oled_icons/184.png new file mode 100644 index 00000000..ae09266c Binary files /dev/null and b/mixly/common/media/oled_icons/184.png differ diff --git a/mixly/common/media/oled_icons/185.png b/mixly/common/media/oled_icons/185.png new file mode 100644 index 00000000..f27cb99a Binary files /dev/null and b/mixly/common/media/oled_icons/185.png differ diff --git a/mixly/common/media/oled_icons/186.png b/mixly/common/media/oled_icons/186.png new file mode 100644 index 00000000..9cdc235e Binary files /dev/null and b/mixly/common/media/oled_icons/186.png differ diff --git a/mixly/common/media/oled_icons/187.png b/mixly/common/media/oled_icons/187.png new file mode 100644 index 00000000..8c6f1a66 Binary files /dev/null and b/mixly/common/media/oled_icons/187.png differ diff --git a/mixly/common/media/oled_icons/188.png b/mixly/common/media/oled_icons/188.png new file mode 100644 index 00000000..33658698 Binary files /dev/null and b/mixly/common/media/oled_icons/188.png differ diff --git a/mixly/common/media/oled_icons/189.png b/mixly/common/media/oled_icons/189.png new file mode 100644 index 00000000..6eb8dfff Binary files /dev/null and b/mixly/common/media/oled_icons/189.png differ diff --git a/mixly/common/media/oled_icons/190.png b/mixly/common/media/oled_icons/190.png new file mode 100644 index 00000000..0a5999c1 Binary files /dev/null and b/mixly/common/media/oled_icons/190.png differ diff --git a/mixly/common/media/oled_icons/191.png b/mixly/common/media/oled_icons/191.png new file mode 100644 index 00000000..86dd0d25 Binary files /dev/null and b/mixly/common/media/oled_icons/191.png differ diff --git a/mixly/common/media/oled_icons/192.png b/mixly/common/media/oled_icons/192.png new file mode 100644 index 00000000..6674a0bf Binary files /dev/null and b/mixly/common/media/oled_icons/192.png differ diff --git a/mixly/common/media/oled_icons/193.png b/mixly/common/media/oled_icons/193.png new file mode 100644 index 00000000..6318d7c1 Binary files /dev/null and b/mixly/common/media/oled_icons/193.png differ diff --git a/mixly/common/media/oled_icons/194.png b/mixly/common/media/oled_icons/194.png new file mode 100644 index 00000000..05aec8dc Binary files /dev/null and b/mixly/common/media/oled_icons/194.png differ diff --git a/mixly/common/media/oled_icons/195.png b/mixly/common/media/oled_icons/195.png new file mode 100644 index 00000000..7d9f6ff0 Binary files /dev/null and b/mixly/common/media/oled_icons/195.png differ diff --git a/mixly/common/media/oled_icons/196.png b/mixly/common/media/oled_icons/196.png new file mode 100644 index 00000000..0da6198f Binary files /dev/null and b/mixly/common/media/oled_icons/196.png differ diff --git a/mixly/common/media/oled_icons/197.png b/mixly/common/media/oled_icons/197.png new file mode 100644 index 00000000..939fe664 Binary files /dev/null and b/mixly/common/media/oled_icons/197.png differ diff --git a/mixly/common/media/oled_icons/198.png b/mixly/common/media/oled_icons/198.png new file mode 100644 index 00000000..5064fb13 Binary files /dev/null and b/mixly/common/media/oled_icons/198.png differ diff --git a/mixly/common/media/oled_icons/199.png b/mixly/common/media/oled_icons/199.png new file mode 100644 index 00000000..3aebf433 Binary files /dev/null and b/mixly/common/media/oled_icons/199.png differ diff --git a/mixly/common/media/oled_icons/200.png b/mixly/common/media/oled_icons/200.png new file mode 100644 index 00000000..3b21688b Binary files /dev/null and b/mixly/common/media/oled_icons/200.png differ diff --git a/mixly/common/media/oled_icons/201.png b/mixly/common/media/oled_icons/201.png new file mode 100644 index 00000000..179c4f5b Binary files /dev/null and b/mixly/common/media/oled_icons/201.png differ diff --git a/mixly/common/media/oled_icons/202.png b/mixly/common/media/oled_icons/202.png new file mode 100644 index 00000000..16de67cb Binary files /dev/null and b/mixly/common/media/oled_icons/202.png differ diff --git a/mixly/common/media/oled_icons/203.png b/mixly/common/media/oled_icons/203.png new file mode 100644 index 00000000..0f8dcfb3 Binary files /dev/null and b/mixly/common/media/oled_icons/203.png differ diff --git a/mixly/common/media/oled_icons/204.png b/mixly/common/media/oled_icons/204.png new file mode 100644 index 00000000..40dc096e Binary files /dev/null and b/mixly/common/media/oled_icons/204.png differ diff --git a/mixly/common/media/oled_icons/205.png b/mixly/common/media/oled_icons/205.png new file mode 100644 index 00000000..ec81a26b Binary files /dev/null and b/mixly/common/media/oled_icons/205.png differ diff --git a/mixly/common/media/oled_icons/206.png b/mixly/common/media/oled_icons/206.png new file mode 100644 index 00000000..2e949aa4 Binary files /dev/null and b/mixly/common/media/oled_icons/206.png differ diff --git a/mixly/common/media/oled_icons/207.png b/mixly/common/media/oled_icons/207.png new file mode 100644 index 00000000..0e3fc6dc Binary files /dev/null and b/mixly/common/media/oled_icons/207.png differ diff --git a/mixly/common/media/oled_icons/208.png b/mixly/common/media/oled_icons/208.png new file mode 100644 index 00000000..4d73a459 Binary files /dev/null and b/mixly/common/media/oled_icons/208.png differ diff --git a/mixly/common/media/oled_icons/209.png b/mixly/common/media/oled_icons/209.png new file mode 100644 index 00000000..d8e950a2 Binary files /dev/null and b/mixly/common/media/oled_icons/209.png differ diff --git a/mixly/common/media/oled_icons/210.png b/mixly/common/media/oled_icons/210.png new file mode 100644 index 00000000..2eaf875a Binary files /dev/null and b/mixly/common/media/oled_icons/210.png differ diff --git a/mixly/common/media/oled_icons/211.png b/mixly/common/media/oled_icons/211.png new file mode 100644 index 00000000..7b7b9af0 Binary files /dev/null and b/mixly/common/media/oled_icons/211.png differ diff --git a/mixly/common/media/oled_icons/212.png b/mixly/common/media/oled_icons/212.png new file mode 100644 index 00000000..5b4f39fb Binary files /dev/null and b/mixly/common/media/oled_icons/212.png differ diff --git a/mixly/common/media/oled_icons/213.png b/mixly/common/media/oled_icons/213.png new file mode 100644 index 00000000..f670cf83 Binary files /dev/null and b/mixly/common/media/oled_icons/213.png differ diff --git a/mixly/common/media/oled_icons/214.png b/mixly/common/media/oled_icons/214.png new file mode 100644 index 00000000..fde2c536 Binary files /dev/null and b/mixly/common/media/oled_icons/214.png differ diff --git a/mixly/common/media/oled_icons/215.png b/mixly/common/media/oled_icons/215.png new file mode 100644 index 00000000..bb24ffd8 Binary files /dev/null and b/mixly/common/media/oled_icons/215.png differ diff --git a/mixly/common/media/oled_icons/216.png b/mixly/common/media/oled_icons/216.png new file mode 100644 index 00000000..eeeaed70 Binary files /dev/null and b/mixly/common/media/oled_icons/216.png differ diff --git a/mixly/common/media/oled_icons/217.png b/mixly/common/media/oled_icons/217.png new file mode 100644 index 00000000..239105c8 Binary files /dev/null and b/mixly/common/media/oled_icons/217.png differ diff --git a/mixly/common/media/oled_icons/218.png b/mixly/common/media/oled_icons/218.png new file mode 100644 index 00000000..9511cd53 Binary files /dev/null and b/mixly/common/media/oled_icons/218.png differ diff --git a/mixly/common/media/oled_icons/219.png b/mixly/common/media/oled_icons/219.png new file mode 100644 index 00000000..e69f6349 Binary files /dev/null and b/mixly/common/media/oled_icons/219.png differ diff --git a/mixly/common/media/oled_icons/220.png b/mixly/common/media/oled_icons/220.png new file mode 100644 index 00000000..534a1c1e Binary files /dev/null and b/mixly/common/media/oled_icons/220.png differ diff --git a/mixly/common/media/oled_icons/221.png b/mixly/common/media/oled_icons/221.png new file mode 100644 index 00000000..770afa8f Binary files /dev/null and b/mixly/common/media/oled_icons/221.png differ diff --git a/mixly/common/media/oled_icons/222.png b/mixly/common/media/oled_icons/222.png new file mode 100644 index 00000000..21549488 Binary files /dev/null and b/mixly/common/media/oled_icons/222.png differ diff --git a/mixly/common/media/oled_icons/223.png b/mixly/common/media/oled_icons/223.png new file mode 100644 index 00000000..57878df6 Binary files /dev/null and b/mixly/common/media/oled_icons/223.png differ diff --git a/mixly/common/media/oled_icons/224.png b/mixly/common/media/oled_icons/224.png new file mode 100644 index 00000000..9aaeb622 Binary files /dev/null and b/mixly/common/media/oled_icons/224.png differ diff --git a/mixly/common/media/oled_icons/225.png b/mixly/common/media/oled_icons/225.png new file mode 100644 index 00000000..5b6266ce Binary files /dev/null and b/mixly/common/media/oled_icons/225.png differ diff --git a/mixly/common/media/oled_icons/226.png b/mixly/common/media/oled_icons/226.png new file mode 100644 index 00000000..e20b44a7 Binary files /dev/null and b/mixly/common/media/oled_icons/226.png differ diff --git a/mixly/common/media/oled_icons/227.png b/mixly/common/media/oled_icons/227.png new file mode 100644 index 00000000..ac7e666b Binary files /dev/null and b/mixly/common/media/oled_icons/227.png differ diff --git a/mixly/common/media/oled_icons/228.png b/mixly/common/media/oled_icons/228.png new file mode 100644 index 00000000..85e525dd Binary files /dev/null and b/mixly/common/media/oled_icons/228.png differ diff --git a/mixly/common/media/oled_icons/229.png b/mixly/common/media/oled_icons/229.png new file mode 100644 index 00000000..645cefdd Binary files /dev/null and b/mixly/common/media/oled_icons/229.png differ diff --git a/mixly/common/media/oled_icons/230.png b/mixly/common/media/oled_icons/230.png new file mode 100644 index 00000000..0ef87cb4 Binary files /dev/null and b/mixly/common/media/oled_icons/230.png differ diff --git a/mixly/common/media/oled_icons/231.png b/mixly/common/media/oled_icons/231.png new file mode 100644 index 00000000..9de7de96 Binary files /dev/null and b/mixly/common/media/oled_icons/231.png differ diff --git a/mixly/common/media/oled_icons/232.png b/mixly/common/media/oled_icons/232.png new file mode 100644 index 00000000..6ff1e02e Binary files /dev/null and b/mixly/common/media/oled_icons/232.png differ diff --git a/mixly/common/media/oled_icons/233.png b/mixly/common/media/oled_icons/233.png new file mode 100644 index 00000000..47bcf388 Binary files /dev/null and b/mixly/common/media/oled_icons/233.png differ diff --git a/mixly/common/media/oled_icons/234.png b/mixly/common/media/oled_icons/234.png new file mode 100644 index 00000000..401af424 Binary files /dev/null and b/mixly/common/media/oled_icons/234.png differ diff --git a/mixly/common/media/oled_icons/235.png b/mixly/common/media/oled_icons/235.png new file mode 100644 index 00000000..cbffcd56 Binary files /dev/null and b/mixly/common/media/oled_icons/235.png differ diff --git a/mixly/common/media/oled_icons/236.png b/mixly/common/media/oled_icons/236.png new file mode 100644 index 00000000..3920208d Binary files /dev/null and b/mixly/common/media/oled_icons/236.png differ diff --git a/mixly/common/media/oled_icons/237.png b/mixly/common/media/oled_icons/237.png new file mode 100644 index 00000000..48ac5a07 Binary files /dev/null and b/mixly/common/media/oled_icons/237.png differ diff --git a/mixly/common/media/oled_icons/238.png b/mixly/common/media/oled_icons/238.png new file mode 100644 index 00000000..3f7377c0 Binary files /dev/null and b/mixly/common/media/oled_icons/238.png differ diff --git a/mixly/common/media/oled_icons/239.png b/mixly/common/media/oled_icons/239.png new file mode 100644 index 00000000..3f2084f5 Binary files /dev/null and b/mixly/common/media/oled_icons/239.png differ diff --git a/mixly/common/media/oled_icons/240.png b/mixly/common/media/oled_icons/240.png new file mode 100644 index 00000000..eb7b4397 Binary files /dev/null and b/mixly/common/media/oled_icons/240.png differ diff --git a/mixly/common/media/oled_icons/241.png b/mixly/common/media/oled_icons/241.png new file mode 100644 index 00000000..67ca2056 Binary files /dev/null and b/mixly/common/media/oled_icons/241.png differ diff --git a/mixly/common/media/oled_icons/242.png b/mixly/common/media/oled_icons/242.png new file mode 100644 index 00000000..b392bd5d Binary files /dev/null and b/mixly/common/media/oled_icons/242.png differ diff --git a/mixly/common/media/oled_icons/243.png b/mixly/common/media/oled_icons/243.png new file mode 100644 index 00000000..3de229c8 Binary files /dev/null and b/mixly/common/media/oled_icons/243.png differ diff --git a/mixly/common/media/oled_icons/244.png b/mixly/common/media/oled_icons/244.png new file mode 100644 index 00000000..5e6bc981 Binary files /dev/null and b/mixly/common/media/oled_icons/244.png differ diff --git a/mixly/common/media/oled_icons/245.png b/mixly/common/media/oled_icons/245.png new file mode 100644 index 00000000..479e5669 Binary files /dev/null and b/mixly/common/media/oled_icons/245.png differ diff --git a/mixly/common/media/oled_icons/246.png b/mixly/common/media/oled_icons/246.png new file mode 100644 index 00000000..8844ed30 Binary files /dev/null and b/mixly/common/media/oled_icons/246.png differ diff --git a/mixly/common/media/oled_icons/247.png b/mixly/common/media/oled_icons/247.png new file mode 100644 index 00000000..fb21c9ec Binary files /dev/null and b/mixly/common/media/oled_icons/247.png differ diff --git a/mixly/common/media/oled_icons/248.png b/mixly/common/media/oled_icons/248.png new file mode 100644 index 00000000..5be1c12b Binary files /dev/null and b/mixly/common/media/oled_icons/248.png differ diff --git a/mixly/common/media/oled_icons/249.png b/mixly/common/media/oled_icons/249.png new file mode 100644 index 00000000..ae6386f3 Binary files /dev/null and b/mixly/common/media/oled_icons/249.png differ diff --git a/mixly/common/media/oled_icons/250.png b/mixly/common/media/oled_icons/250.png new file mode 100644 index 00000000..39749fb1 Binary files /dev/null and b/mixly/common/media/oled_icons/250.png differ diff --git a/mixly/common/media/oled_icons/251.png b/mixly/common/media/oled_icons/251.png new file mode 100644 index 00000000..2f5b113b Binary files /dev/null and b/mixly/common/media/oled_icons/251.png differ diff --git a/mixly/common/media/oled_icons/252.png b/mixly/common/media/oled_icons/252.png new file mode 100644 index 00000000..be4d87db Binary files /dev/null and b/mixly/common/media/oled_icons/252.png differ diff --git a/mixly/common/media/oled_icons/253.png b/mixly/common/media/oled_icons/253.png new file mode 100644 index 00000000..44094cdf Binary files /dev/null and b/mixly/common/media/oled_icons/253.png differ diff --git a/mixly/common/media/oled_icons/254.png b/mixly/common/media/oled_icons/254.png new file mode 100644 index 00000000..a160561f Binary files /dev/null and b/mixly/common/media/oled_icons/254.png differ diff --git a/mixly/common/media/oled_icons/255.png b/mixly/common/media/oled_icons/255.png new file mode 100644 index 00000000..f46d38cf Binary files /dev/null and b/mixly/common/media/oled_icons/255.png differ diff --git a/mixly/common/media/oled_icons/256.png b/mixly/common/media/oled_icons/256.png new file mode 100644 index 00000000..0988a740 Binary files /dev/null and b/mixly/common/media/oled_icons/256.png differ diff --git a/mixly/common/media/oled_icons/257.png b/mixly/common/media/oled_icons/257.png new file mode 100644 index 00000000..1c04c294 Binary files /dev/null and b/mixly/common/media/oled_icons/257.png differ diff --git a/mixly/common/media/oled_icons/258.png b/mixly/common/media/oled_icons/258.png new file mode 100644 index 00000000..16ecee9d Binary files /dev/null and b/mixly/common/media/oled_icons/258.png differ diff --git a/mixly/common/media/oled_icons/259.png b/mixly/common/media/oled_icons/259.png new file mode 100644 index 00000000..9cfa64dd Binary files /dev/null and b/mixly/common/media/oled_icons/259.png differ diff --git a/mixly/common/media/oled_icons/260.png b/mixly/common/media/oled_icons/260.png new file mode 100644 index 00000000..a598624c Binary files /dev/null and b/mixly/common/media/oled_icons/260.png differ diff --git a/mixly/common/media/oled_icons/261.png b/mixly/common/media/oled_icons/261.png new file mode 100644 index 00000000..a3606fb1 Binary files /dev/null and b/mixly/common/media/oled_icons/261.png differ diff --git a/mixly/common/media/oled_icons/262.png b/mixly/common/media/oled_icons/262.png new file mode 100644 index 00000000..f8ce26ad Binary files /dev/null and b/mixly/common/media/oled_icons/262.png differ diff --git a/mixly/common/media/oled_icons/263.png b/mixly/common/media/oled_icons/263.png new file mode 100644 index 00000000..359a72b7 Binary files /dev/null and b/mixly/common/media/oled_icons/263.png differ diff --git a/mixly/common/media/oled_icons/264.png b/mixly/common/media/oled_icons/264.png new file mode 100644 index 00000000..2a0d4886 Binary files /dev/null and b/mixly/common/media/oled_icons/264.png differ diff --git a/mixly/common/media/oled_icons/265.png b/mixly/common/media/oled_icons/265.png new file mode 100644 index 00000000..3c041716 Binary files /dev/null and b/mixly/common/media/oled_icons/265.png differ diff --git a/mixly/common/media/oled_icons/266.png b/mixly/common/media/oled_icons/266.png new file mode 100644 index 00000000..049cada4 Binary files /dev/null and b/mixly/common/media/oled_icons/266.png differ diff --git a/mixly/common/media/oled_icons/267.png b/mixly/common/media/oled_icons/267.png new file mode 100644 index 00000000..2b619422 Binary files /dev/null and b/mixly/common/media/oled_icons/267.png differ diff --git a/mixly/common/media/oled_icons/268.png b/mixly/common/media/oled_icons/268.png new file mode 100644 index 00000000..3a068d73 Binary files /dev/null and b/mixly/common/media/oled_icons/268.png differ diff --git a/mixly/common/media/oled_icons/269.png b/mixly/common/media/oled_icons/269.png new file mode 100644 index 00000000..7326e6c3 Binary files /dev/null and b/mixly/common/media/oled_icons/269.png differ diff --git a/mixly/common/media/oled_icons/270.png b/mixly/common/media/oled_icons/270.png new file mode 100644 index 00000000..1618b8ea Binary files /dev/null and b/mixly/common/media/oled_icons/270.png differ diff --git a/mixly/common/media/oled_icons/271.png b/mixly/common/media/oled_icons/271.png new file mode 100644 index 00000000..0c4e4e4b Binary files /dev/null and b/mixly/common/media/oled_icons/271.png differ diff --git a/mixly/common/media/oled_icons/272.png b/mixly/common/media/oled_icons/272.png new file mode 100644 index 00000000..73a52331 Binary files /dev/null and b/mixly/common/media/oled_icons/272.png differ diff --git a/mixly/common/media/oled_icons/273.png b/mixly/common/media/oled_icons/273.png new file mode 100644 index 00000000..4cf39000 Binary files /dev/null and b/mixly/common/media/oled_icons/273.png differ diff --git a/mixly/common/media/oled_icons/274.png b/mixly/common/media/oled_icons/274.png new file mode 100644 index 00000000..5ac3a00d Binary files /dev/null and b/mixly/common/media/oled_icons/274.png differ diff --git a/mixly/common/media/oled_icons/275.png b/mixly/common/media/oled_icons/275.png new file mode 100644 index 00000000..4f330ce6 Binary files /dev/null and b/mixly/common/media/oled_icons/275.png differ diff --git a/mixly/common/media/oled_icons/276.png b/mixly/common/media/oled_icons/276.png new file mode 100644 index 00000000..0aa328a0 Binary files /dev/null and b/mixly/common/media/oled_icons/276.png differ diff --git a/mixly/common/media/oled_icons/277.png b/mixly/common/media/oled_icons/277.png new file mode 100644 index 00000000..a01b1f39 Binary files /dev/null and b/mixly/common/media/oled_icons/277.png differ diff --git a/mixly/common/media/oled_icons/278.png b/mixly/common/media/oled_icons/278.png new file mode 100644 index 00000000..9886fbea Binary files /dev/null and b/mixly/common/media/oled_icons/278.png differ diff --git a/mixly/common/media/oled_icons/279.png b/mixly/common/media/oled_icons/279.png new file mode 100644 index 00000000..9fdce3de Binary files /dev/null and b/mixly/common/media/oled_icons/279.png differ diff --git a/mixly/common/media/oled_icons/280.png b/mixly/common/media/oled_icons/280.png new file mode 100644 index 00000000..7626bd7f Binary files /dev/null and b/mixly/common/media/oled_icons/280.png differ diff --git a/mixly/common/media/oled_icons/281.png b/mixly/common/media/oled_icons/281.png new file mode 100644 index 00000000..9dab2925 Binary files /dev/null and b/mixly/common/media/oled_icons/281.png differ diff --git a/mixly/common/media/oled_icons/282.png b/mixly/common/media/oled_icons/282.png new file mode 100644 index 00000000..01989681 Binary files /dev/null and b/mixly/common/media/oled_icons/282.png differ diff --git a/mixly/common/media/oled_icons/283.png b/mixly/common/media/oled_icons/283.png new file mode 100644 index 00000000..b0aae2c6 Binary files /dev/null and b/mixly/common/media/oled_icons/283.png differ diff --git a/mixly/common/media/oled_icons/284.png b/mixly/common/media/oled_icons/284.png new file mode 100644 index 00000000..07858e40 Binary files /dev/null and b/mixly/common/media/oled_icons/284.png differ diff --git a/mixly/common/media/oled_icons/285.png b/mixly/common/media/oled_icons/285.png new file mode 100644 index 00000000..f1b8052d Binary files /dev/null and b/mixly/common/media/oled_icons/285.png differ diff --git a/mixly/common/media/oled_icons/286.png b/mixly/common/media/oled_icons/286.png new file mode 100644 index 00000000..1fe6a239 Binary files /dev/null and b/mixly/common/media/oled_icons/286.png differ diff --git a/mixly/common/media/oled_icons/64.png b/mixly/common/media/oled_icons/64.png new file mode 100644 index 00000000..dbfbb16a Binary files /dev/null and b/mixly/common/media/oled_icons/64.png differ diff --git a/mixly/common/media/oled_icons/65.png b/mixly/common/media/oled_icons/65.png new file mode 100644 index 00000000..bc757088 Binary files /dev/null and b/mixly/common/media/oled_icons/65.png differ diff --git a/mixly/common/media/oled_icons/66.png b/mixly/common/media/oled_icons/66.png new file mode 100644 index 00000000..3d55df59 Binary files /dev/null and b/mixly/common/media/oled_icons/66.png differ diff --git a/mixly/common/media/oled_icons/67.png b/mixly/common/media/oled_icons/67.png new file mode 100644 index 00000000..669bc26c Binary files /dev/null and b/mixly/common/media/oled_icons/67.png differ diff --git a/mixly/common/media/oled_icons/68.png b/mixly/common/media/oled_icons/68.png new file mode 100644 index 00000000..e1520abd Binary files /dev/null and b/mixly/common/media/oled_icons/68.png differ diff --git a/mixly/common/media/oled_icons/69.png b/mixly/common/media/oled_icons/69.png new file mode 100644 index 00000000..1e3b6cfe Binary files /dev/null and b/mixly/common/media/oled_icons/69.png differ diff --git a/mixly/common/media/oled_icons/70.png b/mixly/common/media/oled_icons/70.png new file mode 100644 index 00000000..e1eae41f Binary files /dev/null and b/mixly/common/media/oled_icons/70.png differ diff --git a/mixly/common/media/oled_icons/71.png b/mixly/common/media/oled_icons/71.png new file mode 100644 index 00000000..99e3e395 Binary files /dev/null and b/mixly/common/media/oled_icons/71.png differ diff --git a/mixly/common/media/oled_icons/72.png b/mixly/common/media/oled_icons/72.png new file mode 100644 index 00000000..048cc8dd Binary files /dev/null and b/mixly/common/media/oled_icons/72.png differ diff --git a/mixly/common/media/oled_icons/73.png b/mixly/common/media/oled_icons/73.png new file mode 100644 index 00000000..7b341764 Binary files /dev/null and b/mixly/common/media/oled_icons/73.png differ diff --git a/mixly/common/media/oled_icons/74.png b/mixly/common/media/oled_icons/74.png new file mode 100644 index 00000000..b81b573c Binary files /dev/null and b/mixly/common/media/oled_icons/74.png differ diff --git a/mixly/common/media/oled_icons/75.png b/mixly/common/media/oled_icons/75.png new file mode 100644 index 00000000..7885a51d Binary files /dev/null and b/mixly/common/media/oled_icons/75.png differ diff --git a/mixly/common/media/oled_icons/76.png b/mixly/common/media/oled_icons/76.png new file mode 100644 index 00000000..ef8f183d Binary files /dev/null and b/mixly/common/media/oled_icons/76.png differ diff --git a/mixly/common/media/oled_icons/77.png b/mixly/common/media/oled_icons/77.png new file mode 100644 index 00000000..e3d20545 Binary files /dev/null and b/mixly/common/media/oled_icons/77.png differ diff --git a/mixly/common/media/oled_icons/78.png b/mixly/common/media/oled_icons/78.png new file mode 100644 index 00000000..505269b0 Binary files /dev/null and b/mixly/common/media/oled_icons/78.png differ diff --git a/mixly/common/media/oled_icons/79.png b/mixly/common/media/oled_icons/79.png new file mode 100644 index 00000000..1e749b7d Binary files /dev/null and b/mixly/common/media/oled_icons/79.png differ diff --git a/mixly/common/media/oled_icons/80.png b/mixly/common/media/oled_icons/80.png new file mode 100644 index 00000000..65ce624f Binary files /dev/null and b/mixly/common/media/oled_icons/80.png differ diff --git a/mixly/common/media/oled_icons/81.png b/mixly/common/media/oled_icons/81.png new file mode 100644 index 00000000..7ae56802 Binary files /dev/null and b/mixly/common/media/oled_icons/81.png differ diff --git a/mixly/common/media/oled_icons/82.png b/mixly/common/media/oled_icons/82.png new file mode 100644 index 00000000..3f1963e8 Binary files /dev/null and b/mixly/common/media/oled_icons/82.png differ diff --git a/mixly/common/media/oled_icons/83.png b/mixly/common/media/oled_icons/83.png new file mode 100644 index 00000000..b85cb254 Binary files /dev/null and b/mixly/common/media/oled_icons/83.png differ diff --git a/mixly/common/media/oled_icons/84.png b/mixly/common/media/oled_icons/84.png new file mode 100644 index 00000000..566fd7c2 Binary files /dev/null and b/mixly/common/media/oled_icons/84.png differ diff --git a/mixly/common/media/oled_icons/85.png b/mixly/common/media/oled_icons/85.png new file mode 100644 index 00000000..f2a48e2b Binary files /dev/null and b/mixly/common/media/oled_icons/85.png differ diff --git a/mixly/common/media/oled_icons/86.png b/mixly/common/media/oled_icons/86.png new file mode 100644 index 00000000..aa41cb8b Binary files /dev/null and b/mixly/common/media/oled_icons/86.png differ diff --git a/mixly/common/media/oled_icons/87.png b/mixly/common/media/oled_icons/87.png new file mode 100644 index 00000000..554af276 Binary files /dev/null and b/mixly/common/media/oled_icons/87.png differ diff --git a/mixly/common/media/oled_icons/88.png b/mixly/common/media/oled_icons/88.png new file mode 100644 index 00000000..3395079d Binary files /dev/null and b/mixly/common/media/oled_icons/88.png differ diff --git a/mixly/common/media/oled_icons/89.png b/mixly/common/media/oled_icons/89.png new file mode 100644 index 00000000..395557a1 Binary files /dev/null and b/mixly/common/media/oled_icons/89.png differ diff --git a/mixly/common/media/oled_icons/90.png b/mixly/common/media/oled_icons/90.png new file mode 100644 index 00000000..39551064 Binary files /dev/null and b/mixly/common/media/oled_icons/90.png differ diff --git a/mixly/common/media/oled_icons/91.png b/mixly/common/media/oled_icons/91.png new file mode 100644 index 00000000..de747ea2 Binary files /dev/null and b/mixly/common/media/oled_icons/91.png differ diff --git a/mixly/common/media/oled_icons/92.png b/mixly/common/media/oled_icons/92.png new file mode 100644 index 00000000..131246f7 Binary files /dev/null and b/mixly/common/media/oled_icons/92.png differ diff --git a/mixly/common/media/oled_icons/93.png b/mixly/common/media/oled_icons/93.png new file mode 100644 index 00000000..c3790aa8 Binary files /dev/null and b/mixly/common/media/oled_icons/93.png differ diff --git a/mixly/common/media/oled_icons/94.png b/mixly/common/media/oled_icons/94.png new file mode 100644 index 00000000..44b2f691 Binary files /dev/null and b/mixly/common/media/oled_icons/94.png differ diff --git a/mixly/common/media/oled_icons/95.png b/mixly/common/media/oled_icons/95.png new file mode 100644 index 00000000..f23d3e68 Binary files /dev/null and b/mixly/common/media/oled_icons/95.png differ diff --git a/mixly/common/media/oled_icons/96.png b/mixly/common/media/oled_icons/96.png new file mode 100644 index 00000000..2e811f50 Binary files /dev/null and b/mixly/common/media/oled_icons/96.png differ diff --git a/mixly/common/media/oled_icons/97.png b/mixly/common/media/oled_icons/97.png new file mode 100644 index 00000000..b90d1a37 Binary files /dev/null and b/mixly/common/media/oled_icons/97.png differ diff --git a/mixly/common/media/oled_icons/98.png b/mixly/common/media/oled_icons/98.png new file mode 100644 index 00000000..9eee6552 Binary files /dev/null and b/mixly/common/media/oled_icons/98.png differ diff --git a/mixly/common/media/oled_icons/99.png b/mixly/common/media/oled_icons/99.png new file mode 100644 index 00000000..a7cc48e0 Binary files /dev/null and b/mixly/common/media/oled_icons/99.png differ diff --git a/mixly/common/media/oled_icons/face/1.png b/mixly/common/media/oled_icons/face/1.png new file mode 100644 index 00000000..7686d399 Binary files /dev/null and b/mixly/common/media/oled_icons/face/1.png differ diff --git a/mixly/common/media/oled_icons/face/10.png b/mixly/common/media/oled_icons/face/10.png new file mode 100644 index 00000000..75953c92 Binary files /dev/null and b/mixly/common/media/oled_icons/face/10.png differ diff --git a/mixly/common/media/oled_icons/face/11.png b/mixly/common/media/oled_icons/face/11.png new file mode 100644 index 00000000..4f69f637 Binary files /dev/null and b/mixly/common/media/oled_icons/face/11.png differ diff --git a/mixly/common/media/oled_icons/face/12.png b/mixly/common/media/oled_icons/face/12.png new file mode 100644 index 00000000..2f09a1bf Binary files /dev/null and b/mixly/common/media/oled_icons/face/12.png differ diff --git a/mixly/common/media/oled_icons/face/2.png b/mixly/common/media/oled_icons/face/2.png new file mode 100644 index 00000000..f1ff20a8 Binary files /dev/null and b/mixly/common/media/oled_icons/face/2.png differ diff --git a/mixly/common/media/oled_icons/face/3.png b/mixly/common/media/oled_icons/face/3.png new file mode 100644 index 00000000..389fd6b4 Binary files /dev/null and b/mixly/common/media/oled_icons/face/3.png differ diff --git a/mixly/common/media/oled_icons/face/4.png b/mixly/common/media/oled_icons/face/4.png new file mode 100644 index 00000000..3ea7fa26 Binary files /dev/null and b/mixly/common/media/oled_icons/face/4.png differ diff --git a/mixly/common/media/oled_icons/face/5.png b/mixly/common/media/oled_icons/face/5.png new file mode 100644 index 00000000..2e120b4a Binary files /dev/null and b/mixly/common/media/oled_icons/face/5.png differ diff --git a/mixly/common/media/oled_icons/face/6.png b/mixly/common/media/oled_icons/face/6.png new file mode 100644 index 00000000..b2f30aeb Binary files /dev/null and b/mixly/common/media/oled_icons/face/6.png differ diff --git a/mixly/common/media/oled_icons/face/7.png b/mixly/common/media/oled_icons/face/7.png new file mode 100644 index 00000000..17a62d0e Binary files /dev/null and b/mixly/common/media/oled_icons/face/7.png differ diff --git a/mixly/common/media/oled_icons/face/8.png b/mixly/common/media/oled_icons/face/8.png new file mode 100644 index 00000000..ffe35e03 Binary files /dev/null and b/mixly/common/media/oled_icons/face/8.png differ diff --git a/mixly/common/media/oled_icons/face/9.png b/mixly/common/media/oled_icons/face/9.png new file mode 100644 index 00000000..5118c40c Binary files /dev/null and b/mixly/common/media/oled_icons/face/9.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Big smile.png b/mixly/common/media/oled_icons/face/Expressions/Big smile.png new file mode 100644 index 00000000..5bc84af7 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Big smile.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Heart large.png b/mixly/common/media/oled_icons/face/Expressions/Heart large.png new file mode 100644 index 00000000..42eebd96 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Heart large.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Heart small.png b/mixly/common/media/oled_icons/face/Expressions/Heart small.png new file mode 100644 index 00000000..c5524ef3 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Heart small.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Mouth 1 open.png b/mixly/common/media/oled_icons/face/Expressions/Mouth 1 open.png new file mode 100644 index 00000000..1dadad34 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Mouth 1 open.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Mouth 1 shut.png b/mixly/common/media/oled_icons/face/Expressions/Mouth 1 shut.png new file mode 100644 index 00000000..29bc794b Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Mouth 1 shut.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Mouth 2 open.png b/mixly/common/media/oled_icons/face/Expressions/Mouth 2 open.png new file mode 100644 index 00000000..32e7ab29 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Mouth 2 open.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Mouth 2 shut.png b/mixly/common/media/oled_icons/face/Expressions/Mouth 2 shut.png new file mode 100644 index 00000000..535553b8 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Mouth 2 shut.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Sad.png b/mixly/common/media/oled_icons/face/Expressions/Sad.png new file mode 100644 index 00000000..e98969ea Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Sad.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Sick.png b/mixly/common/media/oled_icons/face/Expressions/Sick.png new file mode 100644 index 00000000..19aaf372 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Sick.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Smile.png b/mixly/common/media/oled_icons/face/Expressions/Smile.png new file mode 100644 index 00000000..dffe7176 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Smile.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Swearing.png b/mixly/common/media/oled_icons/face/Expressions/Swearing.png new file mode 100644 index 00000000..1db1fd87 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Swearing.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Talking.png b/mixly/common/media/oled_icons/face/Expressions/Talking.png new file mode 100644 index 00000000..80aad2cd Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Talking.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/Wink.png b/mixly/common/media/oled_icons/face/Expressions/Wink.png new file mode 100644 index 00000000..2c30ce72 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/Wink.png differ diff --git a/mixly/common/media/oled_icons/face/Expressions/ZZZ.png b/mixly/common/media/oled_icons/face/Expressions/ZZZ.png new file mode 100644 index 00000000..03ecea74 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Expressions/ZZZ.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Angry.png b/mixly/common/media/oled_icons/face/Eyes/Angry.png new file mode 100644 index 00000000..665bf38c Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Angry.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Awake.png b/mixly/common/media/oled_icons/face/Eyes/Awake.png new file mode 100644 index 00000000..a3cd569b Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Awake.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Black eye.png b/mixly/common/media/oled_icons/face/Eyes/Black eye.png new file mode 100644 index 00000000..d02d0f73 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Black eye.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Bottom left.png b/mixly/common/media/oled_icons/face/Eyes/Bottom left.png new file mode 100644 index 00000000..c3d2df0f Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Bottom left.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Bottom right.png b/mixly/common/media/oled_icons/face/Eyes/Bottom right.png new file mode 100644 index 00000000..544144fb Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Bottom right.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Crazy 1.png b/mixly/common/media/oled_icons/face/Eyes/Crazy 1.png new file mode 100644 index 00000000..954d6610 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Crazy 1.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Crazy 2.png b/mixly/common/media/oled_icons/face/Eyes/Crazy 2.png new file mode 100644 index 00000000..d1fab5a3 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Crazy 2.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Disappointed.png b/mixly/common/media/oled_icons/face/Eyes/Disappointed.png new file mode 100644 index 00000000..06f27617 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Disappointed.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Dizzy.png b/mixly/common/media/oled_icons/face/Eyes/Dizzy.png new file mode 100644 index 00000000..367a8b81 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Dizzy.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Down.png b/mixly/common/media/oled_icons/face/Eyes/Down.png new file mode 100644 index 00000000..1bbb7464 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Down.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Evil.png b/mixly/common/media/oled_icons/face/Eyes/Evil.png new file mode 100644 index 00000000..7950b4de Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Evil.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Hurt.png b/mixly/common/media/oled_icons/face/Eyes/Hurt.png new file mode 100644 index 00000000..748a2813 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Hurt.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Knocked out.png b/mixly/common/media/oled_icons/face/Eyes/Knocked out.png new file mode 100644 index 00000000..ab74e245 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Knocked out.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Love.png b/mixly/common/media/oled_icons/face/Eyes/Love.png new file mode 100644 index 00000000..0bea7f3d Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Love.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Middle left.png b/mixly/common/media/oled_icons/face/Eyes/Middle left.png new file mode 100644 index 00000000..a7f56f95 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Middle left.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Middle right.png b/mixly/common/media/oled_icons/face/Eyes/Middle right.png new file mode 100644 index 00000000..35f55bee Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Middle right.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Neutral.png b/mixly/common/media/oled_icons/face/Eyes/Neutral.png new file mode 100644 index 00000000..c91e934f Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Neutral.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Nuclear.png b/mixly/common/media/oled_icons/face/Eyes/Nuclear.png new file mode 100644 index 00000000..4d67b532 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Nuclear.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Pinch left.png b/mixly/common/media/oled_icons/face/Eyes/Pinch left.png new file mode 100644 index 00000000..5f284bdd Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Pinch left.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Pinch middle.png b/mixly/common/media/oled_icons/face/Eyes/Pinch middle.png new file mode 100644 index 00000000..0f222ba1 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Pinch middle.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Pinch right.png b/mixly/common/media/oled_icons/face/Eyes/Pinch right.png new file mode 100644 index 00000000..cd2351a6 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Pinch right.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Tear.png b/mixly/common/media/oled_icons/face/Eyes/Tear.png new file mode 100644 index 00000000..4d961761 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Tear.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Tired left.png b/mixly/common/media/oled_icons/face/Eyes/Tired left.png new file mode 100644 index 00000000..23a4dc48 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Tired left.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Tired middle.png b/mixly/common/media/oled_icons/face/Eyes/Tired middle.png new file mode 100644 index 00000000..e893fa0b Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Tired middle.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Tired right.png b/mixly/common/media/oled_icons/face/Eyes/Tired right.png new file mode 100644 index 00000000..6707b4ef Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Tired right.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Toxic.png b/mixly/common/media/oled_icons/face/Eyes/Toxic.png new file mode 100644 index 00000000..5de71150 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Toxic.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Up.png b/mixly/common/media/oled_icons/face/Eyes/Up.png new file mode 100644 index 00000000..b104103b Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Up.png differ diff --git a/mixly/common/media/oled_icons/face/Eyes/Winking.png b/mixly/common/media/oled_icons/face/Eyes/Winking.png new file mode 100644 index 00000000..e230b414 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Eyes/Winking.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Accept.png b/mixly/common/media/oled_icons/face/Information/Accept.png new file mode 100644 index 00000000..863b98a4 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Accept.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Backward.png b/mixly/common/media/oled_icons/face/Information/Backward.png new file mode 100644 index 00000000..3cdab138 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Backward.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Decline.png b/mixly/common/media/oled_icons/face/Information/Decline.png new file mode 100644 index 00000000..617f6188 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Decline.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Forward.png b/mixly/common/media/oled_icons/face/Information/Forward.png new file mode 100644 index 00000000..4606b66c Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Forward.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Left.png b/mixly/common/media/oled_icons/face/Information/Left.png new file mode 100644 index 00000000..7d369ab1 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Left.png differ diff --git a/mixly/common/media/oled_icons/face/Information/No go.png b/mixly/common/media/oled_icons/face/Information/No go.png new file mode 100644 index 00000000..fe138ca4 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/No go.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Question mark.png b/mixly/common/media/oled_icons/face/Information/Question mark.png new file mode 100644 index 00000000..aee1b1ae Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Question mark.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Right.png b/mixly/common/media/oled_icons/face/Information/Right.png new file mode 100644 index 00000000..cc4e4852 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Right.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Stop 1.png b/mixly/common/media/oled_icons/face/Information/Stop 1.png new file mode 100644 index 00000000..36330301 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Stop 1.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Stop 2.png b/mixly/common/media/oled_icons/face/Information/Stop 2.png new file mode 100644 index 00000000..8415cb30 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Stop 2.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Thumbs down.png b/mixly/common/media/oled_icons/face/Information/Thumbs down.png new file mode 100644 index 00000000..704bdaa5 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Thumbs down.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Thumbs up.png b/mixly/common/media/oled_icons/face/Information/Thumbs up.png new file mode 100644 index 00000000..a405824a Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Thumbs up.png differ diff --git a/mixly/common/media/oled_icons/face/Information/Warning.png b/mixly/common/media/oled_icons/face/Information/Warning.png new file mode 100644 index 00000000..5b7fc217 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Information/Warning.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Bomb.png b/mixly/common/media/oled_icons/face/Objects/Bomb.png new file mode 100644 index 00000000..b2974638 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Bomb.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Boom.png b/mixly/common/media/oled_icons/face/Objects/Boom.png new file mode 100644 index 00000000..559d6de5 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Boom.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Fire.png b/mixly/common/media/oled_icons/face/Objects/Fire.png new file mode 100644 index 00000000..fc3b036b Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Fire.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Flowers.png b/mixly/common/media/oled_icons/face/Objects/Flowers.png new file mode 100644 index 00000000..8e4239af Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Flowers.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Forest.png b/mixly/common/media/oled_icons/face/Objects/Forest.png new file mode 100644 index 00000000..1c999710 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Forest.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Light off.png b/mixly/common/media/oled_icons/face/Objects/Light off.png new file mode 100644 index 00000000..fd2a478e Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Light off.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Light on.png b/mixly/common/media/oled_icons/face/Objects/Light on.png new file mode 100644 index 00000000..c0013007 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Light on.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Lightning.png b/mixly/common/media/oled_icons/face/Objects/Lightning.png new file mode 100644 index 00000000..2540ea87 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Lightning.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Night.png b/mixly/common/media/oled_icons/face/Objects/Night.png new file mode 100644 index 00000000..fb779593 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Night.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Pirate.png b/mixly/common/media/oled_icons/face/Objects/Pirate.png new file mode 100644 index 00000000..abf76b21 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Pirate.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Snow.png b/mixly/common/media/oled_icons/face/Objects/Snow.png new file mode 100644 index 00000000..5471e6c5 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Snow.png differ diff --git a/mixly/common/media/oled_icons/face/Objects/Target.png b/mixly/common/media/oled_icons/face/Objects/Target.png new file mode 100644 index 00000000..e5c1a447 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Objects/Target.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Bar 0.png b/mixly/common/media/oled_icons/face/Progress/Bar 0.png new file mode 100644 index 00000000..afaad742 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Bar 0.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Bar 1.png b/mixly/common/media/oled_icons/face/Progress/Bar 1.png new file mode 100644 index 00000000..da79fe6d Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Bar 1.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Bar 2.png b/mixly/common/media/oled_icons/face/Progress/Bar 2.png new file mode 100644 index 00000000..01d98f38 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Bar 2.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Bar 3.png b/mixly/common/media/oled_icons/face/Progress/Bar 3.png new file mode 100644 index 00000000..48b5d728 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Bar 3.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Bar 4.png b/mixly/common/media/oled_icons/face/Progress/Bar 4.png new file mode 100644 index 00000000..22b18adc Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Bar 4.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dial 0.png b/mixly/common/media/oled_icons/face/Progress/Dial 0.png new file mode 100644 index 00000000..05fa892e Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dial 0.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dial 1.png b/mixly/common/media/oled_icons/face/Progress/Dial 1.png new file mode 100644 index 00000000..a64ce5e8 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dial 1.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dial 2.png b/mixly/common/media/oled_icons/face/Progress/Dial 2.png new file mode 100644 index 00000000..250df38f Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dial 2.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dial 3.png b/mixly/common/media/oled_icons/face/Progress/Dial 3.png new file mode 100644 index 00000000..db2b650b Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dial 3.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dial 4.png b/mixly/common/media/oled_icons/face/Progress/Dial 4.png new file mode 100644 index 00000000..033fd7e7 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dial 4.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dots 0.png b/mixly/common/media/oled_icons/face/Progress/Dots 0.png new file mode 100644 index 00000000..e0f444cb Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dots 0.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dots 1.png b/mixly/common/media/oled_icons/face/Progress/Dots 1.png new file mode 100644 index 00000000..9aa5cab4 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dots 1.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dots 2.png b/mixly/common/media/oled_icons/face/Progress/Dots 2.png new file mode 100644 index 00000000..007dbafd Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dots 2.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Dots 3.png b/mixly/common/media/oled_icons/face/Progress/Dots 3.png new file mode 100644 index 00000000..de5505a1 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Dots 3.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Hourglass 0.png b/mixly/common/media/oled_icons/face/Progress/Hourglass 0.png new file mode 100644 index 00000000..3d17a76d Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Hourglass 0.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Hourglass 1.png b/mixly/common/media/oled_icons/face/Progress/Hourglass 1.png new file mode 100644 index 00000000..e80265b0 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Hourglass 1.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Hourglass 2.png b/mixly/common/media/oled_icons/face/Progress/Hourglass 2.png new file mode 100644 index 00000000..5fbb34af Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Hourglass 2.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Timer 0.png b/mixly/common/media/oled_icons/face/Progress/Timer 0.png new file mode 100644 index 00000000..97c497a7 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Timer 0.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Timer 1.png b/mixly/common/media/oled_icons/face/Progress/Timer 1.png new file mode 100644 index 00000000..19f7c267 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Timer 1.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Timer 2.png b/mixly/common/media/oled_icons/face/Progress/Timer 2.png new file mode 100644 index 00000000..b10b9528 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Timer 2.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Timer 3.png b/mixly/common/media/oled_icons/face/Progress/Timer 3.png new file mode 100644 index 00000000..517277ff Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Timer 3.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Timer 4.png b/mixly/common/media/oled_icons/face/Progress/Timer 4.png new file mode 100644 index 00000000..ef4cc940 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Timer 4.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Water level 0.png b/mixly/common/media/oled_icons/face/Progress/Water level 0.png new file mode 100644 index 00000000..c85d62c0 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Water level 0.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Water level 1.png b/mixly/common/media/oled_icons/face/Progress/Water level 1.png new file mode 100644 index 00000000..b9018c1f Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Water level 1.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Water level 2.png b/mixly/common/media/oled_icons/face/Progress/Water level 2.png new file mode 100644 index 00000000..2dc1c16d Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Water level 2.png differ diff --git a/mixly/common/media/oled_icons/face/Progress/Water level 3.png b/mixly/common/media/oled_icons/face/Progress/Water level 3.png new file mode 100644 index 00000000..9e1a4bd3 Binary files /dev/null and b/mixly/common/media/oled_icons/face/Progress/Water level 3.png differ diff --git a/mixly/common/media/oled_icons/face/System/Accept_1.png b/mixly/common/media/oled_icons/face/System/Accept_1.png new file mode 100644 index 00000000..83a7a2d4 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Accept_1.png differ diff --git a/mixly/common/media/oled_icons/face/System/Accept_2.png b/mixly/common/media/oled_icons/face/System/Accept_2.png new file mode 100644 index 00000000..8a6045e4 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Accept_2.png differ diff --git a/mixly/common/media/oled_icons/face/System/Alert.png b/mixly/common/media/oled_icons/face/System/Alert.png new file mode 100644 index 00000000..284939cb Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Alert.png differ diff --git a/mixly/common/media/oled_icons/face/System/Box.png b/mixly/common/media/oled_icons/face/System/Box.png new file mode 100644 index 00000000..8f67d7c2 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Box.png differ diff --git a/mixly/common/media/oled_icons/face/System/Busy_0.png b/mixly/common/media/oled_icons/face/System/Busy_0.png new file mode 100644 index 00000000..5dd2cf34 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Busy_0.png differ diff --git a/mixly/common/media/oled_icons/face/System/Busy_1.png b/mixly/common/media/oled_icons/face/System/Busy_1.png new file mode 100644 index 00000000..7fcb4ba0 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Busy_1.png differ diff --git a/mixly/common/media/oled_icons/face/System/Decline_1.png b/mixly/common/media/oled_icons/face/System/Decline_1.png new file mode 100644 index 00000000..aac95171 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Decline_1.png differ diff --git a/mixly/common/media/oled_icons/face/System/Decline_2.png b/mixly/common/media/oled_icons/face/System/Decline_2.png new file mode 100644 index 00000000..34d8c00f Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Decline_2.png differ diff --git a/mixly/common/media/oled_icons/face/System/Dot_empty.png b/mixly/common/media/oled_icons/face/System/Dot_empty.png new file mode 100644 index 00000000..833d9a0a Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Dot_empty.png differ diff --git a/mixly/common/media/oled_icons/face/System/Dot_full.png b/mixly/common/media/oled_icons/face/System/Dot_full.png new file mode 100644 index 00000000..fa18c45a Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Dot_full.png differ diff --git a/mixly/common/media/oled_icons/face/System/Play.png b/mixly/common/media/oled_icons/face/System/Play.png new file mode 100644 index 00000000..8083fdd2 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Play.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_0.png b/mixly/common/media/oled_icons/face/System/Slider_0.png new file mode 100644 index 00000000..f4fccfca Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_0.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_1.png b/mixly/common/media/oled_icons/face/System/Slider_1.png new file mode 100644 index 00000000..568c6108 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_1.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_2.png b/mixly/common/media/oled_icons/face/System/Slider_2.png new file mode 100644 index 00000000..ebb15bb5 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_2.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_3.png b/mixly/common/media/oled_icons/face/System/Slider_3.png new file mode 100644 index 00000000..66c495cd Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_3.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_4.png b/mixly/common/media/oled_icons/face/System/Slider_4.png new file mode 100644 index 00000000..4cfd383f Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_4.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_5.png b/mixly/common/media/oled_icons/face/System/Slider_5.png new file mode 100644 index 00000000..ff5ef71c Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_5.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_6.png b/mixly/common/media/oled_icons/face/System/Slider_6.png new file mode 100644 index 00000000..094f1712 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_6.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_7.png b/mixly/common/media/oled_icons/face/System/Slider_7.png new file mode 100644 index 00000000..b814752c Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_7.png differ diff --git a/mixly/common/media/oled_icons/face/System/Slider_8.png b/mixly/common/media/oled_icons/face/System/Slider_8.png new file mode 100644 index 00000000..c1423390 Binary files /dev/null and b/mixly/common/media/oled_icons/face/System/Slider_8.png differ diff --git a/mixly/common/media/oled_icons/face/listFileName.bat b/mixly/common/media/oled_icons/face/listFileName.bat new file mode 100644 index 00000000..4c4a0ce0 --- /dev/null +++ b/mixly/common/media/oled_icons/face/listFileName.bat @@ -0,0 +1 @@ +dir *.* /b> namelist.txt \ No newline at end of file diff --git a/mixly/common/media/oled_icons/face/paper.png b/mixly/common/media/oled_icons/face/paper.png new file mode 100644 index 00000000..07414936 Binary files /dev/null and b/mixly/common/media/oled_icons/face/paper.png differ diff --git a/mixly/common/media/oled_icons/face/paper_s.png b/mixly/common/media/oled_icons/face/paper_s.png new file mode 100644 index 00000000..76858ef8 Binary files /dev/null and b/mixly/common/media/oled_icons/face/paper_s.png differ diff --git a/mixly/common/media/oled_icons/face/rock.png b/mixly/common/media/oled_icons/face/rock.png new file mode 100644 index 00000000..de4845d6 Binary files /dev/null and b/mixly/common/media/oled_icons/face/rock.png differ diff --git a/mixly/common/media/oled_icons/face/rock_s.png b/mixly/common/media/oled_icons/face/rock_s.png new file mode 100644 index 00000000..18e69652 Binary files /dev/null and b/mixly/common/media/oled_icons/face/rock_s.png differ diff --git a/mixly/common/media/oled_icons/face/scissors.png b/mixly/common/media/oled_icons/face/scissors.png new file mode 100644 index 00000000..bcb6a098 Binary files /dev/null and b/mixly/common/media/oled_icons/face/scissors.png differ diff --git a/mixly/common/media/oled_icons/face/scissors_s.png b/mixly/common/media/oled_icons/face/scissors_s.png new file mode 100644 index 00000000..8e37cf63 Binary files /dev/null and b/mixly/common/media/oled_icons/face/scissors_s.png differ diff --git a/mixly/common/media/oled_icons/icons.psd b/mixly/common/media/oled_icons/icons.psd new file mode 100644 index 00000000..f6be65ee Binary files /dev/null and b/mixly/common/media/oled_icons/icons.psd differ diff --git a/mixly/common/media/oled_icons/icons2.psd b/mixly/common/media/oled_icons/icons2.psd new file mode 100644 index 00000000..3d45bf32 Binary files /dev/null and b/mixly/common/media/oled_icons/icons2.psd differ diff --git a/mixly/common/media/spriteimg/.keep b/mixly/common/media/spriteimg/.keep new file mode 100644 index 00000000..e69de29b diff --git a/mixly/common/media/spriteimg/HanoiColumn.png b/mixly/common/media/spriteimg/HanoiColumn.png new file mode 100644 index 00000000..ed066eb2 Binary files /dev/null and b/mixly/common/media/spriteimg/HanoiColumn.png differ diff --git a/mixly/common/media/spriteimg/House25.png b/mixly/common/media/spriteimg/House25.png new file mode 100644 index 00000000..025635c0 Binary files /dev/null and b/mixly/common/media/spriteimg/House25.png differ diff --git a/mixly/common/media/spriteimg/House36.png b/mixly/common/media/spriteimg/House36.png new file mode 100644 index 00000000..7f557e31 Binary files /dev/null and b/mixly/common/media/spriteimg/House36.png differ diff --git a/mixly/common/media/spriteimg/House47.png b/mixly/common/media/spriteimg/House47.png new file mode 100644 index 00000000..396567b1 Binary files /dev/null and b/mixly/common/media/spriteimg/House47.png differ diff --git a/mixly/common/media/spriteimg/School.png b/mixly/common/media/spriteimg/School.png new file mode 100644 index 00000000..0d9aff4f Binary files /dev/null and b/mixly/common/media/spriteimg/School.png differ diff --git a/mixly/common/media/spriteimg/apple.png b/mixly/common/media/spriteimg/apple.png new file mode 100644 index 00000000..c20e38f3 Binary files /dev/null and b/mixly/common/media/spriteimg/apple.png differ diff --git a/mixly/common/media/spriteimg/barricade.png b/mixly/common/media/spriteimg/barricade.png new file mode 100644 index 00000000..7aaf84bb Binary files /dev/null and b/mixly/common/media/spriteimg/barricade.png differ diff --git a/mixly/common/media/spriteimg/beijing.png b/mixly/common/media/spriteimg/beijing.png new file mode 100644 index 00000000..3bcae083 Binary files /dev/null and b/mixly/common/media/spriteimg/beijing.png differ diff --git a/mixly/common/media/spriteimg/bg.png b/mixly/common/media/spriteimg/bg.png new file mode 100644 index 00000000..2c53948f Binary files /dev/null and b/mixly/common/media/spriteimg/bg.png differ diff --git a/mixly/common/media/spriteimg/black.png b/mixly/common/media/spriteimg/black.png new file mode 100644 index 00000000..a35e293b Binary files /dev/null and b/mixly/common/media/spriteimg/black.png differ diff --git a/mixly/common/media/spriteimg/blue.png b/mixly/common/media/spriteimg/blue.png new file mode 100644 index 00000000..40e32be9 Binary files /dev/null and b/mixly/common/media/spriteimg/blue.png differ diff --git a/mixly/common/media/spriteimg/books/book1.png b/mixly/common/media/spriteimg/books/book1.png new file mode 100644 index 00000000..1505e04b Binary files /dev/null and b/mixly/common/media/spriteimg/books/book1.png differ diff --git a/mixly/common/media/spriteimg/books/book10.png b/mixly/common/media/spriteimg/books/book10.png new file mode 100644 index 00000000..c7863e9d Binary files /dev/null and b/mixly/common/media/spriteimg/books/book10.png differ diff --git a/mixly/common/media/spriteimg/books/book2.png b/mixly/common/media/spriteimg/books/book2.png new file mode 100644 index 00000000..f15ce3ec Binary files /dev/null and b/mixly/common/media/spriteimg/books/book2.png differ diff --git a/mixly/common/media/spriteimg/books/book3.png b/mixly/common/media/spriteimg/books/book3.png new file mode 100644 index 00000000..e50cceba Binary files /dev/null and b/mixly/common/media/spriteimg/books/book3.png differ diff --git a/mixly/common/media/spriteimg/books/book4.png b/mixly/common/media/spriteimg/books/book4.png new file mode 100644 index 00000000..82ef3fb2 Binary files /dev/null and b/mixly/common/media/spriteimg/books/book4.png differ diff --git a/mixly/common/media/spriteimg/books/book5.png b/mixly/common/media/spriteimg/books/book5.png new file mode 100644 index 00000000..49940859 Binary files /dev/null and b/mixly/common/media/spriteimg/books/book5.png differ diff --git a/mixly/common/media/spriteimg/books/book6.png b/mixly/common/media/spriteimg/books/book6.png new file mode 100644 index 00000000..78cedeaf Binary files /dev/null and b/mixly/common/media/spriteimg/books/book6.png differ diff --git a/mixly/common/media/spriteimg/books/book7.png b/mixly/common/media/spriteimg/books/book7.png new file mode 100644 index 00000000..287fa576 Binary files /dev/null and b/mixly/common/media/spriteimg/books/book7.png differ diff --git a/mixly/common/media/spriteimg/books/book8.png b/mixly/common/media/spriteimg/books/book8.png new file mode 100644 index 00000000..9fbe4d74 Binary files /dev/null and b/mixly/common/media/spriteimg/books/book8.png differ diff --git a/mixly/common/media/spriteimg/books/book9.png b/mixly/common/media/spriteimg/books/book9.png new file mode 100644 index 00000000..283a02b3 Binary files /dev/null and b/mixly/common/media/spriteimg/books/book9.png differ diff --git a/mixly/common/media/spriteimg/boy.png b/mixly/common/media/spriteimg/boy.png new file mode 100644 index 00000000..67f2444b Binary files /dev/null and b/mixly/common/media/spriteimg/boy.png differ diff --git a/mixly/common/media/spriteimg/button.png b/mixly/common/media/spriteimg/button.png new file mode 100644 index 00000000..779c58ca Binary files /dev/null and b/mixly/common/media/spriteimg/button.png differ diff --git a/mixly/common/media/spriteimg/bwbwjx.png b/mixly/common/media/spriteimg/bwbwjx.png new file mode 100644 index 00000000..5cc175c0 Binary files /dev/null and b/mixly/common/media/spriteimg/bwbwjx.png differ diff --git a/mixly/common/media/spriteimg/car.png b/mixly/common/media/spriteimg/car.png new file mode 100644 index 00000000..6b3afffb Binary files /dev/null and b/mixly/common/media/spriteimg/car.png differ diff --git a/mixly/common/media/spriteimg/checked.png b/mixly/common/media/spriteimg/checked.png new file mode 100644 index 00000000..d82ac95b Binary files /dev/null and b/mixly/common/media/spriteimg/checked.png differ diff --git a/mixly/common/media/spriteimg/ditu.png b/mixly/common/media/spriteimg/ditu.png new file mode 100644 index 00000000..e2762f7e Binary files /dev/null and b/mixly/common/media/spriteimg/ditu.png differ diff --git a/mixly/common/media/spriteimg/fzsf/S1.png b/mixly/common/media/spriteimg/fzsf/S1.png new file mode 100644 index 00000000..bb686c1c Binary files /dev/null and b/mixly/common/media/spriteimg/fzsf/S1.png differ diff --git a/mixly/common/media/spriteimg/fzsf/S2.png b/mixly/common/media/spriteimg/fzsf/S2.png new file mode 100644 index 00000000..84dc0e9a Binary files /dev/null and b/mixly/common/media/spriteimg/fzsf/S2.png differ diff --git a/mixly/common/media/spriteimg/fzsf/S3.png b/mixly/common/media/spriteimg/fzsf/S3.png new file mode 100644 index 00000000..2b3e6dc0 Binary files /dev/null and b/mixly/common/media/spriteimg/fzsf/S3.png differ diff --git a/mixly/common/media/spriteimg/fzsf/S4.png b/mixly/common/media/spriteimg/fzsf/S4.png new file mode 100644 index 00000000..73e26e95 Binary files /dev/null and b/mixly/common/media/spriteimg/fzsf/S4.png differ diff --git a/mixly/common/media/spriteimg/fzsf/map_ck_xxjsjs.png b/mixly/common/media/spriteimg/fzsf/map_ck_xxjsjs.png new file mode 100644 index 00000000..dba62ff7 Binary files /dev/null and b/mixly/common/media/spriteimg/fzsf/map_ck_xxjsjs.png differ diff --git a/mixly/common/media/spriteimg/girl.png b/mixly/common/media/spriteimg/girl.png new file mode 100644 index 00000000..bb58a802 Binary files /dev/null and b/mixly/common/media/spriteimg/girl.png differ diff --git a/mixly/common/media/spriteimg/green.png b/mixly/common/media/spriteimg/green.png new file mode 100644 index 00000000..8e08d0ac Binary files /dev/null and b/mixly/common/media/spriteimg/green.png differ diff --git a/mixly/common/media/spriteimg/hxdb/hxdbbg.png b/mixly/common/media/spriteimg/hxdb/hxdbbg.png new file mode 100644 index 00000000..6c28dcdb Binary files /dev/null and b/mixly/common/media/spriteimg/hxdb/hxdbbg.png differ diff --git a/mixly/common/media/spriteimg/hxdb/soldier.png b/mixly/common/media/spriteimg/hxdb/soldier.png new file mode 100644 index 00000000..c40e1da3 Binary files /dev/null and b/mixly/common/media/spriteimg/hxdb/soldier.png differ diff --git a/mixly/common/media/spriteimg/jttl/chick.png b/mixly/common/media/spriteimg/jttl/chick.png new file mode 100644 index 00000000..1df5c4db Binary files /dev/null and b/mixly/common/media/spriteimg/jttl/chick.png differ diff --git a/mixly/common/media/spriteimg/jttl/rabbit.png b/mixly/common/media/spriteimg/jttl/rabbit.png new file mode 100644 index 00000000..e873543a Binary files /dev/null and b/mixly/common/media/spriteimg/jttl/rabbit.png differ diff --git a/mixly/common/media/spriteimg/lelejx.png b/mixly/common/media/spriteimg/lelejx.png new file mode 100644 index 00000000..2c393678 Binary files /dev/null and b/mixly/common/media/spriteimg/lelejx.png differ diff --git a/mixly/common/media/spriteimg/map_si_ke.png b/mixly/common/media/spriteimg/map_si_ke.png new file mode 100644 index 00000000..9a4f3da2 Binary files /dev/null and b/mixly/common/media/spriteimg/map_si_ke.png differ diff --git a/mixly/common/media/spriteimg/map_xuexiao.png b/mixly/common/media/spriteimg/map_xuexiao.png new file mode 100644 index 00000000..b4dd4f15 Binary files /dev/null and b/mixly/common/media/spriteimg/map_xuexiao.png differ diff --git a/mixly/common/media/spriteimg/map_zhi_xue.png b/mixly/common/media/spriteimg/map_zhi_xue.png new file mode 100644 index 00000000..cb182619 Binary files /dev/null and b/mixly/common/media/spriteimg/map_zhi_xue.png differ diff --git a/mixly/common/media/spriteimg/mark.png b/mixly/common/media/spriteimg/mark.png new file mode 100644 index 00000000..ce2021e4 Binary files /dev/null and b/mixly/common/media/spriteimg/mark.png differ diff --git a/mixly/common/media/spriteimg/mixbear.png b/mixly/common/media/spriteimg/mixbear.png new file mode 100644 index 00000000..12da4197 Binary files /dev/null and b/mixly/common/media/spriteimg/mixbear.png differ diff --git a/mixly/common/media/spriteimg/p.png b/mixly/common/media/spriteimg/p.png new file mode 100644 index 00000000..082e3102 Binary files /dev/null and b/mixly/common/media/spriteimg/p.png differ diff --git a/mixly/common/media/spriteimg/purple.png b/mixly/common/media/spriteimg/purple.png new file mode 100644 index 00000000..8bfedea3 Binary files /dev/null and b/mixly/common/media/spriteimg/purple.png differ diff --git a/mixly/common/media/spriteimg/red.png b/mixly/common/media/spriteimg/red.png new file mode 100644 index 00000000..8621048f Binary files /dev/null and b/mixly/common/media/spriteimg/red.png differ diff --git a/mixly/common/media/spriteimg/white.png b/mixly/common/media/spriteimg/white.png new file mode 100644 index 00000000..ac49d7a1 Binary files /dev/null and b/mixly/common/media/spriteimg/white.png differ diff --git a/mixly/common/media/spriteimg/xnie.png b/mixly/common/media/spriteimg/xnie.png new file mode 100644 index 00000000..0b95abf6 Binary files /dev/null and b/mixly/common/media/spriteimg/xnie.png differ diff --git a/mixly/common/media/spriteimg/xnkejx.png b/mixly/common/media/spriteimg/xnkejx.png new file mode 100644 index 00000000..9e43916b Binary files /dev/null and b/mixly/common/media/spriteimg/xnkejx.png differ diff --git a/mixly/common/media/spriteimg/xnsijx.png b/mixly/common/media/spriteimg/xnsijx.png new file mode 100644 index 00000000..2dfbf4bd Binary files /dev/null and b/mixly/common/media/spriteimg/xnsijx.png differ diff --git a/mixly/common/media/spriteimg/xnvijx.png b/mixly/common/media/spriteimg/xnvijx.png new file mode 100644 index 00000000..1453ab3d Binary files /dev/null and b/mixly/common/media/spriteimg/xnvijx.png differ diff --git a/mixly/common/media/spriteimg/xnxbjx.png b/mixly/common/media/spriteimg/xnxbjx.png new file mode 100644 index 00000000..db6c930a Binary files /dev/null and b/mixly/common/media/spriteimg/xnxbjx.png differ diff --git a/mixly/common/media/spriteimg/xtxn.png b/mixly/common/media/spriteimg/xtxn.png new file mode 100644 index 00000000..ebf4a04d Binary files /dev/null and b/mixly/common/media/spriteimg/xtxn.png differ diff --git a/mixly/common/media/spriteimg/yellow.png b/mixly/common/media/spriteimg/yellow.png new file mode 100644 index 00000000..139d0d5e Binary files /dev/null and b/mixly/common/media/spriteimg/yellow.png differ diff --git a/mixly/common/media/tfmodel/group1-shard1of3.bin b/mixly/common/media/tfmodel/group1-shard1of3.bin new file mode 100644 index 00000000..1ec46e46 Binary files /dev/null and b/mixly/common/media/tfmodel/group1-shard1of3.bin differ diff --git a/mixly/common/media/tfmodel/group1-shard2of3.bin b/mixly/common/media/tfmodel/group1-shard2of3.bin new file mode 100644 index 00000000..8e4e48d2 Binary files /dev/null and b/mixly/common/media/tfmodel/group1-shard2of3.bin differ diff --git a/mixly/common/media/tfmodel/group1-shard3of3.bin b/mixly/common/media/tfmodel/group1-shard3of3.bin new file mode 100644 index 00000000..ee27b467 Binary files /dev/null and b/mixly/common/media/tfmodel/group1-shard3of3.bin differ diff --git a/mixly/common/media/tfmodel/model.json b/mixly/common/media/tfmodel/model.json new file mode 100644 index 00000000..d4edc2cb --- /dev/null +++ b/mixly/common/media/tfmodel/model.json @@ -0,0 +1 @@ +{"weightsManifest": [{"paths": ["group1-shard1of3.bin", "group1-shard2of3.bin", "group1-shard3of3.bin"], "weights": [{"dtype": "float32", "shape": [], "name": "module_apply_default/hub_input/Mul/y"}, {"dtype": "float32", "shape": [], "name": "module_apply_default/hub_input/Sub/y"}, {"dtype": "float32", "shape": [3, 3, 3, 32], "name": "module/MobilenetV2/Conv/weights"}, {"dtype": "float32", "shape": [32], "name": "module_apply_default/MobilenetV2/Conv/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 32, 1], "name": "module/MobilenetV2/expanded_conv/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [32], "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 32, 16], "name": "module/MobilenetV2/expanded_conv/project/weights"}, {"dtype": "float32", "shape": [16], "name": "module_apply_default/MobilenetV2/expanded_conv/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 16, 96], "name": "module/MobilenetV2/expanded_conv_1/expand/weights"}, {"dtype": "float32", "shape": [96], "name": "module_apply_default/MobilenetV2/expanded_conv_1/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 96, 1], "name": "module/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [96], "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 96, 24], "name": "module/MobilenetV2/expanded_conv_1/project/weights"}, {"dtype": "float32", "shape": [24], "name": "module_apply_default/MobilenetV2/expanded_conv_1/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 24, 144], "name": "module/MobilenetV2/expanded_conv_2/expand/weights"}, {"dtype": "float32", "shape": [144], "name": "module_apply_default/MobilenetV2/expanded_conv_2/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 144, 1], "name": "module/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [144], "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 144, 24], "name": "module/MobilenetV2/expanded_conv_2/project/weights"}, {"dtype": "float32", "shape": [24], "name": "module_apply_default/MobilenetV2/expanded_conv_2/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 24, 144], "name": "module/MobilenetV2/expanded_conv_3/expand/weights"}, {"dtype": "float32", "shape": [144], "name": "module_apply_default/MobilenetV2/expanded_conv_3/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 144, 1], "name": "module/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [144], "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 144, 32], "name": "module/MobilenetV2/expanded_conv_3/project/weights"}, {"dtype": "float32", "shape": [32], "name": "module_apply_default/MobilenetV2/expanded_conv_3/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 32, 192], "name": "module/MobilenetV2/expanded_conv_4/expand/weights"}, {"dtype": "float32", "shape": [192], "name": "module_apply_default/MobilenetV2/expanded_conv_4/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 192, 1], "name": "module/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [192], "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 192, 32], "name": "module/MobilenetV2/expanded_conv_4/project/weights"}, {"dtype": "float32", "shape": [32], "name": "module_apply_default/MobilenetV2/expanded_conv_4/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 32, 192], "name": "module/MobilenetV2/expanded_conv_5/expand/weights"}, {"dtype": "float32", "shape": [192], "name": "module_apply_default/MobilenetV2/expanded_conv_5/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 192, 1], "name": "module/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [192], "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 192, 32], "name": "module/MobilenetV2/expanded_conv_5/project/weights"}, {"dtype": "float32", "shape": [32], "name": "module_apply_default/MobilenetV2/expanded_conv_5/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 32, 192], "name": "module/MobilenetV2/expanded_conv_6/expand/weights"}, {"dtype": "float32", "shape": [192], "name": "module_apply_default/MobilenetV2/expanded_conv_6/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 192, 1], "name": "module/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [192], "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 192, 64], "name": "module/MobilenetV2/expanded_conv_6/project/weights"}, {"dtype": "float32", "shape": [64], "name": "module_apply_default/MobilenetV2/expanded_conv_6/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 64, 384], "name": "module/MobilenetV2/expanded_conv_7/expand/weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_7/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 384, 1], "name": "module/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 384, 64], "name": "module/MobilenetV2/expanded_conv_7/project/weights"}, {"dtype": "float32", "shape": [64], "name": "module_apply_default/MobilenetV2/expanded_conv_7/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 64, 384], "name": "module/MobilenetV2/expanded_conv_8/expand/weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_8/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 384, 1], "name": "module/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 384, 64], "name": "module/MobilenetV2/expanded_conv_8/project/weights"}, {"dtype": "float32", "shape": [64], "name": "module_apply_default/MobilenetV2/expanded_conv_8/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 64, 384], "name": "module/MobilenetV2/expanded_conv_9/expand/weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_9/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 384, 1], "name": "module/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 384, 64], "name": "module/MobilenetV2/expanded_conv_9/project/weights"}, {"dtype": "float32", "shape": [64], "name": "module_apply_default/MobilenetV2/expanded_conv_9/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 64, 384], "name": "module/MobilenetV2/expanded_conv_10/expand/weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_10/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 384, 1], "name": "module/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [384], "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 384, 96], "name": "module/MobilenetV2/expanded_conv_10/project/weights"}, {"dtype": "float32", "shape": [96], "name": "module_apply_default/MobilenetV2/expanded_conv_10/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 96, 576], "name": "module/MobilenetV2/expanded_conv_11/expand/weights"}, {"dtype": "float32", "shape": [576], "name": "module_apply_default/MobilenetV2/expanded_conv_11/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 576, 1], "name": "module/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [576], "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 576, 96], "name": "module/MobilenetV2/expanded_conv_11/project/weights"}, {"dtype": "float32", "shape": [96], "name": "module_apply_default/MobilenetV2/expanded_conv_11/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 96, 576], "name": "module/MobilenetV2/expanded_conv_12/expand/weights"}, {"dtype": "float32", "shape": [576], "name": "module_apply_default/MobilenetV2/expanded_conv_12/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 576, 1], "name": "module/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [576], "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 576, 96], "name": "module/MobilenetV2/expanded_conv_12/project/weights"}, {"dtype": "float32", "shape": [96], "name": "module_apply_default/MobilenetV2/expanded_conv_12/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 96, 576], "name": "module/MobilenetV2/expanded_conv_13/expand/weights"}, {"dtype": "float32", "shape": [576], "name": "module_apply_default/MobilenetV2/expanded_conv_13/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 576, 1], "name": "module/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [576], "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 576, 160], "name": "module/MobilenetV2/expanded_conv_13/project/weights"}, {"dtype": "float32", "shape": [160], "name": "module_apply_default/MobilenetV2/expanded_conv_13/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 160, 960], "name": "module/MobilenetV2/expanded_conv_14/expand/weights"}, {"dtype": "float32", "shape": [960], "name": "module_apply_default/MobilenetV2/expanded_conv_14/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 960, 1], "name": "module/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [960], "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 960, 160], "name": "module/MobilenetV2/expanded_conv_14/project/weights"}, {"dtype": "float32", "shape": [160], "name": "module_apply_default/MobilenetV2/expanded_conv_14/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 160, 960], "name": "module/MobilenetV2/expanded_conv_15/expand/weights"}, {"dtype": "float32", "shape": [960], "name": "module_apply_default/MobilenetV2/expanded_conv_15/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 960, 1], "name": "module/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [960], "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 960, 160], "name": "module/MobilenetV2/expanded_conv_15/project/weights"}, {"dtype": "float32", "shape": [160], "name": "module_apply_default/MobilenetV2/expanded_conv_15/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 160, 960], "name": "module/MobilenetV2/expanded_conv_16/expand/weights"}, {"dtype": "float32", "shape": [960], "name": "module_apply_default/MobilenetV2/expanded_conv_16/expand/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [3, 3, 960, 1], "name": "module/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights"}, {"dtype": "float32", "shape": [960], "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 960, 320], "name": "module/MobilenetV2/expanded_conv_16/project/weights"}, {"dtype": "float32", "shape": [320], "name": "module_apply_default/MobilenetV2/expanded_conv_16/project/Conv2D_bn_offset"}, {"dtype": "float32", "shape": [1, 1, 320, 1280], "name": "module/MobilenetV2/Conv_1/weights"}, {"dtype": "float32", "shape": [1280], "name": "module_apply_default/MobilenetV2/Conv_1/Conv2D_bn_offset"}]}], "modelTopology": {"node": [{"attr": {"dtype": {"type": "DT_FLOAT"}, "shape": {"shape": {"dim": [{"size": "-1"}, {"size": "224"}, {"size": "224"}, {"size": "3"}]}}}, "name": "images", "op": "Placeholder"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}}, "name": "module_apply_default/hub_input/Mul/y", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}}, "name": "module_apply_default/hub_input/Sub/y", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "32"}]}}}}, "name": "module/MobilenetV2/Conv/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}, "name": "module_apply_default/MobilenetV2/Conv/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "32"}, {"size": "16"}]}}}}, "name": "module/MobilenetV2/expanded_conv/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "16"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "16"}, {"size": "96"}]}}}}, "name": "module/MobilenetV2/expanded_conv_1/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "96"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "96"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "96"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "96"}, {"size": "24"}]}}}}, "name": "module/MobilenetV2/expanded_conv_1/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "24"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "24"}, {"size": "144"}]}}}}, "name": "module/MobilenetV2/expanded_conv_2/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "144"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "144"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "144"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "144"}, {"size": "24"}]}}}}, "name": "module/MobilenetV2/expanded_conv_2/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "24"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "24"}, {"size": "144"}]}}}}, "name": "module/MobilenetV2/expanded_conv_3/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "144"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "144"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "144"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "144"}, {"size": "32"}]}}}}, "name": "module/MobilenetV2/expanded_conv_3/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "32"}, {"size": "192"}]}}}}, "name": "module/MobilenetV2/expanded_conv_4/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "192"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "192"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "192"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "192"}, {"size": "32"}]}}}}, "name": "module/MobilenetV2/expanded_conv_4/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "32"}, {"size": "192"}]}}}}, "name": "module/MobilenetV2/expanded_conv_5/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "192"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "192"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "192"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "192"}, {"size": "32"}]}}}}, "name": "module/MobilenetV2/expanded_conv_5/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "32"}, {"size": "192"}]}}}}, "name": "module/MobilenetV2/expanded_conv_6/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "192"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "192"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "192"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "192"}, {"size": "64"}]}}}}, "name": "module/MobilenetV2/expanded_conv_6/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "64"}, {"size": "384"}]}}}}, "name": "module/MobilenetV2/expanded_conv_7/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "384"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "384"}, {"size": "64"}]}}}}, "name": "module/MobilenetV2/expanded_conv_7/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "64"}, {"size": "384"}]}}}}, "name": "module/MobilenetV2/expanded_conv_8/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "384"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "384"}, {"size": "64"}]}}}}, "name": "module/MobilenetV2/expanded_conv_8/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "64"}, {"size": "384"}]}}}}, "name": "module/MobilenetV2/expanded_conv_9/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "384"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "384"}, {"size": "64"}]}}}}, "name": "module/MobilenetV2/expanded_conv_9/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "64"}, {"size": "384"}]}}}}, "name": "module/MobilenetV2/expanded_conv_10/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "384"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "384"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "384"}, {"size": "96"}]}}}}, "name": "module/MobilenetV2/expanded_conv_10/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "96"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "96"}, {"size": "576"}]}}}}, "name": "module/MobilenetV2/expanded_conv_11/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "576"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "576"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "576"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "576"}, {"size": "96"}]}}}}, "name": "module/MobilenetV2/expanded_conv_11/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "96"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "96"}, {"size": "576"}]}}}}, "name": "module/MobilenetV2/expanded_conv_12/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "576"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "576"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "576"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "576"}, {"size": "96"}]}}}}, "name": "module/MobilenetV2/expanded_conv_12/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "96"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "96"}, {"size": "576"}]}}}}, "name": "module/MobilenetV2/expanded_conv_13/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "576"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "576"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "576"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "576"}, {"size": "160"}]}}}}, "name": "module/MobilenetV2/expanded_conv_13/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "160"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "160"}, {"size": "960"}]}}}}, "name": "module/MobilenetV2/expanded_conv_14/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "960"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "960"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "960"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "960"}, {"size": "160"}]}}}}, "name": "module/MobilenetV2/expanded_conv_14/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "160"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "160"}, {"size": "960"}]}}}}, "name": "module/MobilenetV2/expanded_conv_15/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "960"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "960"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "960"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "960"}, {"size": "160"}]}}}}, "name": "module/MobilenetV2/expanded_conv_15/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "160"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "160"}, {"size": "960"}]}}}}, "name": "module/MobilenetV2/expanded_conv_16/expand/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "960"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/expand/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "960"}, {"size": "1"}]}}}}, "name": "module/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "960"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "960"}, {"size": "320"}]}}}}, "name": "module/MobilenetV2/expanded_conv_16/project/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "320"}]}}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/project/Conv2D_bn_offset", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1"}, {"size": "320"}, {"size": "1280"}]}}}}, "name": "module/MobilenetV2/Conv_1/weights", "op": "Const"}, {"attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1280"}]}}}}, "name": "module_apply_default/MobilenetV2/Conv_1/Conv2D_bn_offset", "op": "Const"}, {"input": ["images", "module_apply_default/hub_input/Mul/y"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/hub_input/Mul", "op": "Mul"}, {"input": ["module_apply_default/hub_input/Mul", "module_apply_default/hub_input/Sub/y"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/hub_input/Sub", "op": "Sub"}, {"device": "/device:CPU:0", "input": ["module_apply_default/hub_input/Sub", "module/MobilenetV2/Conv/weights", "module_apply_default/MobilenetV2/Conv/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/Conv/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/Conv/Relu6", "module/MobilenetV2/expanded_conv/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "padding": {"s": "U0FNRQ=="}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise_bn_offset"], "attr": {"data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv/depthwise/Relu6", "module/MobilenetV2/expanded_conv/project/weights", "module_apply_default/MobilenetV2/expanded_conv/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/expanded_conv_1/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_1/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_1/expand/Relu6", "module/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "padding": {"s": "U0FNRQ=="}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_1/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_1/depthwise/Relu6", "module/MobilenetV2/expanded_conv_1/project/weights", "module_apply_default/MobilenetV2/expanded_conv_1/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_1/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_1/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/expanded_conv_2/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_2/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_2/expand/Relu6", "module/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise_bn_offset"], "attr": {"data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_2/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_2/depthwise/Relu6", "module/MobilenetV2/expanded_conv_2/project/weights", "module_apply_default/MobilenetV2/expanded_conv_2/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_1/project/BatchNorm/FusedBatchNorm", "module_apply_default/MobilenetV2/expanded_conv_2/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_2/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_2/add", "module/MobilenetV2/expanded_conv_3/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_3/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_3/expand/Relu6", "module/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_3/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_3/depthwise/Relu6", "module/MobilenetV2/expanded_conv_3/project/weights", "module_apply_default/MobilenetV2/expanded_conv_3/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_3/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_3/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/expanded_conv_4/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_4/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_4/expand/Relu6", "module/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_4/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_4/depthwise/Relu6", "module/MobilenetV2/expanded_conv_4/project/weights", "module_apply_default/MobilenetV2/expanded_conv_4/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_3/project/BatchNorm/FusedBatchNorm", "module_apply_default/MobilenetV2/expanded_conv_4/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_4/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_4/add", "module/MobilenetV2/expanded_conv_5/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_5/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_5/expand/Relu6", "module/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "padding": {"s": "U0FNRQ=="}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_5/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_5/depthwise/Relu6", "module/MobilenetV2/expanded_conv_5/project/weights", "module_apply_default/MobilenetV2/expanded_conv_5/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_4/add", "module_apply_default/MobilenetV2/expanded_conv_5/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_5/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_5/add", "module/MobilenetV2/expanded_conv_6/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_6/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_6/expand/Relu6", "module/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise_bn_offset"], "attr": {"data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_6/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_6/depthwise/Relu6", "module/MobilenetV2/expanded_conv_6/project/weights", "module_apply_default/MobilenetV2/expanded_conv_6/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_6/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_6/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/expanded_conv_7/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_7/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_7/expand/Relu6", "module/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise_bn_offset"], "attr": {"data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_7/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_7/depthwise/Relu6", "module/MobilenetV2/expanded_conv_7/project/weights", "module_apply_default/MobilenetV2/expanded_conv_7/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_6/project/BatchNorm/FusedBatchNorm", "module_apply_default/MobilenetV2/expanded_conv_7/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_7/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_7/add", "module/MobilenetV2/expanded_conv_8/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_8/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_8/expand/Relu6", "module/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise_bn_offset"], "attr": {"data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_8/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_8/depthwise/Relu6", "module/MobilenetV2/expanded_conv_8/project/weights", "module_apply_default/MobilenetV2/expanded_conv_8/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_7/add", "module_apply_default/MobilenetV2/expanded_conv_8/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_8/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_8/add", "module/MobilenetV2/expanded_conv_9/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_9/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_9/expand/Relu6", "module/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_9/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_9/depthwise/Relu6", "module/MobilenetV2/expanded_conv_9/project/weights", "module_apply_default/MobilenetV2/expanded_conv_9/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_8/add", "module_apply_default/MobilenetV2/expanded_conv_9/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_9/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_9/add", "module/MobilenetV2/expanded_conv_10/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_10/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_10/expand/Relu6", "module/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_10/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_10/depthwise/Relu6", "module/MobilenetV2/expanded_conv_10/project/weights", "module_apply_default/MobilenetV2/expanded_conv_10/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_10/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_10/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/expanded_conv_11/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_11/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_11/expand/Relu6", "module/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "padding": {"s": "U0FNRQ=="}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_11/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_11/depthwise/Relu6", "module/MobilenetV2/expanded_conv_11/project/weights", "module_apply_default/MobilenetV2/expanded_conv_11/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_10/project/BatchNorm/FusedBatchNorm", "module_apply_default/MobilenetV2/expanded_conv_11/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_11/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_11/add", "module/MobilenetV2/expanded_conv_12/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_12/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_12/expand/Relu6", "module/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_12/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_12/depthwise/Relu6", "module/MobilenetV2/expanded_conv_12/project/weights", "module_apply_default/MobilenetV2/expanded_conv_12/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_11/add", "module_apply_default/MobilenetV2/expanded_conv_12/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_12/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_12/add", "module/MobilenetV2/expanded_conv_13/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_13/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_13/expand/Relu6", "module/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "padding": {"s": "U0FNRQ=="}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise_bn_offset"], "attr": {"data_format": {"s": "TkhXQw=="}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_13/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_13/depthwise/Relu6", "module/MobilenetV2/expanded_conv_13/project/weights", "module_apply_default/MobilenetV2/expanded_conv_13/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_13/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_13/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/expanded_conv_14/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_14/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_14/expand/Relu6", "module/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_14/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_14/depthwise/Relu6", "module/MobilenetV2/expanded_conv_14/project/weights", "module_apply_default/MobilenetV2/expanded_conv_14/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_13/project/BatchNorm/FusedBatchNorm", "module_apply_default/MobilenetV2/expanded_conv_14/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_14/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_14/add", "module/MobilenetV2/expanded_conv_15/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_15/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_15/expand/Relu6", "module/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_15/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_15/depthwise/Relu6", "module/MobilenetV2/expanded_conv_15/project/weights", "module_apply_default/MobilenetV2/expanded_conv_15/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_14/add", "module_apply_default/MobilenetV2/expanded_conv_15/project/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_15/add", "op": "Add"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_15/add", "module/MobilenetV2/expanded_conv_16/expand/weights", "module_apply_default/MobilenetV2/expanded_conv_16/expand/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/expand/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_16/expand/Relu6", "module/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise", "op": "DepthwiseConv2dNative"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise", "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise_bn_offset"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm", "op": "BiasAdd"}, {"input": ["module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm"], "attr": {"T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/Relu6", "op": "Relu6"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_16/depthwise/Relu6", "module/MobilenetV2/expanded_conv_16/project/weights", "module_apply_default/MobilenetV2/expanded_conv_16/project/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}, "name": "module_apply_default/MobilenetV2/expanded_conv_16/project/BatchNorm/FusedBatchNorm", "op": "_FusedConv2D"}, {"device": "/device:CPU:0", "input": ["module_apply_default/MobilenetV2/expanded_conv_16/project/BatchNorm/FusedBatchNorm", "module/MobilenetV2/Conv_1/weights", "module_apply_default/MobilenetV2/Conv_1/Conv2D_bn_offset"], "attr": {"explicit_paddings": {"list": {}}, "epsilon": {"f": 0.0}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "padding": {"s": "U0FNRQ=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "num_args": {"i": "1"}, "T": {"type": "DT_FLOAT"}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA==", "UmVsdTY="]}}}, "name": "module_apply_default/MobilenetV2/Conv_1/Relu6", "op": "_FusedConv2D"}, {"input": ["module_apply_default/MobilenetV2/Conv_1/Relu6"], "attr": {"padding": {"s": "VkFMSUQ="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "ksize": {"list": {"i": ["1", "7", "7", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}}, "name": "module_apply_default/MobilenetV2/Logits/AvgPool", "op": "AvgPool"}, {"input": ["module_apply_default/MobilenetV2/Logits/AvgPool"], "attr": {"squeeze_dims": {"list": {"i": ["1", "2"]}}, "T": {"type": "DT_FLOAT"}}, "name": "module_apply_default/hub_output/feature_vector/SpatialSqueeze", "op": "Squeeze"}], "library": {}, "versions": {}}, "generatedBy": "1.14.0", "convertedBy": "TensorFlow.js Converter v1.2.10.1", "format": "graph-model"} \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/ampy-file-tree.js b/mixly/common/modules/mixly-modules/common/ampy-file-tree.js new file mode 100644 index 00000000..6e2ea621 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/ampy-file-tree.js @@ -0,0 +1,74 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.require('Mixly.FileTree'); +goog.require('Mixly.Electron.AmpyFS'); +goog.require('Mixly.Web.AmpyFS'); +goog.require('Mixly.WebSocket.AmpyFS'); +goog.provide('Mixly.AmpyFileTree'); + +const { + Env, + FileTree, + Electron = {}, + Web = {}, + WebSocket = {} +} = Mixly; + + +let currentObj = null; + +if (goog.isElectron) { + currentObj = Electron; +} else { + if (Env.hasSocketServer) { + currentObj = WebSocket; + } else { + currentObj = Web; + } +} + +const { AmpyFS } = currentObj; + + +class AmpyFileTree extends FileTree { + constructor() { + super(new AmpyFS()); + } + + async readFolder(inPath) { + let output = []; + const fs = this.getFS(); + const [_a, status] = await fs.isDirectory(inPath); + if (!status) { + return output; + } + const [_b, children] = await fs.readDirectory(inPath); + for (let data of children) { + if (!data) { + continue; + } + const dataPath = data[0]; + const isDirectory = ['dir', 'empty dir'].includes(data[1]); + if (isDirectory) { + const isDirEmtpy = data[1] === 'empty dir'; + output.push({ + type: 'folder', + id: dataPath, + children: !isDirEmtpy + }); + } else { + output.push({ + type: 'file', + id: dataPath, + children: false + }); + } + } + return output; + } +} + +Mixly.AmpyFileTree = AmpyFileTree; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/ampy.js b/mixly/common/modules/mixly-modules/common/ampy.js new file mode 100644 index 00000000..43ee75c8 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/ampy.js @@ -0,0 +1,31 @@ +goog.loadJs('common', () => { + +goog.provide('Mixly.Ampy'); + +class Ampy { + constructor() {} + + unhexlify(hexString) { + if (hexString.length % 2 !== 0) { + hexString = hexString + '0'; + } + let bytes = []; + for (let c = 0; c < hexString.length; c += 2) { + bytes.push(parseInt(hexString.substr(c, 2), 16)); + } + return new Uint8Array(bytes); + } + + async get() {} + async ls() {} + async mkdir() {} + async put() {} + async reset() {} + async rm() {} + async rmdir() {} + async run() {} +} + +Mixly.Ampy = Ampy; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/app.js b/mixly/common/modules/mixly-modules/common/app.js new file mode 100644 index 00000000..6caefc9c --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/app.js @@ -0,0 +1,689 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('hotkeys'); +goog.require('Mixly.Url'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Drag'); +goog.require('Mixly.Nav'); +goog.require('Mixly.Menu'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.FooterBar'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Component'); +goog.require('Mixly.EditorMix'); +goog.require('Mixly.Electron.Loader'); +goog.require('Mixly.Electron.FS'); +goog.require('Mixly.Electron.File'); +goog.require('Mixly.Electron.LibManager'); +goog.require('Mixly.Electron.Serial'); +goog.require('Mixly.Electron.ArduShell'); +goog.require('Mixly.Electron.BU'); +goog.require('Mixly.Electron.PythonShell'); +goog.require('Mixly.Web.BU'); +goog.require('Mixly.Web.FS'); +goog.require('Mixly.Web.File'); +goog.require('Mixly.Web.Serial'); +goog.require('Mixly.WebCompiler.ArduShell'); +goog.require('Mixly.WebSocket.File'); +goog.require('Mixly.WebSocket.Serial'); +goog.require('Mixly.WebSocket.ArduShell'); +goog.require('Mixly.WebSocket.BU'); +goog.provide('Mixly.App'); + +const { + Url, + Config, + Env, + Msg, + Drag, + Nav, + Menu, + Workspace, + FooterBar, + HTMLTemplate, + LayerExt, + Debug, + Component, + EditorMix, + Electron = {}, + Web = {}, + WebCompiler = {}, + WebSocket = {} +} = Mixly; + +const { Loader } = Electron; + +let currentObj = null; + +if (goog.isElectron) { + currentObj = Electron; +} else { + if (Env.hasSocketServer) { + currentObj = WebSocket; + } else { + currentObj = Web; + } +} + +const { + FS, + File, + LibManager, + BU, + PythonShell, + Serial +} = currentObj; + +let ArduShell = null; +if (!goog.isElectron && Env.hasCompiler) { + ArduShell = WebCompiler.ArduShell; +} else { + ArduShell = currentObj.ArduShell; +} + +const { BOARD, SELECTED_BOARD } = Config; + + +class App extends Component { + static { + HTMLTemplate.add( + 'html/app.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/app.html'))) + ); + } + + #resizeObserver_ = null; + #workspace_ = null; + #nav_ = null; + #footerbar_ = null; + + constructor(element) { + super(); + const $content = $(HTMLTemplate.get('html/app.html').render()); + $content.on('contextmenu', (e) => e.preventDefault()); + this.setContent($content); + this.mountOn($(element)); + this.#nav_ = new Nav(); + this.#nav_.mountOn($content.find('.mixly-nav')); + this.#workspace_ = new Workspace($content.find('.mixly-workspace')[0]); + const editorsManager = this.#workspace_.getEditorsManager(); + editorsManager.add({ + type: '.mix', + id: 'Untitled-1.mix', + name: 'Untitled-1.mix', + title: 'Untitled-1.mix', + favicon: 'fileicon-mix' + }); + this.#footerbar_ = new FooterBar(); + this.#footerbar_.mountOn($content.find('.mixly-footerbar')); + this.#addEventsListenerForNav_(); + this.#addObserver_(); + Mixly.mainStatusBarTabs = this.#workspace_.getStatusBarsManager(); + Serial.refreshPorts(); + if (goog.isElectron) { + PythonShell.init(); + } + } + + #addEventsListenerForNav_() { + const editorsManager = this.#workspace_.getEditorsManager(); + this.#nav_.register({ + id: 'home-btn', + preconditionFn: () => { + return true; + }, + callback: () => { + this.#onbeforeunload_(); + }, + scopeType: Nav.Scope.LEFT, + weight: -1 + }); + this.#nav_.register({ + icon: 'icon-ccw', + title: 'undo(ctrl+z)', + id: 'undo-btn', + displayText: Msg.Lang['nav.btn.undo'], + preconditionFn: () => { + return !!editorsManager.getActive(); + }, + callback: () => editorsManager.getActive().undo(), + scopeType: Nav.Scope.LEFT, + weight: 0 + }); + this.#nav_.register({ + icon: 'icon-cw', + title: 'redo(ctrl+y)', + id: 'redo-btn', + displayText: Msg.Lang['nav.btn.redo'], + preconditionFn: () => { + return !!editorsManager.getActive(); + }, + callback: () => editorsManager.getActive().redo(), + scopeType: Nav.Scope.LEFT, + weight: 1 + }); + + this.#nav_.register({ + icon: 'icon-link', + title: '', + id: 'port-add-btn', + displayText: Msg.Lang['nav.btn.addDevice'], + preconditionFn: () => { + if (goog.isElectron || Env.hasSocketServer) { + return false; + } + return true; + }, + callback: () => BU.requestPort().catch(Debug.error), + scopeType: Nav.Scope.LEFT, + weight: 3 + }); + + this.#nav_.register({ + icon: 'icon-check', + title: '', + id: 'arduino-compile-btn', + displayText: Msg.Lang['nav.btn.compile'], + preconditionFn: () => { + if (!goog.isElectron && !Env.hasSocketServer && !Env.hasCompiler) { + return false; + } + if (!SELECTED_BOARD?.nav?.compile || !SELECTED_BOARD?.nav?.upload) { + return false; + } + const workspace = Workspace.getMain(); + const editorsManager = workspace.getEditorsManager(); + const editor = editorsManager.getActive(); + if (!editor) { + return false; + } + if (editor instanceof EditorMix) { + return true; + } + return false; + }, + callback: () => ArduShell.initCompile(), + scopeType: Nav.Scope.LEFT, + weight: 4 + }); + + this.#nav_.register({ + icon: 'icon-upload', + title: '', + id: 'arduino-upload-btn', + displayText: Msg.Lang['nav.btn.upload'], + preconditionFn: () => { + if (!goog.isElectron && !Env.hasSocketServer && !Env.hasCompiler) { + return false; + } + if (!SELECTED_BOARD?.nav?.compile || !SELECTED_BOARD?.nav?.upload) { + return false; + } + const workspace = Workspace.getMain(); + const editorsManager = workspace.getEditorsManager(); + const editor = editorsManager.getActive(); + if (!editor) { + return false; + } + if (editor instanceof EditorMix) { + return true; + } + return false; + }, + callback: () => ArduShell.initUpload(), + scopeType: Nav.Scope.LEFT, + weight: 5 + }); + + this.#nav_.register({ + icon: 'icon-upload-1', + title: '', + id: 'command-burn-btn', + displayText: Msg.Lang['nav.btn.burn'], + preconditionFn: () => { + if (goog.isElectron || Env.hasSocketServer) { + return SELECTED_BOARD?.nav?.burn; + } + if (Serial.devicesRegistry.hasKey('hid')) { + return false; + } else { + return SELECTED_BOARD?.nav?.burn; + } + }, + callback: () => BU.initBurn(), + scopeType: Nav.Scope.LEFT, + weight: 3 + }); + + this.#nav_.register({ + icon: 'icon-upload', + title: '', + id: 'command-upload-btn', + displayText: Msg.Lang['nav.btn.upload'], + preconditionFn: () => { + return SELECTED_BOARD?.nav?.upload && !SELECTED_BOARD?.nav?.compile; + }, + callback: () => BU.initUpload(), + scopeType: Nav.Scope.LEFT, + weight: 5 + }); + + this.#nav_.register({ + icon: 'icon-play-circled', + title: '', + id: 'python-run-btn', + displayText: Msg.Lang['nav.btn.run'], + preconditionFn: () => { + return goog.isElectron && SELECTED_BOARD?.nav?.run; + }, + callback: () => PythonShell.run(), + scopeType: Nav.Scope.LEFT, + weight: 4 + }); + + this.#nav_.register({ + icon: 'icon-cancel', + title: '', + id: 'python-stop-btn', + displayText: Msg.Lang['nav.btn.stop'], + preconditionFn: () => { + return goog.isElectron && SELECTED_BOARD?.nav?.cancel; + }, + callback: () => PythonShell.stop(), + scopeType: Nav.Scope.LEFT, + weight: 5 + }); + + this.#nav_.register({ + icon: 'icon-usb', + title: '', + id: 'serial-open-btn', + displayText: Msg.Lang['statusbar.serial.port'], + preconditionFn: () => { + return true; + }, + callback: () => { + const statusBarsManager = this.#workspace_.getStatusBarsManager(); + statusBarsManager.openSelectedPort(); + }, + scopeType: Nav.Scope.LEFT, + weight: 10 + }); + + /*const leftSideBarOption = this.#nav_.register({ + icon: 'codicon-layout-sidebar-left-off', + title: '操作左侧边栏', + id: 'left-sidebar-btn', + preconditionFn: () => { + return true; + }, + callback: (element) => { + const $a = $(element).children('a'); + const drag = this.#workspace_.dragVLeft; + if (drag.shown === Drag.Extend.NEGATIVE) { + drag.exitfull(Drag.Extend.NEGATIVE); + } else { + drag.full(Drag.Extend.NEGATIVE); + } + }, + scopeType: Nav.Scope.CENTER, + weight: 1 + }); + + const leftSideBarEvents = this.#workspace_.dragVLeft; + leftSideBarEvents.bind('onfull', (type) => { + const { $btn } = leftSideBarOption; + const $a = $btn.children('a'); + if (type !== Drag.Extend.NEGATIVE) { + return; + } + $a.removeClass('codicon-layout-sidebar-left'); + $a.addClass('codicon-layout-sidebar-left-off'); + }); + + leftSideBarEvents.bind('exitfull', (type) => { + const { $btn } = leftSideBarOption; + const $a = $btn.children('a'); + if (type !== Drag.Extend.NEGATIVE) { + return; + } + $a.removeClass('codicon-layout-sidebar-left-off'); + $a.addClass('codicon-layout-sidebar-left'); + }); + + const rightSideBarOption = this.#nav_.register({ + icon: 'codicon-layout-sidebar-right-off', + title: '操作右侧边栏', + id: 'right-sidebar-btn', + preconditionFn: () => { + return true; + }, + callback: (element) => { + const $a = $(element).children('a'); + const drag = this.#workspace_.dragVRight; + if (drag.shown === Drag.Extend.POSITIVE) { + drag.exitfull(Drag.Extend.POSITIVE); + } else { + drag.full(Drag.Extend.POSITIVE); + } + }, + scopeType: Nav.Scope.CENTER, + weight: 3 + }); + + const rightSideBarEvents = this.#workspace_.dragVRight; + rightSideBarEvents.bind('onfull', (type) => { + const { $btn } = rightSideBarOption; + const $a = $btn.children('a'); + if (type !== Drag.Extend.POSITIVE) { + return; + } + $a.removeClass('codicon-layout-sidebar-right'); + $a.addClass('codicon-layout-sidebar-right-off'); + }); + + rightSideBarEvents.bind('exitfull', (type) => { + const { $btn } = rightSideBarOption; + const $a = $btn.children('a'); + if (type !== Drag.Extend.POSITIVE) { + return; + } + $a.removeClass('codicon-layout-sidebar-right-off'); + $a.addClass('codicon-layout-sidebar-right'); + });*/ + + const bottomSideBarOption = this.#nav_.register({ + icon: 'codicon-layout-panel-off', + title: Msg.Lang['nav.btn.toggleStatusbar'], + id: 'bottom-sidebar-btn', + preconditionFn: () => { + return true; + }, + callback: (element) => { + const $a = $(element).children('a'); + const drag = this.#workspace_.dragH; + if (drag.shown === Drag.Extend.POSITIVE) { + drag.exitfull(Drag.Extend.POSITIVE); + } else { + drag.full(Drag.Extend.POSITIVE); + } + }, + scopeType: Nav.Scope.CENTER, + weight: 2 + }); + + const bottomSideBarEvents = this.#workspace_.dragH; + bottomSideBarEvents.bind('onfull', (type) => { + const { $btn } = bottomSideBarOption; + const $a = $btn.children('a'); + if (type !== Drag.Extend.POSITIVE) { + return; + } + $a.removeClass('codicon-layout-panel'); + $a.addClass('codicon-layout-panel-off'); + }); + + bottomSideBarEvents.bind('exitfull', (type) => { + const { $btn } = bottomSideBarOption; + const $a = $btn.children('a'); + if (type !== Drag.Extend.POSITIVE) { + return; + } + $a.removeClass('codicon-layout-panel-off'); + $a.addClass('codicon-layout-panel'); + }); + + const fileMenu = new Menu(); + const settingMenu = new Menu(); + + this.#nav_.register({ + id: 'file', + displayText: Msg.Lang['nav.btn.file'], + scopeType: Nav.Scope.RIGHT, + weight: 1, + menu: fileMenu + }); + + this.#nav_.register({ + id: 'setting', + displayText: Msg.Lang['nav.btn.setting'], + scopeType: Nav.Scope.RIGHT, + weight: 2, + menu: settingMenu + }); + + fileMenu.add({ + weight: 0, + id: 'new', + preconditionFn: () => { + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.file.new'], 'Ctrl+N', 'icon-doc-new'), + callback: () => File.new() + } + }); + + hotkeys('ctrl+n', function(event) { + event.preventDefault(); + event.stopImmediatePropagation(); + File.new(); + }); + + fileMenu.add({ + weight: 1, + id: 'open-file', + preconditionFn: () => { + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.file.open'], 'Ctrl+O', 'icon-doc'), + callback: (key, opt) => File.open() + } + }); + + hotkeys('ctrl+o', function(event) { + event.preventDefault(); + File.open(); + }); + + fileMenu.add({ + weight: 2, + id: 'sep1', + data: '---------' + }); + + fileMenu.add({ + weight: 3, + id: 'save', + preconditionFn: () => { + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.file.save'], 'Ctrl+S', 'icon-floppy'), + callback: () => File.save() + } + }); + + hotkeys('ctrl+s', function(event) { + event.preventDefault(); + File.save(); + }); + + fileMenu.add({ + weight: 4, + id: 'save-as', + preconditionFn: () => { + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.file.saveAs'], 'Ctrl+Shift+S', 'icon-save-as'), + callback: () => File.saveAs() + } + }); + + hotkeys('ctrl+shift+s', function(event) { + event.preventDefault(); + File.saveAs(); + }); + + fileMenu.add({ + weight: 5, + id: 'sep2', + preconditionFn: () => { + return goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary; + }, + data: '---------' + }); + + fileMenu.add({ + weight: 6, + id: 'export', + preconditionFn: () => { + return goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.file.exportAs'], 'Ctrl+E', 'icon-export'), + callback: () => File.exportLib() + } + }); + + if (goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary) { + hotkeys('ctrl+e', function(event) { + event.preventDefault(); + File.exportLib(); + }); + } + + settingMenu.add({ + weight: 0, + id: 'manage-libraries', + preconditionFn: () => { + return goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.setting.manageLibs'], 'Ctrl+M', 'icon-menu'), + callback: () => LibManager.showManageDialog() + } + }); + + if (goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary) { + hotkeys('ctrl+m', function(event) { + LibManager.showManageDialog(); + }); + } + + settingMenu.add({ + weight: 1, + id: 'sep1', + preconditionFn: () => { + return goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary; + }, + data: '---------' + }); + + settingMenu.add({ + weight: 2, + id: 'feedback', + preconditionFn: () => { + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.setting.feedback'], 'Ctrl+Shift+F', 'icon-comment-1'), + callback: () => { + const href = 'https://gitee.com/bnu_mixly/mixly3/issues'; + Url.open(href); + } + } + }); + + hotkeys('ctrl+shift+f', function(event) { + const href = 'https://gitee.com/bnu_mixly/mixly3/issues'; + Url.open(href); + }); + + settingMenu.add({ + weight: 3, + id: 'wiki', + preconditionFn: () => { + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['nav.btn.setting.wiki'], 'Ctrl+H', 'icon-book-open'), + callback: () => { + const href = 'https://mixly.readthedocs.io/zh-cn/latest/contents.html'; + Url.open(href); + } + } + }); + + hotkeys('ctrl+h', function(event) { + const href = 'https://mixly.readthedocs.io/zh-cn/latest/contents.html'; + Url.open(href); + }); + } + + #addObserver_() { + this.#resizeObserver_ = new ResizeObserver((entries) => { + let contentRect = entries[0].contentRect; + if (!(contentRect.width || contentRect.height)) return; + this.resize(); + }); + this.#resizeObserver_.observe(this.getContent()[0]); + } + + #onbeforeunload_() { + if (goog.isElectron) { + Loader.onbeforeunload(); + } else { + let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType }); + window.location.replace(href); + } + } + + getNav() { + return this.#nav_; + } + + getWorkspace() { + return this.#workspace_; + } + + getFooterBar() { + return this.#footerbar_; + } + + resize() { + this.#nav_.resize(); + this.#workspace_.resize(); + this.#footerbar_.resize(); + } + + removeSkeleton() { + const $appLoading = $('.mixly-app-loading'); + $appLoading.remove(); + } + + dispose() { + this.#resizeObserver_.disconnect(); + this.#workspace_.dispose(); + super.dispose(); + } +} + +Mixly.App = App; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/arduino-cli.js b/mixly/common/modules/mixly-modules/common/arduino-cli.js new file mode 100644 index 00000000..4a105ad1 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/arduino-cli.js @@ -0,0 +1,67 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.provide('Mixly.ArduinoCLI'); + +class ArduinoCLI { + static { + this.COMMAND = { + boardAttach: 'board attach', + boardDetails: 'board details', + boardList: 'board list', + boardListAll: 'board listall', + boardSearch: 'board search', + burnBootloader: 'burn-bootloader', + cacheClean: 'cache clean', + compile: 'compile', + completion: 'completion', + configDump: 'config dump', + configInit: 'config init', + configAdd: 'config add', + configDelete: 'config delete', + configRemove: 'config remove', + configSet: 'config set', + coreDownload: 'core download', + coreInstall: 'core install', + coreList: 'core list', + coreSearch: 'core search', + coreUninstall: 'core uninstall', + coreUpdateIndex: 'core update-index', + coreUpgrade: 'core upgrade', + daemon: 'daemon', + debug: 'debug', + libDeps: 'lib deps', + libDownload: 'lib download', + libExamples: 'lib examples', + libInstall: 'lib install', + libList: 'lib list', + libSearch: 'lib search', + libUninstall: 'lib uninstall', + libUpdateIndex: 'lib update-index', + libUpgrade: 'lib upgrade', + monitor: 'monitor', + outdated: 'outdated', + sketchArchive: 'sketch archive', + sketchNew: 'sketch new', + update: 'update', + upgrade: 'upgrade', + upload: 'upload', + version: 'version' + }; + } + + #cliPath_ = ''; + #configPath_ = ''; + constructor(cliPath) { + this.#cliPath_ = cliPath; + this.#configPath_ = path.join(path.dirname(cliPath), 'config.json'); + } + + async exist() { + return true; + } + + async exec(name, config) {} +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/arduino-shell.js b/mixly/common/modules/mixly-modules/common/arduino-shell.js new file mode 100644 index 00000000..b3058703 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/arduino-shell.js @@ -0,0 +1,20 @@ +goog.loadJs('common', () => { + +goog.provide('Mixly.ArduShell'); + +class ArduShell { + #arduinoCLI_ = null; + constructor(arduinoCLI) { + this.#arduinoCLI_ = arduinoCLI; + } + + async upload(name, params) {} + + async compile(name, params) {} + + async checkBoardVersion() {} +} + +Mixly.ArduShell = ArduShell; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/board-config-item.js b/mixly/common/modules/mixly-modules/common/board-config-item.js new file mode 100644 index 00000000..17399a8e --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/board-config-item.js @@ -0,0 +1,265 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.require('Mixly.Config'); +goog.require('Mixly.Storage'); +goog.provide('Mixly.BoardConfigItem'); + +const { + Env, + Config, + Storage +} = Mixly; + +const { USER, BOARD } = Config; + +class BoardConfigItem { + /** + * @param boardName {string} 板卡名 + * @param boardInfo {object} 某个板卡的配置信息 + ------------------------------------------ + "板卡名": { + "group": "板卡所处分组", + "key": "板卡key", + "config": [ + { + "label": "配置x的描述信息", + "key": "配置x的key", + "options": [ + { + "key": "选项x的key", + "label": "选项x" + }, + ... + ] + }, + ... + ], + ignore: [] + } + ------------------------------------------ + // 不支持 + "板卡名": { + "key": "板卡key", + "config": { + "配置x的key": [ + { + "key": "选项x的key", + "label": "选项x" + }, + ... + ], + ... + } + } + ------------------------------------------ + "板卡名": "板卡key" + ------------------------------------------ + * + **/ + constructor(boardName, boardInfo) { + this.name = boardName; + this.config = { ...boardInfo.config }; + this.ignore = []; + if (typeof boardInfo === 'string') { + this.key = boardInfo; + } else if (boardInfo instanceof Object) { + this.key = boardInfo.key; + this.ignore = boardInfo.ignore ?? []; + this.group = boardInfo.group; + } else { + this.key = boardName; + } + this.generateOptions(); + } + + /** + * @method 根据传入的某个板卡配置构造字典 + -------------------------------------------- + this.options {array}: + [ + { + "name": "Flash Mode", + "key": "FlashMode", + -------------- + "message": { + "zh-hans": "", + "zh-hant": "", + "en": "" + }, + "message": "", + -------------- + "options": [ + { + "title": "QIO", + "id": "qio" + }, + ... + ] + }, + ... + ] + -------------------------------------------- + this.selectedOptions {object}: + { + "xxxkey": { + "label": "xxx", + "key": "xxx" + }, + ... + } + 例如: + { + "FlashMode": { + "label": "QIO", + "key": "qio" + }, + ... + } + -------------------------------------------- + this.defaultOptions = this.selectedOptions; + -------------------------------------------- + this.optionsInfo {object}: + { + "xxxkey": { + "key": [ "xxx", "xxx", ... ], + "label": [ "xxx", "xxx", ... ] + }, + ... + } + 例如: + { + "FlashMode": { + "key": [ "qio", "dio", ... ], + "label": [ "QIO", "DIO", ... ] + }, + ... + } + -------------------------------------------- + * @return {void} + **/ + generateOptions() { + this.options = []; + this.selectedOptions = {}; + this.defaultOptions = {}; + this.optionsInfo = {}; + if (!(this.config instanceof Object)) { + return; + } + for (let i in this.config) { + let child = this.config[i]; + if (!(child.options instanceof Object)) { + continue; + } + if (!child.options.length) { + continue; + } + this.defaultOptions[child.key] = { ...child.options[0] }; + this.optionsInfo[child.key] = { + key: [], + label: [] + }; + let childOptions = []; + for (let j in child.options) { + let childOption = child.options[j]; + if (!(childOption instanceof Object)) { + continue; + } + childOptions.push({ + title: childOption.label, + id: childOption.key + }); + this.optionsInfo[child.key].label.push(childOption.label); + this.optionsInfo[child.key].key.push(childOption.key); + } + this.options.push({ + name: child.label, + key: child.key, + messageId: child.messageId, + options: childOptions + }) + } + this.selectedOptions = { ...this.defaultOptions }; + } + + /** + * @method 判断所要更新的配置项是否合法, + 也即为判断新的配置项是否存在以及配置项的选中项是否在该配置项中存在 + * @param name {string} 所要设置的配置项,xxxkey + * @param value {object} 所要设置的配置项的新的值 + value = { + "label": "xxx", + "key": "xxx" + } + * @return {boolean} + **/ + optionIsLegal(name, value) { + let optionsType = Object.keys(this.defaultOptions); + if (!optionsType.includes(name) + || !this.optionsInfo[name].key.includes(value.key) + || !this.optionsInfo[name].label.includes(value.label)) { + return false; + } else { + return true; + } + } + + /** + * @method 设置当前某个配置项的选中项 + * @param name {string} 所要设置的配置项,xxxkey + * @param value {object} 所要设置的配置项的新的值 + value = { + "label": "xxx", + "key": "xxx" + } + * @return {void} + **/ + setSelectedOption(name, value) { + if (this.optionIsLegal(name, value)) { + this.selectedOptions[name] = { ...value }; + } + } + + /** + * @method 设置当前某些配置项的选中项 + * @param newOptions {object} 所要设置的配置项 + newOptions = { + "xxxkey": { + "label": "xxx", + "key": "xxx" + }, + ... + } + * @return {void} + **/ + setSelectedOptions(newOptions) { + if (!(newOptions instanceof Object)) { + return; + } + this.selectedOptions = this.selectedOptions ?? {}; + for (let i in newOptions) { + this.setSelectedOption(i, newOptions[i]); + } + } + + /** + * @method 储存新的配置项设置 + * @return {void} + **/ + writeSelectedOptions() { + USER.board = USER.board ?? {}; + const { board } = USER; + board[BOARD.boardType] = board[BOARD.boardType] ?? {}; + board[BOARD.boardType].key = this.key; + board[BOARD.boardType].default = { ...this.selectedOptions }; + Storage.user('/', USER); + } + + getCommandParam() { + + } +} + +Mixly.BoardConfigItem = BoardConfigItem; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/boards.js b/mixly/common/modules/mixly-modules/common/boards.js new file mode 100644 index 00000000..18e300b6 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/boards.js @@ -0,0 +1,405 @@ +goog.loadJs('common', () => { + +goog.require('tippy'); +goog.require('layui'); +goog.require('path'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Config'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.ToolboxSearcher'); +goog.require('Mixly.MString'); +goog.require('Mixly.Msg'); +goog.require('Mixly.BoardConfigItem'); +goog.require('Mixly.Profile'); +goog.require('Mixly.EditorBlockly'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Nav'); +goog.provide('Mixly.Boards'); + +const { + Config, + LayerExt, + XML, + Env, + ToolboxSearcher, + MString, + Msg, + BoardConfigItem, + Profile, + EditorBlockly, + Debug, + Nav, + Boards +} = Mixly; + +const { form } = layui; + +const { BOARD, USER, SELECTED_BOARD } = Config; + + + + +Boards.NAME = []; + +Boards.HAS_CONFIG_SETTING = false; + +Boards.init = () => { + Boards.dict = {}; + if (BOARD.board instanceof Object || BOARD.board instanceof String) { + for (let i in BOARD.board) { + Boards.dict[i] = new BoardConfigItem(i, BOARD.board[i]); + if (USER.board && USER.board[BOARD.boardType]) { + Boards.dict[i].setSelectedOptions(USER.board[BOARD.boardType].default); + } + } + } else { + Boards.dict[BOARD.boardType] = new BoardConfigItem(BOARD.boardType, BOARD.boardType); + } + Boards.NAME = Object.keys(Boards.dict); + const $boards = $('#boards-type'); + const $boardSelector = Nav.getMain().getBoardSelector(); + $boardSelector.empty(); + for (let name of Object.keys(Boards.dict)) { + const { group } = Boards.dict[name]; + const option = new Option(name, Boards.dict[name].key); + if (group) { + let $optGroup = $boardSelector.children(`optgroup[label="${group}"]`); + if (!$optGroup.length) { + $optGroup = $(``); + $boardSelector.append($optGroup); + } + $optGroup.append(option); + } else { + $boardSelector.append(option); + } + } + Nav.getMain().bind('changeBoard', (data) => { + Boards.changeTo(data.text); + Boards.updateCategories(data.text); + }); +} + +Boards.addLayer = (boardConfigLayer) => { + Boards.configMenu = boardConfigLayer; +} + +Boards.getType = () => { + const { boardIndex = '' } = BOARD; + return path.basename(path.dirname(boardIndex)) ?? BOARD.boardType; +} + +Boards.getSelectedBoardName = () => { + return $('#boards-type option:selected').text(); +} + +Boards.getSelectedBoardKey = () => { + return $('#boards-type option:selected').val(); +} + +Boards.setSelectedBoard = (name, userConfig) => { + const charIndex = name.indexOf('@'); + if (charIndex !== -1) { + name = name.substring(charIndex + 1, name.length); + } + if (!Boards.NAME.includes(name)) + return; + const boardInfo = Boards.dict[name]; + $("#boards-type").val(boardInfo.key).trigger('change'); + boardInfo.setSelectedOptions(userConfig); + Boards.changeTo(name); + Boards.updateCategories(name); + if (Profile[name]) { + Profile['default'] = Profile[name]; + } +} + +Boards.getSelectedBoardConfig = () => { + const boardName = Boards.getSelectedBoardName(); + return structuredClone(Boards.dict[boardName]?.selectedOptions ?? {}); +} + +Boards.getSelectedBoardCommandParam = () => { + return Boards.configMenu.getSelectedParams(); +} + +Boards.getSelectedBoardConfigParam = (name) => { + return Boards.configMenu.getSelectedParamByName(name); +} + +/** + * @function 更新当前所选择板卡及其相关配置 + * @param boardName {string} 板卡名 + * @return {void} + **/ +Boards.changeTo = (boardName) => { + Boards.configMenu.changeTo(boardName); + if (Profile[boardName]) { + Profile['default'] = Profile[boardName]; + } else { + Profile['default'] = Profile['default'] ?? {}; + } + EditorBlockly.reloadWorkspace(); + const boardKey = Boards.dict[boardName].key; + + for (let i in SELECTED_BOARD) { + delete SELECTED_BOARD[i]; + } + for (let i in BOARD) { + if (BOARD[i] instanceof Object) { + SELECTED_BOARD[i] = { ...BOARD[i] }; + } else { + SELECTED_BOARD[i] = BOARD[i]; + } + } + SELECTED_BOARD['boardName'] = boardName; + if (BOARD.web instanceof Object) { + for (let value of [{ + type: 'burn', + obj: BOARD.web.burn + }, { + type: 'upload', + obj: BOARD.web.upload + }, { + type: 'devices', + obj: BOARD.web.devices + }]) { + if (!(value.obj instanceof Object)) { + continue; + } + let outObj; + if (value.obj[boardKey]) { + outObj = { ...value.obj, ...value.obj[boardKey] }; + } else { + outObj = { ...value.obj }; + } + for (let i in Boards.dict) { + const key = Boards.dict[i].key; + if (outObj[key]) { + delete outObj[key]; + } + } + SELECTED_BOARD.web[value.type] = outObj; + } + } + for (let value of [{ + type: 'burn', + obj: BOARD.burn + }, { + type: 'upload', + obj: BOARD.upload + }, { + type: 'serial', + obj: BOARD.serial + }]) { + if (!(value.obj instanceof Object)) { + continue; + } + let outObj; + if (value.obj[boardKey]) { + outObj = { ...value.obj, ...value.obj[boardKey] }; + } else { + outObj = { ...value.obj }; + } + for (let i in Boards.dict) { + const key = Boards.dict[i].key; + if (outObj[key]) { + delete outObj[key]; + } + } + const pathObj = { + path: Env.clientPath, + indexPath: Env.boardDirPath, + srcPath: Env.srcDirPath + }; + switch (outObj.type) { + case 'volume': + if (Env.currentPlatform == "win32") { + if (typeof outObj.volumeName == "string") { + outObj.volume = "VolumeName='" + outObj.volumeName + "'"; + } else if (typeof outObj.volumeName == "object") { + outObj.volume = "VolumeName='" + outObj.volumeName[0] + "'"; + for (let i = 1; i < outObj.volumeName.length; i++) { + outObj.volume += " or VolumeName='" + outObj.volumeName[i] + "'"; + } + } else { + outObj.volume = "VolumeName='CIRCUITPY'"; + } + } else { + if (typeof outObj.volumeName == "string") { + outObj.volume = outObj.volumeName; + } else if (typeof outObj.volumeName == "object") { + outObj.volume = outObj.volumeName[0]; + for (var i = 1; i < outObj.volumeName.length; i++) { + outObj.volume += "/" + outObj.volumeName[i]; + } + } else { + outObj.volume = "CIRCUITPY"; + } + } + if (!Env.hasSocketServer) { + outObj.filePath = MString.tpl(outObj.filePath, pathObj); + } + break; + case 'command': + let pyToolsPath = "{srcPath}/tools/python/"; + let obj = {}; + let pyTools = { + 'esptool': 'esptool_main.py', + 'kflash': 'kflash.py', + 'stm32loader': 'stm32loader.py', + 'stm32bl': 'stm32bl.py', + 'ampy': 'ampy_main.py' + }; + if (!Env.hasSocketServer) { + for (let key in pyTools) { + obj[key] = Env.python3Path + "\" \"" + pyToolsPath + pyTools[key]; + } + } + if (outObj.reset) { + let resetStr = '{}'; + try { + resetStr = JSON.stringify(outObj.reset); + resetStr = resetStr.replaceAll('\"', '\\\"'); + obj.reset = resetStr; + } catch (error) { + Debug.error(error); + } + } + outObj.command = MString.tpl(outObj.command, obj); + if (!Env.hasSocketServer) { + outObj.command = MString.tpl(outObj.command, pathObj); + } + if (outObj.special && outObj.special instanceof Array) { + for (let key in outObj.special) { + if (!outObj.special[key]?.name + || !outObj.special[key]?.command) { + continue; + } + outObj.special[key].command = MString.tpl(outObj.special[key].command, obj); + if (!Env.hasSocketServer) { + outObj.special[key].command = MString.tpl(outObj.special[key].command, pathObj); + } + } + } + break; + } + if (value.type === 'upload' && (goog.isElectron || Env.hasSocketServer) && outObj.copyLib) { + if (outObj.libPath) { + if (!Env.hasSocketServer) { + let libPath = []; + for (let dirPath of outObj.libPath) { + libPath.push(MString.tpl(dirPath, pathObj)); + } + outObj.libPath = libPath; + } + } else { + if (Env.hasSocketServer) { + outObj.libPath = [ 'build/lib/' ]; + } else { + outObj.libPath = [ path.join(Env.boardDirPath, 'build/lib/') ]; + } + } + } + if (value.type === 'upload' && (goog.isElectron && !Env.hasSocketServer)) { + if (outObj.filePath) { + outObj.filePath = MString.tpl(outObj.filePath, pathObj); + } else { + outObj.filePath = path.join(Env.boardDirPath, 'build/main.py'); + } + } + SELECTED_BOARD[value.type] = outObj; + } +} + +Boards.updateCategories = (boardName, enforce = false) => { + if (Boards.selected === boardName && !enforce) return; + Boards.selected = boardName; + $('#mixly-footer-boardname').html(boardName); + let thirdPartyStr = ''; + if (goog.isElectron) { + thirdPartyStr = Env.thirdPartyXML.join(''); + } + const searchCategoryStr = ''; + thirdPartyStr = Boards.selectCategories(boardName, thirdPartyStr); + const toolboxDom = $('#toolbox'); + toolboxDom.html( + Boards.selectCategories(boardName, XML.CATEGORIES_STR[boardName] ?? Env.defaultXML) + ); + toolboxDom.append(thirdPartyStr); + toolboxDom.append(searchCategoryStr); + const categoriesDom = toolboxDom.find('category'); + for (let i = 0; categoriesDom[i]; i++) { + if (categoriesDom[i].hasAttribute('toolboxitemid')) continue; + categoriesDom[i].setAttribute('toolboxitemid', categoriesDom[i].id); + } + Msg.renderToolbox(false); + EditorBlockly.updateToolbox(); +} + +Boards.selectCategories = (boardName, categoriesStr) => { + const boardKeyList = (Boards.dict[boardName] ? Boards.dict[boardName].key : '').split(':'); + if (!boardKeyList.length) return categoriesStr; + const xmlDom = $(''); + xmlDom.html(categoriesStr); + const categories = xmlDom.find('category'); + for (let i = 0; categories[i]; i++) { + const removed = Boards.removeBlocks($(categories[i]), boardKeyList); + if (!removed) { + const blocks = $(categories[i]).children('block'); + for (let j = 0; blocks[j]; j++) { + Boards.removeBlocks($(blocks[j]), boardKeyList); + } + } + } + return xmlDom.html(); +} + +Boards.removeBlocks = (blocksdom, boardKeyList) => { + const mShow = blocksdom.attr('m-show'); + const mHide = blocksdom.attr('m-hide'); + if (mShow || mHide) { + const select = mShow ? mShow : mHide; + let needRemove = mShow ? true : false; + const selectList = select.split(' '); + for (let key of selectList) { + const keyList = key.split(':'); + const len = keyList.length; + if (![1, 2, 3].includes(len)) { + continue; + } + if ([2, 3].includes(len)) { + const param3 = (len === 3 ? String(keyList[2]).split(',') : []); + if (keyList[0] === boardKeyList[0] + && keyList[1] === boardKeyList[1]) { + if (!param3.length) { + needRemove = mShow ? false : true; + break; + } + for (let value of param3) { + if (value === boardKeyList[2]) { + needRemove = mShow ? false : true; + break; + } + } + } + } else { + if (keyList[0] === boardKeyList[2]) { + needRemove = mShow ? false : true; + break; + } + } + if ((!needRemove && mShow) || (needRemove && !mShow)) + break; + } + if (needRemove) { + blocksdom.remove(); + return true; + } + } + return false; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/code-formatter.js b/mixly/common/modules/mixly-modules/common/code-formatter.js new file mode 100644 index 00000000..759e2fd6 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/code-formatter.js @@ -0,0 +1,60 @@ +goog.loadJs('common', () => { + +goog.require('workerpool'); +goog.provide('Mixly.Registry'); +goog.provide('Mixly.CodeFormatter'); + +const { + Registry, + CodeFormatter +} = Mixly; + + +CodeFormatter.supportCodeFormatters_ = new Registry(); +CodeFormatter.activeCodeFormatters_ = new Registry(); + +CodeFormatter.supportCodeFormatters_.register('python', { + name: 'pythonFormatterService', + path: '../common/modules/mixly-modules/workers/common/python-formatter/index.js' +}); + +CodeFormatter.supportCodeFormatters_.register('cpp', { + name: 'cppFormatterService', + path: '../common/modules/mixly-modules/workers/common/cpp-formatter/index.js' +}); + +CodeFormatter.activateFormatter = async function (type) { + if (!this.supportCodeFormatters_.hasKey(type)) { + return null; + } + const info = this.supportCodeFormatters_.getItem(type); + if (this.activeCodeFormatters_.hasKey(type)) { + const formatter = this.activeCodeFormatters_.getItem(type); + if (formatter.loading) { + await formatter.loading; + } + return formatter; + } + const formatter = workerpool.pool(info.path, { + workerOpts: { + name: info.name + }, + workerType: 'web' + }); + formatter.loading = formatter.exec('init'); + this.activeCodeFormatters_.register(type, formatter); + await formatter.loading; + formatter.loading = null; + return formatter; +} + +CodeFormatter.format = async function (type, code) { + const formatter = await this.activateFormatter(type); + if (!formatter) { + return code; + } + const formattedCode = await formatter.exec('format', [code]); + return formattedCode; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/command.js b/mixly/common/modules/mixly-modules/common/command.js new file mode 100644 index 00000000..f9388bf6 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/command.js @@ -0,0 +1,52 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Config'); +goog.require('Mixly.MJson') +goog.require('Mixly.Debug'); +goog.provide('Mixly.Command'); + +const { + Config, + Command, + MJson, + Debug +} = Mixly; + +const { SOFTWARE } = Config; + +Command.DEFAULT = { + obj: '', + func: '', + args: [] +} + +Command.parse = (commandStr) => { + return MJson.decode(MJson.parse(commandStr)); +} + +Command.run = (commandObj) => { + Debug.log('收到指令:', commandObj); + if (typeof commandObj !== 'object') return; + commandObj = { + ...Command.DEFAULT, + ...commandObj + }; + const { obj, func, args } = commandObj; + const objList = obj.split('.'); + if (objList.length === 0) return; + let nowObj = window[objList[0]]; + if (!nowObj) return; + objList.shift(); + for (let i of objList) { + nowObj = nowObj[i]; + if (!nowObj) return; + } + try { + if (nowObj[func]) + nowObj[func](...args); + } catch (error) { + Debug.error(error); + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/component.js b/mixly/common/modules/mixly-modules/common/component.js new file mode 100644 index 00000000..49de1fd8 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/component.js @@ -0,0 +1,110 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Events'); +goog.require('Mixly.IdGenerator'); +goog.provide('Mixly.Component'); + +const { + Events, + IdGenerator +} = Mixly; + + +class Component { + #$content_ = null; + #mounted_ = false; + #disposed_ = false; + #events_ = new Events(['destroyed']); + #id_ = IdGenerator.generate(); + + constructor() {} + + mountOn($container) { + if (this.#mounted_) { + this.unmount(); + } + $container.append(this.#$content_); + this.onMounted(); + } + + unmount() { + this.#$content_ && this.#$content_.detach(); + this.onUnmounted(); + } + + onMounted() { + this.#mounted_ = true; + } + + onUnmounted() { + this.#mounted_ = false; + } + + isMounted() { + return this.#mounted_; + } + + isDisposed() { + return this.#disposed_; + } + + setContent($elem) { + if (this.#$content_) { + this.#$content_.replaceWith($elem); + } + this.#$content_ = $elem; + $elem.attr('page-id', this.#id_); + } + + getContent() { + return this.#$content_; + } + + resize() {} + + getId() { + return this.#id_; + } + + setId(id) { + this.#id_ = id; + } + + dispose() { + this.#$content_.remove(); + this.#$content_ = null; + this.runEvent('destroyed'); + this.resetEvent(); + this.#events_ = null; + this.#disposed_ = true; + this.#mounted_ = false; + } + + bind(type, func) { + return this.#events_.bind(type, func); + } + + unbind(id) { + this.#events_.unbind(id); + } + + addEventsType(eventsType) { + this.#events_.addType(eventsType); + } + + runEvent(eventsType, ...args) { + return this.#events_.run(eventsType, ...args); + } + + offEvent(eventsType) { + this.#events_.off(eventsType); + } + + resetEvent() { + this.#events_.reset(); + } +} + +Mixly.Component = Component; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/config.js b/mixly/common/modules/mixly-modules/common/config.js new file mode 100644 index 00000000..c6152826 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/config.js @@ -0,0 +1,124 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('FingerprintJS'); +goog.require('Mixly.Url'); +goog.require('Mixly.Env'); +goog.require('Mixly.LocalStorage'); +goog.provide('Mixly.Config'); + +const { + Config, + Url, + Env, + LocalStorage +} = Mixly; + +// 被选中板卡的配置信息 +Config.SELECTED_BOARD = {}; + +// 板卡页面的配置信息 +Config.BOARD = {}; + +// 软件的配置信息 +Config.SOFTWARE = {}; + +Config.USER = { + theme: 'light', + language: 'zh-hans', + winSize: 1, + blockRenderer: 'geras', + compileCAndH: 'true' +}; + +const BOARD_DEFAULT_CONFIG = { + "burn": "None", + "upload": "None", + "nav": "None", + "serial": "None", + "saveMixWithCode": true, + "thirdPartyBoard": false +}; + +const SOFTWARE_DEFAULT_CONFIG = { + "version": "Mixly3.0" +}; + +/** + * @function 读取软件、板卡的配置信息 + * @return {void} + **/ +Config.init = () => { + const urlConfig = Url.getConfig(); + Config.BOARD = { + ...goog.readJsonSync(path.join(Env.boardDirPath, 'config.json'), BOARD_DEFAULT_CONFIG), + ...urlConfig + }; + + if (typeof Config.BOARD.board === 'string' + && path.extname(Config.BOARD.board) === '.json') { + Config.BOARD.board = goog.readJsonSync(path.join(Env.boardDirPath, Config.BOARD.board)); + } + + let pathPrefix = '../'; + + Config.SOFTWARE = goog.readJsonSync(path.join(Env.srcDirPath, 'sw-config.json'), SOFTWARE_DEFAULT_CONFIG); + Config.pathPrefix = pathPrefix; + + Env.hasSocketServer = Config.SOFTWARE?.webSocket?.enabled ? true : false; + Env.hasCompiler = Config.SOFTWARE?.webCompiler?.enabled ? true : false; + + Config.USER = { + ...Config.USER, + ...LocalStorage.get(LocalStorage.PATH['USER']) ?? {} + }; + + if (Config.USER.themeAuto) { + const themeMedia = window.matchMedia("(prefers-color-scheme: light)"); + Config.USER.theme = themeMedia.matches ? 'light' : 'dark'; + } + + if (Config.USER.languageAuto) { + switch (navigator.language) { + case 'zh-CN': + Config.USER.language = 'zh-hans'; + break; + case 'zh-HK': + case 'zh-SG': + case 'zh-TW': + Config.USER.language = 'zh-hant'; + break; + default: + Config.USER.language = 'en'; + } + } + if (Config.USER.visitorId) { + Config.BOARD.visitorId = { ...Config.USER.visitorId }; + } else { + FingerprintJS.load() + .then(fp => fp.get()) + .then(result => { + let visitorId16 = result.visitorId; + let VisitorIdNum = parseInt(visitorId16, 16); + let visitorId32 = VisitorIdNum.toString(32); + let visitorId = { + str16: visitorId16, + str32: visitorId32, + str16CRC32b: Url.CRC32(visitorId16, 16), + str32CRC32b: Url.CRC32(visitorId32, 16) + }; + LocalStorage.set(LocalStorage.PATH['USER'] + '/visitorId', visitorId); + Config.BOARD.visitorId = visitorId; + }) + .catch(error => { + console.error(error); + }) + .finally(() => { + console.log(Config.BOARD); + }); + } +} + +Config.init(); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/context-menu.js b/mixly/common/modules/mixly-modules/common/context-menu.js new file mode 100644 index 00000000..ce0522ac --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/context-menu.js @@ -0,0 +1,116 @@ +goog.loadJs('common', () => { + +goog.require('$.contextMenu'); +goog.require('Mixly.Menu'); +goog.require('Mixly.Events'); +goog.require('Mixly.Registry'); +goog.provide('Mixly.ContextMenu'); + +const { + Menu, + Events, + Registry +} = Mixly; + + +class ContextMenu { + static { + this.generate = (menu, $trigger) => { + let menuItems = {}; + for (let item of menu.getAllItems()) { + if (typeof item.preconditionFn === 'function' + && !item.preconditionFn($trigger)) { + continue; + } + if (item.children) { + item.data.items = this.generate(item.children); + } + menuItems[item.id] = item.data; + } + return menuItems; + } + } + + #selector_ = null; + #menus_ = new Registry(); + #events_ = new Events(['getMenu']); + constructor(selector, config = {}) { + this.#selector_ = selector; + this.menu = $.contextMenu({ + selector, + build: ($trigger) => { + return { items: this.#getMenu_($trigger) } + }, + animation: { duration: 0, show: 'show', hide: 'hide' }, + ...config + }); + } + + #getMenu_($trigger, e) { + const outputs = this.runEvent('getMenu', $trigger, e); + if (!outputs.length) { + return {}; + } + const menu = this.#menus_.getItem(outputs[0]); + if (!menu) { + return {}; + } + return ContextMenu.generate(menu, $trigger, e); + } + + show() { + $(this.#selector_).contextMenu(); + } + + hide() { + $(this.#selector_).contextMenu('hide'); + } + + dispose() { + $.contextMenu('destroy', this.#selector_); + this.#events_.reset(); + this.#menus_.reset(); + this.menu = null; + this.#selector_ = null; + } + + bind(type, func) { + return this.#events_.bind(type, func); + } + + unbind(id) { + this.#events_.unbind(id); + } + + addEventsType(eventsType) { + this.#events_.addType(eventsType); + } + + runEvent(eventsType, ...args) { + return this.#events_.run(eventsType, ...args); + } + + offEvent(eventsType) { + this.#events_.off(eventsType); + } + + resetEvent() { + this.#events_.reset(); + } + + register(id, menu) { + this.#menus_.register(id, menu); + } + + unregister(id) { + this.#menus_.unregister(id); + } + + getItem(id) { + return this.#menus_.getItem(id); + } +} + +Mixly.ContextMenu = ContextMenu; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/css-loader.js b/mixly/common/modules/mixly-modules/common/css-loader.js new file mode 100644 index 00000000..62075896 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/css-loader.js @@ -0,0 +1,44 @@ +goog.loadJs('common', () => { + +goog.require('Mixly'); +goog.provide('Mixly.CssLoader'); + + +const { CssLoader } = Mixly; + +/** + * 加载 link 文件 + * @param href + */ +CssLoader.loadCss = function (href) { + let addSign = true; + let links = document.getElementsByTagName('link'); + for (let i = 0; i < links.length; i++) { + if (links[i] && links[i].href && links[i].href.indexOf(href) !== -1) { + addSign = false; + } + } + if (addSign) { + let $link = document.createElement('link'); + $link.setAttribute('rel', 'stylesheet'); + $link.setAttribute('type', 'text/css'); + $link.setAttribute('href', href); + document.getElementsByTagName('head').item(0).appendChild($link); + } +} + +/** + * 删除 link 文件 + * @param href + */ +CssLoader.removeCss = function (href) { + let links = document.getElementsByTagName('link'); + for (let i = 0; i < links.length; i++) { + let _href = links[i].href; + if (links[i] && links[i].href && links[i].href.indexOf(href) !== -1) { + links[i].parentNode.removeChild(links[i]); + } + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/debug.js b/mixly/common/modules/mixly-modules/common/debug.js new file mode 100644 index 00000000..5e34625d --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/debug.js @@ -0,0 +1,22 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Config'); +goog.provide('Mixly.Debug'); + +const { Config, Debug } = Mixly; +const { SOFTWARE } = Config; + +for (let key in console) { + if (typeof console[key] !== 'function') { + continue; + } + Debug[key] = (...args) => { + if (SOFTWARE.debug) { + console[key](...args); + } else { + console.log(`[${key.toUpperCase()}]`, ...args); + } + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/drag.js b/mixly/common/modules/mixly-modules/common/drag.js new file mode 100644 index 00000000..fb29dc13 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/drag.js @@ -0,0 +1,368 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Config'); +goog.require('Mixly.Events'); +goog.provide('Mixly.Drag'); +goog.provide('Mixly.DragH'); +goog.provide('Mixly.DragV'); + +const { Config, Events } = Mixly; + +const { BOARD } = Config; + +class Drag { + static { + this.DEFAULT_CONFIG = { + type: 'h', // 'h' - 水平拖拽,'v' - 垂直拖拽 + min: '100px', // 元素由于拖拽产生尺寸改变时可以减小到的最小值, + full: [true, true], // 允许元素拖拽直至占满整个容器 + startSize: '100%', + startExitFullSize: '30%' + }; + + this.Extend = { + POSITIVE: 1, // 左或上 + NEGATIVE: 2, // 右或下 + BOTH: 3 // 左+右或上+下 + }; + } + + #events_ = null; + + constructor(element, config) { + this.config = { ...Drag.DEFAULT_CONFIG, ...config }; + this.$container = $(element); + const $children = this.$container.children(); + this.$first = $($children[0]); + this.$last = $($children[1]); + this.config.elem = [ this.$first, this.$last ]; + this.$dragElem = $('
'); + const dragType = this.config.type === 'h'? 's' : 'w'; + this.$container.addClass(`drag-${dragType}-container`); + this.shown = Drag.Extend.POSITIVE; + let dragCssType; + if (this.config.type === 'h') { + this.$dragElem.addClass('drag-s-elem horizontal-line'); + dragCssType = 'top'; + } else { + this.$dragElem.addClass('drag-w-elem vertical-line'); + dragCssType = 'left'; + } + let size = parseFloat(this.config.startSize); + if (size >= 100) { + this.$dragElem.css(dragCssType, 'calc(100% - 4px)'); + size = 100; + this.shown = Drag.Extend.POSITIVE; + } else if (size > 0) { + this.$dragElem.css(dragCssType, `calc(${size}% - 2px)`); + this.shown = Drag.Extend.BOTH; + } else { + this.$dragElem.css(dragCssType, '0px'); + size = 0; + this.shown = Drag.Extend.NEGATIVE; + } + this.$container.prepend(this.$dragElem); + this.size = [`${size}%`, `${100 - size}%`]; + if (size >=100 || size <=0) { + const startExitFullSize = parseFloat(this.config.startExitFullSize); + this.prevSize = [`${startExitFullSize}%`, `${100 - startExitFullSize}%`]; + } else { + this.prevSize = this.size; + } + this.firstDisplay = this.$first.css('display'); + this.lastDisplay = this.$last.css('display'); + if (!this.firstDisplay || this.firstDisplay === 'none') { + this.firstDisplay = 'unset'; + } + if (!this.lastDisplay || this.lastDisplay === 'none') { + this.lastDisplay = 'unset'; + } + this.#events_ = new Events(['ondragStart', 'ondragEnd', 'onfull', 'exitfull', 'sizeChanged']); + this.#addEventListener_(); + } + + #getTouch_(event) { + if (event.touches && event.touches.length > 0) { + return { + clientX: event.touches[0].clientX, + clientY: event.touches[0].clientY + }; + } else { + return { clientX: 0, clientY: 0 }; + } + }; + + #addEventListener_() { + const dragElem = this.$dragElem[0]; + const container = this.$container[0]; + const { type, min, elem, full } = this.config; + dragElem.onpointerdown = (elemEvent) => { + const { currentTarget } = elemEvent; + currentTarget.setPointerCapture(elemEvent.pointerId); + }; + dragElem.onpointerup = (elemEvent) => { + const { currentTarget } = elemEvent; + currentTarget.releasePointerCapture(elemEvent.pointerId); + }; + dragElem.onmousedown = (elemEvent) => { + let dis, prev; + if (type === 'h') { + dis = elemEvent.clientY; + dragElem.top = dragElem.offsetTop; + } else { + dis = elemEvent.clientX; + dragElem.left = dragElem.offsetLeft; + } + const prevSize = this.size; + + document.onmousemove = (docEvent) => { + this.runEvent('ondragStart'); + let iT, maxT, minT = parseInt(min), movement; + if (type === 'h') { + iT = dragElem.top + (docEvent.clientY - dis); + maxT = container.clientHeight - minT; + movement = docEvent.movementY; + } else { + iT = dragElem.left + (docEvent.clientX - dis); + maxT = container.clientWidth - minT; + movement = docEvent.movementX; + } + iT += 1; + if (prev === iT) { + return false; + } + prev = iT; + if (full[0] && movement < 0 && iT < minT * 0.4) { // 向上移动或向左移动 + this.changeTo('0%'); + this.runEvent('onfull', Drag.Extend.NEGATIVE); + } else if (full[1] && movement > 0 && iT > (maxT + minT * 0.6)) { // 向下移动或向右移动 + this.changeTo('100%'); + this.runEvent('onfull', Drag.Extend.POSITIVE); + } else if (iT < maxT && iT > minT) { // 在minT和maxT间移动 + let shown = this.shown; + this.changeTo(iT); + if (shown !== Drag.Extend.BOTH) { + this.runEvent('exitfull', shown); + } + } + this.runEvent('ondragEnd'); + return false; + }; + document.onmouseup = () => { + this.prevSize = prevSize; + document.onmousemove = null; + document.onmouseup = null; + }; + }; + + dragElem.ontouchstart = (touchEvent) => { + touchEvent.preventDefault(); + this.$container.addClass('dragging'); + let touch = this.#getTouch_(touchEvent); + let dis, prev; + if (type === 'h') { + dis = touch.clientY; + dragElem.top = dragElem.offsetTop; + } else { + dis = touch.clientX; + dragElem.left = dragElem.offsetLeft; + } + const prevSize = this.size; + + document.ontouchmove = (moveEvent) => { + moveEvent.preventDefault(); + this.runEvent('ondragStart'); + const current = this.#getTouch_(moveEvent); + let iT, maxT, minT = parseInt(min), movement; + + if (type === 'h') { + iT = dragElem.top + (current.clientY - dis); + maxT = container.clientHeight - minT; + movement = current.clientY - dis; + } else { + iT = dragElem.left + (current.clientX - dis); + maxT = container.clientWidth - minT; + movement = current.clientX - dis; + } + + iT += 1; + if (prev === iT) return false; + prev = iT; + + if (full[0] && movement < 0 && iT < minT * 0.4) { // 向上或向左 + this.changeTo('0%'); + this.runEvent('onfull', Drag.Extend.NEGATIVE); + } else if (full[1] && movement > 0 && iT > (maxT + minT * 0.6)) { // 向下或向右 + this.changeTo('100%'); + this.runEvent('onfull', Drag.Extend.POSITIVE); + } else if (iT < maxT && iT > minT) { // 中间区域 + let shown = this.shown; + this.changeTo(iT); + if (shown !== Drag.Extend.BOTH) { + this.runEvent('exitfull', shown); + } + } + + this.runEvent('ondragEnd'); + return false; + }; + + document.ontouchend = () => { + this.$container.removeClass('dragging'); + this.prevSize = prevSize; + document.ontouchmove = null; + document.ontouchend = null; + }; + }; + } + + changeTo(part) { + const { type, elem } = this.config; + const elemCssType = type === 'h'? 'height' : 'width'; + const dragCssType = type === 'h'? 'top' : 'left'; + let elem1Size, elem2Size, precent; + if (typeof part === 'string' && part.indexOf('%') !== -1) { + precent = parseFloat(part); + } else { + let all; + if (type === 'h') { + all = this.$container.height(); + } else { + all = this.$container.width(); + } + precent = 100 * parseFloat(part) / all; + } + elem1Size = `${precent}%`; + elem2Size = `${(100 - precent)}%`; + if (this.size[0] === elem1Size && this.size[1] === elem2Size) { + return; + } + this.prevSize = this.size; + this.size = [elem1Size, elem2Size]; + if (!precent) { + this.$dragElem.css(dragCssType, '0px'); + this.shown = Drag.Extend.NEGATIVE; + this.$first.css('display', 'none'); + this.$last.css('display', this.lastDisplay); + } else if (precent >= 100) { + this.$dragElem.css(dragCssType, 'calc(100% - 4px)'); + this.shown = Drag.Extend.POSITIVE; + this.$first.css('display', this.firstDisplay); + this.$last.css('display', 'none'); + } else { + this.$dragElem.css(dragCssType, `calc(${elem1Size} - 2px)`); + this.shown = Drag.Extend.BOTH; + this.$first.css('display', this.firstDisplay); + this.$last.css('display', this.lastDisplay); + } + elem[0].css(elemCssType, elem1Size); + elem[1].css(elemCssType, elem2Size); + this.runEvent('sizeChanged'); + } + + full(type) { + if ([this.shown, Drag.Extend.BOTH].includes(type)) { + return; + } + if (this.shown !== Drag.Extend.BOTH) { + this.runEvent('exitfull', this.shown); + } + switch(type) { + case Drag.Extend.NEGATIVE: + this.changeTo('0%'); + break; + case Drag.Extend.POSITIVE: + this.changeTo('100%'); + } + this.runEvent('onfull', type); + } + + exitfull() { + if (this.shown === Drag.Extend.BOTH) { + return; + } + let prevSize = this.prevSize[0]; + if (prevSize === '100%') { + prevSize = '70%'; + } else if (prevSize === '0%') { + prevSize = '30%'; + } + let shown = this.shown; + this.changeTo(prevSize); + this.runEvent('exitfull', shown); + } + + show(type) { + if ([Drag.Extend.BOTH, type].includes(this.shown)) { + return; + } + this.exitfull(); + } + + hide(type) { + switch (type) { + case Drag.Extend.NEGATIVE: + this.full(Drag.Extend.POSITIVE); + break; + case Drag.Extend.POSITIVE: + this.full(Drag.Extend.NEGATIVE); + break; + } + } + + dispose() { + this.resetEvent(); + this.$dragElem[0].onmousedown = null; + this.$dragElem[0].onpointerdown = null; + this.$dragElem[0].onpointerup = null; + this.$dragElem.remove(); + } + + bind(type, func) { + return this.#events_.bind(type, func); + } + + unbind(id) { + this.#events_.unbind(id); + } + + addEventsType(eventsType) { + this.#events_.addType(eventsType); + } + + runEvent(eventsType, ...args) { + this.#events_.run(eventsType, ...args); + } + + offEvent(eventsType) { + this.#events_.off(eventsType); + } + + resetEvent() { + this.#events_.reset(); + } +} + +class DragH extends Drag { + constructor(elem, config) { + super(elem, { + ...config, + type: 'h' + }); + } +} + +class DragV extends Drag { + constructor(elem, config) { + super(elem, { + ...config, + type: 'v' + }); + } +} + +Mixly.DragH = DragH; +Mixly.DragV = DragV; +Mixly.Drag = Drag; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/dropdown-menu-group.js b/mixly/common/modules/mixly-modules/common/dropdown-menu-group.js new file mode 100644 index 00000000..ac992e58 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/dropdown-menu-group.js @@ -0,0 +1,233 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('tippy'); +goog.require('Mixly.Env'); +goog.require('Mixly.Menu'); +goog.require('Mixly.Registry'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.ContextMenu'); +goog.require('Mixly.DropdownMenu'); +goog.provide('Mixly.DropdownMenuGroup'); + +const { + Env, + Menu, + Registry, + HTMLTemplate, + IdGenerator, + ContextMenu, + DropdownMenu +} = Mixly; + + +class DropdownMenuGroup { + static { + HTMLTemplate.add( + 'html/dropdown-menu-item.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/dropdown-menu-item.html'))) + ); + } + + #singleton_ = null; + #menuItems_ = []; + #ids_ = {}; + #instanceIds_ = {}; + #activeInstance_ = null; + #instanceShown_ = false; + #menuShown_ = false; + #trigged_ = false; + #$instancePopper_ = null; + #$instanceContent_ = null; + #$content_ = null; + constructor(elem) { + this.#$content_ = $(elem); + this.#$content_.css('z-index', 200); + this.#singleton_ = tippy.createSingleton([], { + interactive: true, + maxWidth: 'none', + offset: [0, 3], + appendTo: document.body, + arrow: false, + placement: 'bottom-end', + animation: 'shift-toward-extreme', + hideOnClick: false, + delay: [200, null], + onShow: () => { + if (this.#activeInstance_) { + this.showMenu(this.#activeInstance_.id); + } + this.#instanceShown_ = true; + }, + onTrigger: (_, event) => { + const id = $(event.currentTarget).attr('data-id'); + if (this.#instanceShown_) { + if (this.#activeInstance_) { + this.#trigged_ = true; + this.hideMenu(this.#activeInstance_.id); + this.#activeInstance_ = null; + } + this.showMenu(id); + } + this.#activeInstance_ = this.#instanceIds_[id].instance; + }, + onHide: () => { + if (this.#menuShown_) { + return false; + } + this.#instanceShown_ = false; + return true; + } + }); + this.#$instancePopper_ = $(this.#singleton_.popper); + this.#$instancePopper_.addClass('mixly-drapdown-menu'); + this.#$instanceContent_ = this.#$instancePopper_.children().children(); + } + + add(item) { + if (!item.id) { + if (item.type) { + item.id = item.type; + } else { + item.id = IdGenerator.generate(); + } + } + if (!item.weight) { + item.weight = 0; + } + this.remove(item.id); + item.$elem = $(HTMLTemplate.get('html/dropdown-menu-item.html').render({ + text: item.displayText + })); + const instance = tippy(item.$elem[0]); + item.$elem.attr('data-id', instance.id); + item.$i = item.$elem.children('i'); + item.instance = instance; + const contextMenuId = IdGenerator.generate(); + const selector = `body > .mixly-dropdown-menus > div[m-id="${contextMenuId}"]`; + const contextMenu = new ContextMenu(selector, { + trigger: 'none', + appendTo: this.#$instanceContent_, + shadow: true, + autoHide: false, + async: false, + zIndex: 150, + position: (opt) => { + opt.$menu.css('margin', 0); + }, + events: { + show: (opt) => { + item.$i.addClass('menu-shown'); + this.#menuShown_ = true; + this.#singleton_.setProps({}); + }, + hide: (opt) => { + item.$i.removeClass('menu-shown'); + if (this.#trigged_) { + this.#trigged_ = false; + return true; + } + this.#menuShown_ = false; + this.#singleton_.hide(); + } + } + }); + item.contextMenu = contextMenu; + contextMenu.register('menu', item.menu); + contextMenu.bind('getMenu', () => 'menu'); + item.$menu = $(`
`); + DropdownMenu.$container.append(item.$menu); + let i = 0; + for (; i < this.#menuItems_.length; i++) { + if (this.#menuItems_[i].weight <= item.weight) { + continue; + } + break; + } + if (i === this.#menuItems_.length) { + if (this.#menuItems_.length) { + this.#menuItems_[i - 1].$elem.after(item.$elem); + } else { + this.#$content_.append(item.$elem); + } + } else { + this.#menuItems_[i].$elem.before(item.$elem); + } + this.#menuItems_.splice(i, 0, item); + this.#ids_[item.id] = item; + this.#instanceIds_[instance.id] = item; + const instances = []; + for (let menuItem of this.#menuItems_) { + instances.push(menuItem.instance); + } + this.#singleton_.setInstances(instances); + return item.id; + } + + getContextMenu(id) { + if (!this.#ids_[id]) { + return null; + } + return this.#ids_[id].contextMenu; + } + + getInstance() { + return this.#singleton_; + } + + remove(id) { + let item = this.#ids_[id]; + if (!item) { + return; + } + delete this.#ids_[id]; + const instanceId = item.instance.id; + delete this.#instanceIds_[instanceId]; + for (let i in this.#menuItems_) { + if (this.#menuItems_[i].id !== id) { + continue; + } + this.#menuItems_.splice(i, 1); + break; + } + item.instance.destroy(); + item.contextMenu.dispose(); + item.$elem.remove(); + item.$menu.remove(); + item = null; + } + + showMenu(instanceId) { + const item = this.#instanceIds_[instanceId]; + item.$menu.contextMenu(); + } + + hideMenu(instanceId) { + const item = this.#instanceIds_[instanceId]; + item.$menu.contextMenu('hide'); + } + + dispose() { + super.dispose(); + this.#$instanceContent_.remove(); + this.#$instanceContent_ = null; + this.#$instancePopper_.remove(); + this.#$instancePopper_ = null; + this.#$content_.empty(); + this.#$content_ = null; + for (let id in this.#ids_) { + this.remove(id); + } + this.#singleton_.destroy(); + this.#singleton_ = null; + this.#menuItems_ = null; + this.#ids_ = null; + this.#instanceIds_ = null; + this.#activeInstance_ = null; + } +} + +Mixly.DropdownMenuGroup = DropdownMenuGroup; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/dropdown-menu.js b/mixly/common/modules/mixly-modules/common/dropdown-menu.js new file mode 100644 index 00000000..e55a2f72 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/dropdown-menu.js @@ -0,0 +1,97 @@ +goog.loadJs('common', () => { + +goog.require('tippy'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.ContextMenu'); +goog.provide('Mixly.DropdownMenu'); + +const { + IdGenerator, + ContextMenu +} = Mixly; + + +class DropdownMenu extends ContextMenu { + static { + this.$container = $('
'); + $(document.body).append(this.$container); + } + + #shown_ = false; + #layer_ = null; + #contextMenuId_ = ''; + #$contextMenuElem_ = null; + constructor(elem) { + const layer = tippy(elem, { + allowHTML: true, + content: '', + trigger: 'click', + interactive: true, + maxWidth: 'none', + offset: [0, 0], + appendTo: document.body, + arrow: false, + placement: 'bottom-start', + delay: 0, + duration: [0, 0], + onCreate: (instance) => { + $(instance.popper).addClass('mixly-drapdown-menu'); + }, + onMount: () => { + this.show(); + }, + onHide: () => { + this.#shown_ && this.hide(); + } + }); + + const contextMenuId = IdGenerator.generate(); + const selector = `body > .mixly-dropdown-menus > div[m-id="${contextMenuId}"]`; + + super(selector, { + trigger: 'none', + appendTo: $(layer.popper).children().children(), + zIndex: 1001, + position: (opt) => { + opt.$menu.css('margin', 0); + }, + events: { + show: () => { + this.#shown_ = true; + this.#layer_.setProps({}); + }, + hide: () => { + this.#shown_ = false; + if (this.#layer_.state.isShown) { + this.#layer_.hide(); + } + } + } + }); + + this.#$contextMenuElem_ = $(`
`); + DropdownMenu.$container.append(this.#$contextMenuElem_); + this.#contextMenuId_ = contextMenuId; + this.#layer_ = layer; + } + + show() { + this.#$contextMenuElem_.contextMenu(); + } + + hide() { + this.#$contextMenuElem_.contextMenu('hide'); + } + + dispose() { + super.dispose(); + this.#layer_.destroy(); + this.#layer_ = null; + this.#$contextMenuElem_.remove(); + this.#$contextMenuElem_ = null; + } +} + +Mixly.DropdownMenu = DropdownMenu; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-ace.js b/mixly/common/modules/mixly-modules/common/editor-ace.js new file mode 100644 index 00000000..ee8c5133 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-ace.js @@ -0,0 +1,409 @@ +goog.loadJs('common', () => { + +goog.require('ace'); +goog.require('ace.ExtLanguageTools'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorBase'); +goog.provide('Mixly.EditorAce'); + +const { + XML, + Env, + Msg, + Debug, + HTMLTemplate, + EditorBase +} = Mixly; + + +class EditorAce extends EditorBase { + static { + this.CTRL_BTNS = ['resetFontSize', 'increaseFontSize', 'decreaseFontSize']; + this.CTRL_BTN_TEMPLATE = '
'; + this.MODE_MAP = goog.readJsonSync(path.join(Env.templatePath, 'json/ace-mode-map.json')); + + HTMLTemplate.add( + 'html/editor/editor-code.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-code.html'))) + ); + + if (['zh-hans', 'zh-hant'].includes(Msg.nowLang)) { + ace.config.setMessages( + goog.readJsonSync(path.join(Env.templatePath, `json/ace.i18n.${Msg.nowLang}.json`)) + ); + } + } + + #editor_ = null; + #destroyed_ = null; + #cursorLayer_ = null; + + constructor() { + super(); + const editorHTMLTemplate = HTMLTemplate.get('html/editor/editor-code.html'); + this.setContent($(editorHTMLTemplate.render())); + this.id = editorHTMLTemplate.id; + } + + init() { + super.init(); + this.#editor_ = ace.edit(this.getContent()[0]); + this.resetFontSize(); + this.#addCursorLayer_(); + this.#addCursorEventsListener_(); + this.#addDefaultCommand_(); + } + + getEditor() { + return this.#editor_; + } + + dispose() { + super.dispose(); + this.#editor_.destroy(); + this.#destroyed_ = true; + } + + setValue(data, scroll = true) { + if (this.#destroyed_) { + return; + } + this.#editor_.updateSelectionMarkers(); + const { selection } = this.#editor_; + const initCursor = selection.getCursor(); + if (this.getValue() !== data) { + this.#editor_.setValue(data); + } + if (scroll) { + this.scrollToBottom(); + } else { + selection.moveCursorTo(initCursor.row, initCursor.column, true); + selection.clearSelection(); + } + } + + addValue(data, scroll = true) { + if (this.#destroyed_) { + return; + } + const { session } = this.#editor_; + const endCursor = this.getEndPos(); + session.insert(endCursor, data); + if (scroll) { + this.scrollToBottom(); + } + } + + replaceLine(lineNumber, newContent) { + const session = this.#editor_.getSession(); + const totalLines = session.getLength(); + let targetLine = lineNumber < 0 ? totalLines + lineNumber : lineNumber; + if (targetLine < 0) { + targetLine = 0; + } else if (targetLine >= totalLines) { + targetLine = totalLines - 1; + } + const cursorPos = this.#editor_.getCursorPosition(); + const oldLine = session.getLine(targetLine); + const range = new ace.Range(targetLine, 0, targetLine, oldLine.length); + session.replace(range, newContent); + if (cursorPos.row > targetLine) { + this.#editor_.moveCursorTo(cursorPos.row, cursorPos.column); + } else if (cursorPos.row === targetLine) { + const newCol = Math.min(cursorPos.column, newContent.length); + this.#editor_.moveCursorTo(targetLine, newCol); + } else { + this.#editor_.moveCursorTo(cursorPos.row, cursorPos.column); + } + this.#editor_.renderer.scrollCursorIntoView(null, 0.5); + } + + appendLine(text) { + const session = this.#editor_.getSession(); + const totalLines = session.getLength(); + const lastLineIndex = totalLines - 1; + const lastLineText = session.getLine(lastLineIndex); + if (lastLineText.trim()) { + session.insert({ row: totalLines, column: 0 }, `\n${text}`); + } else { + const range = new ace.Range(lastLineIndex, 0, lastLineIndex, lastLineText.length); + session.replace(range, text); + } + this.scrollToBottom(); + } + + getValue() { + return this.#destroyed_ ? '' : this.#editor_.getValue(); + } + + getValueRange(startPos, endPos) { + if (this.#destroyed_ || !startPos || !endPos + || typeof startPos !== 'object' || typeof endPos !== 'object') { + return ""; + } + const session = this.#editor_.getSession(); + return session.getTextRange(new ace.Range( + startPos.row, + startPos.column, + endPos.row, + endPos.column + )); + } + + getEndPos() { + if (this.#destroyed_) { + return { row: 0, column: 0 }; + } + const session = this.#editor_.getSession(); + const row = session.getLength() - 1; + const column = session.getLine(row).length; + return { row, column }; + } + + clear() { + this.setValue('', true); + } + + scrollToBottom() { + if (this.#destroyed_) { + return; + } + const { selection, session } = this.#editor_; + this.#editor_.updateSelectionMarkers(); + this.#editor_.gotoLine(session.getLength()); + selection.moveCursorLineEnd(); + } + + scrollToTop() { + if (this.#destroyed_) { + return; + } + this.#editor_.gotoLine(0); + } + + #addDefaultCommand_() { + const { commands } = this.#editor_; + commands.addCommands([{ + name: "increaseFontSize", + bindKey: "Ctrl-=|Ctrl-+", + exec: (editor) => { + this.increaseFontSize(); + } + }, { + name: "decreaseFontSize", + bindKey: "Ctrl+-|Ctrl-_", + exec: (editor) => { + this.decreaseFontSize(); + } + }, { + name: "resetFontSize", + bindKey: "Ctrl+0|Ctrl-Numpad0", + exec: (editor) => { + this.resetFontSize(); + } + }, { + name: "mixly-message", + bindKey: "backspace|delete|enter", + readOnly: true, + exec: (editor) => { + if (!editor.getReadOnly()) { + return false; + } + this.#cursorLayer_.show(); + return false; + } + }]); + } + + #addCursorLayer_() { + this.#cursorLayer_ = tippy(this.getContent().find('.ace_cursor')[0], { + content: Msg.Lang['editor.viewReadOnly'], + trigger: 'manual', + hideOnClick: true, + delay: 0, + duration: [ 0, 0 ], + placement: 'right', + offset: [ 0, 0 ], + popperOptions: { + strategy: 'fixed', + modifiers: [ + { + name: 'flip', + options: { + fallbackPlacements: ['top-end', 'right'] + } + } + ] + } + }); + } + + #addCursorEventsListener_() { + const editor = this.getEditor(); + $('#mixly-footer-cursor').hide(); + editor.on('focus', () => { + const cursor = selection.getCursor(); + $('#mixly-footer-row').html(cursor.row + 1); + $('#mixly-footer-column').html(cursor.column + 1); + $('#mixly-footer-cursor').show(); + }); + editor.on("blur", () => { + this.#cursorLayer_.hide(); + $('#mixly-footer-cursor').hide(); + }); + const { selection } = editor.getSession(); + const { session } = editor; + selection.on('changeCursor', () => { + const cursor = selection.getCursor(); + $('#mixly-footer-row').html(cursor.row + 1); + $('#mixly-footer-column').html(cursor.column + 1); + }); + selection.on("changeSelection", () => { + if (selection.isEmpty()) { + $('#mixly-footer-selected').parent().hide(); + } else { + const range = selection.getRange(); + const text = session.getTextRange(range); + $('#mixly-footer-selected').parent().css('display', 'inline-flex'); + $('#mixly-footer-selected').html(text.length); + } + }); + session.on("changeScrollTop", () => { + this.#cursorLayer_.hide(); + }); + } + + addCtrlBtns() { + const $content = this.getContent(); + for (let mId of EditorAce.CTRL_BTNS) { + $content.append(XML.render(EditorAce.CTRL_BTN_TEMPLATE, { mId })); + } + this.$ctrlBtns = $content.children('.code-editor-btn'); + this.$ctrlBtns.off().click((event) => { + const mId = $(event.target).attr('m-id'); + this[mId](); + }); + } + + showCtrlBtns() { + this.$ctrlBtns.css('display', 'block'); + } + + hideCtrlBtns() { + this.$ctrlBtns.css('display', 'none'); + } + + resetFontSize() { + this.#editor_.setFontSize(17); + } + + increaseFontSize() { + const size = parseInt(this.#editor_.getFontSize(), 10) || 17; + this.#editor_.setFontSize(size + 1); + } + + decreaseFontSize() { + const size = parseInt(this.#editor_.getFontSize(), 10) || 17; + this.#editor_.setFontSize(Math.max(size - 1 || 1)); + } + + undo() { + super.undo(); + this.#editor_.undo(); + } + + redo() { + super.redo(); + this.#editor_.redo(); + } + + setReadOnly(status) { + this.#editor_.setReadOnly(status); + } + + setMode(type) { + this.#editor_.session.setMode(`ace/mode/${type}`); + } + + setFileMode(extname) { + const mode = this.getFileMode(extname) ?? 'text'; + this.setMode(mode); + } + + getFileMode(extname) { + for (const [mode, extensions] of Object.entries(EditorAce.MODE_MAP)) { + if (extensions.includes(extname)) { + return mode; + } + } + return null; + } + + cut() { + const { selection, session } = this.#editor_; + const cutLine = selection.isEmpty(); + const range = cutLine ? selection.getLineRange() : selection.getRange(); + this.#editor_._emit('cut', range); + if (!range.isEmpty()) { + const copyText = session.getTextRange(range); + navigator.clipboard.writeText(copyText) + .then(() => { + Debug.log('clipboard:复制成功', copyText); + }).catch((error) => { + Debug.error('clipboard:复制失败', error); + }); + session.remove(range); + } + this.#editor_.clearSelection(); + } + + copy() { + const copyText = this.#editor_.getSelectedText(); + this.#editor_.clearSelection(); + if (!copyText) { + return; + } + navigator.clipboard.writeText(copyText) + .then(() => { + Debug.log('clipboard:复制成功', copyText); + }).catch((error) => { + Debug.error('clipboard:复制失败', error); + }); + } + + paste() { + navigator.clipboard.readText() + .then((message) => { + this.#editor_.execCommand('paste', message); + Debug.log('clipboard:粘贴成功', message); + }) + .catch((error) => { + Debug.error('clipboard:粘贴失败', error); + }); + } + + commentLine() { + this.#editor_.execCommand('togglecomment'); + } + + blockComment() { + this.#editor_.execCommand('toggleBlockComment'); + } + + resize() { + this.#editor_.resize(); + super.resize(); + } + + focus() { + this.#editor_.focus(); + } +} + +Mixly.EditorAce = EditorAce; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-base.js b/mixly/common/modules/mixly-modules/common/editor-base.js new file mode 100644 index 00000000..1bbadaea --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-base.js @@ -0,0 +1,50 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Events'); +goog.require('Mixly.PageBase'); +goog.provide('Mixly.EditorBase'); + +const { Events, PageBase } = Mixly; + +class EditorBase extends PageBase { + #$btnsContent_ = null; + + constructor() { + super(); + } + + getBtnsContent() { + return this.#$btnsContent_; + } + + setBtnsContent($elem) { + this.#$btnsContent_ = $elem; + } + + getValue() { + return ''; + } + + setValue(data, ext) { + this.removeDirty(); + } + + getCode() { + return this.getValue(); + } + + dispose() { + this.#$btnsContent_ && this.#$btnsContent_.remove(); + super.dispose(); + } + + undo() {} + + redo() {} + + empty() {} +} + +Mixly.EditorBase = EditorBase; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-blockly.js b/mixly/common/modules/mixly-modules/common/editor-blockly.js new file mode 100644 index 00000000..6b0c286c --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-blockly.js @@ -0,0 +1,367 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Blockly'); +goog.require('WorkspaceSearch'); +goog.require('Backpack'); +goog.require('Minimap'); +goog.require('PositionedMinimap'); +goog.require('ContentHighlight'); +goog.require('ZoomToFitControl'); +goog.require('Blockly.FieldGridDropdown'); +goog.require('Blockly.FieldDependentDropdown'); +goog.require('Blockly.FieldSlider'); +goog.require('Blockly.FieldBitmap'); +goog.require('Blockly.FieldColourHsvSliders'); +goog.require('Blockly.FieldDate'); +goog.require('Blockly.FieldAngle'); +goog.require('Blockly.FieldColour'); +goog.require('Blockly.FieldMultilineInput'); +goog.require('Blockly.Screenshot'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.ToolboxSearcher'); +goog.require('Mixly.Debug'); +goog.require('Mixly.EditorBase'); +goog.provide('Mixly.EditorBlockly'); + +const { + Config, + Env, + XML, + HTMLTemplate, + ToolboxSearcher, + Debug, + EditorBase +} = Mixly; +const { USER, BOARD } = Config; + +Blockly.ALIGN_LEFT = Blockly.inputs.Align.LEFT; +Blockly.ALIGN_CENTRE = Blockly.inputs.Align.CENTRE; +Blockly.ALIGN_RIGHT = Blockly.inputs.Align.RIGHT; + +class EditorBlockly extends EditorBase { + static { + HTMLTemplate.add( + 'html/editor/editor-blockly.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-blockly.html'))) + ); + + HTMLTemplate.add( + 'xml/default-categories.xml', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'xml/default-categories.xml'))) + ); + + this.$blockly = $('
'); + this.editor = null; + this.workspace = null; + this.initBlockly = () => { + const DEFAULT_CATEGORIES = HTMLTemplate.get('xml/default-categories.xml').render(); + const media = path.join(Env.srcDirPath, 'common/media/blockly'); + const renderer = ['geras', 'zelos', 'thrasos'].includes(USER.blockRenderer) ? USER.blockRenderer : 'geras'; + this.editor = Blockly.inject(this.$blockly[0], { + media, + toolbox: DEFAULT_CATEGORIES, + renderer, + zoom: { + controls: true, + wheel: true, + scaleSpeed: 1.03 + }, + grid: USER.blocklyShowGrid ==='yes' ? { + spacing: 20, + length: 3, + colour: '#ccc', + snap: true + } : {} + }); + + const $blocklyScrollbarHandle = this.$blockly.find('.blocklyScrollbarHandle'); + $blocklyScrollbarHandle.on('pointerdown', (event) => { + const { currentTarget } = event; + currentTarget.setPointerCapture(event.pointerId); + }); + $blocklyScrollbarHandle.on('pointerup', (event) => { + const { currentTarget } = event; + currentTarget.releasePointerCapture(event.pointerId); + }); + + this.editor.registerToolboxCategoryCallback( + Blockly.Variables.CATEGORY_NAME, + (...args) => Blockly.Variables.flyoutCategory(...args) + ); + + this.editor.registerToolboxCategoryCallback( + Blockly.Procedures.CATEGORY_NAME, + (...args) => Blockly.Procedures.flyoutCategory(...args) + ); + + this.editor.setTheme(Blockly.Themes[ + USER.theme === 'dark' ? 'Dark' : 'Classic' + ]); + + this.addPlugins(); + this.workspace = new Blockly.Workspace(new Blockly.Options({ + toolbox: null + })); + } + + this.addPlugins = () => { + const { editor } = this; + Blockly.ContextMenuItems.registerCommentOptions(); + editor.configureContextMenu = (menuOptions, e) => { + const workspaceSearchOption = { + text: Blockly.Msg['WORKSPACE_SEARCH_OPEN'], + enabled: editor.getTopBlocks().length, + callback: () => { + this.workspaceSearch.open(); + } + }; + menuOptions.push(workspaceSearchOption); + const screenshotOption = { + text: Blockly.Msg['DOWNLOAD_SCREENSHOT'], + enabled: editor.getTopBlocks().length, + callback: function() { + Blockly.Screenshot.downloadScreenshot(editor); + }, + }; + menuOptions.push(screenshotOption); + } + + this.toolboxSeacher = new ToolboxSearcher(editor); + + this.workspaceSearch = new WorkspaceSearch(editor); + this.workspaceSearch.init(); + + this.zoomToFit = new ZoomToFitControl(editor); + this.zoomToFit.init(); + + this.backpack = new Backpack(editor, { + useFilledBackpackImage: true, + skipSerializerRegistration: false, + contextMenu: { + emptyBackpack: true, + removeFromBackpack: true, + copyToBackpack: true, + copyAllToBackpack: true, + pasteAllToBackpack: true, + disablePreconditionChecks: false + } + }); + this.backpack.init(); + + /*if (USER.blocklyMultiselect === 'yes') { + this.multiselectPlugin = new Multiselect(editor); + this.multiselectPlugin.init({ + useDoubleClick: false, + bumpNeighbours: false, + multiselectIcon: { + hideIcon: true + }, + multiselectCopyPaste: { + crossTab: true, + menu: false + } + }); + } + + if (USER.blocklyShowMinimap === 'yes') { + this.minimap = new PositionedMinimap(editor); + this.minimap.init(); + }*/ + + if (USER.blocklyContentHighlight === 'yes') { + this.contentHighlight = new ContentHighlight(editor); + this.contentHighlight.init(); + } + } + + this.getEditor = () => { + return this.editor; + } + + this.getContent = () => { + return this.$blockly; + } + + this.getXML = (workspace) => { + const $xml = $(Blockly.Xml.workspaceToDom(workspace)); + return $xml[0].outerHTML; + } + + this.getRawCode = (workspace, generator) => { + return generator?.workspaceToCode(workspace) || ''; + } + + this.getCode = (workspace, generator) => { + let code = generator?.workspaceToCode(workspace) || ''; + code = code.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/g, function (s) { + try { + return decodeURIComponent(s.replace(/_/g, '%')); + } catch (error) { + Debug.error(error); + return s; + } + }); + return code; + } + + this.updateToolbox = () => { + this.editor.updateToolbox($('#toolbox')[0]); + } + + this.reloadWorkspace = () => { + let workspaceState = Blockly.serialization.workspaces.save(this.editor); + let undoStack = [...this.editor.undoStack_]; + let redoStack = [...this.editor.redoStack_]; + Blockly.serialization.workspaces.load(workspaceState, this.editor, { + recordUndo: false + }); + this.editor.undoStack_ = [...undoStack]; + this.editor.redoStack_ = [...redoStack]; + } + + this.initBlockly(); + } + + #editor_ = null; + #workspaceState_ = null; + #undoStack_ = null; + #redoStack_ = null; + + constructor() { + super(); + this.setContent( + $(HTMLTemplate.get('html/editor/editor-blockly.html').render()) + ); + this.#editor_ = EditorBlockly.getEditor(); + } + + getEditor() { + return this.#editor_; + } + + undo() { + super.undo(); + this.#editor_.undo(0); + } + + redo() { + super.redo(); + this.#editor_.undo(1); + } + + setVisible(status) { + this.#editor_.setVisible(status); + } + + scrollCenter() { + this.#editor_.scrollCenter(); + } + + resize() { + // 重新调整编辑器尺寸 + this.#editor_.hideChaff(false); + this.#editor_.hideComponents(true); + Blockly.common.svgResize(this.#editor_); + Blockly.bumpObjects.bumpTopObjectsIntoBounds(this.#editor_); + super.resize(); + } + + dispose() { + super.dispose(); + if (this.isActive()) { + Blockly.Events.disable(); + this.#editor_.clear(); + Blockly.Events.enable(); + EditorBlockly.getContent().detach(); + } + this.#undoStack_ = null; + this.#redoStack_ = null; + this.#editor_ = null; + this.getContent().remove(); + } + + onMounted() { + super.onMounted(); + this.getContent().append(EditorBlockly.getContent()); + setTimeout(() => { + Blockly.Events.disable(); + if (this.#workspaceState_) { + Blockly.serialization.workspaces.load(this.#workspaceState_, this.#editor_, { + recordUndo: false + }); + } else { + this.#editor_.clear(); + } + if (this.#undoStack_) { + this.#editor_.undoStack_ = [...this.#undoStack_]; + } + if (this.#redoStack_) { + this.#editor_.redoStack_ = [...this.#redoStack_]; + } + Blockly.Events.enable(); + }, 0); + } + + onUnmounted() { + super.onUnmounted(); + EditorBlockly.getContent().detach(); + this.getContent().empty(); + this.#workspaceState_ = Blockly.serialization.workspaces.save(this.#editor_); + this.#undoStack_ = [...this.#editor_.undoStack_]; + this.#redoStack_ = [...this.#editor_.redoStack_]; + Blockly.Events.disable(); + this.#editor_.clearUndo(); + Blockly.Events.enable(); + } + + setValue(data, ext) {} + + #getTargetWorkspace_() { + let workspace = this.#editor_; + if (!this.isActive()) { + if (this.isDirty()) { + this.#workspaceState_ = Blockly.serialization.workspaces.save(this.#editor_); + } + Blockly.serialization.workspaces.load(this.#workspaceState_, EditorBlockly.workspace, { + recordUndo: false + }); + workspace = EditorBlockly.workspace; + } + return workspace; + } + + getXML() { + const workspace = this.#getTargetWorkspace_(); + return EditorBlockly.getXML(workspace); + } + + getRawCode() { + const workspace = this.#getTargetWorkspace_(); + return EditorBlockly.getRawCode(workspace, Blockly.generator); + } + + getCode() { + const workspace = this.#getTargetWorkspace_(); + return EditorBlockly.getCode(workspace, Blockly.generator); + } + + getMix() { + const workspace = this.#getTargetWorkspace_(); + return { + block: EditorBlockly.getXML(workspace), + code: EditorBlockly.getCode(workspace, Blockly.generator) + }; + } + + getValue() { + return this.getCode(); + } +} + +Mixly.EditorBlockly = EditorBlockly; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-code.js b/mixly/common/modules/mixly-modules/common/editor-code.js new file mode 100644 index 00000000..8386af1a --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-code.js @@ -0,0 +1,231 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Config'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Menu'); +goog.require('Mixly.ContextMenu'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.CodeFormatter'); +goog.require('Mixly.MonacoTheme'); +goog.require('Mixly.MonacoTreeSitter'); +goog.require('Mixly.EditorMonaco'); +goog.provide('Mixly.EditorCode'); + +const { + Config, + XML, + Env, + Msg, + Debug, + Menu, + ContextMenu, + IdGenerator, + CodeFormatter, + MonacoTheme, + MonacoTreeSitter, + EditorMonaco +} = Mixly; +const { USER } = Config; + + +class EditorCode extends EditorMonaco { + #contextMenu_ = null; + #monacoTreeSitter_ = null; + + constructor() { + super(); + } + + init() { + super.init(); + this.setLanguage('text'); + this.setTabSize(4); + this.#addContextMenu_(); + this.setTheme(USER.theme); + this.#monacoTreeSitter_ = new MonacoTreeSitter(this); + } + + onMounted() { + super.onMounted(); + this.#addChangeEventListenerExt_(); + } + + #addContextMenu_() { + this.#contextMenu_ = new ContextMenu(`div[page-id="${this.getId()}"]`, { + zIndex: 300 + }); + let menu = new Menu(); + menu.add({ + weight: 0, + id: 'cut', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.cut'], 'Ctrl+X'), + callback: (key, opt) => this.cut() + } + }); + menu.add({ + weight: 1, + id: 'copy', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.copy'], 'Ctrl+C'), + callback: (key, opt) => this.copy() + } + }); + menu.add({ + weight: 2, + id: 'paste', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.paste'], 'Ctrl+V'), + callback: (key, opt) => this.paste() + } + }); + menu.add({ + weight: 3, + id: 'sep1', + data: '---------' + }); + menu.add({ + weight: 4, + id: 'togglecomment', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.togglecomment'], 'Ctrl+/'), + callback: (key, opt) => this.commentLine() + } + }); + menu.add({ + weight: 5, + id: 'toggleBlockComment', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.toggleBlockComment'], 'Shift+Alt+A'), + callback: (key, opt) => this.blockComment() + } + }); + this.#contextMenu_.register('code', menu); + this.#contextMenu_.bind('getMenu', () => 'code'); + } + + getContextMenu() { + return this.#contextMenu_; + } + + setValue(data, ext) { + this.disableChangeEvent(); + super.setValue(data); + const language = this.getLanguageByExt(ext); + if (MonacoTheme.supportThemes.includes(language)) { + this.setTheme(`${USER.theme}-${language}`); + } else { + this.setTheme(USER.theme); + } + this.setLanguage(language); + this.enableChangeEvent(); + this.setCodeFormatter(language, ext).catch(Debug.error); + } + + diffEdits(data, ext) { + this.disableChangeEvent(); + super.diffEdits(data); + const language = this.getLanguageByExt(ext); + this.setLanguage(language); + if (MonacoTheme.supportThemes.includes(language)) { + this.setTheme(`${USER.theme}-${language}`); + } else { + this.setTheme(USER.theme); + } + this.#monacoTreeSitter_.setValue(language, USER.theme, data); + this.enableChangeEvent(); + this.setCodeFormatter(language, ext).catch(Debug.error); + } + + async setCodeFormatter(language, ext) { + const formatter = await CodeFormatter.activateFormatter(language); + const menu = this.#contextMenu_.getItem('code'); + if (!formatter) { + menu.remove('sep-format'); + menu.remove('format'); + return; + } + menu.add({ + weight: 6, + id: 'sep-format', + data: '---------' + }); + menu.add({ + weight: 6, + id: 'format', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.formatDocument'], ''), + callback: () => { + CodeFormatter.format(language, this.getValue()) + .then((data) => { + super.setValue(data, ext); + }) + .catch(Debug.error); + } + } + }); + } + + getTreeSitter() { + return this.#monacoTreeSitter_; + } + + getLanguageByExt(ext) { + let language = 'plaintext'; + switch(ext) { + case '.json': + language = 'json'; + break; + case '.c': + case '.cpp': + case '.h': + case '.hpp': + case '.ino': + language = 'cpp'; + break; + case '.js': + language = 'javascript'; + break; + case '.py': + language = 'python'; + break; + case '.lua': + language = 'lua'; + break; + case '.md': + case '.mdx': + language = 'markdown'; + break; + default: + language = 'plaintext'; + } + return language; + } + + #addChangeEventListenerExt_() { + this.offEvent('change'); + this.bind('change', () => { + this.addDirty(); + this.#monacoTreeSitter_.setValue(this.getLanguage(), USER.theme, this.getValue()); + }); + } + + dispose() { + this.#contextMenu_.dispose(); + this.#contextMenu_ = null; + super.dispose(); + } +} + +Mixly.EditorCode = EditorCode; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-md.js b/mixly/common/modules/mixly-modules/common/editor-md.js new file mode 100644 index 00000000..5c7b246e --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-md.js @@ -0,0 +1,170 @@ +goog.loadJs('common', () => { + +goog.require('marked'); +goog.require('markedKatex'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Drag'); +goog.require('Mixly.DragV'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorBase'); +goog.require('Mixly.EditorCode'); +goog.provide('Mixly.EditorMd'); + +const { + XML, + Env, + Drag, + DragV, + IdGenerator, + HTMLTemplate, + EditorBase, + EditorCode +} = Mixly; + + +class EditorMd extends EditorBase { + static { + HTMLTemplate.add( + 'html/editor/editor-md.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-md.html'))) + ); + + HTMLTemplate.add( + 'html/editor/editor-md-btns.html', + goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-md-btns.html')) + ); + + marked.use(markedKatex({ throwOnError: false })); + } + + #prevCode_ = ''; + #listener_ = null; + #drag_ = null; + #$preview_ = null; + #$btns_ = null; + + constructor() { + super(); + const $content = $(HTMLTemplate.get('html/editor/editor-md.html').render()); + const $btnsContent = $(HTMLTemplate.get('html/editor/editor-md-btns.html')); + this.#$preview_ = $content.find('.markdown-body'); + this.addPage($content.find('.editor-code'), 'code', new EditorCode()); + this.#$btns_ = $btnsContent.find('button'); + this.#drag_ = null; + this.setContent($content); + this.setBtnsContent($btnsContent); + } + + init() { + super.init(); + this.#addDragEventsListener_(); + this.#addBtnEventsListener_(); + } + + onMounted() { + super.onMounted(); + this.#addChangeEventListener_(); + } + + #addDragEventsListener_() { + this.#drag_ = new DragV(this.getContent()[0], { + min: '200px', + full: [true, true], + startSize: '0%', + startExitFullSize: '70%' + }); + this.#drag_.bind('sizeChanged', () => this.resize()); + this.#drag_.bind('onfull', (type) => { + this.#$btns_.removeClass('self-adaption-btn'); + let $btn = null; + switch(type) { + case Drag.Extend.POSITIVE: + $btn = this.#$btns_.filter('[m-id="code"]'); + break; + case Drag.Extend.NEGATIVE: + $btn = this.#$btns_.filter('[m-id="preview"]'); + break; + } + $btn.addClass('self-adaption-btn'); + }); + this.#drag_.bind('exitfull', (type) => { + this.#$btns_.removeClass('self-adaption-btn'); + const $btn = this.#$btns_.filter('[m-id="mixture"]'); + $btn.addClass('self-adaption-btn'); + if (type === Drag.Extend.POSITIVE) { + this.updatePreview(); + } + }); + } + + #addBtnEventsListener_() { + this.#$btns_.on('click', (event) => { + const $btn = $(event.currentTarget); + const mId = $btn.attr('m-id'); + if (!$btn.hasClass('self-adaption-btn')) { + this.#$btns_.removeClass('self-adaption-btn'); + $btn.addClass('self-adaption-btn'); + } + switch (mId) { + case 'code': + this.#drag_.full(Drag.Extend.POSITIVE); + break; + case 'mixture': + this.#drag_.exitfull(Drag.Extend.POSITIVE); + this.#drag_.exitfull(Drag.Extend.NEGATIVE); + break; + case 'preview': + this.#drag_.full(Drag.Extend.NEGATIVE); + break; + } + }) + } + + #addChangeEventListener_() { + const codePage = this.getPage('code'); + codePage.offEvent('change'); + codePage.bind('change', () => { + this.addDirty(); + if (this.#drag_.shown === 'NEGATIVE') { + return; + } + this.updatePreview(); + }); + } + + updatePreview() { + const code = this.getPage('code').getValue(); + if (code === this.#prevCode_) { + return; + } + this.#prevCode_ = code; + const $dom = $(marked.parse(code)); + const $as = $dom.find('a'); + $as.attr('target', '_blank'); + this.#$preview_.html($dom); + } + + setValue(data, ext) { + const codePage = this.getPage('code'); + codePage.disableChangeEvent(); + codePage.setValue(data, ext); + this.updatePreview(); + codePage.enableChangeEvent(); + } + + getValue() { + const codePage = this.getPage('code'); + return codePage.getValue(); + } + + dispose() { + this.#drag_.dispose(); + super.dispose(); + } +} + +Mixly.EditorMd = EditorMd; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-mix.js b/mixly/common/modules/mixly-modules/common/editor-mix.js new file mode 100644 index 00000000..686c9f9b --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-mix.js @@ -0,0 +1,644 @@ +goog.loadJs('common', () => { + +goog.require('layui'); +goog.require('tippy'); +goog.require('Base64'); +goog.require('Blockly'); +goog.require('Mixly.Drag'); +goog.require('Mixly.DragV'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Menu'); +goog.require('Mixly.Boards'); +goog.require('Mixly.MJson'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorBlockly'); +goog.require('Mixly.EditorCode'); +goog.require('Mixly.EditorBase'); +goog.provide('Mixly.EditorMix'); + +const { dropdown } = layui; +const { + EditorBlockly, + EditorCode, + EditorBase, + Drag, + DragV, + XML, + Msg, + Config, + Env, + Debug, + Menu, + Boards, + MJson, + HTMLTemplate, + LayerExt +} = Mixly; +const { BOARD, SOFTWARE, USER } = Config; + +const { form } = layui; + + +class EditorMix extends EditorBase { + static { + HTMLTemplate.add( + 'html/editor/editor-mix.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-mix.html'))) + ); + + HTMLTemplate.add( + 'html/editor/editor-mix-btns.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-mix-btns.html'))) + ); + } + + #language_ = null; + #tabSize_ = null; + #$btns_ = null; + #temp_ = ''; + + constructor() { + super(); + const $content = $(HTMLTemplate.get('html/editor/editor-mix.html').render()); + const $btnsContent = $(HTMLTemplate.get('html/editor/editor-mix-btns.html').render({ + block: Msg.Lang['editor.block'], + mix: Msg.Lang['editor.mix'], + code: Msg.Lang['editor.code'] + })); + this.drag = null; + this.#$btns_ = $btnsContent.find('button'); + this.setContent($content); + this.setBtnsContent($btnsContent); + this.addPage($content.find('.editor-blockly'), 'block', new EditorBlockly()); + this.addPage($content.find('.editor-code'), 'code', new EditorCode()); + } + + init() { + super.init(); + this.#addDragEventsListener_(); + this.#addBtnEventsListener_(); + this.#language_ = this.getDefaultLanguageExt(); + this.#tabSize_ = this.getDefaultTabSize(); + const codePage = this.getPage('code'); + codePage.setLanguage(codePage.getLanguageByExt(this.#language_)); + codePage.setTabSize(this.#tabSize_); + codePage.setReadOnly(true); + this.#py2BlockEditorInit_(); + const contextMenu = codePage.getContextMenu(); + let codeMenu = contextMenu.getItem('code'); + codeMenu.add({ + weight: 7, + id: 'sep2', + data: '---------' + }); + codeMenu.add({ + weight: 8, + id: 'block', + data: { + isHtmlName: false, + name: Msg.Lang['editor.contextMenu.exitCodeEditor'], + callback: (key, opt) => this.drag.exitfull(Drag.Extend.NEGATIVE) + } + }); + let blockMenu = new Menu(); + blockMenu.add({ + weight: 0, + id: 'copy', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.copy'], 'Ctrl+C'), + callback: (key, opt) => codePage.copy() + } + }); + blockMenu.add({ + weight: 1, + id: 'sep1', + data: '---------' + }); + blockMenu.add({ + weight: 2, + id: 'code', + data: { + isHtmlName: false, + name: Msg.Lang['editor.contextMenu.enterCodeEditor'], + callback: (key, opt) => this.drag.full(Drag.Extend.NEGATIVE) + } + }); + contextMenu.register('block', blockMenu); + contextMenu.offEvent('getMenu'); + contextMenu.bind('getMenu', () => { + return this.getPageType(); + }); + } + + #getCodeExtname_() { + let extname = '.c'; + const language = BOARD.language.toLowerCase(); + switch (language) { + case 'python': + case 'circuitpython': + case 'micropython': + extname = '.py'; + break; + case 'lua': + extname = '.lua'; + break; + case 'javascript': + extname = '.js'; + break; + case 'c/c++': + default: + extname = '.c'; + } + return extname; + } + + #py2BlockEditorInit_() { + const codePage = this.getPage('code'); + if (typeof Sk === 'object' + && typeof PythonToBlocks === 'function' + && typeof Py2blockEditor === 'function') { + const py2blockConverter = new PythonToBlocks(); + this.py2BlockEditor = new Py2blockEditor(py2blockConverter, codePage.getEditor()); + } + } + + #addCodeChangeEventListener_() { + const codePage = this.getPage('code'); + codePage.offEvent('change'); + codePage.bind('change', () => { + this.addDirty(); + codePage.getTreeSitter().setValue(codePage.getLanguage(), USER.theme, codePage.getValue()); + }); + } + + #addDragEventsListener_() { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + this.drag = new DragV(this.getContent()[0], { + min: '200px', + full: [true, true], + startSize: '100%', + startExitFullSize: '70%' + }); + this.drag.bind('sizeChanged', () => this.resize()); + this.drag.bind('onfull', (type) => { + this.#$btns_.removeClass('self-adaption-btn'); + let $btn = null; + switch(type) { + case Drag.Extend.POSITIVE: + $btn = this.#$btns_.filter('[m-id="block"]'); + blockPage.scrollCenter(); + break; + case Drag.Extend.NEGATIVE: + $btn = this.#$btns_.filter('[m-id="code"]'); + codePage.setReadOnly(false); + codePage.focus(); + if (this.py2BlockEditor && BOARD.pythonToBlockly) { + this.py2BlockEditor.fromCode = true; + } + break; + } + $btn.addClass('self-adaption-btn'); + }); + this.drag.bind('exitfull', (type) => { + this.#$btns_.removeClass('self-adaption-btn'); + const $btn = this.#$btns_.filter('[m-id="mixture"]'); + $btn.addClass('self-adaption-btn'); + switch(type) { + case Drag.Extend.NEGATIVE: + codePage.setReadOnly(true); + if (this.py2BlockEditor + && BOARD.pythonToBlockly + && typeof this.py2BlockEditor.updateBlock === 'function') { + this.py2BlockEditor.updateBlock(); + } else { + codePage.diffEdits(blockPage.getValue(), this.#language_); + } + break; + case Drag.Extend.POSITIVE: + this.#temp_ = blockPage.getValue(); + codePage.diffEdits(this.#temp_, this.#language_); + break; + } + blockPage.resize(); + blockPage.scrollCenter(); + }); + } + + #addBtnEventsListener_() { + this.#$btns_.on('click', (event) => { + const $btn = $(event.currentTarget); + const mId = $btn.attr('m-id'); + if (mId === 'deps') { + return; + } + if (!$btn.hasClass('self-adaption-btn')) { + this.#$btns_.removeClass('self-adaption-btn'); + $btn.addClass('self-adaption-btn'); + } + switch (mId) { + case 'block': + this.drag.full(Drag.Extend.POSITIVE); + break; + case 'mixture': + this.drag.exitfull(Drag.Extend.POSITIVE); + this.drag.exitfull(Drag.Extend.NEGATIVE); + break; + case 'code': + this.drag.full(Drag.Extend.NEGATIVE); + break; + } + }) + } + + getCurrentEditor() { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + if (this.getPageType() === 'code') { + return codePage; + } else { + return blockPage; + } + } + + getDefaultLanguageExt() { + let ext = '.txt'; + let type = (BOARD.language || '').toLowerCase(); + switch(type) { + case 'python': + case 'micropython': + case 'circuitpython': + ext = '.py'; + break; + case 'c/c++': + ext = '.cpp'; + break; + case 'javascript': + ext = '.js'; + break; + case 'markdown': + ext = '.md'; + break; + case 'lua': + ext = '.lua'; + break; + default: + ext = '.txt'; + } + return ext; + } + + getDefaultTabSize() { + let tabSize = 4; + let type = (BOARD.language || '').toLowerCase(); + switch(type) { + case 'c/c++': + case 'markdown': + tabSize = 2; + break; + case 'python': + case 'micropython': + case 'circuitpython': + case 'javascript': + default: + tabSize = 4; + } + return tabSize; + } + + getPageType() { + if (this.drag.shown !== Drag.Extend.NEGATIVE) { + return 'block'; + } else { + return 'code'; + } + } + + undo() { + super.undo(); + const editor = this.getCurrentEditor(); + editor.undo(); + } + + redo() { + super.redo(); + const editor = this.getCurrentEditor(); + editor.redo(); + } + + dispose() { + const blockPage = this.getPage('block'); + const blocklyWorkspace = blockPage.getEditor(); + blocklyWorkspace.removeChangeListener(this.codeChangeListener); + this.drag.dispose(); + super.dispose(); + this.drag = null; + } + + onMounted() { + super.onMounted(); + const blockPage = this.getPage('block'); + const blocklyWorkspace = blockPage.getEditor(); + this.codeChangeListener = blocklyWorkspace.addChangeListener((event) => { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + if ( + event.isUiEvent || + event.type == Blockly.Events.FINISHED_LOADING || + blocklyWorkspace.isDragging() + ) { + return; + } + this.addDirty(); + if (this.drag.shown !== Drag.Extend.BOTH) { + return; + } + const code = blockPage.getCode(); + if (this.#temp_ === code) { + return; + } + this.#temp_ = code; + codePage.diffEdits(code, this.#language_); + }); + this.#addCodeChangeEventListener_(); + } + + onUnmounted() { + super.onUnmounted(); + const blockPage = this.getPage('block'); + const blocklyWorkspace = blockPage.getEditor(); + blocklyWorkspace.removeChangeListener(this.codeChangeListener); + } + + setValue(data, ext) { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + switch (ext) { + case '.mix': + case '.xml': + Blockly.Events.disable(); + try { + data = XML.convert(data, true); + data = data.replace(/\\(u[0-9a-fA-F]{4})/g, function (s) { + return unescape(s.replace(/\\(u[0-9a-fA-F]{4})/g, '%$1')); + }); + } catch (error) { + Debug.error(error); + } + this.parseMix($(data), false, false, (message) => { + if (message) { + switch (message) { + case 'USE_CODE': + Debug.log('已从code标签中读取代码'); + break; + case 'USE_INCOMPLETE_BLOCKS': + Debug.log('一些块已被忽略'); + break; + } + blockPage.scrollCenter(); + Blockly.hideChaff(); + } + }); + Blockly.Events.enable(); + break; + default: + this.drag.full(Drag.Extend.NEGATIVE); + this.getPage('code').setValue(data, ext); + break; + } + } + + getValue() { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + const mix = blockPage.getMix(); + const $xml = $(mix.block); + const config = Boards.getSelectedBoardConfig(); + const boardName = Boards.getSelectedBoardName(); + const board = BOARD?.boardType ?? 'default'; + let xml = ''; + let code = ''; + $xml.removeAttr('xmlns') + .attr('version', SOFTWARE?.version ?? 'Mixly 2.0') + .attr('board', board + '@' + boardName); + if (this.drag.shown !== Drag.Extend.NEGATIVE) { + $xml.attr('shown', 'block'); + code = mix.code; + } else { + $xml.attr('shown', 'code'); + code = codePage.getValue(); + } + xml = $xml[0].outerHTML; + if (config) { + xml += `${MJson.stringify(config)}`; + } + xml += `${Base64.encode(code)}`; + return xml; + } + + getCode() { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + if (this.drag.shown !== Drag.Extend.NEGATIVE) { + return blockPage.getRawCode(); + } else { + return codePage.getCode(); + } + } + + getMil() { + const $mix = $(this.getValue()); + let $xml, $config, $code; + for (let i = 0; $mix[i]; i++) { + switch ($mix[i].nodeName) { + case 'XML': + $xml = $($mix[i]); + break; + case 'CONFIG': + $config = $($mix[i]); + break; + case 'CODE': + $code = $($mix[i]); + break; + } + } + if (!$xml) return ''; + $config && $config.remove(); + $code && $code.remove(); + $xml.attr('type', 'lib'); + $xml.find('block,shadow').removeAttr('id varid x y'); + const $blocks = $xml.children('block'); + let blockXmlList = []; + for (let i = 0; $blocks[i]; i++) { + const outerHTML = $blocks[i].outerHTML; + if (!blockXmlList.includes(outerHTML)) { + blockXmlList.push(outerHTML); + } else { + $blocks[i].remove(); + } + } + return $xml[0].outerHTML; + } + + parseMix(xml, useCode = false, useIncompleteBlocks = false, endFunc = (message) => {}) { + const blockPage = this.getPage('block'); + const codePage = this.getPage('code'); + const mixDom = xml; + let xmlDom, configDom, codeDom; + for (let i = 0; mixDom[i]; i++) { + switch (mixDom[i].nodeName) { + case 'XML': + xmlDom = $(mixDom[i]); + break; + case 'CONFIG': + configDom = $(mixDom[i]); + break; + case 'CODE': + codeDom = $(mixDom[i]); + break; + } + } + if (!xmlDom && !codeDom) { + layer.msg(Msg.Lang['editor.invalidData'], { time: 1000 }); + return; + } + for (let i of ['version', 'id', 'type', 'varid', 'name', 'x', 'y', 'items']) { + const nowDom = xmlDom.find('*[' + i + ']'); + if (nowDom.length) { + for (let j = 0; nowDom[j]; j++) { + let attr = $(nowDom[j]).attr(i); + try { + attr = attr.replaceAll('\\\"', ''); + } catch (error) { + Debug.error(error); + } + $(nowDom[j]).attr(i, attr); + } + } + } + let config, configStr = configDom && configDom.html(); + config = configStr? MJson.parse(configStr) : {}; + let boardName = xmlDom.attr('board') ?? ''; + blockPage.getEditor().clear(); + Boards.setSelectedBoard(boardName, config); + let code = codeDom ? codeDom.html() : ''; + if (Base64.isValid(code)) { + code = Base64.decode(code); + } else { + try { + code = util.unescape(code); + code = code.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/g, function (s) { + try { + return decodeURIComponent(s.replace(/_/g, '%')); + } catch (error) { + return s; + } + }); + } catch (error) { + Debug.error(error); + } + } + if (useCode) { + if (!codeDom) { + layer.msg(Msg.Lang['editor.invalidData'], { time: 1000 }); + return; + } + this.drag.full(Drag.Extend.NEGATIVE); // 完全显示代码编辑器 + codePage.diffEdits(code, this.#language_); + endFunc('USE_CODE'); + return; + } + const blockDom = mixDom.find('block'); + const shadowDom = mixDom.find('shadow'); + blockDom.removeAttr('id varid'); + shadowDom.removeAttr('id varid'); + let blocks = []; + let undefinedBlocks = []; + for (let i = 0; blockDom[i]; i++) { + const blockType = $(blockDom[i]).attr('type'); + if (blockType && !blocks.includes(blockType)) + blocks.push(blockType); + } + for (let i = 0; shadowDom[i]; i++) { + const shadowType = $(shadowDom[i]).attr('type'); + if (shadowType && !blocks.includes(shadowType)) + blocks.push(shadowType); + } + const blocklyGenerator = Blockly.generator; + for (let i of blocks) { + if (Blockly.Blocks[i] && blocklyGenerator.forBlock[i]) { + continue; + } + undefinedBlocks.push(i); + } + if (undefinedBlocks.length) { + this.showParseMixErrorDialog(mixDom, undefinedBlocks, endFunc); + return; + } + Blockly.Xml.clearWorkspaceAndLoadFromXml(xmlDom[0], blockPage.getEditor()); + blockPage.getEditor().scrollCenter(); + Blockly.hideChaff(); + if (!useIncompleteBlocks && codeDom && xmlDom.attr('shown') === 'code') { + this.drag.full(Drag.Extend.NEGATIVE); // 完全显示代码编辑器 + codePage.diffEdits(code, this.#language_); + endFunc(); + return; + } + this.drag.full(Drag.Extend.POSITIVE); // 完全显示块编辑器 + if (useIncompleteBlocks) + endFunc('USE_INCOMPLETE_BLOCKS'); + else + endFunc(); + } + + showParseMixErrorDialog(xml, undefinedBlocks, endFunc = () => {}) { + const { PARSE_MIX_ERROR_DIV } = XML.TEMPLATE_STR; + const renderStr = XML.render(PARSE_MIX_ERROR_DIV, { + text: undefinedBlocks.join('
'), + btn1Name: Msg.Lang['editor.cancel'], + btn2Name: Msg.Lang['editor.ignoreBlocks'], + btn3Name: Msg.Lang['editor.loadCode'] + }) + LayerExt.open({ + title: Msg.Lang['editor.parseMixErrorInfo'], + id: 'parse-mix-error-layer', + area: ['50%', '250px'], + max: ['500px', '250px'], + min: ['350px', '100px'], + shade: LayerExt.SHADE_ALL, + content: renderStr, + borderRadius: '5px', + success: (layero, index) => { + $('#parse-mix-error-layer').css('overflow', 'hidden'); + form.render(null, 'parse-mix-error-filter'); + layero.find('button').click((event) => { + layer.close(index); + const mId = $(event.currentTarget).attr('m-id'); + switch (mId) { + case '0': + break; + case '1': + for (let i of undefinedBlocks) { + xml.find('*[type='+i+']').remove(); + } + this.parseMix(xml, false, true, endFunc); + break; + case '2': + this.parseMix(xml, true, false, endFunc); + break; + } + }); + } + }); + } +} + +Mixly.EditorMix = EditorMix; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-monaco.js b/mixly/common/modules/mixly-modules/common/editor-monaco.js new file mode 100644 index 00000000..0c3180f4 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-monaco.js @@ -0,0 +1,396 @@ +goog.loadJs('common', () => { + +goog.require('Diff'); +goog.require('monaco'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Events'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorBase'); +goog.provide('Mixly.EditorMonaco'); + +const { + XML, + Env, + Msg, + Debug, + Events, + HTMLTemplate, + EditorBase +} = Mixly; + + +class EditorMonaco extends EditorBase { + static { + HTMLTemplate.add( + 'html/editor/editor-code.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-code.html'))) + ); + + this.$monaco = $('
'); + this.editor = null; + this.events = new Events(['change']); + + this.addEventsListener = () => { + const { editor } = this; + $('#mixly-footer-cursor').hide(); + + editor.onDidBlurEditorText(() => { + $('#mixly-footer-cursor').hide(); + }); + + editor.onDidFocusEditorText(() => { + const position = editor.getPosition(); + $('#mixly-footer-row').html(position.lineNumber); + $('#mixly-footer-column').html(position.column); + const selection = editor.getSelection(); + if (selection.isEmpty()) { + $('#mixly-footer-selected').parent().hide(); + } else { + const text = editor.getModel().getValueInRange(selection); + $('#mixly-footer-selected').parent().css('display', 'inline-flex'); + $('#mixly-footer-selected').html(text.length); + } + $('#mixly-footer-cursor').show(); + }); + + editor.onDidChangeCursorPosition((e) => { + $('#mixly-footer-row').html(e.position.lineNumber); + $('#mixly-footer-column').html(e.position.column); + }); + + editor.onDidChangeCursorSelection((e) => { + if (e.selection.isEmpty()) { + $('#mixly-footer-selected').parent().hide(); + } else { + const text = editor.getModel().getValueInRange(e.selection); + $('#mixly-footer-selected').parent().css('display', 'inline-flex'); + $('#mixly-footer-selected').html(text.length); + } + }); + + editor.onDidChangeModelContent((...args) => { + this.events.run('change', ...args); + }); + } + + this.getEditor = () => { + return this.editor; + } + + this.getContent = () => { + return this.$monaco; + } + + this.initMonaco = () => { + this.editor = monaco.editor.create(this.$monaco[0], { + theme: 'vs-dark', + disableLayerHinting: true, // 等宽优化 + emptySelectionClipboard: false, // 空选择剪切板 + selectionClipboard: false, // 选择剪切板 + codeLens: true, // 代码镜头 + scrollBeyondLastLine: true, // 滚动完最后一行后再滚动一屏幕 + colorDecorators: true, // 颜色装饰器 + accessibilitySupport: 'off', // 辅助功能支持 "auto" | "off" | "on" + lineNumbers: 'on', // 行号 取值: "on" | "off" | "relative" | "interval" | function + lineNumbersMinChars: 5, // 行号最小字符 number + enableSplitViewResizing: false, + contextmenu: false, + fontSize: 17, + automaticLayout: false, + wordWrap: 'wordWrapColumn', + wordWrapColumn: 300, + scrollbar: { + vertical: 'visible', + horizontal: 'visible', + verticalScrollbarSize: 10, + horizontalScrollbarSize: 10 + } + }); + this.addEventsListener(); + } + + this.initMonaco(); + } + + #readOnly_ = false; + #changeListener_ = null; + #enableChangeEvent_ = true; + #editor_ = null; + #state_ = null; + #tabSize_ = null; + #language_ = null; + #mode_ = null; + + constructor() { + super(); + const editorHTMLTemplate = HTMLTemplate.get('html/editor/editor-code.html'); + this.setContent($(editorHTMLTemplate.render())); + this.addEventsType(['change']); + } + + init() { + super.init(); + this.#editor_ = monaco.editor.createModel(''); + this.#editor_.setEOL(monaco.editor.EndOfLineSequence.LF); + } + + onMounted() { + super.onMounted(); + const editor = EditorMonaco.getEditor(); + editor.setModel(this.#editor_); + if (this.#state_) { + editor.restoreViewState(this.#state_); + } + this.setReadOnly(this.#readOnly_); + this.getContent().append(EditorMonaco.getContent()); + if (!this.#readOnly_) { + this.focus(); + } + this.#addChangeEventListener_(); + } + + disableChangeEvent() { + this.#enableChangeEvent_ = false; + } + + enableChangeEvent() { + this.#enableChangeEvent_ = true; + } + + #addChangeEventListener_() { + const $content = EditorMonaco.getContent(); + this.#changeListener_ = EditorMonaco.events.bind('change', () => { + this.#enableChangeEvent_ && this.runEvent('change'); + }); + } + + #removeChangeEventListener_() { + this.#changeListener_ && EditorMonaco.events.unbind(this.#changeListener_); + this.offEvent('change'); + } + + onUnmounted() { + super.onUnmounted(); + const editor = EditorMonaco.getEditor(); + const $content = EditorMonaco.getContent(); + this.#state_ = editor.saveViewState(); + $content.detach(); + this.getContent().empty(); + this.#removeChangeEventListener_(); + } + + dispose() { + this.#removeChangeEventListener_(); + this.#editor_.dispose(); + super.dispose(); + this.#editor_ = null; + } + + setTheme(mode) { + if (this.#mode_ === mode) { + return; + } + const editor = EditorMonaco.getEditor(); + editor.updateOptions({ + theme: `vs-${mode}` + }); + this.#mode_ = mode; + } + + getTheme() { + return this.#mode_; + } + + setValue(data) { + if (this.getValue() === data) { + return; + } + this.#editor_.setValue(data); + } + + addValue(data) { + const prevData = this.getValue(); + this.setValue(prevData + data); + } + + getValue() { + return this.#editor_.getValue(); + } + + diffEdits(data) { + const prevData = this.getValue(); + if (prevData === data) { + return; + } + const edits = this.buildDiffEdits(prevData, data); + if (!edits.length) { + return; + } + this.#editor_.pushEditOperations([], edits, () => null); + } + + buildDiffEdits(prevData, nextData) { + if (prevData === nextData) { + return []; + } + const diffs = Diff.diffChars(prevData, nextData); + const edits = []; + const state = { + index: 0, + pendingStart: null, + pendingText: '' + }; + for (const d of diffs) { + if (d.added) { + if (state.pendingStart == null) { + state.pendingStart = state.index; + } + state.pendingText += d.value; + } + else if (d.removed) { + if (state.pendingStart == null) { + state.pendingStart = state.index; + } + state.index += d.value.length; + } + else { + this.flushPendingEdit(state, edits); + state.index += d.value.length; + } + } + this.flushPendingEdit(state, edits); + return edits; + } + + flushPendingEdit(state, edits) { + const { pendingStart, index, pendingText } = state; + if (pendingStart == null) { + return; + } + const startPos = this.#editor_.getPositionAt(pendingStart); + const endPos = this.#editor_.getPositionAt(index); + edits.push({ + range: new monaco.Range( + startPos.lineNumber, + startPos.column, + endPos.lineNumber, + endPos.column + ), + text: pendingText, + forceMoveMarkers: true + }); + state.pendingStart = null; + state.pendingText = ''; + } + + clear() { + this.setValue('', true); + } + + scrollToBottom() { + const editor = EditorMonaco.getEditor(); + editor.setScrollTop(editor.getScrollHeight()); + } + + scrollToTop() { + const editor = EditorMonaco.getEditor(); + editor.setScrollTop(0); + } + + resize() { + super.resize(); + const editor = EditorMonaco.getEditor(); + editor.layout(null, true); + } + + undo() { + this.#editor_.undo(); + } + + redo() { + this.#editor_.redo(); + } + + cut() { + const editor = EditorMonaco.getEditor(); + let selection = editor.getSelection(); + let selectedText = this.#editor_.getValueInRange(selection); + if (selection) { + editor.executeEdits('cut', [{ range: selection, text: '' }]); + navigator.clipboard.writeText(selectedText); + } + this.focus(); + } + + copy() { + const editor = EditorMonaco.getEditor(); + editor.trigger('source', 'editor.action.clipboardCopyWithSyntaxHighlightingAction'); + } + + paste() { + const editor = EditorMonaco.getEditor(); + navigator.clipboard.readText() + .then((clipboardText) => { + editor.trigger('source', 'type', { text: clipboardText }); + this.focus(); + }) + .catch(Debug.error); + } + + getEditor() { + return this.#editor_; + } + + setReadOnly(readOnly) { + const editor = EditorMonaco.getEditor(); + editor.updateOptions({ readOnly }); + this.#readOnly_ = readOnly; + } + + setLanguage(language) { + if (this.#language_ === language) { + return; + } + this.#language_ = language; + monaco.editor.setModelLanguage(this.#editor_, language); + } + + getLanguage() { + return this.#language_; + } + + setTabSize(tabSize) { + if (this.#tabSize_ === tabSize) { + return; + } + this.#tabSize_ = tabSize; + this.#editor_.updateOptions({ tabSize }); + } + + setFontSize(fontSize) { + const editor = EditorMonaco.getEditor(); + editor.updateOptions({ fontSize }); + } + + focus() { + const editor = EditorMonaco.getEditor(); + editor.focus(); + } + + commentLine() { + const editor = EditorMonaco.getEditor(); + EditorMonaco.getEditor().trigger('source', 'editor.action.commentLine'); + } + + blockComment() { + const editor = EditorMonaco.getEditor(); + editor.trigger('source', 'editor.action.blockComment'); + } +} + +Mixly.EditorMonaco = EditorMonaco; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-unknown.js b/mixly/common/modules/mixly-modules/common/editor-unknown.js new file mode 100644 index 00000000..5f6c755c --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-unknown.js @@ -0,0 +1,35 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorBase'); +goog.provide('Mixly.EditorUnknown'); + +const { + XML, + Env, + HTMLTemplate, + EditorBase +} = Mixly; + +class EditorUnknown extends EditorBase { + static { + HTMLTemplate.add( + 'html/editor/editor-unknown.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-unknown.html'))) + ); + } + + constructor() { + super(); + this.setContent( + $(HTMLTemplate.get('html/editor/editor-unknown.html').render()) + ); + } +} + +Mixly.EditorUnknown = EditorUnknown; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editor-welcome.js b/mixly/common/modules/mixly-modules/common/editor-welcome.js new file mode 100644 index 00000000..fcc061e1 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editor-welcome.js @@ -0,0 +1,34 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorBase'); +goog.provide('Mixly.EditorWelcome'); + +const { + XML, + Env, + HTMLTemplate, + EditorBase +} = Mixly; + +class EditorWelcome extends EditorBase { + static { + HTMLTemplate.add( + 'html/editor/editor-welcome.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-welcome.html'))) + ); + } + + constructor() { + super(); + this.setContent( + $(HTMLTemplate.get('html/editor/editor-welcome.html').render()) + ); + } +} + +Mixly.EditorWelcome = EditorWelcome; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/editors-manager.js b/mixly/common/modules/mixly-modules/common/editors-manager.js new file mode 100644 index 00000000..b0dc0d21 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/editors-manager.js @@ -0,0 +1,144 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Nav'); +goog.require('Mixly.EditorMix'); +goog.require('Mixly.EditorCode'); +goog.require('Mixly.EditorMd'); +goog.require('Mixly.EditorBlockly'); +goog.require('Mixly.EditorUnknown'); +goog.require('Mixly.EditorWelcome'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Debug'); +goog.require('Mixly.PagesManager'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Electron.FS'); +goog.require('Mixly.Web.FS'); +goog.provide('Mixly.EditorsManager'); + +const { + XML, + Env, + Nav, + EditorMix, + EditorCode, + EditorMd, + EditorBlockly, + EditorUnknown, + EditorWelcome, + Registry, + Debug, + PagesManager, + HTMLTemplate, + Electron = {}, + Web = {} +} = Mixly; + +const { FS } = goog.isElectron? Electron : Web; + +class EditorsManager extends PagesManager { + static { + HTMLTemplate.add( + 'html/editor/editor-manager.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-manager.html'))) + ); + + HTMLTemplate.add( + 'html/editor/editor-tab.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/editor/editor-tab.html'))) + ); + + this.typesRegistry = new Registry(); + this.typesRegistry.register(['.mix', '.mil'], EditorMix); + this.typesRegistry.register(['.txt', '.ino', '.json'], EditorCode); + this.typesRegistry.register('.md', EditorMd); + this.typesRegistry.register('#default', EditorUnknown); + this.typesRegistry.register('#welcome', EditorWelcome); + } + + constructor(element) { + const managerHTMLTemplate = HTMLTemplate.get('html/editor/editor-manager.html'); + const tabHTMLTemplate = HTMLTemplate.get('html/editor/editor-tab.html'); + const $manager = $(managerHTMLTemplate.render()); + const $tab = $(tabHTMLTemplate.render()); + super({ + parentElem: element, + managerContentElem: $manager[0], + bodyElem: $manager.find('.body')[0], + tabElem: $manager.find('.tabs')[0], + tabContentElem: $tab[0], + typesRegistry: EditorsManager.typesRegistry + }); + this.#addEventsListenerExt_(); + } + + #addEventsListenerExt_() { + const editorTabs = this.getTabs(); + + // active Tab被改变时触发 + editorTabs.bind('activeTabChange', (event) => { + const $btnsContainer = Nav.getMain().getEditorBtnsContainer(); + $btnsContainer.children('div').detach(); + const { tabEl } = event.detail; + const id = $(tabEl).attr('data-tab-id'); + const editor = this.get(id); + const $btns = editor.getBtnsContent(); + if ($btns && $btns.length) { + $btnsContainer.removeClass('empty'); + $btnsContainer.children('a').css('display', 'none'); + $btnsContainer.append($btns); + } else { + $btnsContainer.addClass('empty'); + $btnsContainer.children('a').css('display', 'block'); + } + Nav.getMain().resize(); + }); + + // 添加新Tab时触发 + editorTabs.bind('tabCreated', (event) => { + const { tabEl } = event.detail; + const id = $(tabEl).attr('data-tab-id'); + const editor = this.get(id); + FS.isFile(id) + .then((isFile) => { + if (!isFile) { + return; + } + return FS.readFile(id); + }) + .then((data) => { + data && editor.setValue(data, path.extname(id)); + }) + .catch(Debug.error); + const tabs = this.getTabs(); + editor.bind('addDirty', () => { + tabs.updateTab(id, { + title: id + ' - 未保存' + }); + }); + editor.bind('removeDirty', () => { + tabs.updateTab(id, { + title: id + }); + }); + }); + + // 移除已有Tab时触发 + editorTabs.bind('tabDestroyed', (event) => { + if (this.length()) { + return; + } + const $btnsContainer = Nav.getMain().getEditorBtnsContainer(); + $btnsContainer.children('div').detach(); + $btnsContainer.children('a').css('display', 'block'); + $btnsContainer.addClass('empty'); + Nav.getMain().resize(); + }); + } +} + +Mixly.EditorsManager = EditorsManager; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/env.js b/mixly/common/modules/mixly-modules/common/env.js new file mode 100644 index 00000000..683d6e5b --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/env.js @@ -0,0 +1,141 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.Url'); +goog.provide('Mixly.Env'); + +const fs_plus = Mixly.require('fs-plus'); +const electron_remote = Mixly.require('@electron/remote'); +const timers = Mixly.require('node:timers'); +const { Env, Url } = Mixly; + +/** + * 检测是否启用node服务器 + * @type {Boolean} + */ +Env.hasSocketServer = false; + +/** + * 检测是否启用node编译服务器 + * @type {Boolean} + */ +Env.hasCompiler = false; + +/** + * 获取当前mixly的路径 + * @type {String} + */ +Env.clientPath = null; + +/** + * 检测当前系统 + * @type {String} win32、darwin、linux + */ +Env.currentPlatform = goog.platform(); + +/** + * 对于win系统,获取免安装python3的路径,对于mac与linux,则此变量值为python3 + * @type {String} + */ +Env.python3Path = null; + +/** + * 获取mixly.py的路径 + * @type {String} + */ +Env.pyFilePath = null; + +let htmlPath = decodeURIComponent((new URL($('html')[0].baseURI)).pathname); +let baseJsPath = decodeURIComponent((new URL(goog.basePath)).pathname); + +if (goog.isElectron && Env.currentPlatform === 'win32') { + htmlPath = htmlPath.substring(1); + baseJsPath = baseJsPath.substring(1); +} + +/** + * 获取板卡index或主页面index的路径 + * @type {String} + */ +Env.indexDirPath = path.join(htmlPath, '..'); + +/** + * 资源文件夹所在路径 + * @type {String} + */ +Env.srcDirPath = path.join(Env.indexDirPath, '..'); + +/** + * 获取板卡index或主页面index的缩放比例 + * @type {String} + */ +Env.winSize = null; + +/** + * 获取板卡index默认xml + * @type {String} + */ +Env.defaultXML = null; + +/** + * 获取第三方库所用css + * @type {Array} + */ +Env.thirdPartyCSS = []; + +/** + * 获取第三方库所用js + * @type {Array} + */ +Env.thirdPartyJS = []; + +/** + * 默认模板路径 + * @type {String} + */ +Env.templatePath = path.join(baseJsPath, '../templates'); + +/** + * 语言文件路径 + * @type {String} + */ +Env.msgPath = path.join(baseJsPath, '../msg'); + +/** + * 模板index所在路径 + * @type {String} + */ +const urlConfig = Url.getConfig() ?? {}; +Env.boardIndexPath = path.join(Env.indexDirPath, '../', urlConfig.boardIndex ?? 'index.xml'); + +/** + * 模板index所在目录路径 + * @type {String} + */ +Env.boardDirPath = path.join(Env.boardIndexPath, '..'); + +if (goog.isElectron) { + window.setInterval = timers.setInterval; + window.clearInterval = timers.clearInterval; + window.setTimeout = timers.setTimeout; + window.clearTimeout = timers.clearTimeout; + window.setImmediate = timers.setImmediate; + window.clearImmediate = timers.clearImmediate; + const { app } = electron_remote; + if (Env.currentPlatform === 'darwin') { + Env.clientPath = path.join(app.getPath('exe'), '../../../../'); + } else { + Env.clientPath = path.join(app.getPath('exe'), '../'); + } + Env.pyFilePath = path.join(Env.clientPath, 'mixpyBuild/mixly.py'); + if (Env.currentPlatform === 'win32') { + Env.python3Path = path.join(Env.clientPath, 'mixpyBuild/win_python3/python3.exe'); + } else { + Env.python3Path = '/usr/bin/python3'; + if (fs_plus.isFileSync('/usr/local/bin/python3')) { + Env.python3Path = '/usr/local/bin/python3'; + } + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/events.js b/mixly/common/modules/mixly-modules/common/events.js new file mode 100644 index 00000000..1ec7d697 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/events.js @@ -0,0 +1,98 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.MArray'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Debug'); +goog.provide('Mixly.Events'); + +const { + IdGenerator, + MArray, + Registry, + Debug +} = Mixly; + +class Events { + #events_ = new Registry(); + #eventsType_ = null; + + constructor(eventsType = []) { + this.#eventsType_ = eventsType; + } + + addType(eventsType) { + this.#eventsType_ = MArray.unique([...this.#eventsType_, ...eventsType]); + } + + exist(type) { + if (!this.#eventsType_.includes(type)) { + Debug.warn(`${type} event does not exist under the class`); + return false; + } + return true; + } + + bind(type, func) { + if (!this.exist(type)) { + return this; + } + const id = IdGenerator.generate(); + let typeEvent = this.#events_.getItem(type); + if (!typeEvent) { + typeEvent = new Registry(); + this.#events_.register(type, typeEvent); + } + typeEvent.register(id, func); + return id; + } + + unbind(id) { + for (let [_, value] of this.#events_.getAllItems()) { + let typeEvent = value; + if (!typeEvent.getItem(id)) { + continue; + } + typeEvent.unregister(id); + } + return this; + } + + off(type) { + if (this.#events_.getItem(type)) { + this.#events_.unregister(type); + } + return this; + } + + run(type, ...args) { + let outputs = []; + if (!this.exist(type)) { + return outputs; + } + const eventsFunc = this.#events_.getItem(type); + if (!eventsFunc) { + return outputs; + } + for (let [_, func] of eventsFunc.getAllItems()) { + outputs.push(func(...args)); + } + return outputs; + } + + reset() { + this.#events_.reset(); + } + + length(type) { + const typeEvent = this.#events_.getItem(type); + if (typeEvent) { + return typeEvent.length(); + } + return 0; + } +} + +Mixly.Events = Events; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/file-tree.js b/mixly/common/modules/mixly-modules/common/file-tree.js new file mode 100644 index 00000000..4ea1ca68 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/file-tree.js @@ -0,0 +1,998 @@ +goog.loadJs('common', () => { + +goog.require('XScrollbar'); +goog.require('path'); +goog.require('$.jstree'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Config'); +goog.require('Mixly.Events'); +goog.require('Mixly.Menu'); +goog.require('Mixly.ContextMenu'); +goog.require('Mixly.Registry'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Component'); +goog.require('Mixly.HTMLTemplate'); +goog.provide('Mixly.FileTree'); + +const { + Env, + Msg, + Config, + Menu, + Events, + ContextMenu, + Registry, + IdGenerator, + Debug, + Component, + HTMLTemplate +} = Mixly; + +const { USER } = Config; + +class FileTree extends Component { + static { + this.FILE_ICON_MAP = goog.readJsonSync(path.join(Env.templatePath, 'json/file-icons.json')); + this.FOLDER_ICON_MAP = goog.readJsonSync(path.join(Env.templatePath, 'json/folder-icons.json')); + + HTMLTemplate.add( + 'html/file-tree.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/file-tree.html'))) + ); + } + + #$openFolderContent_ = null; + #$folderContent_ = null; + #$rootFolder_ = null; + #$iconTriangle_ = null; + #$iconFolder_ = null; + #$name_ = null; + #$children_ = null; + #$progress_ = null; + #$mask_ = null; + #$fileTree_ = null; + #mprogress_ = null; + #rootFolderOpened_ = false; + #rootPath_ = ''; + #rootName_ = ''; + #rootTitle_ = ''; + #fs_ = null; + #contextMenu_ = null; + #selected_ = null; + #jstree_ = null; + #scrollbar_ = null; + + constructor(fs) { + super(); + const $content = $(HTMLTemplate.get('html/file-tree.html').render()); + this.setContent($content); + this.#$rootFolder_ = $content.find('.folder-title'); + this.#$iconTriangle_ = this.#$rootFolder_.find('.triangle'); + this.#$iconFolder_ = this.#$rootFolder_.find('.folder'); + this.#$name_ = this.#$rootFolder_.find('.name'); + this.#$children_ = $content.find('.children'); + this.#$progress_ = $content.children('.progress'); + this.#$mask_ = $content.children('.mask'); + this.#fs_ = fs; + this.#rootPath_ = ''; + this.#scrollbar_ = new XScrollbar(this.#$children_[0], { + onlyHorizontal: false, + thumbSize: '4px', + thumbRadius: '1px', + thumbBackground: USER.theme === 'dark'? '#b0b0b0' : '#5f5f5f' + }); + this.#$fileTree_ = $(this.#scrollbar_.$content); + this.#$fileTree_.jstree({ + core: { + strings: { + 'Loading ...': Msg.Lang['fileTree.loading'] + '...' + }, + multiple: false, + animation: false, + worker: false, + dblclick_toggle: false, + check_callback: function(operation, node, parent, position, more) { + if(operation === 'copy_node' || operation === 'move_node') { + if(parent.id === '#') { + return false; + } + } + return true; + }, + data: (node, cb) => { + if (!this.#rootPath_) { + cb([]); + return; + } + this.showProgress(); + let folderPath = this.#rootPath_; + if(node.id !== '#') { + let $li = this.#jstree_.get_node(node, true); + let $i = $li.find('.jstree-anchor > .jstree-icon'); + $i.addClass('layui-anim layui-anim-fadein layui-anim-fadeout layui-anim-loop'); + folderPath = node.id; + } + this.#getChildren_(folderPath) + .then((data) => { + cb(data); + }) + .catch(Debug.error) + .finally(() => this.hideProgress()); + }, + themes: { + dots: true, + name: USER.theme === 'light'? 'default' : 'default-dark', + responsive: false, + ellipsis: true + } + }, + plugins: ['wholerow', 'unique'] + }); + this.#jstree_ = this.#$fileTree_.jstree(true); + this.addEventsType([ + 'beforeSelectLeaf', 'afterSelectLeaf', 'afterOpenNode', 'afterCloseNode', 'afterRefreshNode', + 'afterCreateNode', 'afterDeleteNode', 'afterRenameNode' + ]); + this.#addEventsListener_(); + this.#addContextMenu_(); + this.nodeAliveRegistry = new Registry(); + this.delayRefreshRegistry = new Registry(); + this.watchRegistry = new Registry(); + } + + #addEventsListener_() { + this.#$fileTree_ + .on('click.jstree', '.jstree-open>a', ({ target }) => { + setTimeout(() => { + $(target).parent().removeClass('jstree-leaf').addClass('jstree-opened'); + this.#jstree_.close_node(target); + }); + }) + .on('click.jstree', '.jstree-closed>a', ({ target }) => { + setTimeout(() => { + $(target).parent().removeClass('jstree-leaf').addClass('jstree-closed'); + this.#jstree_.open_node(target); + }); + }) + .on('open_node.jstree', (e, data) => { + const { id } = data.node; + let elem = document.getElementById(id); + let $i = $(elem).children('.jstree-anchor').children('.jstree-icon'); + $i.addClass('opened'); + }) + .on('close_node.jstree', (e, data) => { + const { id } = data.node; + let elem = document.getElementById(id); + let $i = $(elem).children('.jstree-anchor').children('.jstree-icon'); + $i.removeClass('opened'); + }) + .on('after_open.jstree', (e, data) => { + const { id } = data.node; + const eventId = this.nodeAliveRegistry.getItem(id); + if (eventId) { + clearTimeout(eventId); + this.nodeAliveRegistry.unregister(id); + } else { + this.watchFolder(id); + } + this.runEvent('afterOpenNode', data); + this.reselect(); + }) + .on('after_close.jstree', (e, data) => { + const { id } = data.node; + const eventId = setTimeout(() => { + this.unwatchFolder(id); + }, 60 * 1000); + if (!this.nodeAliveRegistry.getItem(id)) { + this.nodeAliveRegistry.register(id, eventId); + } + this.runEvent('afterCloseNode', data); + this.reselect(); + }) + .on('changed.jstree', (e, data) => { + const selected = data.instance.get_selected(true); + if (!selected.length) { + // this.#selected_ = null; + return; + } + if ((selected[0].icon || '').indexOf('foldericon') !== -1) { + this.reselect(); + return; + } + if (selected[0].id === this.#selected_) { + return; + } + const result = this.runEvent('beforeSelectLeaf', selected); + if ((result.length && result[0]) || !result.length) { + this.#selected_ = selected[0].id; + this.runEvent('afterSelectLeaf', selected); + } else { + this.deselect(selected[0].id); + this.reselect(); + } + }) + .on('refresh.jstree', (e, data) => { + this.runEvent('afterRefreshNode', data.node); + }) + .on('refresh_node.jstree', (e, data) => { + this.runEvent('afterRefreshNode', data.node); + }); + + this.#$rootFolder_.click(() => { + if (this.isRootFolderOpened()) { + this.closeRootFolder(); + } else { + this.openRootFolder(); + this.reselect(); + } + }); + } + + #addContextMenu_() { + const selector = `div[page-id="${this.getId()}"] .jstree-node, div[page-id="${this.getId()}"] > button`; + this.#contextMenu_ = new ContextMenu(selector, { + zIndex: 300, + events: { + hide: ({ $trigger }) => { + $trigger.removeClass('active'); + }, + activated: ({ $trigger }) => { + $trigger.addClass('active'); + } + } + }); + this.#addFileContextMenuItems_(); + this.#contextMenu_.bind('getMenu', () => 'menu'); + } + + #addFileContextMenuItems_() { + let menu = new Menu(); + menu.add({ + weight: 0, + id: 'new_folder', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['root', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['fileTree.newFolder'], ''), + callback: (_, { $trigger }) => { + const type = $trigger.attr('type'); + if (type === 'root') { + this.openRootFolder(); + this.createRootChildFolderNode(); + } else { + const id = $trigger.attr('id'); + this.createFolderNode(id); + } + } + } + }); + menu.add({ + weight: 1, + id: 'new_file', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['root', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['fileTree.newFile'], ''), + callback: (_, { $trigger }) => { + const type = $trigger.attr('type'); + if (type === 'root') { + this.openRootFolder(); + this.createRootChildFileNode(); + } else { + const id = $trigger.attr('id'); + this.createFileNode(id); + } + } + } + }); + menu.add({ + weight: 2, + id: 'sep1', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['root', 'folder'].includes(type); + }, + data: '---------' + }); + menu.add({ + weight: 3, + id: 'cut', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['file', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.cut'], ''), + callback: (_, { $trigger }) => { + const id = $trigger.attr('id'); + this.cutNode(id); + } + } + }); + menu.add({ + weight: 4, + id: 'copy', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['file', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.copy'], ''), + callback: (_, { $trigger }) => { + const id = $trigger.attr('id'); + this.copyNode(id); + } + } + }); + menu.add({ + weight: 5, + id: 'paste', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['root', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.paste'], ''), + callback: (_, { $trigger }) => { + const type = $trigger.attr('type'); + if (type === 'root') { + this.openRootFolder(); + this.pasteNode('/'); + } else { + const id = $trigger.attr('id'); + this.pasteNode(id); + } + } + } + }); + menu.add({ + weight: 6, + id: 'sep2', + data: '---------' + }); + menu.add({ + weight: 7, + id: 'copy_path', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['fileTree.copyPath'], ''), + callback: (_, { $trigger }) => { + let outPath = null; + const type = $trigger.attr('type'); + if (type === 'root') { + outPath = this.#rootPath_; + } else { + outPath = $trigger.attr('id'); + } + navigator.clipboard.writeText(outPath) + .catch(Debug.error); + } + } + }); + menu.add({ + weight: 8, + id: 'rename', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['file', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['fileTree.rename'], ''), + callback: (_, { $trigger }) => { + const type = $trigger.attr('type'); + const id = $trigger.attr('id'); + if (type === 'folder') { + this.renameFolderNode(id); + } else { + this.renameFileNode(id); + } + } + } + }); + menu.add({ + weight: 9, + id: 'del', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + return ['file', 'folder'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['fileTree.delete'], ''), + callback: (_, { $trigger }) => { + const type = $trigger.attr('type'); + const id = $trigger.attr('id'); + if (type === 'folder') { + if (this.#selected_) { + const relative = path.relative(id, this.#selected_); + if (relative.indexOf('../') !== 0) { + this.deselect(this.#selected_); + } + } + this.deleteFolderNode(id); + } else { + if (this.#selected_ === id) { + this.deselect(id); + } + this.deleteFileNode(id); + } + } + } + }); + this.#contextMenu_.register('menu', menu); + } + + getContextMenu() { + return this.#contextMenu_; + } + + openRootFolder() { + if (this.isRootFolderOpened()) { + return; + } + this.#$iconTriangle_.removeClass('codicon-chevron-right'); + this.#$iconTriangle_.addClass('codicon-chevron-down'); + this.#$iconFolder_.addClass('opened'); + this.#$rootFolder_.addClass('opened'); + this.#$children_.css('display', 'block'); + this.#rootFolderOpened_ = true; + } + + closeRootFolder() { + if (!this.isRootFolderOpened()) { + return; + } + this.#$iconTriangle_.removeClass('codicon-chevron-down'); + this.#$iconTriangle_.addClass('codicon-chevron-right'); + this.#$iconFolder_.removeClass('opened'); + this.#$rootFolder_.removeClass('opened'); + this.#$children_.css('display', 'none'); + const selected = this.#selected_; + this.deselectAll(); + this.#selected_ = selected; + this.#rootFolderOpened_ = false; + } + + isRootFolderOpened() { + return this.#rootFolderOpened_; + } + + setFolderPath(folderPath) { + let newFolderPath = path.join(folderPath); + if (newFolderPath === this.#rootPath_) { + this.#jstree_.refresh(); + return; + } + if (this.#rootPath_) { + this.unwatchFolder(this.#rootPath_); + } + this.#rootPath_ = newFolderPath; + this.nodeAliveRegistry.reset(); + this.#jstree_.refresh(); + this.watchFolder(this.#rootPath_); + this.setRootFolderTitle(this.#rootPath_); + const rootNodeName = path.basename(folderPath).toUpperCase(); + this.setRootFolderName(rootNodeName); + } + + getFolderPath() { + return this.#rootPath_; + } + + setRootFolderName(name) { + this.#rootName_ = name; + this.#$name_.text(name); + } + + getRootFolderName() { + return this.#rootName_; + } + + setRootFolderTitle(name) { + this.#rootTitle_ = name; + this.#$rootFolder_.attr('title', name); + } + + getRootFolderTitle() { + return this.#rootTitle_; + } + + refreshFolder(folderPath) { + // 延迟刷新节点,防止过于频繁的IO操作 + let eventId = this.delayRefreshRegistry.getItem(folderPath); + if (eventId) { + clearTimeout(eventId); + this.delayRefreshRegistry.unregister(folderPath); + } + eventId = setTimeout(() => { + if (folderPath === this.#rootPath_) { + this.#jstree_.refresh(); + return; + } + const node = this.#jstree_.get_node(folderPath); + const nodeIsOpened = node && !this.isClosed(folderPath); + if (nodeIsOpened) { + this.watchFolder(folderPath); + this.clearFolderTemp(folderPath); + this.#jstree_.refresh_node(folderPath); + } else { + this.unwatchFolder(folderPath); + } + }, 500); + this.delayRefreshRegistry.register(folderPath, eventId); + } + + clearFolderTemp(folderPath) { + const node = this.#jstree_.get_node(folderPath); + if (!node) { + return; + } + node.state.loaded = false; + } + + watchFolder(folderPath) { + if (this.isWatched(folderPath)) { + return; + } + this.watchRegistry.register(folderPath, 'folder'); + } + + unwatchFolder(folderPath) { + if (!this.isWatched(folderPath)) { + return; + } + this.clearFolderTemp(folderPath); + const keys = this.nodeAliveRegistry.keys(); + for (let key of keys) { + if (key.indexOf(folderPath) === -1) { + continue; + } + const eventId = this.nodeAliveRegistry.getItem(key); + if (eventId) { + clearTimeout(eventId); + this.nodeAliveRegistry.unregister(key); + } + } + this.watchRegistry.unregister(folderPath); + } + + watchFile(filePath) {} + + unwatchFile(filePath) {} + + isWatched(inPath) { + return !!this.watchRegistry.getItem(inPath); + } + + isClosed(inPath) { + return this.#jstree_.is_closed(inPath); + } + + select(inPath) { + let elem = document.getElementById(inPath); + if (!elem) { + this.#selected_ = null; + return; + } + this.#selected_ = inPath; + this.#jstree_.select_node(inPath, true, true); + $(elem).children('.jstree-wholerow').addClass('jstree-wholerow-clicked'); + } + + reselect() { + if (!this.#selected_) { + return; + } + let elem = document.getElementById(this.#selected_); + if (!elem) { + return; + } + this.#jstree_.select_node(this.#selected_, true, true); + $(elem).children('.jstree-wholerow').addClass('jstree-wholerow-clicked'); + } + + deselect(inPath) { + if (this.#selected_ === inPath) { + this.#selected_ = null; + } + let elem = document.getElementById(inPath); + if (!elem) { + return; + } + this.#jstree_.deselect_node(elem, true); + $(elem).children('.jstree-wholerow').removeClass('jstree-wholerow-clicked'); + } + + deselectAll() { + this.#selected_ = null; + this.#jstree_.deselect_all(); + } + + getSelectedNodeId() { + return this.#selected_; + } + + getNode(inPath) { + return this.#jstree_.get_node(inPath); + } + + getSelectedNodes() { + return this.#jstree_.get_selected(true); + } + + async #getChildren_(inPath) { + let output = []; + const content = await this.readFolder(inPath); + for (let item of content) { + const { type, id, title, children } = item; + const text = item.text ?? path.basename(id); + let icon = item.icon ?? 'icon-doc'; + if (!item.icon) { + if (type === 'folder') { + icon = this.#getFolderIcon_(text); + } else { + icon = this.#getFileIcon_(text); + } + } + output.push({ + text, + id, + children, + li_attr: { + type, + name: text, + title: title ?? id + }, + icon + }); + } + return output; + } + + async readFolder(inPath) { + return []; + } + + #getFileIcon_(filename) { + const prefix = 'fileicon-'; + if (FileTree.FILE_ICON_MAP[filename]) { + return prefix + FileTree.FILE_ICON_MAP[filename]; + } + const extname = path.extname(filename).toLowerCase(); + if (FileTree.FILE_ICON_MAP[extname]) { + return prefix + FileTree.FILE_ICON_MAP[extname]; + } + return prefix + FileTree.FILE_ICON_MAP['default']; + } + + #getFolderIcon_(foldername) { + const prefix = 'foldericon-'; + if (FileTree.FOLDER_ICON_MAP[foldername]) { + return prefix + FileTree.FOLDER_ICON_MAP[foldername]; + } + return prefix + FileTree.FOLDER_ICON_MAP['default']; + } + + createRootChildNode(type) { + this.showProgress(); + this.hideMask(); + const node = this.#jstree_.get_node('#'); + const children = false; + let icon = 'foldericon-default'; + if (type === 'file') { + icon = 'fileicon-mix'; + } + const folderPath = this.#rootPath_; + this.#jstree_.create_node(node, { children, icon }, 'first', (childNode) => { + this.#jstree_.edit(childNode, '', (newNode) => { + this.showMask(); + const desPath = path.join(folderPath, newNode.text); + this.#jstree_.delete_node(newNode); + const oldNode = this.#jstree_.get_node(desPath); + if (oldNode || !newNode.text) { + this.hideProgress(); + return; + } + let createPromise = null; + if (type === 'file') { + createPromise = this.#fs_.createFile(desPath); + } else { + createPromise = this.#fs_.createDirectory(desPath); + } + createPromise + .catch(Debug.error) + .finally(() => { + this.hideProgress(); + this.runEvent('afterCreateNode', folderPath); + }); + }); + }); + } + + createRootChildFileNode() { + this.createRootChildNode('file'); + } + + createRootChildFolderNode() { + this.createRootChildNode('folder'); + } + + createNode(type, folderPath) { + this.showProgress(); + this.hideMask(); + const node = this.#jstree_.get_node(folderPath); + const children = false; + let icon = 'foldericon-default'; + if (type === 'file') { + icon = 'fileicon-mix'; + } + if (folderPath === '#') { + folderPath = this.#rootPath_; + } + this.#jstree_.open_node(node, () => { + this.#jstree_.create_node(node, { children, icon }, 'first', (childNode) => { + this.#jstree_.edit(childNode, '', (newNode) => { + this.showMask(); + this.#jstree_.delete_node(newNode); + if (!newNode.text) { + this.hideProgress(); + return; + } + const desPath = path.join(folderPath, newNode.text); + const parentNode = this.#jstree_.get_node(folderPath) ?? {}; + for (let nodeId of parentNode.children ?? []) { + if (nodeId !== desPath) { + continue; + } + this.hideProgress(); + return; + } + let createPromise = null; + if (type === 'file') { + createPromise = this.#fs_.createFile(desPath); + } else { + createPromise = this.#fs_.createDirectory(desPath); + } + createPromise + .catch(Debug.error) + .finally(() => { + this.hideProgress(); + this.runEvent('afterCreateNode', folderPath); + }); + }); + }); + }); + } + + createFileNode(folderPath) { + this.createNode('file', folderPath); + } + + createFolderNode(folderPath) { + this.createNode('folder', folderPath); + } + + renameNode(type, inPath) { + this.showProgress(); + this.hideMask(); + const node = this.#jstree_.get_node(inPath); + const oldNodeName = node.text; + this.#jstree_.edit(node, oldNodeName, (newNode) => { + this.showMask(); + const folderPath = path.join(inPath, '..'); + const desPath = path.join(folderPath, newNode.text); + this.#jstree_.close_node(newNode); + if (oldNodeName === newNode.text) { + this.hideProgress(); + return; + } + this.#jstree_.rename_node(newNode, oldNodeName); + const parentNode = this.#jstree_.get_node(folderPath) ?? {}; + for (let nodeId of parentNode.children ?? []) { + if (nodeId !== desPath) { + continue; + } + this.hideProgress(); + return; + } + let renamePromise = null; + if (type === 'file') { + renamePromise = this.#fs_.renameFile(inPath, desPath); + } else { + renamePromise = this.#fs_.renameDirectory(inPath, desPath); + } + renamePromise + .catch(Debug.error) + .finally(() => { + this.hideProgress(); + this.runEvent('afterRenameNode', path.join(inPath, '..')); + }); + }); + } + + renameFileNode(filePath) { + this.renameNode('file', filePath); + } + + renameFolderNode(folderPath) { + this.renameNode('folder', folderPath); + } + + deleteNode(type, inPath) { + this.showProgress(); + let deletePromise = null; + if (type === 'file') { + deletePromise = this.#fs_.deleteFile(inPath); + } else { + deletePromise = this.#fs_.deleteDirectory(inPath); + } + deletePromise + .catch(Debug.error) + .finally(() => { + this.hideProgress(); + this.runEvent('afterDeleteNode', path.join(inPath, '..')); + }); + } + + deleteFileNode(filePath) { + this.deleteNode('file', filePath); + } + + deleteFolderNode(folderPath) { + this.deleteNode('folder', folderPath); + } + + copyNode(inPath) { + const node = this.#jstree_.get_node(inPath); + this.#jstree_.copy(node); + } + + cutNode(inPath) { + const node = this.#jstree_.get_node(inPath); + this.#jstree_.cut(node); + } + + pasteNode(folderPath) { + if (!this.#jstree_.can_paste()) { + return; + } + this.showProgress(); + const oldNodes = this.#jstree_.get_buffer(); + const oldNode = oldNodes.node[0]; + const { mode } = oldNodes; + const { type } = oldNode.li_attr; + let pastePromise = null; + let startPath = oldNode.id; + let endPath = path.join(folderPath, oldNode.text); + if (mode === 'move_node') { + const relativePath = path.relative(startPath, endPath); + if (relativePath.indexOf('..') === -1) { + pastePromise = Promise.resolve(); + } else { + if (type === 'file') { + pastePromise = this.#fs_.moveFile(startPath, endPath); + } else { + pastePromise = this.#fs_.createDirectory(endPath) + .then(() => { + return this.#fs_.moveDirectory(startPath, endPath); + }); + } + } + } else if (mode === 'copy_node') { + if (type === 'file') { + pastePromise = this.#fs_.copyFile(startPath, endPath); + } else { + pastePromise = this.#fs_.createDirectory(endPath) + .then(() => { + return this.#fs_.copyDirectory(startPath, endPath); + }); + } + } + pastePromise + .then(async () => { + if (mode === 'move_node') { + const temp = path.join(startPath, '..'); + const relativePath = path.relative(temp, endPath); + if (relativePath.indexOf('..') === -1) { + this.clearFolderTemp(temp); + await this.loadNode(temp); + await this.openNode(temp); + this.clearFolderTemp(folderPath); + await this.loadNode(folderPath); + await this.openNode(folderPath); + } else { + this.clearFolderTemp(folderPath); + await this.loadNode(folderPath); + await this.openNode(folderPath); + this.clearFolderTemp(temp); + await this.loadNode(temp); + await this.openNode(temp); + } + } else { + this.clearFolderTemp(folderPath); + this.#jstree_.refresh_node(folderPath); + this.openNode(folderPath); + } + }) + .catch(Debug.error) + .finally(() => { + this.hideProgress(); + }); + } + + loadNode(inPath) { + return new Promise((resolve, reject) => { + if (inPath === '/') { + inPath = '#'; + } + const node = this.#jstree_.get_node(inPath); + if (!node) { + resolve(); + } + this.#jstree_.load_node(node, () => { + resolve(); + }); + }); + } + + openNode(folderPath) { + return new Promise((resolve, reject) => { + const node = this.#jstree_.get_node(folderPath); + if (!node) { + resolve(); + } + this.#jstree_.open_node(node, () => { + resolve(); + }); + }); + } + + dispose() { + this.#jstree_.destroy(); + this.#scrollbar_.destroy(); + this.#contextMenu_.dispose(); + super.dispose(); + } + + getFS() { + return this.#fs_; + } + + setFS(fs) { + this.#fs_ = fs; + } + + showProgress() { + this.#$progress_.css('display', 'block'); + this.showMask(); + } + + hideProgress() { + this.#$progress_.css('display', 'none'); + this.hideMask(); + } + + showMask() { + this.#$mask_.css('display', 'block'); + } + + hideMask() { + this.#$mask_.css('display', 'none'); + } +} + +Mixly.FileTree = FileTree; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/file.js b/mixly/common/modules/mixly-modules/common/file.js new file mode 100644 index 00000000..ebfa1321 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/file.js @@ -0,0 +1,43 @@ +goog.loadJs('common', () => { + +goog.provide('Mixly.File'); + +class File { + static { + this.showOpenFilePicker = async () => { + return new Promise((resolve, reject) => { + reject(); + }); + } + + this.showDirectoryPicker = async () => { + return new Promise((resolve, reject) => { + reject(); + }); + } + + this.showSaveFilePicker = async () => { + return new Promise((resolve, reject) => { + reject(); + }); + } + } + + constructor() {} + + async readFile() { + return new Promise((resolve, reject) => { + reject(); + }); + } + + async writeFile(data) { + return new Promise((resolve, reject) => { + reject(); + }); + } +} + +Mixly.File = File; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/footerbar.js b/mixly/common/modules/mixly-modules/common/footerbar.js new file mode 100644 index 00000000..68e29f22 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/footerbar.js @@ -0,0 +1,94 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Config'); +goog.require('Mixly.Boards'); +goog.require('Mixly.FooterLayer'); +goog.require('Mixly.FooterLayerBoardConfig'); +goog.require('Mixly.FooterLayerMessage'); +goog.require('Mixly.Component'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Electron.FooterLayerExample'); +goog.require('Mixly.Web.FooterLayerExample'); +goog.provide('Mixly.FooterBar'); + +const { + Env, + XML, + Msg, + Config, + Boards, + FooterLayer, + FooterLayerBoardConfig, + FooterLayerMessage, + Component, + HTMLTemplate, + Electron = {}, + Web = {} +} = Mixly; + +const { FooterLayerExample } = goog.isElectron? Electron : Web; + +const { BOARD } = Config; + + +class FooterBar extends Component { + static { + HTMLTemplate.add( + 'html/footerbar.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/footerbar.html'))) + ); + } + + #exampleLayer_ = null; + #messageLayer_ = null; + #boardConfigLayer_ = null; + + constructor() { + super(); + let content = $(HTMLTemplate.get('html/footerbar.html').render({ + outputAceName: Msg.Lang['footerbar.output'], + row: Msg.Lang['footerbar.cursor.row'], + column: Msg.Lang['footerbar.cursor.column'], + unknown: Msg.Lang['footerbar.board.unknown'], + config: Msg.Lang['footerbar.config'], + selected: Msg.Lang['footerbar.cursor.selected'], + on: Msg.Lang['footerbar.board.on'], + message: Msg.Lang['footerbar.message'], + example: Msg.Lang['footerbar.examples'] + })); + Boards.init(); + this.setContent(content); + content.find('.code-lang').html(BOARD.language ?? Msg.Lang['footerbar.language.unknown']); + this.#exampleLayer_ = new FooterLayerExample(content.find('.example')[0]); + this.#messageLayer_ = new FooterLayerMessage(content.find('.message')[0]); + this.#boardConfigLayer_ = new FooterLayerBoardConfig(content.find('.board-config')[0], Boards.dict); + Boards.addLayer(this.#boardConfigLayer_); + } + + resize() { + super.resize(); + this.#exampleLayer_.resize(); + this.#messageLayer_.resize(); + this.#boardConfigLayer_.resize(); + } + + getExampleLayer() { + return this.#exampleLayer_; + } + + getMessageLayer() { + return this.#messageLayer_; + } + + getBoardConfigLayer() { + return this.#boardConfigLayer_; + } +} + +Mixly.FooterBar = FooterBar; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/footerlayer-board-config.js b/mixly/common/modules/mixly-modules/common/footerlayer-board-config.js new file mode 100644 index 00000000..fa69483d --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/footerlayer-board-config.js @@ -0,0 +1,226 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('tippy'); +goog.require('Blockly'); +goog.require('layui'); +goog.require('$.select2'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.FooterLayer'); +goog.provide('Mixly.FooterLayerBoardConfig'); + +const { + FooterLayer, + Env, + XML, + Msg, + HTMLTemplate +} = Mixly; + +const { dropdown } = layui; + +class FooterLayerBoardConfig extends FooterLayer { + static { + // 弹层模板 + this.menuHTMLTemplate = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/footerlayer/footerlayer-board-config.html')) + ); + } + + /** + * @param domId { string } 绑定dom的id + * @param boardsInfo { obj } 板卡配置信息 + { + "xxx板卡": BoardConfigItem, + ... + } + * @return { FooterLayerBoardConfig obj } + **/ + #canvas_ = null; + constructor(element, boardsInfo) { + super(element, { + onHidden: (instance) => { + this.boardsInfo[this.boardName].writeSelectedOptions(); + }, + onMount: (instance) => { + if (this.renderBoardName === this.boardName) { + return; + } + this.renderMenu(); + }, + btns: [ + { + class: 'reset', + title: Msg.Lang['footerbar.config.default'], + icon: 'layui-icon-refresh-1', + onclick: () => { + const selectedBoardName = this.boardName; + let { defaultOptions } = this.boardsInfo[selectedBoardName]; + this.setSelectedOptions(defaultOptions); + } + } + ] + }); + this.$content.addClass('footer-layer-board-config'); + this.$footerContainer = $(element); + this.boardsInfo = boardsInfo; + // 当前用户所选择的板卡 + this.boardName = null; + // 当前渲染的板卡配置所对应的板卡名 + this.renderBoardName = null; + this.dropdownItems = {}; + } + + getSelectedParams() { + let paramList = []; + let { ignore, selectedOptions } = this.boardsInfo[this.boardName]; + for (let i in selectedOptions) { + if (ignore.includes(i)) { + continue; + } + paramList.push(i + '=' + selectedOptions[i].key); + } + let { boardKey } = this; + const index = boardKey.indexOf('@'); + if (index !== -1) { + boardKey = boardKey.substring(0, index); + } + return paramList.length ? (boardKey + ':' + paramList.join(',')) : boardKey; + } + + getSelectedParamByName(name) { + let { selectedOptions } = this.boardsInfo[this.boardName]; + for (let i in selectedOptions) { + if (i === name) { + return selectedOptions[i].key; + } + } + return ''; + } + + renderMenu() { + let { options, selectedOptions } = this.boardsInfo[this.boardName]; + this.renderTemplate(options); + this.renderOptions(options); + this.setSelectedOptions(selectedOptions); + this.renderBoardName = this.boardName + } + + setSelectedOptions(selectedOptions) { + // 每次打开板卡设置窗口时设置其默认选中项 + const boardsInfo = this.boardsInfo[this.boardName]; + let optionsType = Object.keys(boardsInfo.defaultOptions); + for (let i in selectedOptions) { + if (!boardsInfo.defaultOptions[i]) { + continue; + } + let id = boardsInfo.defaultOptions[i].key; + if (boardsInfo.optionIsLegal(i, selectedOptions[i])) { + id = selectedOptions[i].key; + } + this.$body.find(`[mid=${i}]`).val(id).trigger('change'); + boardsInfo.setSelectedOption(i, selectedOptions[i]); + } + // 重新计算窗口的位置 + this.setProps({}); + } + + renderOptions(options) { + const _this = this; + for (let item of options) { + this.createDropdownMenu(item.key, item.options); + this.createMessageLayer(item.key, item.messageId); + } + } + + createMessageLayer(mId, messageId) { + if (!messageId) { + return; + } + if (!Blockly.Msg[messageId]) { + return; + } + let $container = this.$body.find(`[mid="${mId}-label"]`); + tippy($container[0], { + content: Blockly.Msg[messageId], + allowHTML: true, + interactive: true, + placement: 'left', + offset: [0, 16] + }); + } + + createDropdownMenu(mId, options) { + let $container = this.$body.find(`[mid="${mId}"]`); + if (!$container.length) { + return; + } + let menu = []; + let maxLength = 0; + for (let item of options) { + menu.push({ + id: item.id, + text: item.title + }); + let nowLength = this.getStrWidth(item.title); + if (maxLength < nowLength) { + maxLength = nowLength; + } + } + $container.select2({ + data: menu, + minimumResultsForSearch: Infinity, + width: 'auto', + dropdownCssClass: 'mixly-scrollbar select2-board-config' + }); + $container.next().css('min-width', (maxLength + 30) + 'px'); + $container.on('select2:select', (e) => { + const boardName = this.boardName; + const data = e.params.data; + this.boardsInfo[boardName].setSelectedOption(mId, { + key: data.id, + label: data.text + }); + this.setProps({}); + }); + } + + renderTemplate(options) { + this.$body.find('select').select2('destroy'); + const xmlStr = FooterLayerBoardConfig.menuHTMLTemplate.render({ options }); + this.updateContent(xmlStr); + } + + changeTo(boardName) { + if (this.boardsInfo[boardName]?.options.length) { + this.$footerContainer.css('display', 'inline-flex'); + } else { + this.$footerContainer.css('display', 'none'); + this.hide(); + } + this.boardName = boardName; + this.boardKey = this.boardsInfo[boardName].key; + this.renderMenu(this.layer); + } + + getStrWidth(str, font = '14px Arial') { + try { + this.#canvas_ = this.#canvas_ || document.createElement('canvas').getContext('2d'); + this.#canvas_.font = font; + return this.#canvas_.measureText(str).width; + } catch (e) { + return 0; + } + } + + resize() { + this.$body.find('select').select2('close'); + } +} + +Mixly.FooterLayerBoardConfig = FooterLayerBoardConfig; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/footerlayer-example.js b/mixly/common/modules/mixly-modules/common/footerlayer-example.js new file mode 100644 index 00000000..aaf29b90 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/footerlayer-example.js @@ -0,0 +1,86 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.Title'); +goog.require('Mixly.Env'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.FooterLayer'); +goog.provide('Mixly.FooterLayerExample'); + +const { + Title, + Env, + Debug, + Workspace, + HTMLTemplate, + FooterLayer +} = Mixly; + +const { dropdown, tree } = layui; + +class FooterLayerExample extends FooterLayer { + static { + // 弹层模板 + this.menuHTMLTemplate = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/footerlayer/footerlayer-example.html')) + ); + } + + constructor(element) { + super(element, { + onMount: (instance) => { + this.examplesTree.reload({ data: this.getRoot() }); + } + }); + this.$content.addClass('footer-layer-example'); + this.updateContent(FooterLayerExample.menuHTMLTemplate.render()); + this.$treeBody = this.$body.children('.example-tree-body'); + this.DEPTH = 5; + this.render(); + } + + render() { + this.examplesTree = tree.render({ + elem: this.$treeBody[0], + data: this.getRoot(), + accordion: true, + anim: false, + icon: [ 'icon-folder-empty', 'icon-folder-open-empty-1', 'icon-file-code' ], + getChildren: (obj) => { + return this.getChildren(obj.data.id); + }, + click: (obj) => { + if (obj.data.children) { + return; + } + this.dataToWorkspace(obj.data.id); + }, + statusChange: () => { + this.setProps({}); + } + }); + this.examplesTree.config.statusChange(); + } + + // 可覆盖 + getRoot() {} + + // 可覆盖 + getChildren(inPath) {} + + // 可覆盖 + dataToWorkspace(inPath) {} + + updateCode(ext, data) { + const editorMix = Workspace.getMain().getEditorsManager().getActive(); + editorMix.setValue(data, ext); + Title.updateTitle(Title.title); + } +} + +Mixly.FooterLayerExample = FooterLayerExample; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/footerlayer-message.js b/mixly/common/modules/mixly-modules/common/footerlayer-message.js new file mode 100644 index 00000000..316e6385 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/footerlayer-message.js @@ -0,0 +1,204 @@ +goog.loadJs('common', () => { + +goog.require('shortid'); +goog.require('path'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Env'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.FooterLayer'); +goog.provide('Mixly.FooterLayerMessage'); + +const { + XML, + Msg, + Env, + HTMLTemplate, + FooterLayer +} = Mixly; + +class FooterLayerMessage extends FooterLayer { + // 弹层模板 + static { + this.menuHTMLTemplate = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/footerlayer/footerlayer-message.html')) + ); + + this.menuItemHTMLTemplate = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/footerlayer/footerlayer-message-item.html')) + ); + + this.menuItemWithIconHTMLTemplate = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/footerlayer/footerlayer-message-item-with-icon.html')) + ); + + this.STYLES = ['primary', 'secondary', 'success', 'danger', 'warning']; + } + + constructor(element) { + super(element, { + onMount: (instance) => { + this.$body.scrollTop(this.$container.parent().prop('scrollHeight')); + }, + btns: [ + { + class: 'clear', + title: Msg.Lang['footerbar.message.clear'], + icon: 'layui-icon-delete', + onclick: () => { + this.clear(); + } + } + ] + }); + this.DEFALUT_ITEM_CONFIG = { + type: 0, + style: 'primary', + src: '../common/media/mixly.png', + name: '', + onCreate: (obj) => {}, + onDestroy: () => {}, + btns: [], + checkbox: false + }; + const { menuHTMLTemplate } = FooterLayerMessage; + this.updateContent(menuHTMLTemplate.render()); + this.messageQuery = []; + this.$content.addClass('footer-layer-message'); + this.$container = this.$content.find('.toast-container'); + this.clear(); + } + + append(config) { + config.operate = 'append'; + if (!this.$container.length) { + this.messageQuery.push(config); + if (this.messageQuery.length > 50) { + this.messageQuery.shift(); + } + return; + } + this.add_(config); + } + + add_(config) { + config = { ...this.DEFALUT_ITEM_CONFIG, ...config }; + this.$body.css('width', '350px'); + let $children = this.$container.children('div'); + if (!$children.length) { + this.$container.html(''); + } else if ($children.length >= 50) { + for (let i = 0; i <= $children.length - 50; i++) { + $($children[i]).remove(); + } + } + if (!FooterLayerMessage.STYLES.includes(config.style)) { + config.style = FooterLayerMessage.STYLES[0]; + } + + let btnsFunc = []; + config.btns = config.btns ?? []; + for (let i in config.btns) { + if (!(config.btns[i] instanceof Object)) { + continue; + } + btnsFunc.push(config.btns[i].onclick); + delete config.btns[i].onclick; + config.btns[i].mId = i; + } + + let checkbox = { + checked: '', + show: false, + title: '' + }; + if (config.checkbox instanceof Object) { + checkbox.id = shortid.generate(); + checkbox.show = true; + checkbox.title = config.checkbox.title; + checkbox.checked = config.checkbox.checked ? 'checked' : ''; + } + let template = this.genItemTemplate({ + type: config.type, + style: config.style, + src: config.src, + name: config.name, + message: config.message, + btns: config.btns, + checkbox + }); + let $template = $(template); + this.$container.append($template); + this.createBtnsClickEvent_($template, config.checkbox, btnsFunc); + this.scrollToBottom(); + this.setProps({}); + if (typeof config.onCreate === 'function') { + config.onCreate($template); + } + if (typeof config.onDestroy === 'function') { + $template.find('.btn-close[data-bs-dismiss="toast"]').off().click(() => { + $template.remove(); + if (!this.$container.children('div').length) { + this.clear(); + } + config.onDestroy(); + }); + } + } + + createBtnsClickEvent_(container, checkbox, btnsFunc) { + container.find('.btns').children('button').off().click((event) => { + let $target = $(event.target); + let mId = parseInt($target.attr('m-id')); + let checkboxValue = null; + if (checkbox) { + checkboxValue = container.find('input[class="form-check-input"]').prop('checked'); + } + if (typeof btnsFunc[mId] === 'function') { + btnsFunc[mId](event, container, checkboxValue); + } + if (!this.$container.children('div').length) { + this.clear(); + } + }); + } + + remove() { + if (!this.$container.children('div').length) { + return; + } + $container.eq(-1).remove(); + } + + clear() { + this.$container.html(Msg.Lang['footerbar.message.empty']); + this.$body.css('width', '100px'); + this.setProps({}); + } + + genItemTemplate(items) { + const { + menuItemWithIconHTMLTemplate, + menuItemHTMLTemplate + } = FooterLayerMessage; + let htmlTemplate; + if (items.type === 1) { + htmlTemplate = menuItemWithIconHTMLTemplate; + } else { + htmlTemplate = menuItemHTMLTemplate; + } + return htmlTemplate.render(items); + } + + scrollToTop() { + this.$body.scrollTop(0); + } + + scrollToBottom() { + this.$body.scrollTop(this.$body.prop('scrollHeight')); + } +} + +Mixly.FooterLayerMessage = FooterLayerMessage; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/footerlayer.js b/mixly/common/modules/mixly-modules/common/footerlayer.js new file mode 100644 index 00000000..e6ddf26b --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/footerlayer.js @@ -0,0 +1,115 @@ +goog.loadJs('common', () => { + +goog.require('tippy'); +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.provide('Mixly.FooterLayer'); + +const { Env, XML, Msg } = Mixly; + +class FooterLayer { + static { + // 弹层模板和一些默认配置项 + this.TEMPLATE = goog.readFileSync(path.join(Env.templatePath, 'html/footerlayer/footerlayer.html')); + this.DEFAULT_CONFIG_TIPPY = { + allowHTML: true, + trigger: 'manual', + interactive: true, + hideOnClick: false, + maxWidth: 'none', + offset: [ 0, 6 ], + delay: 0, + duration: [ 0, 0 ] + }; + } + + /** + * @param domId 被绑定元素的ID + * @param config 配置项 + { + ...DEFAULT_CONFIG_TIPPY + } + **/ + constructor(element, config) { + this.config = { + ...FooterLayer.DEFAULT_CONFIG_TIPPY, + ...(config ?? {}) + }; + this.btns = config.btns ?? []; + this.btnsClickEvent = {}; + this.element = element; + this.layer = null; + this.#create_(); + this.#addSharedMethod_(); + this.setContent(XML.render(FooterLayer.TEMPLATE, { + content: '', + btns: this.btns, + close: Msg.Lang['footerlayer.close'] + })); + this.$content = $(this.layer.popper).find('.tippy-content'); + this.$body = this.$content.find('.footer-layer-body'); + this.#addContainerClickEvent_(); + this.#addBtnsClickEvent_(); + } + + #create_() { + this.layer = tippy(this.element, this.config); + } + + updateContent(content) { + if (this.$body.length) { + this.$body.html(content); + } else { + this.setContent(content); + } + } + + #addBtnsClickEvent_() { + for (let i of this.btns) { + if (!(i instanceof Object)) { + continue; + } + if (typeof i.onclick !== 'function' || !(i.class)) { + continue; + } + this.btnsClickEvent[i.class] = i.onclick; + delete i.onclick; + } + this.btnsClickEvent['close'] = this.hide; + for (let key in this.btnsClickEvent) { + $(this.layer.popper).find('.layui-layer-title').children(`.${key}`) + .off().click(() => { + this.btnsClickEvent[key](); + }); + } + } + + #addSharedMethod_() { + let sharedMethod = ['hide', 'show', 'destroy', 'setProps', 'setContent']; + for (let type of sharedMethod) { + this[type] = this.layer[type]; + } + } + + /** + * @method 为绑定的元素添加鼠标单击事件 + * @return {void} + **/ + #addContainerClickEvent_() { + $(this.element).off().click(() => { + if (this.layer.state.isShown) { + this.hide(); + } else { + this.show(); + } + }); + } + + resize() {} +} + +Mixly.FooterLayer = FooterLayer; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/fs-board-handler.js b/mixly/common/modules/mixly-modules/common/fs-board-handler.js new file mode 100644 index 00000000..40bebec9 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/fs-board-handler.js @@ -0,0 +1,144 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Registry'); +goog.provide('Mixly.FSBoardHandler'); + +const { Registry } = Mixly; + + +class FSBoardHandler { + static { + this.FsType = { + LITTLEFS: 'littlefs', + FATFS: 'fatfs', + SPIFFS: 'spiffs' + }; + + this.CommandType = { + DOWNLOAD: 'download', + UPLOAD: 'upload' + }; + } + + #config_ = { + type: FSBoardHandler.FsType.LITTLEFS, + offset: 0x610000, + size: 0x9F0000, + blockSize: 4096, + pageSize: 256, + usrFolder: '/' + }; + #commandsRegistry_ = new Registry(); + + constructor() { + for (let key in FSBoardHandler.FsType) { + const fsRegistry = new Registry(); + fsRegistry.register(FSBoardHandler.CommandType.DOWNLOAD, ''); + fsRegistry.register(FSBoardHandler.CommandType.UPLOAD, ''); + this.#commandsRegistry_.register(FSBoardHandler.FsType[key], fsRegistry); + } + } + + getConfig() { + return this.#config_; + } + + updateConfig(config) { + Object.assign(this.#config_, config); + } + + setFSType(type) { + this.#config_.type = type; + } + + getFSType() { + return this.#config_.type; + } + + setFSSize() { + this.#config_.size = size; + } + + getFSSize() { + return this.#config_.size; + } + + setFSPageSize(size) { + this.#config_.pageSize = size; + } + + getFSPageSize() { + return this.#config_.pageSize; + } + + setFSBlockSize(size) { + this.#config_.blockSize = size; + } + + getFSBlockSize() { + return this.#config_.blockSize; + } + + setFSOffset(offset) { + this.#config_.offset = offset; + } + + getFSOffset() { + return this.#config_.offset; + } + + setUsrFolder(usrFolder) { + this.#config_.usrFolder = usrFolder; + } + + getUsrFolder() { + return this.#config_.usrFolder; + } + + setFSCommands(type, commands) { + const fsRegistry = this.getFSCommands(type); + if (!fsRegistry) { + return; + } + for (let key in commands) { + fsRegistry.hasKey(key) && fsRegistry.unregister(key); + fsRegistry.register(key, commands[key]); + } + } + + getFSCommands(type) { + return this.#commandsRegistry_.getItem(type); + } + + setLittleFSCommands(commands) { + this.setFSCommands(FSBoardHandler.FsType.LITTLEFS, commands); + } + + getLittleFSCommands() { + return this.getFSCommands(FSBoardHandler.FsType.LITTLEFS); + } + + setFatFSCommands(commands) { + this.setFSCommands(FSBoardHandler.FsType.FATFS, commands); + } + + getFatFSCommands() { + return this.getFSCommands(FSBoardHandler.FsType.FATFS); + } + + setSpifFSCommands(commands) { + this.setFSCommands(FSBoardHandler.FsType.SPIFFS, commands); + } + + getSpifFSCommands() { + return this.getFSCommands(FSBoardHandler.FsType.SPIFFS); + } + + onBeforeUpload() {} + + onBeforeDownload() {} +} + +Mixly.FSBoardHandler = FSBoardHandler; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/fs-board.js b/mixly/common/modules/mixly-modules/common/fs-board.js new file mode 100644 index 00000000..bb195778 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/fs-board.js @@ -0,0 +1,96 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Serial'); +goog.require('Mixly.Boards'); +goog.require('Mixly.FSBoardHandler'); +goog.provide('Mixly.FSBoard'); + +const { + Serial, + FSBoardHandler, + Boards +} = Mixly; + +class FSBoard { + #handler_ = null; + + constructor() {} + + #addParams_(usrFolder, fsType) { + this.#handler_.updateConfig({ + port: Serial.getSelectedPortName() + }); + this.#handler_.setUsrFolder(usrFolder); + this.#handler_.setFSType(fsType); + } + + async download(usrFolder, fsType) { + this.#addParams_(usrFolder, fsType); + this.#handler_.onBeforeDownload(); + } + + async upload(usrFolder, fsType) { + this.#addParams_(usrFolder, fsType); + this.#handler_.onBeforeUpload(); + } + + getConfig() { + return this.#handler_.getConfig(); + } + + getFSType() { + return this.#handler_.getFSType(); + } + + getLittleFSCommands() { + return this.#handler_.getLittleFSCommands(); + } + + getFatFSCommands() { + return this.#handler_.getFatFSCommands(); + } + + getSpifFSCommands() { + return this.#handler_.getSpifFSCommands(); + } + + getFSCommands(type) { + return this.#handler_.getFSCommands(type); + } + + getSelectedFSCommands() { + return this.getFSCommands(this.getFSType()); + } + + getSelectedFSDownloadCommand() { + const fsRegistry = this.getSelectedFSCommands(); + if (!fsRegistry) { + return ''; + } + return fsRegistry.getItem(FSBoardHandler.CommandType.DOWNLOAD); + } + + getSelectedFSUploadCommand() { + const fsRegistry = this.getSelectedFSCommands(); + if (!fsRegistry) { + return ''; + } + return fsRegistry.getItem(FSBoardHandler.CommandType.UPLOAD); + } + + setHandler(handler) { + this.#handler_ = handler; + } + + getHandler() { + return this.#handler_; + } + + dispose() { + this.#handler_ = null; + } +} + +Mixly.FSBoard = FSBoard; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/fs.js b/mixly/common/modules/mixly-modules/common/fs.js new file mode 100644 index 00000000..1108b8ec --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/fs.js @@ -0,0 +1,47 @@ +goog.loadJs('common', () => { + +goog.require('Mixly'); +goog.provide('Mixly.FS'); + + +class FS { + constructor() {} + + async rename(oldPath, newPath) {} + + async createFile(filePath) {} + + async readFile(filePath, encoding = 'utf8') {} + + async writeFile(filePath, data) {} + + async isFile(filePath) {} + + async renameFile(oldFilePath, newFilePath) {} + + async moveFile(oldFilePath, newFilePath) {} + + async copyFile(oldFilePath, newFilePath) {} + + async deleteFile(filePath) {} + + async createDirectory(folderPath) {} + + async readDirectory(folderPath) {} + + async isDirectory(folderPath) {} + + async isDirectoryEmpty(folderPath) {} + + async renameDirectory(oldFolderPath, newFolderPath) {} + + async moveDirectory(oldFolderPath, newFolderPath) {} + + async copyDirectory(oldFolderPath, newFolderPath) {} + + async deleteDirectory(folderPath) {} +} + +Mixly.FS = FS; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/html-template.js b/mixly/common/modules/mixly-modules/common/html-template.js new file mode 100644 index 00000000..9cac50f4 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/html-template.js @@ -0,0 +1,74 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.XML'); +goog.require('Mixly.Registry'); +goog.require('Mixly.IdGenerator'); +goog.provide('Mixly.HTMLTemplate'); + +const { + XML, + Registry, + IdGenerator, +} = Mixly; + +class HTMLTemplate { + static { + this.regexStyle_ = /(?<='); + $style.attr('style-id', this.id); + $style.attr('type', 'text/css').html(this.#style_); + $('head').append($style); + } + + getId() { + return this.id; + } +} + +Mixly.HTMLTemplate = HTMLTemplate; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/id-generator.js b/mixly/common/modules/mixly-modules/common/id-generator.js new file mode 100644 index 00000000..11488371 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/id-generator.js @@ -0,0 +1,24 @@ +goog.loadJs('common', () => { + +goog.require('shortid'); +goog.require('Mixly'); +goog.provide('Mixly.IdGenerator'); + +const { IdGenerator } = Mixly; + +IdGenerator.generate = function(input) { + let output = {}; + if (input instanceof Array) { + for (let i of input) { + if (typeof i !== 'string') { + continue; + } + output[i] = shortid.generate(); + } + return output; + } else { + return shortid.generate(); + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/if-visiable.js b/mixly/common/modules/mixly-modules/common/if-visiable.js new file mode 100644 index 00000000..b821f673 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/if-visiable.js @@ -0,0 +1,44 @@ +goog.loadJs('common', () => { + +goog.require('ifvisible'); +goog.require('Mixly.Events'); +goog.provide('Mixly.IfVisible'); + +const { Events, IfVisible } = Mixly; + +IfVisible.events = new Events(['blur', 'focus', 'idle', 'wakeup']); + +IfVisible.init = function () { + ifvisible.on('blur', () => this.runEvent('blur')); + ifvisible.on('focus', () => this.runEvent('focus')); + ifvisible.on('idle', () => this.runEvent('idle')); + ifvisible.on('wakeup', () => this.runEvent('wakeup')); +} + +IfVisible.bind = function (type, func) { + return this.events.bind(type, func); +} + +IfVisible.unbind = function (id) { + this.events.unbind(id); +} + +IfVisible.addEventsType = function (eventsType) { + this.events.addType(eventsType); +} + +IfVisible.runEvent = function (eventsType, ...args) { + return this.events.run(eventsType, ...args); +} + +IfVisible.offEvent = function (eventsType) { + this.events.off(eventsType); +} + +IfVisible.resetEvent = function () { + this.events.reset(); +} + +IfVisible.init(); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/js-funcs.js b/mixly/common/modules/mixly-modules/common/js-funcs.js new file mode 100644 index 00000000..670ba95a --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/js-funcs.js @@ -0,0 +1,6 @@ +goog.provide('Mixly.JSFuncs'); +goog.require('Mixly.Config'); + +Mixly.JSFuncs.getPlatform = function () { + return Mixly.Config.BOARD.boardType; +}; \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/layer-ext.js b/mixly/common/modules/mixly-modules/common/layer-ext.js new file mode 100644 index 00000000..241ead08 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/layer-ext.js @@ -0,0 +1,167 @@ +goog.loadJs('common', () => { + +goog.require('layui'); +goog.require('Mixly.Config'); +goog.require('Mixly.Msg'); +goog.provide('Mixly.LayerExt'); + +const { + LayerExt, + Config, + Msg +} = Mixly; + +const { BOARD, USER } = Config; + +const { layer } = layui; + +LayerExt.SHADE_ALL = [1, 'transparent']; +LayerExt.SHADE_NAV = [1, 'transparent', '40px']; + +// 默认的弹层标题高度 +LayerExt.DEFAULT_TITLE_HEIGHT = 42; +// 默认的弹层配置项 +LayerExt.DEFAULT_CONFIG = { + area: ['50%', '50%'], + max: ['850px', '543px'], + min: ['350px', '243px'], + title: '信息', + id: 'info', + content: '', + resize: true, + shade: LayerExt.SHADE_ALL, + success: null, + beforeEnd: null, + end: null, + cancel: null, + resizing: null, + offset: 'auto', + fixed: true, + borderRadius: '5px', + maxmin: false, + zIndex: 19891014 +}; + +LayerExt.open = (toolConfig) => { + if (typeof toolConfig !== 'object') + toolConfig = LayerExt.DEFAULT_CONFIG; + else + toolConfig = { + ...LayerExt.DEFAULT_CONFIG, + ...toolConfig + }; + + const { title } = toolConfig; + let layerOffset = 42; + let layerTitle = null; + if (title) { + if (typeof title === 'object' && !isNaN(parseInt(title[1]))) { + layerOffset = parseInt(title[1]); + layerTitle = title[0]; + } else { + layerTitle = title; + } + } else { + layerOffset = 0; + layerTitle = false; + } + return layer.open({ + ...toolConfig, + type: 1, + title: layerTitle, + closeBtn: 1, + success: function (layero, index) { + const { borderRadius, id, max, min, success } = toolConfig; + layer.style(index, { borderRadius }); + const pageBody = $('#' + id); + pageBody.addClass('mixly-scrollbar'); + if (typeof max === 'object') { + layero.css({ + 'maxWidth': max[0], + 'maxHeight': max[1] + }); + pageBody.css('maxWidth', max[0]); + if (max[1].indexOf('%') !== -1) + pageBody.css('maxHeight', max[1]); + else + pageBody.css('maxHeight', (parseInt(max[1]) - layerOffset) + 'px'); + } + if (typeof min === 'object') { + layero.css({ + 'minHeight': min[1], + 'minWidth': min[0] + }); + pageBody.css('minWidth', min[0]); + if (min[1].indexOf('%') !== -1) + pageBody.css('minHeight', min[1]); + else + pageBody.css('minHeight', (parseInt(min[1]) - layerOffset) + 'px'); + } + const winHeight = $(window).height(); + const winWidth = $(window).width(); + layero.css({ + 'left': (winWidth - layero.width()) / 2 + 'px', + 'top': (winHeight - layero.height()) / 2 + 'px' + }); + const pageTitle = layero.find('.layui-layer-title'); + pageTitle.css('borderRadius', borderRadius + ' ' + borderRadius + ' 0px 0px'); + pageBody.css('borderRadius', '0px 0px ' + borderRadius + ' ' + borderRadius); + const $close = layero.find('.layui-layer-setwin'); + if (layerOffset && layerOffset !== 42) { + pageTitle.css({ + 'height': layerOffset + 'px', + 'line-height': layerOffset + 'px' + }); + $close.css({ + 'right': '10px', + 'top': '10px' + }); + pageBody.css({ + 'height': (layero.height() - layerOffset) + 'px' + }); + } + if (typeof success === 'function') + success(layero, index); + }, + beforeEnd: function (layero, index, that) { + const { beforeEnd } = toolConfig; + if (typeof beforeEnd === 'function') { + beforeEnd(layero, index, that); + } + }, + end: function () { + const { end } = toolConfig; + if (typeof end === 'function') { + end(); + } + }, + cancel: function (index, layero) { + $('#layui-layer-shade' + index).remove(); + const { cancel } = toolConfig; + if (typeof cancel === 'function') { + cancel(index, layero); + } + }, + resizing: function (layero) { + const winHeight = $(window).height(); + const winWidth = $(window).width(); + const width = layero.width()/winWidth*100 + "%"; + const height = layero.height()/winHeight*100 + "%"; + layero.css({ width, height }); + const { resizing } = toolConfig; + if (typeof resizing === 'function') { + const $content = layero.children('.layui-layer-content'); + resizing({ + layero: [ width, height ], + content: [ $content.width(), $content.height() ] + }); + } + } + }); +} + +LayerExt.openProgressLayer = () => { + +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/layer-firmware.js b/mixly/common/modules/mixly-modules/common/layer-firmware.js new file mode 100644 index 00000000..a7905721 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/layer-firmware.js @@ -0,0 +1,94 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Layer'); +goog.require('Mixly.HTMLTemplate'); +goog.provide('Mixly.LayerFirmware'); + +const { + Env, + Msg, + Layer, + HTMLTemplate +} = Mixly; + + +class LayerFirmware extends Layer { + static { + HTMLTemplate.add( + 'html/dialog/firmware.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/dialog/firmware.html'))) + ); + } + + #dialog_ = null; + #$dialogContent_ = null; + #$cancel_ = null; + #$burn_ = null; + #$select_ = null; + #map_ = {}; + + constructor(config = {}, shadowType = 'nav') { + const $dialogContent_ = $(HTMLTemplate.get('html/dialog/firmware.html').render({ + cancel: Msg.Lang['nav.btn.cancel'], + burn: Msg.Lang['nav.btn.burn'] + })); + config.content = $dialogContent_; + super(config, shadowType); + this.#$dialogContent_ = $dialogContent_; + this.#$cancel_ = $dialogContent_.find('.cancel'); + this.#$burn_ = $dialogContent_.find('.burn'); + this.#$select_ = $dialogContent_.find('.type'); + this.#$select_.select2({ + data: [], + minimumResultsForSearch: Infinity, + width: '380px', + dropdownCssClass: 'mixly-scrollbar' + }); + this.addEventsType(['burn']); + this.#addEventsListener_(); + } + + #addEventsListener_() { + this.#$cancel_.click(() => { + this.hide(); + }); + + this.#$burn_.click(() => { + this.hide(); + this.runEvent('burn', this.#map_[this.#$select_.val()]); + }); + } + + setMenu(items) { + this.#$select_.empty(); + for (let item of items) { + const newOption = new window.Option(item.text, item.id); + this.#$select_.append(newOption); + } + this.#$select_.trigger('change'); + } + + setMap(firmwareMap) { + this.#map_ = firmwareMap; + } + + dispose() { + this.#$select_.select2('destroy'); + this.#$select_.remove(); + this.#$select_ = null; + this.#$cancel_.remove(); + this.#$cancel_ = null; + this.#$burn_.remove(); + this.#$burn_ = null; + this.#$dialogContent_.remove(); + this.#$dialogContent_ = null; + this.#map_ = null; + super.dispose(); + } +} + +Mixly.LayerFirmware = LayerFirmware; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/layer-new-file.js b/mixly/common/modules/mixly-modules/common/layer-new-file.js new file mode 100644 index 00000000..6d85a396 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/layer-new-file.js @@ -0,0 +1,76 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Layer'); +goog.require('Mixly.HTMLTemplate'); +goog.provide('Mixly.LayerNewFile'); + +const { + Env, + Msg, + Layer, + HTMLTemplate +} = Mixly; + + +class LayerNewFile extends Layer { + static { + HTMLTemplate.add( + 'html/dialog/new-file.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/dialog/new-file.html'))) + ); + } + + #dialog_ = null; + #$dialogContent_ = null; + #$cancel_ = null; + #$ok_ = null; + + constructor(config = {}, shadowType = 'all') { + const $dialogContent_ = $(HTMLTemplate.get('html/dialog/new-file.html').render({ + message: Msg.Lang['file.emptyInfo'], + cancel: Msg.Lang['nav.btn.cancel'], + ok: Msg.Lang['nav.btn.ok'] + })); + config.title = Msg.Lang['nav.btn.file.new']; + config.cancelValue = Msg.Lang['nav.btn.cancel']; + config.cancel = () => { + this.hide(); + return false; + }; + config.cancelDisplay = false; + config.content = $dialogContent_; + super(config, shadowType); + this.#$dialogContent_ = $dialogContent_; + this.#$cancel_ = $dialogContent_.find('.cancel'); + this.#$ok_ = $dialogContent_.find('.ok'); + this.addEventsType(['empty']); + this.#addEventsListener_(); + } + + #addEventsListener_() { + this.#$cancel_.click(() => { + this.hide(); + }); + + this.#$ok_.click(() => { + this.hide(); + this.runEvent('empty'); + }); + } + + dispose() { + this.#$cancel_.remove(); + this.#$cancel_ = null; + this.#$ok_.remove(); + this.#$ok_ = null; + this.#$dialogContent_.remove(); + this.#$dialogContent_ = null; + super.dispose(); + } +} + +Mixly.LayerNewFile = LayerNewFile; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/layer-progress.js b/mixly/common/modules/mixly-modules/common/layer-progress.js new file mode 100644 index 00000000..6f74c078 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/layer-progress.js @@ -0,0 +1,42 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.require('Mixly.Layer'); +goog.require('Mixly.HTMLTemplate'); +goog.provide('Mixly.LayerProgress'); + +const { + Env, + Layer, + HTMLTemplate +} = Mixly; + + +class LayerProgress extends Layer { + static { + HTMLTemplate.add( + 'html/dialog/progress.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/dialog/progress.html'))) + ); + } + + #dialog_ = null; + #$dialogContent_ = null; + + constructor(config = {}, shadowType = 'nav') { + const $dialogContent_ = $(HTMLTemplate.get('html/dialog/progress.html').render()); + config.content = $dialogContent_; + super(config, shadowType); + this.#$dialogContent_ = $dialogContent_; + } + + dispose() { + this.#$dialogContent_.remove(); + this.#$dialogContent_ = null; + super.dispose(); + } +} + +Mixly.LayerProgress = LayerProgress; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/layer.js b/mixly/common/modules/mixly-modules/common/layer.js new file mode 100644 index 00000000..9bab639f --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/layer.js @@ -0,0 +1,91 @@ +goog.loadJs('common', () => { + +goog.require('dialog'); +goog.require('Mixly.Env'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Component'); +goog.require('Mixly.HTMLTemplate'); +goog.provide('Mixly.Layer'); + +const { + Env, + Registry, + Component, + HTMLTemplate +} = Mixly; + + +class Layer extends Component { + static { + this.templates = new Registry(); + + this.register = function (key, value) { + this.templates.register(key, value); + } + + this.register('all', (new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/dialog/shadow-all.html')) + )).render()); + this.register('nav', (new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/dialog/shadow-nav.html')) + )).render()); + } + + #dialog_ = null; + + constructor(config = {}, shadowType = 'nav') { + super(); + const shadow = Layer.templates.getItem(shadowType); + this.setContent($(shadow)); + config.skin = config.skin ?? 'layui-anim layui-anim-scale'; + this.#dialog_ = dialog({ + padding: 0, + ...config + }); + } + + show() { + this.mountOn($(window.document.body)); + this.#dialog_.show(); + } + + hide() { + this.getContent().detach(); + this.#dialog_.close(); + this.onUnmounted(); + } + + title(text) { + this.#dialog_.title(text); + } + + width(value) { + this.#dialog_.width(value); + } + + height(value) { + this.#dialog_.height(value); + } + + reset() { + this.#dialog_.reset(); + } + + focus() { + this.#dialog_.focus(); + } + + blur() { + this.#dialog_.blur(); + } + + dispose() { + this.#dialog_.remove(); + this.#dialog_ = null; + super.dispose(); + } +} + +Mixly.Layer = Layer; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/loader.js b/mixly/common/modules/mixly-modules/common/loader.js new file mode 100644 index 00000000..6163d903 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/loader.js @@ -0,0 +1,148 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('d3'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.Boards'); +goog.require('Mixly.App'); +goog.require('Mixly.Msg'); +goog.require('Mixly.UserEvents'); +goog.require('Mixly.UserOPEvents'); +goog.require('Mixly.JSFuncs'); +goog.require('Mixly.Title'); +goog.require('Mixly.LocalStorage'); +goog.require('Mixly.Storage'); +goog.require('Mixly.Debug'); +goog.require('Mixly.API2'); +goog.require('Mixly.Electron.LibManager'); +goog.require('Mixly.Electron.File'); +goog.require('Mixly.WebCompiler.Loader'); +goog.require('Mixly.WebSocket.Loader'); +goog.provide('Mixly.Loader'); + +const { + Config, + Boards, + Loader, + Env, + App, + Msg, + UserEvents, + UserOPEvents, + Title, + LocalStorage, + Storage, + Debug, + API2, + Electron = {}, + Web = {}, + WebCompiler = {}, + WebSocket = {} +} = Mixly; + +const { LibManager, File } = goog.isElectron? Electron : Web; +const { USER } = Config; + + +window.addEventListener('load', () => { + if (!goog.isElectron) { + if (Env.hasSocketServer) { + WebSocket.Loader.init(); + } else if (Env.hasCompiler) { + WebCompiler.Loader.init(); + } + } + const app = new App($('body')[0]); + Mixly.app = app; + const $xml = $(goog.readFileSync(Env.boardIndexPath)); + let scrpitPaths = []; + let cssPaths = []; + let $categories = null; + for (let i = 0; i < $xml.length; i++) { + const $xmli = $($xml[i]); + let rePath = ''; + switch ($xml[i].nodeName) { + case 'SCRIPT': + rePath = $xmli.attr('src'); + rePath && scrpitPaths.push(path.join(Env.boardDirPath, rePath)); + break; + case 'LINK': + rePath = $xmli.attr('href'); + rePath && cssPaths.push(path.join(Env.boardDirPath, rePath)); + break; + case 'XML': + $categories = $xmli; + break; + } + } + $categories && $('#toolbox').html($categories.html()); + cssPaths.length && LazyLoad.css(cssPaths); + if (scrpitPaths.length) { + LazyLoad.js(scrpitPaths, () => { + Loader.start(); + }); + } else { + Loader.start(); + } +}); + +Loader.start = () => { + if (window.frames.length !== parent.frames.length) { + window.userEvents = new UserEvents(Editor.blockEditor); + } + if (!goog.isElectron && window.location.host.indexOf('mixly.cn')) { + window.userOpEvents = new UserOPEvents(); + } + if (goog.isElectron && typeof LibManager === 'object') { + LibManager.init(() => Loader.init()); + } else { + Env.defaultXML = $('#toolbox').html(); + Loader.init(); + } +} + +Loader.init = () => { + const selectedBoardName = Boards.getSelectedBoardName(); + Boards.setSelectedBoard(selectedBoardName, {}); + Msg.renderToolbox(true); + Mixly.app.getNav().resize(); + const workspace = Mixly.app.getWorkspace(); + const editor = workspace.getEditorsManager().getActive(); + if (USER.cache !== 'no') { + Loader.restoreBlocks(editor); + } + Mixly.app.removeSkeleton(); + window.addEventListener('unload', () => Loader.backupBlocks(editor), false); + API2.init(); +} + +Loader.restoreBlocks = (editor) => { + const filePath = LocalStorage.get(`${LocalStorage.PATH['USER']}/filePath`); + const mix = Storage.board('mix'); + const openedPath = Storage.board('path'); + if (filePath) { + LocalStorage.set(`${LocalStorage.PATH['USER']}/filePath`, ''); + goog.isElectron && File.openFile(filePath); + } else if (mix) { + try { + editor.setValue(mix, '.mix'); + if (openedPath && goog.isElectron) { + File.openedFilePath = openedPath; + File.workingPath = path.dirname(openedPath); + Title.updeteFilePath(File.openedFilePath); + } + } catch (error) { + Storage.board('mix', ''); + Debug.error(error); + } + } +} + +Loader.backupBlocks = (editor) => { + const mix = editor.getValue(); + Storage.board('mix', mix); + Storage.board('path', Title.getFilePath()); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/local-storage.js b/mixly/common/modules/mixly-modules/common/local-storage.js new file mode 100644 index 00000000..630c5c05 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/local-storage.js @@ -0,0 +1,59 @@ +goog.loadJs('common', () => { + +goog.require('store'); +goog.require('Mixly.MArray'); +goog.provide('Mixly.LocalStorage'); + +const { MArray, LocalStorage } = Mixly; + +LocalStorage.PATH = { + USER: 'mixly3.0/user', + BOARD: 'mixly3.0/boards/{{d.boardType}}/user', + THIRD_PARTY: 'mixly3.0/boards/{{d.boardType}}/third_party/{{d.thirdPartyName}}' +}; + +LocalStorage.set = function (path, value) { + let { first, last, firstKey, lastKey } = this.find(path); + if (!first) { + return; + } + last[lastKey] = value; + store.set(firstKey, first); +} + +LocalStorage.get = function (path) { + let { first, last, lastKey } = this.find(path); + if (!first) { + return undefined; + } + return last[lastKey]; +} + +LocalStorage.getItems = function (path) { + let items = path.split('/'); + MArray.remove(items, ''); + return items; +} + +LocalStorage.find = function (path) { + let items = this.getItems(path); + if (!items.length) { + return {}; + } + let rootObj = {}; + rootObj[items[0]] = store.get(items[0]); + let last = rootObj; + let value; + for (let i = 0; i < items.length - 1; i++) { + if (!(last[items[i]] instanceof Object)) { + last[items[i]] = {}; + } + last = last[items[i]]; + } + let first = rootObj[items[0]]; + let firstKey = items[0]; + let lastKey = items[items.length - 1]; + return { first, last, firstKey, lastKey }; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/marray.js b/mixly/common/modules/mixly-modules/common/marray.js new file mode 100644 index 00000000..3e4d972e --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/marray.js @@ -0,0 +1,68 @@ +goog.loadJs('common', () => { +goog.require('Mixly'); +goog.provide('Mixly.MArray'); + +const { MArray } = Mixly; + +MArray.equals = (x, y) => { + // If both x and y are null or undefined and exactly the same + if (x === y) { + return true; + } + // If they are not strictly equal, they both need to be Objects + if (!(x instanceof Object ) || !(y instanceof Object)) { + return false; + } + //They must have the exact same prototype chain,the closest we can do is + //test the constructor. + if (x.constructor !== y.constructor) { + return false; + } + for (var p in x) { + //Inherited properties were tested using x.constructor === y.constructor + if (x.hasOwnProperty(p)) { + // Allows comparing x[ p ] and y[ p ] when set to undefined + if (!y.hasOwnProperty(p)) { + return false; + } + // If they have the same strict value or identity then they are equal + if (x[p] === y[p]) { + continue; + } + // Numbers, Strings, Functions, Booleans must be strictly equal + if ( typeof(x[p]) !== "object" ) { + return false; + } + // Objects and Arrays must be tested recursively + if (!MArray.equals(x[p], y[p])) { + return false; + } + } + } + for (p in y) { + // allows x[ p ] to be set to undefined + if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) { + return false; + } + } + return true; +} + +MArray.remove = (arr, data) => { + let arrLen = arr.length; + for (let i = 0; i < arrLen; i++) { + if (arr[i] !== data) { + continue; + } + arr.splice(i, 1); + i--; + arrLen--; + } +} + +//数组去除重复元素 +MArray.unique = (arr) => { + return Array.from(new Set(arr)); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/menu.js b/mixly/common/modules/mixly-modules/common/menu.js new file mode 100644 index 00000000..b46356d5 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/menu.js @@ -0,0 +1,135 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Events'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.HTMLTemplate'); +goog.provide('Mixly.Menu'); + +const { + Env, + Debug, + Events, + IdGenerator, + HTMLTemplate +} = Mixly; + + +class Menu { + static { + HTMLTemplate.add( + 'html/menu-item.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/menu-item.html'))) + ); + + this.getItem = (name, hotKey = '', icon = '') => { + return HTMLTemplate.get('html/menu-item.html').render({ name, hotKey, icon }); + }; + } + + #menuItems_ = []; + #ids_ = {}; + #isDynamic_ = false; + #events_ = new Events(['onRead']); + constructor(isDynamic) { + this.#ids_ = {}; + this.#menuItems_ = []; + this.#isDynamic_ = isDynamic; + } + + add(item) { + if (!item.id) { + if (item.type) { + item.id = item.type; + } else { + item.id = IdGenerator.generate(); + } + } + if (!item.weight) { + item.weight = 0; + } + const { id, weight } = item; + if (this.#ids_[id]) { + delete this.#ids_[id]; + } + let i = 0; + for (; i < this.#menuItems_.length; i++) { + if (this.#menuItems_[i].weight <= weight) { + continue; + } + break; + } + this.#menuItems_.splice(i, 0, item); + this.#ids_[id] = item; + return id; + } + + remove(id) { + if (!this.#ids_[id]) { + return; + } + delete this.#ids_[id]; + for (let i in this.#menuItems_) { + if (this.#menuItems_[i].id !== id) { + continue; + } + this.#menuItems_.splice(i, 1); + break; + } + } + + empty() { + this.#ids_ = {}; + this.#menuItems_ = []; + } + + hasKey(id) { + return !!this.#ids_[id]; + } + + getItem(id) { + return this.#ids_[id] ?? null; + } + + getAllItems() { + if (this.#isDynamic_) { + this.empty(); + const results = this.runEvent('onRead'); + if (results?.length) { + for (let item of results[0]) { + this.add(item); + } + } + } + return this.#menuItems_; + } + + bind(type, func) { + return this.#events_.bind(type, func); + } + + unbind(id) { + this.#events_.unbind(id); + } + + addEventsType(eventsType) { + this.#events_.addType(eventsType); + } + + runEvent(eventsType, ...args) { + return this.#events_.run(eventsType, ...args); + } + + offEvent(eventsType) { + this.#events_.off(eventsType); + } + + resetEvent() { + this.#events_.reset(); + } +} + +Mixly.Menu = Menu; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/mfile.js b/mixly/common/modules/mixly-modules/common/mfile.js new file mode 100644 index 00000000..ce8e746f --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/mfile.js @@ -0,0 +1,388 @@ +goog.loadJs('common', () => { + +goog.require('layui'); +goog.require('Blockly'); +goog.require('Base64'); +goog.require('Mixly.Config'); +goog.require('Mixly.MArray'); +goog.require('Mixly.Boards'); +goog.require('Mixly.XML'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Msg'); +goog.provide('Mixly.MFile'); + +const { form, util } = layui; + +const { + Config, + MArray, + Boards, + XML, + LayerExt, + Msg, + MFile +} = Mixly; + +const { BOARD, SOFTWARE } = Config; + +MFile.SAVE_FILTER_TYPE = { + mix: { name: Msg.Lang['file.type.mix'], extensions: ['mix'] }, + py: { name: Msg.Lang['file.type.python'], extensions: ['py'] }, + ino: { name: Msg.Lang['file.type.arduino'], extensions: ['ino'] }, + hex: { name: Msg.Lang['file.type.hex'], extensions: ['hex'] }, + bin: { name: Msg.Lang['file.type.bin'], extensions: ['bin'] }, + mil: { name: Msg.Lang['file.type.mil'], extensions: ['mil'] } +}; + +MFile.saveFilters = [ MFile.SAVE_FILTER_TYPE.mix ]; + +MFile.OPEN_FILTER_TYPE = ['mix','xml', 'py', 'ino', 'hex', 'bin']; + +MFile.openFilters = ['mix']; + +/** + * @function 更新保存文件时可用的后缀 + * @param config { array } + * config = ["py", "ino", "hex", "bin", "png"] + * 注:mix后缀为默认添加,列表后缀名顺序即为保存时自上而下显示的顺序 + * @param priority { string },配置需要优先显示的后缀名,没有此项可不填 + * @return void + **/ +MFile.updateSaveFilters = (config, priority = null) => { + if (typeof config !== 'object') + config = []; + MFile.saveFilters = [ MFile.SAVE_FILTER_TYPE.mix ]; + let saveFilterType = ['mix']; + for (let i of config) + if (MFile.SAVE_FILTER_TYPE[i] && !saveFilterType.includes(i)) { + saveFilterType.push(i); + if (i === priority) { + MFile.saveFilters.unshift(MFile.SAVE_FILTER_TYPE[i]); + } else { + MFile.saveFilters.push(MFile.SAVE_FILTER_TYPE[i]); + } + } +} + +/** + * @function 更新打开文件时的可用后缀 + * @param config { array } + * config = ["py", "ino", "hex", "bin"] + * @return void + **/ +MFile.updateOpenFilters = (config, priority) => { + if (typeof config !== 'object') + config = []; + MFile.openFilters = ['mix', 'xml']; + for (let i of config) + if (MFile.OPEN_FILTER_TYPE.includes(i) && !MFile.openFilters.includes(i)) + MFile.openFilters.push(i); +} + +MFile.init = () => { + const saveConfig = BOARD?.nav?.save ?? {}; + let saveFilters = [], openFilters = []; + for (let i in saveConfig) + if (saveConfig[i]) { + saveFilters.push(i); + openFilters.push(i); + } + if (BOARD?.nav?.setting?.thirdPartyLibrary) + saveFilters.push('mil'); + MFile.updateOpenFilters(openFilters); + MFile.updateSaveFilters(saveFilters); +} + +MFile.init(); + +MFile.getCode = (type) => { + const { mainEditor } = Editor; + const { codeEditor, blockEditor } = mainEditor; + const { editor, generator } = blockEditor; + if (mainEditor.selected === 'CODE') + return codeEditor.getValue(); + else { + return generator.workspaceToCode(editor) || ''; + } +} + +MFile.getMix = () => { + const mixDom = $(Blockly.Xml.workspaceToDom(Editor.blockEditor)), + version = SOFTWARE?.version ?? 'Mixly 2.0', + boardName = Boards.getSelectedBoardName(), + board = BOARD?.boardType ?? 'default', + config = Boards.getSelectedBoardConfig(); + mixDom.removeAttr('xmlns') + .attr('version', version) + .attr('board', board + '@' + boardName); + let xmlStr = mixDom[0].outerHTML; + let code = MFile.getCode(); + if (config) { + try { + xmlStr += `${JSON.stringify(config)}`; + } catch (error) { + console.log(error); + } + } + if (BOARD.saveMixWithCode) { + code = Base64.encode(code); + xmlStr += `${code}`; + } + return xmlStr; +} + +MFile.getMil = () => { + const mixDom = $(MFile.getMix()); + let xmlDom, configDom, codeDom; + for (let i = 0; mixDom[i]; i++) { + switch (mixDom[i].nodeName) { + case 'XML': + xmlDom = $(mixDom[i]); + break; + case 'CONFIG': + configDom = $(mixDom[i]); + break; + case 'CODE': + codeDom = $(mixDom[i]); + break; + } + } + if (!xmlDom) return ''; + configDom && configDom.remove(); + codeDom && codeDom.remove(); + xmlDom.attr('type', 'lib'); + xmlDom.find('block,shadow').removeAttr('id varid x y'); + const blocksDom = xmlDom.children('block'); + let blockXmlList = []; + for (let i = 0; blocksDom[i]; i++) { + const outerHTML = blocksDom[i].outerHTML; + if (!blockXmlList.includes(outerHTML)) + blockXmlList.push(outerHTML); + else + blocksDom[i].remove(); + } + return xmlDom[0].outerHTML; +} + +MFile.parseMix = (xml, useCode = false, useIncompleteBlocks = false, endFunc = (message) => {}) => { + const mixDom = xml; + let xmlDom, configDom, codeDom; + for (let i = 0; mixDom[i]; i++) { + switch (mixDom[i].nodeName) { + case 'XML': + xmlDom = $(mixDom[i]); + break; + case 'CONFIG': + configDom = $(mixDom[i]); + break; + case 'CODE': + codeDom = $(mixDom[i]); + break; + } + } + if (!xmlDom && !codeDom) { + layer.msg(Msg.Lang['editor.invalidData'], { time: 1000 }); + return; + } + for (let i of ['version', 'id', 'type', 'varid', 'name', 'x', 'y', 'items']) { + const nowDom = xmlDom.find('*[' + i + ']'); + if (nowDom.length) { + for (let j = 0; nowDom[j]; j++) { + let attr = $(nowDom[j]).attr(i); + try { + attr = attr.replaceAll('\\\"', ''); + } catch (error) { + console.log(error); + } + $(nowDom[j]).attr(i, attr); + } + } + } + let config, configStr = configDom && configDom.html(); + try { + if (configStr) + config = JSON.parse(configStr); + } catch (error) { + console.log(error); + } + let boardName = xmlDom.attr('board') ?? ''; + Boards.setSelectedBoard(boardName, config); + let code = codeDom ? codeDom.html() : ''; + if (Base64.isValid(code)) { + code = Base64.decode(code); + } else { + try { + code = util.unescape(code); + code = code.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/g, function (s) { + try { + return decodeURIComponent(s.replace(/_/g, '%')); + } catch (error) { + return s; + } + }); + } catch (error) { + console.log(error); + } + } + if (useCode) { + if (!codeDom) { + layer.msg(Msg.Lang['editor.invalidData'], { time: 1000 }); + return; + } + Editor.mainEditor.drag.full('NEGATIVE'); // 完全显示代码编辑器 + Editor.codeEditor.setValue(code, -1); + Editor.blockEditor.clear(); + endFunc('USE_CODE'); + return; + } + const blockDom = mixDom.find('block'); + const shadowDom = mixDom.find('shadow'); + blockDom.removeAttr('id varid'); + shadowDom.removeAttr('id varid'); + let blocks = []; + let undefinedBlocks = []; + for (let i = 0; blockDom[i]; i++) { + const blockType = $(blockDom[i]).attr('type'); + if (blockType && !blocks.includes(blockType)) + blocks.push(blockType); + } + for (let i = 0; shadowDom[i]; i++) { + const shadowType = $(shadowDom[i]).attr('type'); + if (shadowType && !blocks.includes(shadowType)) + blocks.push(shadowType); + } + const blocklyGenerator = Editor.mainEditor.blockEditor.generator; + for (let i of blocks) { + if (Blockly.Blocks[i] && blocklyGenerator.forBlock[i]) { + continue; + } + undefinedBlocks.push(i); + } + if (undefinedBlocks.length) { + MFile.showParseMixErrorDialog(mixDom, undefinedBlocks, endFunc); + return; + } + Editor.blockEditor.clear(); + Blockly.Xml.domToWorkspace(xmlDom[0], Editor.blockEditor); + Editor.blockEditor.scrollCenter(); + Blockly.hideChaff(); + if (!useIncompleteBlocks && codeDom) { + const workspaceCode = MFile.getCode(); + if (workspaceCode !== code) { + Editor.mainEditor.drag.full('NEGATIVE'); // 完全显示代码编辑器 + Editor.codeEditor.setValue(code, -1); + } + endFunc(); + return; + } + Editor.mainEditor.drag.full('POSITIVE'); // 完全显示块编辑器 + if (useIncompleteBlocks) + endFunc('USE_INCOMPLETE_BLOCKS'); + else + endFunc(); +} + +MFile.removeUndefinedBlocks = (xml, undefinedBlocks) => { + for (let i of undefinedBlocks) { + xml.find('*[type='+i+']').remove(); + } +} + +MFile.showParseMixErrorDialog = (xml, undefinedBlocks, endFunc = () => {}) => { + const { PARSE_MIX_ERROR_DIV } = XML.TEMPLATE_STR; + const renderStr = XML.render(PARSE_MIX_ERROR_DIV, { + text: undefinedBlocks.join('
'), + btn1Name: Msg.Lang['editor.cancel'], + btn2Name: Msg.Lang['editor.ignoreBlocks'], + btn3Name: Msg.Lang['editor.loadCode'] + }) + LayerExt.open({ + title: Msg.Lang['editor.parseMixErrorInfo'], + id: 'parse-mix-error-layer', + area: ['50%', '250px'], + max: ['500px', '250px'], + min: ['350px', '100px'], + shade: LayerExt.SHADE_ALL, + content: renderStr, + borderRadius: '5px', + success: (layero, index) => { + $('#parse-mix-error-layer').css('overflow', 'hidden'); + form.render(null, 'parse-mix-error-filter'); + layero.find('button').click((event) => { + layer.close(index); + const mId = $(event.currentTarget).attr('m-id'); + switch (mId) { + case '0': + break; + case '1': + for (let i of undefinedBlocks) { + xml.find('*[type='+i+']').remove(); + } + MFile.parseMix(xml, false, true, endFunc); + break; + case '2': + MFile.parseMix(xml, true, false, endFunc); + break; + } + }); + } + }); +} + +MFile.openFile = (filters, readType = 'text', sucFunc = () => {}) => { + const loadFileDom = $(''); + loadFileDom.attr({ + id: 'web-open-file', + type: 'file', + name: 'web-open-file', + accept: filters + }); + loadFileDom.change(function(event) { + MFile.onclickOpenFile(this, readType, (data) => { + sucFunc(data); + }); + }); + loadFileDom.css('display', 'none'); + $('#web-open-file').remove(); + $('body').append(loadFileDom); + loadFileDom.click(); +} + +MFile.onclickOpenFile = (input, readType, endFunc) => { + const files = input.files; + //限制上传文件的 大小,此处为10M + if (files[0].size > 5 * 1024 * 1024) { + layer.msg('所选择文件大小必须在5MB内', { time: 1000 }); + $('#web-open-file').remove(); + endFunc(null); + return false; + } + const resultFile = input.files[0]; + // 如果文件存在 + if (resultFile) { + const filename = resultFile.name; + const reader = new FileReader(); + switch (readType) { + case 'text': + reader.readAsText(resultFile); + break; + case 'bin': + reader.readAsBinaryString(resultFile); + break; + case 'url': + reader.readAsDataURL(resultFile); + break; + default: + reader.readAsArrayBuffer(resultFile); + } + reader.onload = function (e) { + const data = e.target.result; + $('#web-open-file').remove(); + endFunc({ data, filename }); + }; + } else { + endFunc(null); + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/mixly.js b/mixly/common/modules/mixly-modules/common/mixly.js new file mode 100644 index 00000000..bb6e0331 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/mixly.js @@ -0,0 +1,12 @@ +goog.loadJs('common', () => { + +goog.provide('Mixly'); + +Mixly.require = function(moduleName) { + if (!goog.isElectron) { + return; + } + return require(moduleName); +} + +}); diff --git a/mixly/common/modules/mixly-modules/common/mixly2-api.js b/mixly/common/modules/mixly-modules/common/mixly2-api.js new file mode 100644 index 00000000..6d5c61c7 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/mixly2-api.js @@ -0,0 +1,50 @@ +goog.loadJs('common', () => { + +goog.require('Blockly'); +goog.require('Mixly'); +goog.provide('Mixly.API2'); +goog.provide('Mixly.Editor'); + +const { API2, Editor } = Mixly; + +const HUES = { + ACTUATOR_HUE: 100, + BLYNK0_HUE: 0, + BLYNK1_HUE: 159, + COMMUNICATE_HUE: 140, + LOOPS_HUE: 120, + DISPLAY_HUE: 180, + ETHERNET_HUE: 0, + FACTORY_HUE: '#777777', + BASE_HUE: 20, + LISTS_HUE: 260, + LOGIC_HUE: 210, + MATH_HUE: 230, + PINS_HUE: 230, + PROCEDURES_HUE: 290, + SCOOP_HUE: 120, + SENSOR_HUE: 40, + SERIAL_HUE: 65, + STORAGE_HUE: 0, + TEXTS_HUE: 160, + TOOLS_HUE: '#555555', + VARIABLES_HUE: 330, + HANDBIT_HUE: 65 +}; + +API2.init = () => { + const workspace = Mixly.app.getWorkspace(); + const editorsManager = workspace.getEditorsManager(); + const mixEditor = editorsManager.getActive(); + const blockPage = mixEditor.getPage('block'); + const codePage = mixEditor.getPage('code'); + Blockly.mainWorkspace = blockPage.getEditor(); + Editor.blockEditor = blockPage.getEditor(); + Editor.codeEditor = codePage.getEditor(); + Object.assign(Blockly.Msg, HUES); + Blockly.ALIGN_LEFT = Blockly.inputs.Align.LEFT; + Blockly.ALIGN_CENTRE = Blockly.inputs.Align.CENTRE; + Blockly.ALIGN_RIGHT = Blockly.inputs.Align.RIGHT; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/mjson.js b/mixly/common/modules/mixly-modules/common/mjson.js new file mode 100644 index 00000000..06545592 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/mjson.js @@ -0,0 +1,68 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Debug'); +goog.provide('Mixly.MJson'); + +const { Debug, MJson } = Mixly; + +MJson.operate = (jsonObj, optFunc) => { + // 循环所有键 + for (var key in jsonObj) { + //如果对象类型为object类型且数组长度大于0 或者 是对象 ,继续递归解析 + var element = jsonObj[key]; + if (element.length > 0 && typeof (element) == "object" || typeof (element) == "object") { + let data = MJson.operate(element, optFunc); + for (let i in data) { + jsonObj[key][i] = data[i]; + } + } else { //不是对象或数组、直接输出 + if (typeof (element) === 'string') { + try { + jsonObj[key] = optFunc(jsonObj[key]); + } catch (error) { + Debug.error(error); + } + } + } + } + return jsonObj; +} + +MJson.decode = (jsonObj) => { + // 深度拷贝对象,防止解码或编码时篡改原有对象 + let newJsonObj = structuredClone(jsonObj); + return MJson.operate(newJsonObj, decodeURIComponent); +} + +MJson.encode = (jsonObj) => { + // 深度拷贝对象,防止解码或编码时篡改原有对象 + let newJsonObj = structuredClone(jsonObj); + return MJson.operate(newJsonObj, encodeURIComponent);; +} + +MJson.parse = (jsonStr) => { + let jsonObj = null; + try { + jsonStr = jsonStr.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? "" : m); + jsonObj = JSON.parse(jsonStr); + } catch (error) { + Debug.error(error); + } + return jsonObj; +} + +MJson.stringify = (jsonObj) => { + let jsonStr = ''; + try { + jsonStr = JSON.stringify(jsonObj); + } catch (error) { + Debug.error(error); + } + return jsonStr; +} + +MJson.get = (inPath) => { + return goog.readJsonSync(inPath); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/monaco-theme.js b/mixly/common/modules/mixly-modules/common/monaco-theme.js new file mode 100644 index 00000000..db5de20c --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/monaco-theme.js @@ -0,0 +1,119 @@ +goog.loadJs('common', () => { + +goog.require('monaco'); +goog.require('Mixly.Registry'); +goog.provide('Mixly.MonacoTheme'); + +const { Registry } = Mixly; + + +class MonacoTheme { + static { + this.cssClassNamePrefix = 'mts'; + this.themesRegistry = new Registry(); + this.supportThemes = []; + // this.supportThemes = ['cpp', 'python']; + + this.getClassNameOfTerm = function (type, theme, term) { + return `${this.cssClassNamePrefix}-${type}-${theme}-${term}`; + } + + /*this.themesRegistry.register('vs-dark-cpp', new MonacoTheme( + 'vs-dark-cpp', + 'cpp', + 'dark', + goog.readJsonSync('../common/templates/json/tree-sitter/themes/dark-cpp.json') + )); + + this.themesRegistry.register('vs-light-cpp', new MonacoTheme( + 'vs-light-cpp', + 'cpp', + 'light', + goog.readJsonSync('../common/templates/json/tree-sitter/themes/light-cpp.json') + )); + + this.themesRegistry.register('vs-dark-python', new MonacoTheme( + 'vs-dark-python', + 'python', + 'dark', + goog.readJsonSync('../common/templates/json/tree-sitter/themes/dark-python.json') + )); + + this.themesRegistry.register('vs-light-python', new MonacoTheme( + 'vs-light-python', + 'python', + 'light', + goog.readJsonSync('../common/templates/json/tree-sitter/themes/light-python.json') + ));*/ + } + + #id_ = null; + #type_ = null; + #theme_ = null; + #$tag_ = null; + #config_ = null; + + constructor(id, type, theme, config) { + this.#id_ = id; + this.#type_ = type; + this.#theme_ = theme; + this.load(config); + } + + load(config) { + monaco.editor.defineTheme(this.#id_, config.base); + this.#config_ = config; + + if (!this.#$tag_) { + let hasStyleNode = $('head').find(`style[style-id='${this.id_}']`).length; + if (hasStyleNode) { + return; + } + this.#$tag_ = $(''); + this.#$tag_.attr('style-id', this.id); + this.#$tag_.attr('type', 'text/css') + $('head').append(this.#$tag_); + } + + this.#$tag_.html(this.generateCss()); + } + + generateCss() { + return Object.keys(this.#config_.monacoTreeSitter) + .map(term => + `span.${MonacoTheme.getClassNameOfTerm(this.#type_, this.#theme_, term)}{${this.generateStyleOfTerm(term)}}` + ) + .join(''); + } + + generateStyleOfTerm(term) { + const style = this.#config_.monacoTreeSitter[term]; + if (!style) { + return ''; + } + + if (typeof style === 'string') { + return `color:${style}`; + } + + return `color:${style.color};${style.extraCssStyles || ''}`; + } + + getColorOfTerm(term) { + const style = this.#config_.monacoTreeSitter[term]; + if (!style) { + return undefined; + } + return typeof style === 'object' ? style.color : style; + } + + dispose() { + this.#$tag_ && this.#$tag_.remove(); + this.#$tag_ = null; + this.#config_ = null; + } +} + +Mixly.MonacoTheme = MonacoTheme; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/monaco-tree-sitter.js b/mixly/common/modules/mixly-modules/common/monaco-tree-sitter.js new file mode 100644 index 00000000..0aa5f7ae --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/monaco-tree-sitter.js @@ -0,0 +1,127 @@ +goog.loadJs('common', () => { + +goog.require('_'); +goog.require('monaco'); +goog.require('Mixly.Registry'); +goog.require('Mixly.MonacoTheme'); +goog.provide('Mixly.MonacoTreeSitter'); + +const { Registry, MonacoTheme } = Mixly; + + +class MonacoTreeSitter { + static { + this.workerPath = '../common/modules/mixly-modules/workers/common/tree-sitter/index.js'; + this.supportTreeSitters_ = new Registry(); + this.activeTreeSitters_ = new Registry(); + + /*this.supportTreeSitters_.register('python', { + workerName: 'pythonTreeSitterService', + wasm: 'tree-sitter-python.wasm' + }); + + this.supportTreeSitters_.register('cpp', { + workerName: 'cppTreeSitterService', + wasm: 'tree-sitter-cpp.wasm' + });*/ + + this.activateTreeSitter = async function (type) { + if (!this.supportTreeSitters_.hasKey(type)) return null; + + const info = this.supportTreeSitters_.getItem(type); + if (this.activeTreeSitters_.hasKey(type)) { + const ts = this.activeTreeSitters_.getItem(type); + if (ts.loading) await ts.loading; + return ts; + } + + const treeSitter = workerpool.pool(this.workerPath, { + workerOpts: { name: info.workerName }, + workerType: 'web' + }); + + const grammar = await goog.readJson( + `../common/templates/json/tree-sitter/grammars/${type}.json` + ); + + treeSitter.loading = treeSitter.exec( + 'init', + [info.wasm, grammar] + ); + + this.activeTreeSitters_.register(type, treeSitter); + await treeSitter.loading; + treeSitter.loading = null; + return treeSitter; + }; + + this.treeSitterPostion = function (pos) { + return { + row: pos.lineNumber - 1, + column: pos.column - 1 + }; + }; + } + + constructor(editor, opts) { + this.editor = editor; + + this.seq = 0; + this.decorations = []; + + this.refresh = _.debounce( + this.refresh.bind(this), + opts?.debounceUpdate ?? 15 + ); + } + + dispose() { + this.pool.terminate(true); + this.decorations = []; + } + + async updateWorker(type, theme, text) { + const treeSitter = await MonacoTreeSitter.activateTreeSitter(type); + if (!treeSitter) { + return; + } + const id = ++this.seq; + const dto = await treeSitter.exec('update', [text]); + if (id !== this.seq) return; + this.applyDecorations(type, theme, dto); + } + + applyDecorations(type, theme, dto) { + const decos = []; + + for (const [term, ranges] of Object.entries(dto)) { + const className = MonacoTheme.getClassNameOfTerm(type, theme, term); + for (const r of ranges) { + decos.push({ + range: new monaco.Range( + r.startLineNumber, + r.startColumn, + r.endLineNumber, + r.endColumn + ), + options: { + inlineClassName: className + } + }); + } + } + this.decorations = this.editor.getEditor().deltaDecorations(this.decorations, decos); + } + + refresh(type, theme, newText) { + this.updateWorker(type, theme, newText); + } + + setValue(type, theme, newText) { + this.refresh(type, theme, newText); + } +} + +Mixly.MonacoTreeSitter = MonacoTreeSitter; + +}); diff --git a/mixly/common/modules/mixly-modules/common/msg.js b/mixly/common/modules/mixly-modules/common/msg.js new file mode 100644 index 00000000..c8bbcb1a --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/msg.js @@ -0,0 +1,85 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.MJson'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Blockly'); +goog.require('Blockly.Lang.ZhHans'); +goog.require('Blockly.Lang.ZhHant'); +goog.require('Blockly.Lang.En'); +goog.provide('Mixly.Msg'); + +const { + Msg, + MJson, + Config, + Env +} = Mixly; + +const { USER } = Config; + +const { + ZhHans, + ZhHant, + En +} = Blockly.Lang; + + +Msg.LANG_TYPE = ['zh-hans', 'zh-hant', 'en']; +Msg.LANG = { + 'zh-hans': MJson.get(path.join(Env.msgPath, 'mixly/zh-hans.json')), + 'zh-hant': MJson.get(path.join(Env.msgPath, 'mixly/zh-hant.json')), + 'en': MJson.get(path.join(Env.msgPath, 'mixly/en.json')) +}; +Msg.BLOCKLY_LANG = { + 'zh-hans': ZhHans, + 'zh-hant': ZhHant, + 'en': En +}; +Msg.BLOCKLY_LANG_DEFAULT = { + 'zh-hans': MJson.get(path.join(Env.msgPath, 'blockly/default/zh-hans.json')), + 'zh-hant': MJson.get(path.join(Env.msgPath, 'blockly/default/zh-hant.json')), + 'en': MJson.get(path.join(Env.msgPath, 'blockly/default/en.json')) +}; +Msg.nowLang = USER.language ?? 'zh-hans'; +Msg.blocklyDefault = Blockly.Msg; + +Msg.getLang = (str) => { + return Msg.LANG[Msg.nowLang][str] ?? ''; +} + +Msg.changeTo = (lang) => { + lang = Msg.LANG_TYPE.includes(lang) ? lang : 'zh-hans'; + Msg.nowLang = lang; + Msg.Lang = Msg.LANG[lang]; + Blockly.Msg = Msg.BLOCKLY_LANG[lang]; + Object.assign(Msg.blocklyDefault, Msg.BLOCKLY_LANG_DEFAULT[lang]); +} + +Msg.renderToolbox = (addToolboxitemid = false) => { + let $categories = $('#toolbox').find('category'); + for (let i = 0; i < $categories.length; i++) { + let { id } = $categories[i]; + if (!Blockly.Msg.MSG[id]) { + continue; + } + let $category = $($categories[i]); + $category.attr('name', Blockly.Msg.MSG[id]); + if (addToolboxitemid) { + if ($category.attr('toolboxitemid')) { + continue; + } + $category.attr({ + 'toolboxitemid': id, + 'name': Blockly.Msg.MSG[id] + }); + } else { + $(`span[id="${id}.label"]`).html(Blockly.Msg.MSG[id]); + } + } +} + +Msg.changeTo(Msg.nowLang); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/mstring.js b/mixly/common/modules/mixly-modules/common/mstring.js new file mode 100644 index 00000000..07051419 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/mstring.js @@ -0,0 +1,76 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Debug'); +goog.provide('Mixly.MString'); + +const { Debug, MString } = Mixly; + +/** + * @function 使用传入值替换字符串中{xxx} + * @param str {string} 传入字符串 + * @param obj {object} + * obj = { + * xxx: value1, + * xxx: value2 + * } + * 使用value替换{xxx} + * @return {string} 返回处理后的字符串 + **/ +MString.tpl = (str, obj) => { + if (typeof str !== 'string' || !(obj instanceof Object)) { + return str; + } + for (let key in obj) { + let re = new RegExp("{[\s]*" + key + "[\s]*}", "gim"); + str = str.replace(re, obj[key]); + } + return str; +} + +MString.decode = (str) => { + try { + str = unescape(str.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/gm, '%$1')); + str = unescape(str.replace(/\\(u[0-9a-fA-F]{4})/gm, '%$1')); + } catch (error) { + Debug.error(error); + } + return str; +} + +MString.strToByte = (str) => { + var len, c; + len = str.length; + var bytes = []; + for (var i = 0; i < len; i++) { + c = str.charCodeAt(i); + if (c >= 0x010000 && c <= 0x10FFFF) { + bytes.push(((c >> 18) & 0x07) | 0xF0); + bytes.push(((c >> 12) & 0x3F) | 0x80); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if (c >= 0x000800 && c <= 0x00FFFF) { + bytes.push(((c >> 12) & 0x0F) | 0xE0); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if (c >= 0x000080 && c <= 0x0007FF) { + bytes.push(((c >> 6) & 0x1F) | 0xC0); + bytes.push((c & 0x3F) | 0x80); + } else { + bytes.push(c & 0xFF); + } + } + return new Int8Array(bytes); +} + +MString.uint8ArrayToStr = (fileData) => { + var dataString = ""; + for (var i = 0; i < fileData.length; i++) { + var convert = (fileData[i]).toString(16); + if (convert.length % 2 == 1) + convert = "0" + convert; + dataString = dataString + " " + convert.toUpperCase(); + } + return dataString; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/nav.js b/mixly/common/modules/mixly-modules/common/nav.js new file mode 100644 index 00000000..0a0e3efe --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/nav.js @@ -0,0 +1,464 @@ +goog.loadJs('common', () => { + +goog.require('layui'); +goog.require('$.select2'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Component'); +goog.require('Mixly.DropdownMenuGroup'); +goog.provide('Mixly.Nav'); + +const { + Env, + XML, + Msg, + HTMLTemplate, + Component, + DropdownMenuGroup +} = Mixly; + +const { element } = layui; + + +class Nav extends Component { + static { + /** + * nav容器html片段 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/nav.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/nav.html'))) + ); + + /** + * nav按钮html片段 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/nav-btn.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/nav-btn.html'))) + ); + + /** + * nav子元素容器html片段 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/nav-item-container.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/nav-item-container.html'))) + ); + + /** + * nav子元素html片段 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/nav-item.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/nav-item.html'))) + ); + + /** + * 板卡选择器html片段 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/board-selector-div.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/board-selector-div.html'))) + ); + + /** + * 端口选择器html片段 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/port-selector-div.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/port-selector-div.html'))) + ); + + /** + * 下拉菜单遮罩 + * @type {String} + */ + HTMLTemplate.add( + 'html/nav/shadow.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/nav/shadow.html'))) + ); + + Nav.Scope = { + 'LEFT': -1, + 'CENTER': 0, + 'RIGHT': 1, + '-1': 'LEFT', + '0': 'CENTER', + '1': 'RIGHT' + }; + + this.navs = []; + + this.getAll = () => { + return this.navs; + } + + this.add = (nav) => { + this.remove(nav); + this.navs.push(nav); + } + + this.remove = (nav) => { + for (let i in this.workspaces) { + if (this.navs[i].id !== nav.id) { + continue; + } + this.navs.slice(i, 1); + } + } + + this.getMain = () => { + if (this.navs.length) { + return this.navs[0]; + } + return null; + } + } + + #$container_ = null; + #$leftBtnContainer_ = null; + #$leftBtnExtContainer_ = null; + #$rightBtnContainer_ = null; + #$dropdownContainer_ = null; + #$rightMenuContainer_ = null; + #$rightArea_ = null; + #$editorBtnsContainer_ = null; + #$boardSelect_ = null; + #$portSelect_ = null; + #$shadow_ = $(HTMLTemplate.get('html/nav/shadow.html').render()); + #btns_ = []; + #rightDropdownMenuGroup_ = null; + + constructor() { + super(); + const navTemplate = HTMLTemplate.get('html/nav/nav.html'); + this.setId(navTemplate.getId()); + this.#$container_ = $(navTemplate.render({ + more: Msg.Lang['nav.more'] + })); + this.setContent(this.#$container_); + this.#$leftBtnContainer_ = this.#$container_.find('.left-btn-container'); + this.#$leftBtnExtContainer_ = this.#$container_.find('.left-btn-ext-container'); + this.#$rightBtnContainer_ = this.#$container_.find('.right-btn-container'); + this.#$dropdownContainer_ = this.#$container_.find('.dropdown-container'); + this.#$rightMenuContainer_ = this.#$container_.find('.right-menu-container'); + this.#$rightArea_ = this.#$container_.find('.right-area'); + this.#$editorBtnsContainer_ = this.#$container_.find('.editor-btn-container'); + const boardSelectTemplate = HTMLTemplate.get('html/nav/board-selector-div.html'); + this.#$boardSelect_ = $(boardSelectTemplate.render()); + this.#$dropdownContainer_.append(this.#$boardSelect_); + this.#$boardSelect_.select2({ + width: '150px', + minimumResultsForSearch: 10, + dropdownCssClass: `mixly-scrollbar mixly-${boardSelectTemplate.getId()}`, + dropdownAutoWidth: true, + placeholder: Msg.Lang['nav.selectBoard'], + language: Msg.nowLang + }); + const portSelectTemplate = HTMLTemplate.get('html/nav/port-selector-div.html'); + this.#$portSelect_ = $(portSelectTemplate.render()); + this.#$dropdownContainer_.append(this.#$portSelect_); + this.#$portSelect_.select2({ + width: '100px', + minimumResultsForSearch: Infinity, + dropdownCssClass: `mixly-scrollbar mixly-${portSelectTemplate.getId()}`, + dropdownAutoWidth: true, + placeholder: Msg.Lang['nav.selectPort'] + }); + const $merge = this.#$boardSelect_.add(this.#$portSelect_); + let count = 0; + $merge.on('select2:opening', (event) => { + count += 1; + $(document.body).append(this.#$shadow_); + }); + $merge.on('select2:closing', () => { + count -= 1; + !count && this.#$shadow_.detach(); + }); + this.#$shadow_.click(() => $merge.select2('close')); + this.addEventsType(['changeBoard', 'changePort']); + this.#addEventsListener_(); + this.#rightDropdownMenuGroup_ = new DropdownMenuGroup(this.#$rightMenuContainer_[0]); + Nav.add(this); + this.list = []; + } + + onMounted() { + super.onMounted(); + element.render('nav', 'nav-filter'); + } + + getEditorBtnsContainer() { + return this.#$editorBtnsContainer_; + } + + getBoardSelector() { + return this.#$boardSelect_; + } + + getPortSelector() { + return this.#$portSelect_; + } + + getBoardName() { + return this.#$boardSelect_.find(':selected').text(); + } + + getBoardKey() { + return this.#$boardSelect_.val(); + } + + getPortName() { + return this.#$portSelect_.find(':selected').text(); + } + + getPortKey() { + return this.#$portSelect_.val(); + } + + /** + * @function 注册函数 + * @param config 选项 + * { + * icon: String, + * title: String, + * id: String | Array, + * displayText: String, + * preconditionFn: Function, + * callback: Function, + * scopeType: Nav.SCOPE_TYPE, + * weight: Number + * } + * @return {void} + **/ + register(config) { + const { scopeType = Nav.ScopeType.LEFT } = config; + config = { + preconditionFn: () => true, + ...config + }; + const { + id = '', + title = '', + icon = '', + displayText = '' + } = config; + switch (scopeType) { + case Nav.Scope.LEFT: + config.$moreBtn = $(HTMLTemplate.get('html/nav/nav-item.html').render({ + mId: id, + icon, + text: displayText + })); + case Nav.Scope.CENTER: + config.$btn = $(HTMLTemplate.get('html/nav/nav-btn.html').render({ + title, + mId: id, + icon, + text: displayText + })); + break; + } + this.#add_(config); + return config; + } + + #add_(config) { + const { + scopeType = Nav.ScopeType.LEFT, + id = '' + } = config; + switch (scopeType) { + case Nav.Scope.LEFT: + if (id === 'home-btn') { + this.#btns_[config.id] = config; + } else { + this.#addLeftBtn_(config); + } + break; + case Nav.Scope.CENTER: + this.#addCenterBtn_(config); + break; + case Nav.Scope.RIGHT: + this.#addRightBtn_(config); + break; + } + } + + /** + * @function 取消注册函数 + * @param config 选项 + * { + * id: String | Array, + * scopeType: Nav.SCOPE_TYPE + * } + * @return {void} + **/ + unregister(config) { + + } + + #getElemWidth_(elem) { + const display = elem.css('display'); + if (display !== 'none') { + return elem.outerWidth(true); + } + const visibility = elem.css('visibility'); + const position = elem.css('position'); + elem.css({ + display: 'block', + visibility: 'hidden', + position: 'absolute' + }); + const width = elem.outerWidth(true); + elem.css({ display, visibility, position }); + return width; + } + + #addEventsListener_() { + $(document).off('click', '.mixly-nav') + .on('click', '.mixly-nav', (event) => { + const mId = $(event.currentTarget).attr('m-id'); + if (this.#btns_[mId] + && typeof this.#btns_[mId].callback === 'function') { + this.#btns_[mId].callback(this); + } + }); + + this.#$boardSelect_.on('select2:select', (event) => { + const { data } = event.params; + this.runEvent('changeBoard', data); + }); + + this.#$portSelect_.on('select2:select', (event) => { + const { data } = event.params; + this.runEvent('changePort', data); + $('#mixly-footer-port-div').css('display', 'inline-flex'); + $('#mixly-footer-port').html(data.id); + }); + } + + #addLeftBtn_(config) { + const { id = '', weight = 0 } = config; + if (Object.keys(this.#btns_).includes(id)) { + this.#btns_[id].$btn.remove(); + this.#btns_[id].$moreBtn.remove(); + delete this.#btns_[id]; + } + let $btn = null; + let $moreBtn = null; + const $btns = this.#$leftBtnContainer_.children('button'); + for (let i = 0; $btns[i]; i++) { + const mId = $($btns[i]).attr('m-id'); + if (!this.#btns_[mId]) { + continue; + } + if (weight < this.#btns_[mId].weight) { + $btn = this.#btns_[mId].$btn; + $moreBtn = this.#btns_[mId].$moreBtn; + break; + } + } + if ($btn) { + $btn.before(config.$btn); + $moreBtn.before(config.$moreBtn); + } else { + this.#$leftBtnContainer_.append(config.$btn); + this.#$leftBtnExtContainer_.append(config.$moreBtn); + } + config.width = this.#getElemWidth_(config.$btn); + this.#btns_[id] = config; + this.resize(); + } + + #addCenterBtn_(config) { + const { id = '', weight = 0 } = config; + let $btn = null; + const $btns = this.#$rightBtnContainer_.children('button'); + for (let i = 0; $btns[i]; i++) { + const mId = $($btns[i]).attr('m-id'); + if (!this.#btns_[mId]) { + continue; + } + if (weight < this.#btns_[mId].weight) { + $btn = this.#btns_[mId].$btn; + break; + } + } + if ($btn) { + $btn.before(config.$btn); + } else { + this.#$rightBtnContainer_.append(config.$btn); + } + config.width = this.#getElemWidth_(config.$btn); + this.#btns_[id] = config; + this.resize(); + } + + #addRightBtn_(config) { + const { preconditionFn } = config; + if (!preconditionFn()) { + return; + } + this.#rightDropdownMenuGroup_.add(config); + this.resize(); + } + + resize() { + super.resize(); + this.#$boardSelect_.select2('close'); + this.#$portSelect_.select2('close'); + const navRightWidth = this.#getElemWidth_(this.#$rightArea_); + const navWidth = this.#getElemWidth_(this.#$container_); + const $btns = this.#$leftBtnContainer_.children('button'); + let nowWidth = navRightWidth; + let showMoreBtnContainer = false; + for (let i = 0; $btns[i]; i++) { + const mId = $($btns[i]).attr('m-id'); + if (mId === 'home-btn') { + continue; + } + const config = this.#btns_[mId]; + let newWidth = nowWidth; + if (config) { + const { preconditionFn } = config; + if (!preconditionFn()) { + config.$btn.css('display', 'none'); + config.$moreBtn.css('display', 'none'); + continue; + } + newWidth += config.width; + } else { + newWidth += this.#getElemWidth_($($btns[i])); + continue; + } + if (navWidth < newWidth + this.#$editorBtnsContainer_.outerWidth(true) + 130) { + config.$btn.css('display', 'none'); + config.$moreBtn.css('display', 'block'); + showMoreBtnContainer = true; + } else { + config.$btn.css('display', 'block'); + config.$moreBtn.css('display', 'none'); + nowWidth = newWidth; + } + } + if (navWidth < nowWidth + this.#$editorBtnsContainer_.outerWidth(true) + 130) { + showMoreBtnContainer = false; + } + const parent = this.#$leftBtnExtContainer_.parent(); + parent.css('display', showMoreBtnContainer? 'block' : 'none'); + } +} + +Mixly.Nav = Nav; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/page-base.js b/mixly/common/modules/mixly-modules/common/page-base.js new file mode 100644 index 00000000..b3ae2a21 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/page-base.js @@ -0,0 +1,159 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Component'); +goog.require('Mixly.Events'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Component'); +goog.provide('Mixly.PageBase'); + +const { + Events, + Registry, + Component +} = Mixly; + +class PageBase extends Component { + #pages_ = new Registry(); + #$tab_ = null; + #$close_ = null; + #dirty_ = false; + #active_ = true; + #inited_ = false; + + constructor() { + super(); + this.addEventsType(['created', 'addDirty', 'removeDirty', 'active']); + } + + init() { + this.#forward_('init'); + this.#inited_ = true; + this.runEvent('created'); + } + + addPage($child, id, page) { + this.#pages_.register(id, page); + $child.append(page.getContent()); + } + + removePage(id) { + const page = this.getPage(id); + if (!page) { + return; + } + this.#pages_.unregister(id); + page.dispose(); + } + + getPage(id) { + return this.#pages_.getItem(id); + } + + mountPage($child, id, page) { + if (!this.isMounted()) { + return; + } + this.addPage($child, id, page); + page.onMounted(); + } + + resize() { + super.resize(); + this.#forward_('resize'); + } + + dispose() { + this.#forward_('dispose'); + this.#pages_.reset(); + this.#$close_ = null; + this.#$tab_ && this.#$tab_.remove(); + this.#$tab_ = null; + super.dispose(); + } + + #forward_(type, ...args) { + this.#pages_.getAllItems().forEach((page) => { + if (typeof page[type] !== 'function') { + return; + } + page[type](...args); + }); + } + + onMounted() { + super.onMounted(); + this.#forward_('onMounted'); + this.setActive(true); + this.runEvent('active'); + } + + onUnmounted() { + super.onUnmounted(); + this.#forward_('onUnmounted'); + this.setActive(false); + } + + setActive(status) { + this.#forward_('setActive', status); + this.#active_ = status; + } + + setTab($tab) { + this.#$tab_ = $tab; + this.#$close_ = $tab.find('.chrome-tab-close'); + } + + hideCloseBtn() { + this.#$close_.css('display', 'none'); + } + + showCloseBtn() { + this.#$close_.css('display', 'block'); + } + + getTab() { + return this.#$tab_; + } + + setMarkStatus(styleClass) { + this.#$close_.attr('class', `chrome-tab-close layui-badge-dot ${styleClass}`); + } + + addDirty() { + this.#forward_('addDirty'); + const $tab = this.getTab(); + if (!$tab || this.isDirty()) { + return; + } + $tab.addClass('dirty'); + this.runEvent('addDirty'); + this.#dirty_ = true; + } + + removeDirty() { + this.#forward_('removeDirty'); + const $tab = this.getTab(); + if (!$tab || !this.isDirty()) { + return; + } + this.runEvent('removeDirty'); + $tab.removeClass('dirty'); + this.#dirty_ = false; + } + + isDirty() { + return this.#dirty_; + } + + isInited() { + return this.#inited_; + } + + isActive() { + return this.#active_; + } +} + +Mixly.PageBase = PageBase; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/pages-manager.js b/mixly/common/modules/mixly-modules/common/pages-manager.js new file mode 100644 index 00000000..aaecf27a --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/pages-manager.js @@ -0,0 +1,212 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.PagesTab'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Component'); +goog.provide('Mixly.PagesManager'); + +const { + PagesTab, + Registry, + Component +} = Mixly; + +class PagesManager extends Component { + #tabs_ = null; + #welcomePage_ = null; + #$editorContainer_ = null; + #$tabsContainer_ = null; + #$parentContainer_ = null; + #pagesRegistry_ = new Registry(); + #page_ = 'welcome'; + #activeId_ = null; + #typesRegistry_ = null; + + /** + * config = { + * parentElem: element, + * managerContentElem: element, + * bodyElem: element, + * tabElem: element, + * tabContentElem: element, + * typesRegistry: Mixly.Registry + * } + **/ + constructor(config) { + super(); + this.#$parentContainer_ = $(config.parentElem); + const $content = $(config.managerContentElem); + this.#typesRegistry_ = config.typesRegistry; + this.#$tabsContainer_ = $(config.tabElem); + this.#$editorContainer_ = $(config.bodyElem); + this.#tabs_ = new PagesTab({ + parentElem: config.tabElem, + contentElem: config.tabContentElem + }); + $content.append(this.#$editorContainer_); + this.setContent($content); + this.mountOn(this.#$parentContainer_); + let PageType = this.#typesRegistry_.getItem('#welcome'); + if (PageType) { + this.#welcomePage_ = new PageType(); + this.#showWelcomePage_(); + } + this.#addEventsListener_(); + } + + #addEventsListener_() { + const pageTabs = this.getTabs(); + // active Tab被改变时触发 + pageTabs.bind('activeTabChange', (event) => { + const prevEditor = this.getActive(); + const { tabEl } = event.detail; + const $tab = $(tabEl); + const id = $tab.attr('data-tab-id'); + $tab.find('.chrome-tab-favicon').addClass('active'); + const page = this.get(id); + this.#activeId_ = id; + if (prevEditor) { + const $prevTab = prevEditor.getTab(); + $prevTab.find('.chrome-tab-favicon').removeClass('active'); + prevEditor.unmount(); + } + this.#$editorContainer_.empty(); + this.#$editorContainer_.append(page.getContent()); + page.onMounted(); + page.resize(); + }); + + // 添加新Tab时触发 + pageTabs.bind('tabCreated', (event) => { + const { tabEl } = event.detail; + const id = $(tabEl).attr('data-tab-id'); + const type = $(tabEl).attr('data-tab-type'); + let PageType = this.#typesRegistry_.getItem(type); + if (!PageType) { + PageType = this.#typesRegistry_.getItem('#default'); + } + let page = new PageType(); + this.#pagesRegistry_.register(id, page); + page.setTab($(tabEl)); + if (this.#welcomePage_ + && this.#pagesRegistry_.length() + && this.#page_ === 'welcome') { + this.#hideWelcomePage_(); + } + page.init(); + }); + + // 移除已有Tab时触发 + pageTabs.bind('tabDestroyed', (event) => { + const { tabEl } = event.detail; + const id = $(tabEl).attr('data-tab-id'); + const page = this.get(id); + if (!page) { + return; + } + page.dispose(); + this.#pagesRegistry_.unregister(id); + if (this.#welcomePage_ + && !this.#pagesRegistry_.length() + && this.#page_ !== 'welcome') { + this.#showWelcomePage_(); + } + }); + } + + #showWelcomePage_() { + this.unmount(); + this.#welcomePage_.mountOn(this.#$parentContainer_); + this.#page_ = 'welcome'; + } + + #hideWelcomePage_() { + this.#welcomePage_.unmount(); + this.mountOn(this.#$parentContainer_); + this.#page_ = 'editor'; + } + + resize() { + super.resize(); + const page = this.getActive(); + page && page.resize(); + this.#tabs_.resize(); + } + + onMounted() { + super.onMounted(); + const page = this.getActive(); + page && page.onMounted(); + this.#tabs_.onMounted(); + } + + onUnmounted() { + const page = this.getActive(); + page && page.onUnmounted(); + this.#tabs_.onUnmounted(); + super.onUnmounted(); + } + + getActive() { + return this.get(this.#activeId_); + } + + add(...args) { + if (args[0] && typeof args[0] === 'object') { + this.#tabs_.addTab(args[0]); + } else { + const [type, id, name, title, favicon] = args; + this.#tabs_.addTab({ + type, + id, + name: name ?? id, + title: title ?? id, + favicon + }); + } + } + + remove(id) { + this.#tabs_.removeTab(id); + } + + changeTo(id) { + if (!this.get(id)) { + return; + } + this.#tabs_.setCurrentTab(id); + } + + get(id) { + return this.#pagesRegistry_.getItem(id); + } + + keys() { + return this.#pagesRegistry_.keys(); + } + + length() { + return this.#pagesRegistry_.length(); + } + + getTabs() { + return this.#tabs_; + } + + dispose() { + for (let id of this.keys()) { + this.remove(id); + } + this.#tabs_.dispose(); + this.#welcomePage_ && this.#welcomePage_.dispose(); + this.#tabs_ = null; + this.#welcomePage_ = null; + this.#$tabsContainer_ = null; + this.#$editorContainer_ = null; + super.dispose(); + } +} + +Mixly.PagesManager = PagesManager; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/pages-tab.js b/mixly/common/modules/mixly-modules/common/pages-tab.js new file mode 100644 index 00000000..c60af8f1 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/pages-tab.js @@ -0,0 +1,164 @@ +goog.loadJs('common', () => { + +goog.require('_'); +goog.require('path'); +goog.require('ChromeTabs'); +goog.require('XScrollbar'); +goog.require('Sortable'); +goog.require('$.contextMenu'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.Config'); +goog.require('Mixly.Events'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Component'); +goog.provide('Mixly.PagesTab'); + +const { + IdGenerator, + Config, + Events, + Registry, + Component +} = Mixly; + +const { USER } = Config; + +class PagesTab extends Component { + #chromeTabs_ = null; + #scrollbar_ = null; + #tabsRegistry_ = null; + #sortable_ = null; + + /** + * config = { + * parentElem: element, + * contentElem: element + * } + **/ + constructor(config) { + super(); + const $parentsContainer = $(config.parentElem); + const $content = $(config.contentElem); + this.$tabsContainer = $content.children('div'); + this.#chromeTabs_ = new ChromeTabs(); + this.#chromeTabs_.init(this.$tabsContainer[0]); + this.#scrollbar_ = new XScrollbar($content.find('.chrome-tabs-content')[0], { + onlyHorizontal: true, + thumbSize: 1.7, + thumbRadius: 0, + thumbBackground: USER.theme === 'dark'? '#b0b0b0' : '#5f5f5f' + }); + this.#sortable_ = new Sortable(this.#chromeTabs_.tabContentEl, { + animation: 150, + ghostClass: 'blue-background-class', + direction: 'horizontal' + }); + this.setContent($content); + this.mountOn($parentsContainer); + this.#addEventsListener_(); + this.#tabsRegistry_ = new Registry(); + this.addEventsType(['activeTabChange', 'tabCreated', 'tabDestroyed', 'tabCheckDestroy', 'tabBeforeDestroy']); + } + + #addEventsListener_() { + const { $tabsContainer } = this; + const container = $tabsContainer[0]; + + this.#chromeTabs_.checkDestroy = (event) => { + const status = this.runEvent('tabCheckDestroy', event); + return _.sum(status) == status.length; + } + + // active Tab被改变时触发 + container.addEventListener('activeChange', (event) => { + this.runEvent('activeTabChange', event); + }); + + // 添加新Tab时触发 + container.addEventListener('created', (event) => { + const { tabEl } = event.detail; + const tabId = $(tabEl).attr('data-tab-id'); + this.#tabsRegistry_.register(tabId, tabEl); + this.runEvent('tabCreated', event); + setTimeout(() => { + this.#scrollbar_.update(); + }, 500); + }); + + // 移除已有Tab之前触发 + container.addEventListener('beforeDestroy', (event) => { + this.runEvent('tabBeforeDestroy', event); + }); + + // 移除已有Tab时触发 + container.addEventListener('destroyed', (event) => { + const { tabEl } = event.detail; + const tabId = $(tabEl).attr('data-tab-id'); + this.#tabsRegistry_.unregister(tabId); + this.runEvent('tabDestroyed', event); + setTimeout(() => { + this.#scrollbar_ && this.#scrollbar_.update(); + }, 500); + }); + } + + addTab(tabProperties, others = {}) { + tabProperties = { ...tabProperties }; + const { id } = tabProperties; + tabProperties.id = id ?? IdGenerator.generate(); + let tab = this.#tabsRegistry_.getItem(tabProperties.id); + if (tab) { + this.updateTab(tabProperties.id, tabProperties); + this.setCurrentTab(tabProperties.id); + } else { + tab = this.#chromeTabs_.addTab(tabProperties, others); + } + let { left } = $(tab).position(); + this.#scrollbar_.$container.scrollLeft = left; + this.#scrollbar_.update(); + } + + removeTab(id) { + const elem = this.#tabsRegistry_.getItem(id); + this.#chromeTabs_.removeTab(elem); + } + + setCurrentTab(id) { + const elem = this.#tabsRegistry_.getItem(id); + this.#chromeTabs_.setCurrentTab(elem); + } + + updateTab(id, tabProperties) { + const elem = this.#tabsRegistry_.getItem(id); + const newId = tabProperties.id || id; + this.#chromeTabs_.updateTab(elem, tabProperties); + if (id !== newId) { + this.#tabsRegistry_.unregister(id); + this.#tabsRegistry_.register(id, elem); + } + } + + getScrollbar() { + return this.#scrollbar_; + } + + getSortable() { + return this.#sortable_; + } + + dispose() { + this.#chromeTabs_.dispose(); + this.#chromeTabs_ = null; + this.#tabsRegistry_.reset(); + this.#tabsRegistry_ = null; + this.#sortable_.destroy(); + this.#sortable_ = null; + this.#scrollbar_.destroy(); + this.#scrollbar_ = null; + super.dispose(); + } +} + +Mixly.PagesTab = PagesTab; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/profile.js b/mixly/common/modules/mixly-modules/common/profile.js new file mode 100644 index 00000000..d36ea646 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/profile.js @@ -0,0 +1,57 @@ +goog.loadJs('common', () => { + +goog.require('Mixly'); +goog.provide('Mixly.Profile'); + +const { Profile } = Mixly; + +Profile.parse = function (range) { + let pinList = []; + for (let i of range) { + const pinInfo = i.split('-'); + switch (pinInfo.length) { + case 1: + const pinNumStr = pinInfo[0].toString(); + if (!isNaN(pinNumStr)) { + const pinNum = parseInt(pinNumStr); + pinList.push(pinNum); + } + break; + case 2: + const pinNumStr0 = pinInfo[0].toString(), + pinNumStr1 = pinInfo[1].toString(); + if (!isNaN(pinNumStr0) && !isNaN(pinNumStr1)) { + let pinNum0 = parseInt(pinNumStr0); + let pinNum1 = parseInt(pinNumStr1); + if (pinNum0 < 0 || pinNum1 < 0) break; + if (pinNum0 > pinNum1) { + [ pinNum0, pinNum1 ] = [ pinNum1, pinNum0 ]; + } + for (let j = pinNum0; j <= pinNum1; j++) { + if (!pinList.includes(j)) { + pinList.push(j); + } + } + } + break; + } + } + return pinList; +}; + +Profile.generate = function (pinMap, add1 = '', add2 = '') { + const getPins = (list) => { + let pins = []; + for (let i of list) { + const pin = [ add1 + i, add2 + i ]; + pins.push(pin); + } + return pins; + } + const pinList = this.parse(pinMap); + return getPins(pinList); +}; + +window.profile = Profile; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/registry.js b/mixly/common/modules/mixly-modules/common/registry.js new file mode 100644 index 00000000..eaf00904 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/registry.js @@ -0,0 +1,71 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Debug'); +goog.provide('Mixly.Registry'); + +const { Debug } = Mixly; + +class Registry { + #registry_ = new Map(); + + constructor() { + this.reset(); + } + + reset() { + this.#registry_.clear(); + } + + validate(keys) { + if (!(keys instanceof Array)) { + keys = [keys]; + } + return keys; + } + + register(keys, value) { + keys = this.validate(keys); + for (let key of keys) { + if (this.#registry_.has(key)) { + Debug.warn(`${key}已存在,不可重复注册`); + continue; + } + this.#registry_.set(key, value); + } + } + + unregister(keys) { + keys = this.validate(keys); + for (let key of keys) { + if (!this.#registry_.has(key)) { + Debug.warn(`${key}不存在,无需取消注册`); + continue; + } + this.#registry_.delete(key); + } + } + + length() { + return this.#registry_.size; + } + + hasKey(key) { + return this.#registry_.has(key); + } + + keys() { + return [...this.#registry_.keys()]; + } + + getItem(key) { + return this.#registry_.get(key) ?? null; + } + + getAllItems() { + return this.#registry_; + } +} + +Mixly.Registry = Registry; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/regression.js b/mixly/common/modules/mixly-modules/common/regression.js new file mode 100644 index 00000000..6cbc6bd6 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/regression.js @@ -0,0 +1,84 @@ +goog.loadJs('common', () => { + +goog.require('Mixly'); +goog.provide('Mixly.Regression'); + +class Regression { + constructor() { + this.x = []; + this.y = []; + this.n = 0; + this.beta = 1; + this.alpha = 0; + } + /** + * 适配 + * @param {Array} x + * @param {Array} y + */ + fit(x, y) { + this.x = x; + this.y = y; + this.n = x.length; + this.beta = this.getBeta(); + this.alpha = this.getAlpha(this.beta); + } + /** + * 预测 + * @param {Array} x 数据集 + * @returns {Array} 预测结果数据集 + */ + predict(x) { + if (!Array.isArray(x)) x = [x]; + const y = []; + for (const num of x) { + y.push(this.alpha + num * this.beta); + } + return y; + } + /** + * 获取beta + * @returns {Number} 斜率 + */ + getBeta() { + const beta = (this.sum(this.x, (v, k) => v * this.y[k]) * this.n + - this.sum(this.x) * this.sum(this.y)) / + (this.sum(this.x, (v) => v * v) * this.n + - Math.pow(this.sum(this.x), 2)); + return beta; + } + /** + * 获取alpha + * @param {Number} beta 斜率 + * @returns {Number} 偏移量 + */ + getAlpha(beta) { + return this.avg(this.y) - this.avg(this.x) * beta; + } + /** + * 求和(Σ) + * @param {Array} arr 数字集合 + * @param {Function} fun 每个集合的操作方法 + */ + sum(arr, fun = (v, k) => v) { + let s = 0; + const operate = fun; + for (let i = 0; i < arr.length; i++) { + let num = arr[i]; + s += operate(num, i); + } + return s; + } + /** + * 均值 + * @param {Array} arr 数字集合 + */ + avg(arr) { + const s = this.sum(arr); + return s / arr.length; + } +} + +Mixly.Regression = Regression; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/script-loader.js b/mixly/common/modules/mixly-modules/common/script-loader.js new file mode 100644 index 00000000..363f841a --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/script-loader.js @@ -0,0 +1,65 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Env'); +goog.provide('Mixly.ScriptLoader'); + + +const { Env, ScriptLoader } = Mixly; + +/** + * 加载 script 文件 + * @param src + */ +ScriptLoader.loadScript = function (src) { + let addSign = true; + let scripts = document.getElementsByTagName('script'); + for (let i = 0; i < scripts.length; i++) { + if (scripts[i] && scripts[i].src && scripts[i].src.indexOf(src) !== -1) { + addSign = false; + } + } + if (addSign) { + let $script = document.createElement('script'); + $script.setAttribute('type', 'text/javascript'); + $script.setAttribute('src', src); + //$script.setAttribute('async', ''); + document.getElementsByTagName('head').item(0).appendChild($script); + } +} + +/** + * 删除 script 文件 + * @param src + */ +ScriptLoader.removeScript = function (src) { + let scripts = document.getElementsByTagName('script'); + if (src.indexOf('../') !== -1) { + src = src.substring(src.lastIndexOf('../') + 3, src.length); + } + for (let i = 0; i < scripts.length; i++) { + if (scripts[i] && scripts[i].src && scripts[i].src.indexOf(src) !== -1) { + scripts[i].parentNode.removeChild(scripts[i]); + } + } +} + +ScriptLoader.loadLangJs = function (oldLang, newLang, doFunc) { + let scripts = document.querySelectorAll('script'); + let newLangPathArr = []; + for (let i = 0; i < scripts.length; i++) { + if (scripts[i] && scripts[i].src && scripts[i].src.indexOf(oldLang + '.js') !== -1) { + let oldLangPath = scripts[i].src; + let newLangPath = oldLangPath.replace(oldLang + '.js', newLang + '.js'); + scripts[i].parentNode.removeChild(scripts[i]); + newLangPathArr.push(newLangPath); + } + } + for (let i = 0; i < Env.thirdPartyJS.length; i++) { + Env.thirdPartyJS[i] = Env.thirdPartyJS[i].replace(oldLang + '.js', newLang + '.js'); + } + LazyLoad.js(newLangPathArr, function () { + doFunc(); + }); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/serial.js b/mixly/common/modules/mixly-modules/common/serial.js new file mode 100644 index 00000000..9a7df1d2 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/serial.js @@ -0,0 +1,398 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Config'); +goog.require('Mixly.Events'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Nav'); +goog.require('Mixly.Msg'); +goog.provide('Mixly.Serial'); + +const { + Config, + Events, + Registry, + Nav, + Msg +} = Mixly; + +const { SELECTED_BOARD } = Config; + + +class Serial { + static { + this.portsName = []; + this.portToNameRegistry = new Registry(); + this.nameToPortRegistry = new Registry(); + this.DEFAULT_CONFIG = { + ctrlCBtn: false, + ctrlDBtn: false, + baudRates: 9600, + yMax: 100, + yMin: 0, + pointNum: 100, + rts: true, + dtr: true + }; + this.AVAILABEL_BAUDS = [ + 300, 600, 750, 1200, 2400, 4800, 9600, 19200, 31250, 38400, 57600, + 74880, 115200, 230400, 250000, 460800, 500000, 921600, 1000000, 2000000, + ]; + + this.getSelectedPortName = function () { + return Nav.getMain().getPortSelector().val(); + } + + this.getCurrentPortsName = function () { + return this.portsName; + } + + this.refreshPorts = function () { + let portsName = []; + for (let name of Serial.nameToPortRegistry.keys()) { + portsName.push({ name }); + } + Serial.renderSelectBox(portsName); + } + + this.getConfig = function () { + let config = SELECTED_BOARD?.serial ?? {}; + return { + ...this.DEFAULT_CONFIG, + ...config + }; + } + + this.portIsLegal = function (port) { + return this.portsName.includes(port); + } + + /** + * @function 重新渲染串口下拉框 + * @param {array} 当前可用的所有串口 + * @return {void} + **/ + this.renderSelectBox = function (ports) { + const $portSelector = Nav.getMain().getPortSelector(); + const selectedPort = $portSelector.val(); + $portSelector.empty(); + if (ports.length) { + let portsName = []; + ports.map(port => { + portsName.push(port.name); + }); + portsName.sort(); + this.portsName = portsName; + portsName.map(name => { + let newOption = new Option(name, name); + if (selectedPort === name) { + newOption.setAttribute('selected', true); + } + $portSelector.append(newOption); + }); + } else { + this.portsName = []; + let newOption = new Option(Msg.Lang['statusbar.serial.noPort']); + newOption.setAttribute('disabled', true); + $portSelector.append(newOption); + } + $portSelector.select2('close'); + $portSelector.trigger('change'); + let footerStatus = ports.length ? 'inline-flex' : 'none'; + $('#mixly-footer-port-div').css('display', footerStatus); + $('#mixly-footer-port').html($portSelector.val()); + } + } + + #buffer_ = []; + #bufferLength_ = 0; + #encoder_ = new TextEncoder('utf8'); + #decoder_ = new TextDecoder('utf8'); + #baud_ = 0; + #dtr_ = false; + #rts_ = false; + #vid_ = 0x0000; + #pid_ = 0x0000; + #isOpened_ = false; + #port_ = ''; + #special_ = []; + #specialLength_ = 0; + #events_ = new Events(['onOpen', 'onClose', 'onError', 'onBuffer', 'onString', 'onByte', 'onChar']); + constructor(port) { + this.#port_ = port; + this.resetBuffer(); + } + + decodeBuffer(buffer) { + let output = ''; + for (let i = 0; i < buffer.length; i++) { + output += this.decodeByte(buffer[i]); + } + return output; + } + + /* UTF-8编码方式 + * ------------------------------------------------------------ + * |1字节 0xxxxxxx | + * |2字节 110xxxxx 10xxxxxx | + * |3字节 1110xxxx 10xxxxxx 10xxxxxx | + * |4字节 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx | + * |5字节 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx | + * |6字节 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx| + * ------------------------------------------------------------ + **/ + decodeByte(byte) { + let output = ''; + if (byte !== 0x5F && this.#special_.length && !this.#specialLength_) { + const str = this.#special_.join(''); + try { + output += decodeURIComponent(str.replace(/_([0-9a-fA-F]{2})/gm, '%$1')); + } catch (_) { + output += str; + } + this.#special_ = []; + } + if ((byte & 0x80) === 0x00) { + // 1字节 + this.#buffer_ = []; + this.#bufferLength_ = 0; + if (byte === 0x5F) { + // 如果当前字节是 "_" + this.#specialLength_ = 2; + this.#special_.push(String.fromCharCode(byte)); + } else if (byte !== 0x0D) { + // 如果当前字节不是 "\r" + if (this.#specialLength_) { + this.#specialLength_--; + this.#special_.push(String.fromCharCode(byte)); + } else { + output += String.fromCharCode(byte); + } + } + } else if ((byte & 0xC0) === 0x80) { + /* + * 2字节以上的中间字节,10xxxxxx + * 如果没有起始头,则丢弃这个字节 + * 如果不是2字节及以上的起始头,则丢弃这个字节 + **/ + if (!this.#buffer_.length || this.#bufferLength_ < 2) { + return output; + } + this.#buffer_.push(byte); + if (this.#bufferLength_ === this.#buffer_.length) { + output += this.decode(new Uint8Array(this.#buffer_)); + this.#buffer_ = []; + } + } else { + // 2字节以上的起始头 + if (this.#buffer_.length) { + this.#buffer_ = []; + } + this.#bufferLength_ = this.#getBufferLength_(byte); + this.#buffer_.push(byte); + } + return output; + } + + #getBufferLength_(byte) { + let len = 1; + if ((byte & 0xFC) === 0xFC) { + len = 6; + } else if ((byte & 0xF8) === 0xF8) { + len = 5; + } else if ((byte & 0xF0) === 0xF0) { + len = 4; + } else if ((byte & 0xE0) === 0xE0) { + len = 3; + } else if ((byte & 0xC0) === 0xC0) { + len = 2; + } + return len; + } + + resetBuffer() { + this.#buffer_ = []; + this.#bufferLength_ = 0; + } + + async open(baud) { + this.#isOpened_ = true; + } + + async close() { + this.#isOpened_ = false; + this.#baud_ = 0; + } + + async toggle() { + if (this.isOpened()) { + return this.close(); + } else { + return this.open(); + } + } + + baudRateIsLegal(baud) { + return Serial.AVAILABEL_BAUDS.includes(baud); + } + + async setBaudRate(baud) { + this.#baud_ = baud; + } + + async setDTR(dtr) { + this.#dtr_ = dtr; + } + + async setRTS(rts) { + this.#rts_ = rts; + } + + async setDTRAndRTS(dtr, rts) { + this.#dtr_ = dtr; + this.#rts_ = rts; + } + + async setVID(vid) { + this.#vid_ = vid; + } + + async setPID(pid) { + this.#pid_ = pid; + } + + async setVIDAndPID(vid, pid) { + this.#vid_ = vid; + this.#pid_ = pid; + } + + getPortName() { + return this.#port_; + } + + getBaudRate() { + return this.#baud_ || Serial.getConfig().baudRates; + } + + getRawBaudRate() { + return this.#baud_; + } + + getDTR() { + return this.#dtr_; + } + + getRTS() { + return this.#rts_; + } + + getVID() { + return this.#vid_; + } + + getPID() { + return this.#pid_; + } + + async sendString(str) {} + + async sendBuffer(buffer) {} + + async interrupt() { + return this.sendBuffer([3]); + } + + async reset() { + return this.sendBuffer([4]); + } + + onBuffer(buffer) { + this.#events_.run('onBuffer', buffer); + } + + onString(string) { + this.#events_.run('onString', string); + } + + onByte(byte) { + this.#events_.run('onByte', byte); + } + + onChar(char) { + this.#events_.run('onChar', char); + } + + onOpen() { + this.#isOpened_ = true; + this.#events_.run('onOpen'); + } + + onClose(code) { + this.#isOpened_ = false; + this.#events_.run('onClose', code); + } + + onError(error) { + this.#events_.run('onError', error); + } + + isOpened() { + return this.#isOpened_; + } + + encode(str) { + return this.#encoder_.encode(str); + } + + decode(uint8Array) { + return this.#decoder_.decode(uint8Array); + } + + async config(info) { + return Promise.all([ + this.setBaudRate(info.baud), + this.setDTRAndRTS(info.dtr, info.rts) + ]); + } + + async sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + async dispose() { + this.#events_.reset(); + if (this.isOpened()) { + await this.close(); + } + this.#events_ = null; + this.#encoder_ = null; + this.#decoder_ = null; + } + + bind(type, func) { + return this.#events_.bind(type, func); + } + + unbind(id) { + this.#events_.unbind(id); + } + + addEventsType(eventsType) { + this.#events_.addType(eventsType); + } + + runEvent(eventsType, ...args) { + return this.#events_.run(eventsType, ...args); + } + + offEvent(eventsType) { + this.#events_.off(eventsType); + } + + resetEvent() { + this.#events_.reset(); + } +} + +Mixly.Serial = Serial; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/sidebar-libs.js b/mixly/common/modules/mixly-modules/common/sidebar-libs.js new file mode 100644 index 00000000..35f3e799 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/sidebar-libs.js @@ -0,0 +1,57 @@ +goog.loadJs('common', () => { + +goog.require('XScrollbar'); +goog.require('Mixly.Env'); +goog.require('Mixly.Config'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Debug'); +goog.require('Mixly.PageBase'); +goog.provide('Mixly.SideBarLibs'); + +const { + Env, + Config, + HTMLTemplate, + Debug, + PageBase +} = Mixly; + +const { USER } = Config; + + +class SideBarLibs extends PageBase { + static { + HTMLTemplate.add( + 'html/sidebar/sidebar-libs.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/sidebar/sidebar-libs.html'))) + ); + } + + #scrollbar_ = null; + + constructor() { + super(); + const $content = $(HTMLTemplate.get('html/sidebar/sidebar-libs.html').render()); + this.#scrollbar_ = new XScrollbar($content[0], { + onlyHorizontal: false, + thumbSize: '4px', + thumbRadius: '1px', + thumbBackground: USER.theme === 'dark'? '#b0b0b0' : '#5f5f5f' + }); + this.setContent($content); + } + + init() { + super.init(); + this.hideCloseBtn(); + } + + dispose() { + this.#scrollbar_.destroy(); + super.dispose(); + } +} + +Mixly.SideBarLibs = SideBarLibs; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/sidebar-local-storage.js b/mixly/common/modules/mixly-modules/common/sidebar-local-storage.js new file mode 100644 index 00000000..5f9ab2b7 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/sidebar-local-storage.js @@ -0,0 +1,126 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mprogress'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Menu'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.Electron.FileTree'); +goog.require('Mixly.Web.FileTree'); +goog.require('Mixly.Electron.FS'); +goog.require('Mixly.Web.FS'); +goog.provide('Mixly.SideBarLocalStorage'); + +const { + IdGenerator, + XML, + Env, + HTMLTemplate, + Debug, + Menu, + PageBase, + Electron = {}, + Web = {} +} = Mixly; + +const { + FileTree, + FS +} = goog.isElectron? Electron : Web; + +class SideBarLocalStorage extends PageBase { + static { + HTMLTemplate.add( + 'html/sidebar/sidebar-local-storage-open-folder.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/sidebar/sidebar-local-storage-open-folder.html'))) + ); + } + + #$openFolderContent_ = null; + #fileTree_ = null; + #contextMenu_ = null; + #folderPath_ = null; + + constructor() { + super(); + const $openFolderContent = $(HTMLTemplate.get('html/sidebar/sidebar-local-storage-open-folder.html').render()); + this.#$openFolderContent_ = $openFolderContent; + this.setContent($openFolderContent); + this.#fileTree_ = new FileTree(); + this.#addEventsListener_(); + } + + init() { + super.init(); + this.hideCloseBtn(); + } + + #addEventsListener_() { + this.#$openFolderContent_.find('button').click(() => { + this.showDirectoryPicker(); + }); + + const contextMenu = this.#fileTree_.getContextMenu(); + const menu = contextMenu.getItem('menu'); + + menu.add({ + weight: 10, + type: 'open_new_folder', + preconditionFn: ($trigger) => { + let type = $trigger.attr('type'); + return ['root'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem('打开新文件夹', ''), + callback: () => { + this.showDirectoryPicker(); + } + } + }); + } + + showDirectoryPicker() { + FS.showDirectoryPicker() + .then((folderPath) => { + if (!folderPath) { + return; + } + this.setFolderPath(folderPath); + this.setContent(this.#fileTree_.getContent()); + this.#$openFolderContent_.remove(); + }) + .catch(Debug.error); + } + + getFileTree() { + return this.#fileTree_; + } + + resize() { + super.resize(); + this.#fileTree_ && this.#fileTree_.resize(); + } + + dispose() { + this.#fileTree_.dispose(); + } + + setFolderPath(folderPath) { + if (goog.isElectron) { + this.#fileTree_.setFolderPath(folderPath); + } else { + this.#fileTree_.setFolderPath('/'); + } + this.#folderPath_ = this.#fileTree_.getFolderPath(); + this.#fileTree_.openRootFolder(); + } +} + +Mixly.SideBarLocalStorage = SideBarLocalStorage; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/sidebars-manager.js b/mixly/common/modules/mixly-modules/common/sidebars-manager.js new file mode 100644 index 00000000..3253cdf9 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/sidebars-manager.js @@ -0,0 +1,144 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Events'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.SideBarLocalStorage'); +goog.require('Mixly.SideBarLibs'); +goog.require('Mixly.PagesManager'); +goog.require('Mixly.IdGenerator'); +goog.provide('Mixly.SideBarsManager'); +goog.provide('Mixly.LeftSideBarsManager'); +goog.provide('Mixly.RightSideBarsManager'); + +const { + Env, + Msg, + Registry, + Events, + HTMLTemplate, + SideBarLocalStorage, + SideBarLibs, + PagesManager, + IdGenerator, + Boards +} = Mixly; + +class SideBarsManager extends PagesManager { + static { + HTMLTemplate.add( + 'html/sidebar/left-sidebars-manager.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/sidebar/left-sidebars-manager.html'))) + ); + + HTMLTemplate.add( + 'html/sidebar/left-sidebars-tab.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/sidebar/left-sidebars-tab.html'))) + ); + + HTMLTemplate.add( + 'html/sidebar/right-sidebars-manager.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/sidebar/right-sidebars-manager.html'))) + ); + + HTMLTemplate.add( + 'html/sidebar/right-sidebars-tab.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/sidebar/right-sidebars-tab.html'))) + ); + + this.typesRegistry = new Registry(); + this.managersRegistry = new Registry(); + this.typesRegistry.register(['#default', 'local_storage'], SideBarLocalStorage); + this.typesRegistry.register(['libs'], SideBarLibs); + this.Align = { + LEFT: 0, + RIGHT: 1, + 0: 'LEFT', + 1: 'RIGHT' + }; + + this.getMain = function() { + if (!this.managersRegistry.length()) { + return null; + } + const key = this.managersRegistry.keys()[0]; + return this.managersRegistry.getItem(key); + } + + this.add = function(manager) { + this.managersRegistry.register(manager.id, manager); + } + + this.remove = function(manager) { + this.managersRegistry.unregister(manager.id); + } + } + + #shown_ = false; + + constructor(element, align = SideBarsManager.Align.LEFT) { + let managerHTMLTemplate = '', tabHTMLTemplate = ''; + if (align === SideBarsManager.Align.RIGHT) { + managerHTMLTemplate = HTMLTemplate.get('html/sidebar/right-sidebars-manager.html'); + tabHTMLTemplate = HTMLTemplate.get('html/sidebar/right-sidebars-tab.html'); + } else { + managerHTMLTemplate = HTMLTemplate.get('html/sidebar/left-sidebars-manager.html'); + tabHTMLTemplate = HTMLTemplate.get('html/sidebar/left-sidebars-tab.html'); + } + const $manager = $(managerHTMLTemplate.render()); + const $tab = $(tabHTMLTemplate.render()); + super({ + parentElem: element, + managerContentElem: $manager[0], + bodyElem: $manager.find('.body')[0], + tabElem: $manager.find('.tabs')[0], + tabContentElem: $tab[0], + typesRegistry: SideBarsManager.typesRegistry + }); + this.id = IdGenerator.generate(); + this.addEventsType(['show', 'hide']); + SideBarsManager.add(this); + } + + show() { + this.runEvent('show'); + } + + hide() { + this.runEvent('hide'); + } + + toggle() { + this.isShown() ? this.hide() : this.show(); + } + + isShown() { + return this.#shown_; + } + + dispose() { + SideBarsManager.remove(this); + super.dispose(); + } +} + +class LeftSideBarsManager extends SideBarsManager { + constructor(element) { + super(element, SideBarsManager.Align.LEFT); + } +} + +class RightSideBarsManager extends SideBarsManager { + constructor(element) { + super(element, SideBarsManager.Align.RIGHT); + } +} + +Mixly.SideBarsManager = SideBarsManager; +Mixly.LeftSideBarsManager = LeftSideBarsManager; +Mixly.RightSideBarsManager = RightSideBarsManager; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/socket.js b/mixly/common/modules/mixly-modules/common/socket.js new file mode 100644 index 00000000..2d45deab --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/socket.js @@ -0,0 +1,91 @@ +goog.loadJs('common', () => { + +goog.require('io'); +goog.require('Mixly'); +goog.provide('Mixly.Socket'); + + +class Socket { + #socket_ = null; + constructor(path, option) { + this.#socket_ = io(path, option); + } + + #detectStatus_(status, callback) { + window.setTimeout(() => { + if (status.finished) { + return; + } + if (this.isConnected()) { + this.#detectStatus_(status, callback); + } else { + callback({ + error: 'socket is not connected' + }); + status.finished = true; + } + }, 1000); + } + + emit(eventName, ...args) { + const callback = args.pop(); + if (this.isConnected()) { + let emitStatus = { + finished: false + }; + let status = this.#socket_.emit(eventName, ...args, (...callbackArgs) => { + if (emitStatus.finished) { + return; + } + emitStatus.finished = true; + callback(...callbackArgs); + }); + this.#detectStatus_(emitStatus, callback); + return status; + } else { + callback({ + error: 'socket is not connected' + }); + return false; + } + } + + async emitAsync(eventName, ...args) { + return new Promise((resolve, reject) => { + if (this.isConnected()) { + const callback = (...callbackArgs) => { + if (callbackArgs[0].error) { + reject(callbackArgs[0].error); + return; + } + resolve(...callbackArgs); + } + let emitStatus = { + finished: false + }; + let status = this.#socket_.emit(eventName, ...args, (...callbackArgs) => { + if (emitStatus.finished) { + return; + } + emitStatus.finished = true; + callback(...callbackArgs); + }); + this.#detectStatus_(emitStatus, callback); + } else { + reject('socket is not connected'); + } + }) + } + + getSocket() { + return this.#socket_; + } + + isConnected() { + return this.#socket_?.connected; + } +} + +Mixly.Socket = Socket; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-ampy.js b/mixly/common/modules/mixly-modules/common/statusbar-ampy.js new file mode 100644 index 00000000..75aadbfc --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-ampy.js @@ -0,0 +1,596 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.DragV'); +goog.require('Mixly.StatusBar'); +goog.require('Mixly.Serial'); +goog.require('Mixly.Menu'); +goog.require('Mixly.AmpyFileTree'); +goog.provide('Mixly.StatusBarAmpy'); + +const { + PageBase, + Env, + Msg, + Debug, + HTMLTemplate, + DragV, + StatusBar, + Serial, + Menu, + AmpyFileTree +} = Mixly; + +const { layer } = layui; + + +class StatusBarAmpy extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-ampy.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-ampy.html'))) + ); + + HTMLTemplate.add( + 'html/statusbar/statusbar-ampy-open-fs.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-ampy-open-fs.html'))) + ); + + HTMLTemplate.add( + 'html/statusbar/statusbar-ampy-editor-empty.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-ampy-editor-empty.html'))) + ); + } + + #$fileTree_ = null; + #$editor_ = null; + #$openFS_ = null; + #$editorEmpty_ = null; + #editor_ = null; + #fileTree_ = null; + #drag_ = null; + #fileTreeShown_ = false; + #editorShown_ = false; + #changed_ = false; + + constructor() { + super(); + const $content = $(HTMLTemplate.get('html/statusbar/statusbar-ampy.html').render()); + this.setContent($content); + this.#fileTree_ = new AmpyFileTree(); + this.#$fileTree_ = $content.children('.file-tree'); + this.#$openFS_ = $(HTMLTemplate.get('html/statusbar/statusbar-ampy-open-fs.html').render({ + loadBoardFS: Msg.Lang['statusbar.ampy.loadBoardFS'] + })); + this.#$fileTree_.append(this.#$openFS_); + this.#editor_ = new StatusBar(); + this.#$editor_ = $content.children('.editor'); + this.#$editorEmpty_ = $(HTMLTemplate.get('html/statusbar/statusbar-ampy-editor-empty.html').render()); + this.#$editor_.append(this.#$editorEmpty_); + } + + #addEventsListener_() { + this.#drag_ = new DragV(this.getContent()[0], { + min: '150px', + startSize: '15%', + full: [false, false] + }); + + this.#drag_.bind('sizeChanged', () => { + this.resize(); + }); + + this.#$openFS_.children('button').click(() => { + this.openFS(); + }); + + this.#fileTree_.bind('beforeSelectLeaf', (selected) => { + const filePath = selected[0].id; + const mode = this.#editor_.getFileMode(path.extname(filePath)); + if (!mode) { + layer.msg(Msg.Lang['statusbar.ampy.cannotEdit'], { time: 1000 }); + return false; + } + this.#editor_.setMode(mode); + return true; + }); + + this.#fileTree_.bind('afterSelectLeaf', async (selected) => { + const filePath = selected[0].id; + this.#fileTree_.showProgress(); + const fs = this.#fileTree_.getFS(); + const [error, result] = await fs.readFile(filePath); + if (error) { + this.hideEditor(); + this.#fileTree_.deselectAll(); + } else { + this.showEditor(); + this.#editor_.setValue(result); + this.#editor_.scrollToTop(); + this.#editor_.focus(); + this.setStatus(false); + } + this.#fileTree_.hideProgress(); + }); + + this.#fileTree_.bind('afterCreateNode', (folderPath) => { + this.#fileTree_.refreshFolder(folderPath); + }); + + this.#fileTree_.bind('afterDeleteNode', (folderPath) => { + this.#fileTree_.refreshFolder(folderPath); + }); + + this.#fileTree_.bind('afterRenameNode', (folderPath) => { + this.#fileTree_.refreshFolder(folderPath); + }); + + this.#fileTree_.bind('afterRefreshNode', (refreshedNode) => { + const selectedNodeId = this.#fileTree_.getSelectedNodeId(); + if (!selectedNodeId) { + this.hideEditor(); + } + }); + + const fileTreeContextMenu = this.#fileTree_.getContextMenu(); + const fileTreeMenu = fileTreeContextMenu.getItem('menu'); + + fileTreeMenu.add({ + weight: 14, + id: 'sep5', + data: '---------' + }); + + fileTreeMenu.add({ + weight: 15, + id: 'upload-folder', + preconditionFn: ($trigger) => { + let type = $trigger.attr('type'); + if (type === 'file') { + return false; + } + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.ampy.uploadFolder'], ''), + callback: async (_, { $trigger }) => { + this.#fileTree_.showProgress(); + try { + const fp = await window.showDirectoryPicker(); + if (!fp) { + this.#fileTree_.hideProgress(); + return; + } + const type = $trigger.attr('type'); + let folderPath = '/'; + if (type !== 'root') { + folderPath = $trigger.attr('id'); + } + const fs = this.#fileTree_.getFS(); + try { + for await (const [key, value] of fp.entries()) { + if (value.kind !== 'file') { + continue; + } + const file = await value.getFile(); + const arrayBuffer = await file.arrayBuffer(); + const [error,] = await fs.writeFile(path.join(folderPath, file.name), arrayBuffer); + if (error) { + Debug.error(error); + } + } + } catch (error) { + Debug.error(error); + } + this.#fileTree_.refreshFolder(folderPath); + } catch (_) { } + this.#fileTree_.hideProgress(); + } + } + }); + + fileTreeMenu.add({ + weight: 16, + id: 'upload-file', + preconditionFn: ($trigger) => { + let type = $trigger.attr('type'); + if (type === 'file') { + return false; + } + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.ampy.uploadFile'], ''), + callback: async (_, { $trigger }) => { + this.#fileTree_.showProgress(); + try { + const [ fp ] = await window.showOpenFilePicker({ + multiple: false + }); + if (!fp) { + this.#fileTree_.hideProgress(); + return; + } + const type = $trigger.attr('type'); + let folderPath = '/'; + if (type !== 'root') { + folderPath = $trigger.attr('id'); + } + const file = await fp.getFile(); + const arrayBuffer = await file.arrayBuffer(); + const fs = this.#fileTree_.getFS(); + const [error,] = await fs.writeFile(path.join(folderPath, file.name), arrayBuffer); + if (error) { + Debug.error(error); + } else { + this.#fileTree_.refreshFolder(folderPath); + } + } catch (_) { } + this.#fileTree_.hideProgress(); + } + } + }); + + fileTreeMenu.add({ + weight: 17, + id: 'download', + preconditionFn: ($trigger) => { + const type = $trigger.attr('type'); + if (type === 'file') { + return true; + } + return false; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.ampy.download'], ''), + callback: async (_, { $trigger }) => { + this.#fileTree_.showProgress(); + try { + const filePath = $trigger.attr('id'); + const fp = await window.showSaveFilePicker({ + suggestedName: path.basename(filePath) + }); + if (!fp) { + this.#fileTree_.hideProgress(); + return; + } + const fs = this.#fileTree_.getFS(); + const [error, result] = await fs.readFile(filePath, 'buffer'); + if (error) { + Debug.error(error); + } else { + const writer = await fp.createWritable(); + await writer.write(result); + await writer.close(); + } + } catch (_) { } + this.#fileTree_.hideProgress(); + } + } + }); + + fileTreeMenu.add({ + weight: 18, + id: 'sep6', + preconditionFn: ($trigger) => { + const selectedNodeId = this.#fileTree_.getSelectedNodeId(); + let type = $trigger.attr('type'); + let id = $trigger.attr('id'); + if (type === 'file' && selectedNodeId !== id) { + return false; + } + return true; + }, + data: '---------' + }); + + fileTreeMenu.add({ + weight: 19, + id: 'refresh', + preconditionFn: ($trigger) => { + const selectedNodeId = this.#fileTree_.getSelectedNodeId(); + let type = $trigger.attr('type'); + let id = $trigger.attr('id'); + if (type === 'file' && selectedNodeId !== id) { + return false; + } + return true; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.ampy.refresh'], ''), + callback: (_, { $trigger }) => { + let type = $trigger.attr('type'); + if (type === 'root') { + this.#fileTree_.openRootFolder(); + this.#fileTree_.refreshFolder('/'); + } else if (type === 'folder') { + let id = $trigger.attr('id'); + this.#fileTree_.openNode(id); + this.#fileTree_.refreshFolder(id); + } else { + const nodes = this.#fileTree_.getSelectedNodes(); + this.#fileTree_.runEvent('afterSelectLeaf', nodes); + } + } + } + }); + + fileTreeMenu.add({ + weight: 20, + id: 'sep6', + preconditionFn: ($trigger) => { + let type = $trigger.attr('type'); + return ['root'].includes(type); + }, + data: '---------' + }); + + fileTreeMenu.add({ + weight: 21, + id: 'exit', + preconditionFn: ($trigger) => { + let type = $trigger.attr('type'); + return ['root'].includes(type); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.ampy.exit'], ''), + callback: () => { + this.closeFS(); + } + } + }); + + const editorContextMenu = this.#editor_.getContextMenu(); + const editorMenu = editorContextMenu.getItem('code'); + + editorMenu.empty(); + + editorMenu.add({ + weight: 0, + id: 'cut', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.cut'], 'Ctrl+X'), + callback: () => this.#editor_.cut() + } + }); + editorMenu.add({ + weight: 1, + id: 'copy', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.copy'], 'Ctrl+C'), + callback: () => this.#editor_.copy() + } + }); + editorMenu.add({ + weight: 2, + id: 'paste', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.paste'], 'Ctrl+V'), + callback: () => this.#editor_.paste() + } + }); + editorMenu.add({ + weight: 3, + id: 'sep1', + data: '---------' + }); + editorMenu.add({ + weight: 4, + id: 'togglecomment', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.togglecomment'], 'Ctrl+/'), + callback: () => this.#editor_.commentLine() + } + }); + /*editorMenu.add({ + weight: 5, + id: 'toggleBlockComment', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.toggleBlockComment'], 'Shift+Alt+A'), + callback: (key, opt) => this.#editor_.blockComment() + } + });*/ + + editorMenu.add({ + weight: 6, + id: 'sep2', + preconditionFn: () => { + return this.#changed_; + }, + data: '---------' + }); + + editorMenu.add({ + weight: 7, + id: 'save', + preconditionFn: () => { + return this.#changed_; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['file.save'], 'Ctrl+S'), + callback: async () => { + await this.put(); + } + } + }); + + const { commands } = this.#editor_.getEditor(); + commands.addCommand({ + name: "save", + bindKey: "Ctrl-S", + exec: async () => { + if (!this.#changed_) { + return; + } + await this.put(); + } + }); + } + + async put() { + this.#fileTree_.showProgress(); + const id = this.#fileTree_.getSelectedNodeId(); + const fs = this.#fileTree_.getFS(); + const [error, stdout] = await fs.writeFile(id, this.#editor_.getValue()); + this.#fileTree_.hideProgress(); + if (!error) { + this.setStatus(false); + } + } + + showFileTree() { + if (this.#fileTreeShown_) { + return; + } + this.#$openFS_.detach(); + this.#$fileTree_.empty(); + this.#$fileTree_.append(this.#fileTree_.getContent()); + this.#fileTreeShown_ = true; + } + + hideFileTree() { + if (!this.#fileTreeShown_) { + return; + } + this.#fileTree_.getContent().detach(); + this.#$fileTree_.empty(); + this.#$fileTree_.append(this.#$openFS_); + this.#fileTreeShown_ = false; + } + + showEditor() { + if (this.#editorShown_) { + return; + } + this.#$editorEmpty_.detach(); + this.#$editor_.empty(); + this.#$editor_.append(this.#editor_.getContent()); + this.#editorShown_ = true; + } + + hideEditor() { + if (!this.#editorShown_) { + return; + } + this.#editor_.getContent().detach(); + this.#$editor_.empty(); + this.#$editor_.append(this.#$editorEmpty_); + this.#editorShown_ = false; + this.setStatus(false); + } + + getDrag() { + return this.#drag_; + } + + init() { + super.init(); + this.addDirty(); + this.setMarkStatus('negative'); + this.#editor_.init(); + this.#addEventsListener_(); + const editor = this.#editor_.getEditor(); + editor.setReadOnly(false); + editor.renderer.setShowGutter(true); + editor.setOptions({ + enableBasicAutocompletion: true, + enableSnippets: true, + enableLiveAutocompletion: true, + newLineMode: 'unix' + }); + editor.on('change', () => { + this.setStatus(true); + }); + } + + openFS() { + const port = Serial.getSelectedPortName(); + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + return; + } + const fs = this.#fileTree_.getFS(); + fs.setPortName(port); + this.#fileTree_.setFolderPath('/'); + this.#fileTree_.setRootFolderName(`${port} - /`); + this.#fileTree_.openRootFolder(); + this.showFileTree(); + } + + closeFS() { + this.#fileTree_.deselectAll(); + this.hideFileTree(); + this.hideEditor(); + this.setStatus(false); + } + + onMounted() { + super.onMounted(); + this.#editor_.onMounted(); + this.#fileTree_.onMounted(); + // this.#fileTree_.refreshFolder('/'); + } + + onUnmounted() { + // this.hideEditor(); + // this.#fileTree_.deselectAll(); + super.onUnmounted(); + this.#editor_.onUnmounted(); + this.#fileTree_.onUnmounted(); + } + + resize() { + super.resize(); + this.#editor_.resize(); + this.#fileTree_.resize(); + } + + setStatus(isChanged) { + if (this.#changed_ === isChanged) { + return; + } + this.#changed_ = isChanged; + if (isChanged) { + this.setMarkStatus('positive'); + } else { + this.setMarkStatus('negative'); + } + } + + dispose() { + this.#$fileTree_ = null; + this.#$editor_ = null; + this.#$openFS_ = null; + this.#$editorEmpty_ = null; + this.#editor_.dispose(); + this.#editor_ = null; + this.#fileTree_.dispose(); + this.#fileTree_ = null; + this.#drag_.dispose(); + this.#drag_ = null; + super.dispose(); + } +} + +Mixly.StatusBarAmpy = StatusBarAmpy; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-fs.js b/mixly/common/modules/mixly-modules/common/statusbar-fs.js new file mode 100644 index 00000000..558ddeae --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-fs.js @@ -0,0 +1,331 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mprogress'); +goog.require('$.select2'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Component'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Serial'); +goog.require('Mixly.FSBoardHandler'); +goog.require('Mixly.Electron.FS'); +goog.require('Mixly.Electron.FSBoard'); +goog.provide('Mixly.StatusBarFS'); + +const { + Env, + Msg, + PageBase, + HTMLTemplate, + Debug, + Component, + Registry, + Serial, + FSBoardHandler, + Electron = {} +} = Mixly; + +const { FS, FSBoard } = Electron; + +const { layer } = layui; + +const os = Mixly.require('os'); + + +class Panel extends Component { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-fs-panel.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-fs-panel.html'))) + ); + } + + #$folderInput_ = null; + #$closeBtn_ = null; + #$selectFolderBtn_ = null; + #$downloadBtn_ = null; + #$uploadBtn_ = null; + #$fsSelect_ = null; + #$progress_ = null; + #folderPath_ = ''; + #fs_ = 'default'; + #opened_ = false; + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-fs-panel.html'); + const $content = $(template.render({ + mapFolder: Msg.Lang['statusbar.fs.mapFolder'], + comment: Msg.Lang['statusbar.fs.comment'], + commentInfo: Msg.Lang['statusbar.fs.commentInfo'], + filesystem: Msg.Lang['statusbar.fs.filesystem'], + path: Msg.Lang['statusbar.fs.path'], + selectFolder: Msg.Lang['statusbar.fs.selectFolder'], + download: Msg.Lang['statusbar.fs.download'], + upload: Msg.Lang['statusbar.fs.upload'] + })); + this.setContent($content); + this.#$folderInput_ = $content.find('.folder-input'); + this.#$closeBtn_ = $content.find('.close-btn'); + this.#$selectFolderBtn_ = $content.find('.folder-btn'); + this.#$downloadBtn_ = $content.find('.download-btn'); + this.#$uploadBtn_ = $content.find('.upload-btn'); + this.#$fsSelect_ = $content.find('.fs-type'); + this.#$progress_ = $content.find('.progress'); + this.addEventsType(['download', 'upload']); + this.#addEventsListener_(); + this.#$fsSelect_.select2({ + width: '100%', + minimumResultsForSearch: Infinity, + dropdownCssClass: 'mixly-scrollbar' + }); + } + + #addEventsListener_() { + this.#$fsSelect_.on('select2:select', (event) => { + const { data } = event.params; + this.#fs_ = data.id; + }); + + this.#$closeBtn_.click(() => { + this.dispose(); + }); + + this.#$selectFolderBtn_.click(() => { + FS.showDirectoryPicker() + .then((folderPath) => { + if (!folderPath) { + return; + } + this.#folderPath_ = path.join(folderPath); + this.#$folderInput_.val(this.#folderPath_); + }) + .catch(Debug.error); + }); + + this.#$downloadBtn_.click(() => { + this.#checkFolder_() + .then((status) => { + if (!status) { + return; + } + this.runEvent('download', { + folderPath: this.#folderPath_, + fsType: this.#fs_ + }); + }) + .catch(Debug.error); + }); + + this.#$uploadBtn_.click(() => { + this.#checkFolder_() + .then((status) => { + if (!status) { + return; + } + this.runEvent('upload', { + folderPath: this.#folderPath_, + fsType: this.#fs_ + }); + }) + .catch(Debug.error); + }); + } + + #checkFolder_() { + return new Promise((resolve, reject) => { + if (!this.#folderPath_) { + layer.msg(Msg.Lang['statusbar.fs.localFolderNotExist'], { time: 1000 }); + resolve(false); + return; + } + FS.isDirectory(this.#folderPath_) + .then((status) => { + if (status) { + resolve(true); + } else { + layer.msg(Msg.Lang['statusbar.fs.localFolderNotExist'], { time: 1000 }); + resolve(false); + } + }) + .catch(reject); + }); + } + + setFSMenu(menu) { + this.#$fsSelect_.empty(); + this.#fs_ = menu[0].id; + for (let i in menu) { + this.#$fsSelect_.append(new Option(menu[i].text, menu[i].id)); + } + } + + setStatus(isOpened) { + if (this.#opened_ === isOpened) { + return; + } + this.#opened_ = isOpened; + if (isOpened) { + this.#$progress_.css('display', 'block'); + } else { + this.#$progress_.css('display', 'none'); + } + } + + dispose() { + this.#$fsSelect_.select2('destroy'); + this.#$folderInput_ = null; + this.#$closeBtn_ = null; + this.#$selectFolderBtn_ = null; + this.#$downloadBtn_ = null; + this.#$uploadBtn_ = null; + this.#$fsSelect_ = null; + this.#$progress_ = null; + super.dispose(); + } +} + + +class StatusBarFS extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-fs.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-fs.html'))) + ); + } + + #$btn_ = null; + #$mask_ = null; + #fsBoard_ = null; + #registry_ = new Registry(); + #opened_ = false; + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-fs.html'); + const $content = $(template.render({ + new: Msg.Lang['statusbar.fs.newMapFolder'] + })); + this.setContent($content); + this.#$btn_ = $content.find('.manage-btn'); + this.#$mask_ = $content.children('.mask'); + this.#fsBoard_ = new FSBoard(); + this.#fsBoard_.setHandler(new FSBoardHandler()); + this.#addEventsListener_(); + } + + #addEventsListener_() { + this.#$btn_.click(() => { + this.addPanel(); + }); + } + + init() { + this.addDirty(); + this.setMarkStatus('negative'); + } + + setStatus(isOpened) { + if (this.#opened_ === isOpened) { + return; + } + this.#opened_ = isOpened; + if (isOpened) { + this.#$mask_.css('display', 'block'); + this.setMarkStatus('positive'); + } else { + this.#$mask_.css('display', 'none'); + this.setMarkStatus('negative'); + } + } + + addPanel() { + const panel = new Panel(); + panel.setFSMenu(this.#fsBoard_.getHandler().getFSMenu()); + this.#$btn_.parent().before(panel.getContent()); + this.#registry_.register(panel.getId(), panel); + panel.bind('download', (config) => { + this.#ensureSerial_() + .then((status) => { + if (!status) { + return; + } + this.setStatus(true); + panel.setStatus(true); + return this.#fsBoard_.download(config.folderPath, config.fsType); + }) + .catch(Debug.error) + .finally(() => { + this.setStatus(false); + panel.setStatus(false); + }); + }); + + panel.bind('upload', (config) => { + this.#ensureSerial_() + .then((status) => { + if (!status) { + return; + } + this.setStatus(true); + panel.setStatus(true); + return this.#fsBoard_.upload(config.folderPath, config.fsType); + }) + .catch(Debug.error) + .finally(() => { + this.setStatus(false); + panel.setStatus(false); + }); + }); + + panel.bind('destroyed', () => { + this.#registry_.unregister(panel.getId()); + }); + } + + #ensureSerial_() { + return new Promise((resolve, reject) => { + const port = Serial.getSelectedPortName(); + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { time: 1000 }); + resolve(false); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + let closePromise = Promise.resolve(); + if (statusBarSerial) { + closePromise = statusBarSerial.close(); + } + closePromise.then(() => { + resolve(true); + }).catch(reject); + }); + } + + dispose() { + for (let id of this.#registry_.keys()) { + this.#registry_.getItem(id).dispose(); + } + this.#$btn_ = null; + this.#$mask_ = null; + this.#fsBoard_.dispose(); + this.#fsBoard_ = null; + this.#registry_.reset(); + this.#registry_ = null; + super.dispose(); + } + + setHandler(handler) { + this.#fsBoard_.setHandler(handler); + } +} + +Mixly.StatusBarFS = StatusBarFS; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-libs-code.js b/mixly/common/modules/mixly-modules/common/statusbar-libs-code.js new file mode 100644 index 00000000..71ba1fc5 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-libs-code.js @@ -0,0 +1,39 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.PageBase'); +goog.provide('Mixly.StatusBarLibsCode'); + +const { + Env, + HTMLTemplate, + PageBase +} = Mixly; + + +class StatusBarLibsCode extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-libs-mix.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-libs-mix.html'))) + ); + } + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-libs-mix.html'); + const $content = $(template.render()); + this.setContent($content); + } + + init() { + super.init(); + this.hideCloseBtn(); + } +} + +Mixly.StatusBarLibsCode = StatusBarLibsCode; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-libs-mix.js b/mixly/common/modules/mixly-modules/common/statusbar-libs-mix.js new file mode 100644 index 00000000..3fb6f726 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-libs-mix.js @@ -0,0 +1,41 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.Env'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.PageBase'); +goog.provide('Mixly.StatusBarLibsMix'); + +const { + Env, + HTMLTemplate, + PageBase +} = Mixly; + + +class StatusBarLibsMix extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-libs-mix.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-libs-mix.html'))) + ); + } + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-libs-mix.html'); + const $content = $(template.render()); + this.setContent($content); + this.id = template.getId(); + } + + init() { + super.init(); + this.hideCloseBtn(); + } +} + +Mixly.StatusBarLibsMix = StatusBarLibsMix; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-libs.js b/mixly/common/modules/mixly-modules/common/statusbar-libs.js new file mode 100644 index 00000000..9d887730 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-libs.js @@ -0,0 +1,89 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('dayjs'); +goog.require('$.select2'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.StatusBar'); +goog.require('Mixly.SideBarsManager'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.StatusBarLibsMix'); +goog.require('Mixly.StatusBarLibsCode'); +goog.provide('Mixly.StatusBarLibs'); + +const { + Env, + Msg, + Debug, + StatusBar, + SideBarsManager, + RightSideBarsManager, + HTMLTemplate, + PageBase, + StatusBarLibsMix, + StatusBarLibsCode, +} = Mixly; + + +class StatusBarLibs extends PageBase { + static { + HTMLTemplate.add( + 'statusbar/statusbar-libs.html', + new HTMLTemplate(`
`) + ); + SideBarsManager.typesRegistry.register(['libs_mix'], StatusBarLibsMix); + SideBarsManager.typesRegistry.register(['libs_code'], StatusBarLibsCode); + } + + #manager_ = null; + + constructor() { + super(); + const template = HTMLTemplate.get('statusbar/statusbar-libs.html'); + const $content = $(template.render()); + this.setContent($content); + this.id = template.getId(); + this.#manager_ = new RightSideBarsManager($content[0]); + this.#manager_.add('libs_mix', 'libs_mix', 'Mixly库'); + this.#manager_.add('libs_code', 'libs_code', '代码库'); + this.#manager_.changeTo('libs_mix'); + } + + init() { + this.addDirty(); + const $tab = this.getTab(); + this.setMarkStatus('negative'); + } + + getManager() { + return this.#manager_; + } + + resize() { + super.resize(); + this.#manager_.resize(); + } + + onMounted() { + super.onMounted(); + this.#manager_.onMounted(); + } + + onUnmounted() { + this.#manager_.onUnmounted(); + super.onUnmounted(); + } + + dispose() { + this.#manager_.dispose(); + this.#manager_ = null; + super.dispose(); + } +} + +Mixly.StatusBarLibs = StatusBarLibs; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-output.js b/mixly/common/modules/mixly-modules/common/statusbar-output.js new file mode 100644 index 00000000..f3d97a57 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-output.js @@ -0,0 +1,21 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.StatusBar'); +goog.provide('Mixly.StatusBarOutput'); + +const { StatusBar } = Mixly; + +class StatusBarOutput extends StatusBar { + constructor() { + super(); + } + + init() { + super.init(); + this.hideCloseBtn(); + } +} + +Mixly.StatusBarOutput = StatusBarOutput; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-serial-chart.js b/mixly/common/modules/mixly-modules/common/statusbar-serial-chart.js new file mode 100644 index 00000000..f2751370 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-serial-chart.js @@ -0,0 +1,267 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('$.ui'); +goog.require('$.flot'); +goog.require('$.select2'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.Regression'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Config'); +goog.provide('Mixly.StatusBarSerialChart'); + +const { + Env, + Msg, + PageBase, + Regression, + HTMLTemplate, + Config +} = Mixly; + +const { USER, SELECTED_BOARD } = Config; + + +class StatusBarSerialChart extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-serial-chart.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-serial-chart.html'))) + ); + } + + #data_ = []; + #totalPoints_ = SELECTED_BOARD?.serial?.pointNum ?? 100; + #yMax_ = SELECTED_BOARD?.serial?.yMax ?? 100; + #yMin_ = SELECTED_BOARD?.serial?.yMin ?? 0; + #needUpdate_ = false; + #regression_ = new Regression(); + #plot_ = null; + #opened_ = false; + #started_ = false; + #$pointNum_ = null; + #$yMax_ = null; + #$yMin_ = null; + #isOpened_ = false; + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-serial-chart.html'); + const $template = $(template.render({ + pointsNum: Msg.Lang['statusbar.serial.chart.pointsNum'], + yMin: Msg.Lang['statusbar.serial.chart.yMin'], + yMax: Msg.Lang['statusbar.serial.chart.yMax'] + })); + this.setContent($template); + this.#$pointNum_ = $template.find('select'); + this.#$pointNum_.select2({ + width: '100%', + minimumResultsForSearch: Infinity, + dropdownCssClass: 'mixly-scrollbar' + }); + this.#$pointNum_.val(this.#totalPoints_).trigger('change'); + this.#$yMax_ = $template.find('.y-max'); + this.#$yMax_.val(this.#yMax_); + this.#$yMin_ = $template.find('.y-min'); + this.#$yMin_.val(this.#yMin_); + const axisFontColor = USER.theme === 'light' ? '#000' : '#c2c3c2'; + this.#plot_ = $.plot($template.find('.figure'), this.getValue(), { + series: { + shadowSize: 1 + }, + colors: ['#777'], + yaxis: { + min: this.#yMin_, + max: this.#yMax_, + show: true, + font: { + fill: axisFontColor + } + }, + xaxis: { + show: true, + font: { + fill: axisFontColor + }, + mode: 'time', + timezone: 'browser', + twelveHourClock: true, + timeBase: 'milliseconds', + minTickSize: [1, 'second'], + min: Date.now(), + max: Date.now() + 1000 * 10, + } + }); + + this.#addEventsListener_(); + } + + #addEventsListener_() { + this.#$pointNum_.on('select2:select', (event) => { + const { data } = event.params; + this.#totalPoints_ = data.id; + this.setValue([]); + }); + + this.#$yMax_.change(() => { + const yMax = parseInt(this.#$yMax_.val()); + if (isNaN(yMax) || yMax <= this.#yMin_) { + this.#$yMax_.val(this.#yMax_); + } else { + this.#yMax_ = yMax; + let { yaxis } = this.#plot_.getAxes(); + yaxis.options.max = yMax; + } + }); + + this.#$yMin_.change(() => { + const yMin = parseInt(this.#$yMin_.val()); + if (isNaN(yMin) || yMin >= this.#yMax_) { + this.#$yMin_.val(this.#yMin_); + } else { + this.#yMin_ = yMin; + let { yaxis } = this.#plot_.getAxes(); + yaxis.options.min = yMin; + } + }); + } + + init() { + super.init(); + this.hideCloseBtn(); + this.resize(); + } + + resize() { + this.#plot_.getSurface().clearCache(); + super.resize(); + this.#plot_.resize(); + this.#plot_.setupGrid(false); + this.#plot_.draw(); + } + + stop() { + this.setValue([]); + this.#opened_ = false; + this.#started_ = false; + } + + start() { + this.#opened_ = true; + if (this.#started_) { + return; + } + this.#started_ = true; + this.update(); + } + + update() { + if (!this.#started_) { + return; + } + if (!this.isActive()) { + this.#started_ = false; + return; + } + if (!this.#needUpdate_) { + setTimeout(() => this.update(), 50); + return; + } + this.#plot_.setData(this.getValue()); + this.#plot_.getSurface().clearCache(); + this.#plot_.setupGrid(false); + this.#plot_.draw(); + this.setRange(this.#plot_); + this.#needUpdate_ = false; + window.requestAnimationFrame(() => this.update()); + } + + getValue() { + return [{ + data: this.#data_, + lines: { + show: true, + fill: false, + fillColor: '#007acc' + } + }]; + } + + addValue(data) { + if (!this.#started_) { + return; + } + if (this.#data_.length + && data[0] === this.#data_[this.#data_.length - 1][0]) { + return; + } + while (this.#data_.length > this.#totalPoints_) { + this.#data_.shift(); + } + this.#data_.push([Date.now(), data]); + this.#needUpdate_ = true; + } + + setValue(data) { + if (!this.#started_) { + return; + } + this.#data_ = data; + this.#needUpdate_ = true; + } + + setRange() { + let { xaxis } = this.#plot_.getAxes(); + let { data = [] } = this.#plot_.getData()[0] ?? {}; + if (!data.length) { + return; + } + if (data.length >= this.#totalPoints_) { + xaxis.options.min = data[0][0]; + xaxis.options.max = data[this.#totalPoints_ - 1][0]; + return; + } + let x = [], y = []; + for (let i in data) { + x.push((i - 0) + 1); + y.push(data[i][0] - data[0][0]); + } + this.#regression_.fit(x, y); + let xMax = this.#regression_.predict([this.#totalPoints_])[0] + data[0][0]; + let xMin = data[0][0]; + xaxis.options.min = xMin; + xaxis.options.max = xMax; + } + + setStatus(isOpened) { + this.#isOpened_ = isOpened; + } + + isOpened() { + return this.#isOpened_; + } + + onMounted() { + super.onMounted(); + if (this.#opened_) { + this.start(); + } + } + + onUnmounted() { + this.setValue([]); + super.onUnmounted(); + } + + dispose() { + this.#plot_.shutdown(); + this.#$pointNum_.select2('destroy'); + super.dispose(); + } +} + +Mixly.StatusBarSerialChart = StatusBarSerialChart; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-serial-output.js b/mixly/common/modules/mixly-modules/common/statusbar-serial-output.js new file mode 100644 index 00000000..ab95ea4e --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-serial-output.js @@ -0,0 +1,155 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.StatusBar'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.HTMLTemplate') +goog.provide('Mixly.StatusBarSerialOutput'); + +const { + PageBase, + StatusBar, + Env, + Msg, + HTMLTemplate +} = Mixly; + + +class StatusBarSerialOutput extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-serial-output.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-serial-output.html'))) + ); + } + + #$empty_ = null; + #$scroll_ = null; + #$timestamp_ = null; + #$hex_ = null; + #scroll_ = true; + #timestamp_ = false; + #hex_ = false; + #active_ = false; + #isOpened_ = false; + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-serial-output.html'); + const $content = $(template.render({ + empty: Msg.Lang['statusbar.serial.output.empty'], + scroll: Msg.Lang['statusbar.serial.output.scroll'], + timestamp: Msg.Lang['statusbar.serial.output.timestamp'] + })); + this.setContent($content); + this.#$empty_ = $content.find('.empty'); + this.#$scroll_ = $content.find('.scroll'); + this.#$timestamp_ = $content.find('.timestamp'); + this.#$hex_ = $content.find('.hex'); + this.addPage($content.find('.body'), 'editor', new StatusBar()); + this.#addEventsListener_(); + } + + #addEventsListener_() { + this.#$empty_.click(() => { + this.empty({ startRow: 0 }); + }); + + this.#$scroll_.change((event) => { + let scroll = false; + if (this.#$scroll_.prop('checked')) { + scroll = true; + } + this.#scroll_ = scroll; + }); + + this.#$timestamp_.change((event) => { + let timestamp = false; + if (this.#$timestamp_.prop('checked')) { + timestamp = true; + } + this.#timestamp_ = timestamp; + }); + + this.#$hex_.change((event) => { + let hex = false; + if (this.#$hex_.prop('checked')) { + hex = true; + } + this.#hex_ = hex; + }); + } + + init() { + super.init(); + this.hideCloseBtn(); + this.#$scroll_.prop('checked', this.#scroll_); + this.#$timestamp_.prop('checked', this.#timestamp_); + this.#$hex_.prop('checked', this.#hex_); + } + + empty() { + const editor = this.getEditor(); + const endRow = editor.session.getLength(); + if (this.isOpened()) { + editor.session.removeFullLines(1, endRow); + this.addValue('\n'); + } else { + editor.session.removeFullLines(0, endRow); + } + } + + setStatus(isOpened) { + this.#isOpened_ = isOpened; + } + + isOpened() { + return this.#isOpened_; + } + + getValue() { + return this.getPage('editor').getValue(); + } + + setValue(data, scroll) { + this.getPage('editor').setValue(data, scroll); + } + + addValue(data, scroll) { + this.getPage('editor').addValue(data, scroll); + } + + getPageAce() { + return this.getPage('editor'); + } + + getEditor() { + return this.getPage('editor').getEditor(); + } + + getEditorPageId() { + return this.getPage('editor').getId(); + } + + getContextMenu() { + return this.getPage('editor').getContextMenu(); + } + + scrollChecked() { + return this.#scroll_; + } + + timestampChecked() { + return this.#timestamp_; + } + + hexChecked() { + return this.#hex_; + } +} + +Mixly.StatusBarSerialOutput = StatusBarSerialOutput; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar-serial.js b/mixly/common/modules/mixly-modules/common/statusbar-serial.js new file mode 100644 index 00000000..49f24a3f --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar-serial.js @@ -0,0 +1,657 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('dayjs'); +goog.require('$.select2'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Config'); +goog.require('Mixly.StatusBar'); +goog.require('Mixly.SideBarsManager'); +goog.require('Mixly.RightSideBarsManager'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.PageBase'); +goog.require('Mixly.Menu'); +goog.require('Mixly.StatusBarSerialOutput'); +goog.require('Mixly.StatusBarSerialChart'); +goog.require('Mixly.Electron.Serial'); +goog.require('Mixly.Web.Serial'); +goog.require('Mixly.WebSocket.Serial'); +goog.provide('Mixly.StatusBarSerial'); + +const { + Env, + Msg, + Debug, + Config, + StatusBar, + SideBarsManager, + RightSideBarsManager, + HTMLTemplate, + PageBase, + Menu, + StatusBarSerialOutput, + StatusBarSerialChart, + Electron = {}, + Web = {}, + WebSocket = {} +} = Mixly; + +let currentObj = null; + +if (goog.isElectron) { + currentObj = Electron; +} else { + if (Env.hasSocketServer) { + currentObj = WebSocket; + } else { + currentObj = Web; + } +} + +const { Serial } = currentObj; + +const { SELECTED_BOARD } = Config; + + +class StatusBarSerial extends PageBase { + static { + HTMLTemplate.add( + 'html/statusbar/statusbar-serial.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbar-serial.html'))) + ); + SideBarsManager.typesRegistry.register(['serial_output'], StatusBarSerialOutput); + SideBarsManager.typesRegistry.register(['serial_chart'], StatusBarSerialChart); + + this.getMenu = function () { + let ports = []; + let menu = { list: ports }; + Serial.getCurrentPortsName().map((name) => { + ports.push(name); + }); + if (!ports.length) { + menu.empty = Msg.Lang['statusbar.serial.noPort']; + } + return menu; + } + } + + #$sendInput_ = null; + #$settingMenu_ = null; + #$scroll_ = null; + #$timestamp_ = null; + #$dtr_ = null; + #$rts_ = null; + #$hex_ = null; + #opened_ = false; + #valueTemp_ = ''; + #receiveTemp_ = ''; + #manager_ = null; + #output_ = null; + #chart_ = null; + #serial_ = null; + #port_ = ''; + #config_ = { + baud: 115200, + dtr: true, + rts: false, + sendWith: '\r\n', + hex: false + }; + #addTimestamp_ = false; + #maxLine_ = 200; + #lastUpdate_ = 0; + #refreshFrequency_ = 50; + #timer_ = null; + #reading_ = false; + + constructor() { + super(); + const template = HTMLTemplate.get('html/statusbar/statusbar-serial.html'); + const $content = $(template.render({ + sendInfo: Msg.Lang['statusbar.serial.sendInfo'] + })); + this.setContent($content); + this.#$settingMenu_ = $content.find('.setting-menu'); + this.#$settingMenu_.select2({ + minimumResultsForSearch: Infinity, + dropdownAutoWidth: true, + dropdownCssClass: 'mixly-scrollbar' + }); + this.id = template.getId(); + this.#$sendInput_ = $content.find('.send > .box > input'); + this.#$scroll_ = $content.find('.scroll'); + this.#$timestamp_ = $content.find('.timestamp'); + this.#$dtr_ = $content.find('.dtr'); + this.#$rts_ = $content.find('.rts'); + this.#$hex_ = $content.find('.hex'); + this.#manager_ = new RightSideBarsManager($content.find('.content')[0]); + this.#manager_.add('serial_output', 'serial_output', Msg.Lang['statusbar.serial.output'], ''); + this.#manager_.add('serial_chart', 'serial_chart', Msg.Lang['statusbar.serial.chart'], ''); + this.#manager_.changeTo('serial_output'); + this.#output_ = this.#manager_.get('serial_output'); + this.#chart_ = this.#manager_.get('serial_chart'); + this.#addCommandsForOutput_(); + const config = Serial.getConfig(); + this.#config_.dtr = config.dtr; + this.#config_.rts = config.rts; + this.#config_.baud = config.baudRates; + this.#config_.pointNum = config.pointNum; + this.#config_.reset = config.ctrlDBtn; + this.#config_.interrupt = config.ctrlCBtn; + this.#config_.yMax = config.yMax; + this.#config_.yMin = config.yMin; + } + + #addCommandsForOutput_() { + const { commands } = this.#output_.getEditor(); + commands.addCommands([{ + name: 'copy', + bindKey: 'Ctrl-C', + readOnly: true, + exec: (editor) => { + const copyText = editor.getSelectedText(); + if (!copyText) { + this.interrupt(); + return true; + } + return false; + } + }, { + name: 'reset', + bindKey: 'Ctrl-D', + readOnly: true, + exec: (editor) => { + this.reset(); + return true; + } + }]); + } + + #addContextMenuItemsForOutput_() { + let menu = this.#output_.getContextMenu().getItem('code'); + menu.add({ + weight: 1, + type: 'sep1', + preconditionFn: () => { + return this.portExit(); + }, + data: '---------' + }); + if (this.#config_.interrupt) { + menu.add({ + weight: 2, + type: 'interrupt', + preconditionFn: () => { + return this.portExit(); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.serial.interrupt'], 'Ctrl+C'), + callback: (key, opt) => this.interrupt().catch(Debug.error) + } + }); + } + if (this.#config_.reset) { + menu.add({ + weight: 3, + type: 'reset', + preconditionFn: () => { + return this.portExit(); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.serial.reset'], 'Ctrl+D'), + callback: (key, opt) => this.reset().catch(Debug.error) + } + }); + } + menu.add({ + weight: 4, + type: 'toggle', + preconditionFn: () => { + return this.portExit(); + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.serial.toggle'], ''), + callback: (key, opt) => this.toggle().catch(Debug.error) + } + }); + } + + #addEventsListener_() { + this.getTab().dblclick(() => { + if (!this.portExit()) { + return; + } + this.toggle().catch(Debug.error); + }); + + this.#serial_.bind('onOpen', () => { + this.setStatus(true); + const portName = this.getPortName(); + this.setValue( + `==${Msg.Lang['statusbar.serial.port']} ${portName} ${Msg.Lang['statusbar.serial.open']}==\n` + ); + this.#$sendInput_.attr('disabled', false); + if (this.#output_.timestampChecked()) { + this.#addTimestamp_ = true; + } + this.#chart_.start(); + }); + + this.#serial_.bind('onClose', () => { + this.stopRead(); + this.#timer_ && clearTimeout(this.#timer_); + this.#timer_ = null; + if (this.isDisposed() || !this.isOpened()) { + return; + } + this.setStatus(false); + const portName = this.getPortName(); + const output = `${this.getValue() + this.#valueTemp_}\n` + + `==${Msg.Lang['statusbar.serial.port']} ${portName} ${Msg.Lang['statusbar.serial.close']}==`; + this.setValue(output); + this.#valueTemp_ = ''; + this.#receiveTemp_ = ''; + this.#$sendInput_.val(''); + this.#$sendInput_.attr('disabled', true); + this.#chart_.stop(); + }); + + this.#serial_.bind('onError', (error) => { + this.stopRead(); + this.#timer_ && clearTimeout(this.#timer_); + this.#timer_ = null; + if (this.isDisposed()) { + return; + } + if (!this.isOpened()) { + this.setValue(`${String(error)}\n`); + return; + } + this.setValue(`${this.getValue() + this.#valueTemp_}\n${String(error)}\n`); + this.#valueTemp_ = ''; + }); + + this.#serial_.bind('onChar', (char) => { + if (!this.#reading_) { + this.#receiveTemp_ += char; + } + if (!this.#reading_ || this.#output_.hexChecked()) { + return; + } + if (this.#output_.timestampChecked()) { + if (this.#addTimestamp_) { + const timestamp = dayjs().format('HH:mm:ss.SSS'); + this.addValue(`${timestamp} -> ${char}`); + } else { + this.addValue(char); + } + if (char === '\n') { + this.#addTimestamp_ = true; + } else { + this.#addTimestamp_ = false; + } + } else { + this.addValue(char); + } + if (this.#timer_) { + return; + } + this.#timer_ = setTimeout(this.#timedRefresh_.bind(this), this.#refreshFrequency_); + }); + + this.#serial_.bind('onString', (str) => { + if (!this.#chart_.isActive() || !this.isActive() || !this.#reading_) { + return; + } + const num = parseFloat(str); + if (isNaN(num)) { + return; + } + this.#chart_.addValue(num); + }); + + this.#serial_.bind('onByte', (byte) => { + if (!this.#reading_ || !this.#output_.hexChecked()) { + return; + } + let str = byte.toString(16).toUpperCase(); + if (str.length < 2) { + str = '0' + str; + } + str = '0x' + str + (byte === 0x0A ? '\n' : ' '); + if (this.#output_.timestampChecked()) { + if (this.#addTimestamp_) { + const timestamp = dayjs().format('HH:mm:ss.SSS'); + this.addValue(`${timestamp} -> ${str}`); + } else { + this.addValue(str); + } + if (byte === 0x0A) { + this.#addTimestamp_ = true; + } else { + this.#addTimestamp_ = false; + } + } else { + this.addValue(str); + } + if (this.#timer_) { + return; + } + this.#timer_ = setTimeout(this.#timedRefresh_.bind(this), this.#refreshFrequency_); + }); + + this.#$settingMenu_.on('select2:select', (event) => { + const { id } = event.currentTarget.dataset; + const { data } = event.params; + if (id === 'baud') { + this.setBaudRate(data.id - 0).catch(Debug.error); + } else if (id === 'send-with') { + if (data.id === 'no') { + this.#config_.sendWith = ''; + } else { + this.#config_.sendWith = data.id.replace('\\r', '\r').replace('\\n', '\n'); + } + } + }); + + this.#$sendInput_.keydown((event) => { + if (event.keyCode !== 13) { + return; + } + const { sendWith } = this.#config_; + let data = this.#$sendInput_.val(); + if (this.#config_.hex) { + let hexstr = data.split(' '); + let hexs = []; + for (let str of hexstr) { + let hex = parseInt(str, 16); + if (isNaN(hex)) { + continue; + } + hexs.push(hex); + } + for (let char of sendWith) { + hexs.push(char.charCodeAt(0)); + } + this.#serial_.sendBuffer(hexs).catch(Debug.error); + } else { + data += sendWith; + this.#serial_.sendString(data).catch(Debug.error); + } + this.#$sendInput_.val(''); + }); + + this.#$dtr_.change((event) => { + let dtr = false; + if (this.#$dtr_.prop('checked')) { + dtr = true; + } + if (this.isOpened()) { + this.#serial_.setDTR(dtr) + .then(() => { + this.#config_.dtr = dtr; + }) + .catch(Debug.error); + } else { + this.#config_.dtr = dtr; + } + }); + + this.#$rts_.change((event) => { + let rts = false; + if (this.#$rts_.prop('checked')) { + rts = true; + } + if (this.isOpened()) { + this.#serial_.setRTS(rts) + .then(() => { + this.#config_.rts = rts; + }) + .catch(Debug.error); + } else { + this.#config_.rts = rts; + } + }); + + this.#$hex_.change((event) => { + let hex = false; + if (this.#$hex_.prop('checked')) { + hex = true; + } + this.#config_.hex = hex; + }); + } + + #timedRefresh_() { + this.#timer_ = null; + if (!this.#valueTemp_ || !this.isOpened()) { + return; + } + if (Date.now() - this.#lastUpdate_ < this.#refreshFrequency_) { + this.#timer_ = setTimeout(this.#timedRefresh_.bind(this), this.#refreshFrequency_); + return; + } + this.addValue(''); + } + + init() { + super.init(); + this.addDirty(); + this.setMarkStatus('negative'); + const $tab = this.getTab(); + this.#port_ = $tab.attr('data-tab-id'); + this.#serial_ = new Serial(this.getPortName()); + this.#serial_.config(this.#config_).catch(Debug.error); + this.#addEventsListener_(); + this.#addContextMenuItemsForOutput_(); + this.setValue(this.#valueTemp_); + this.#valueTemp_ = ''; + this.#$settingMenu_.filter('[data-id="baud"]').val(this.#config_.baud).trigger('change'); + this.#$dtr_.prop('checked', this.#config_.dtr); + this.#$rts_.prop('checked', this.#config_.rts); + } + + async open() { + await this.#serial_.open(this.#config_.baud); + if (SELECTED_BOARD?.serial?.ctrlCBtn) { + await this.#serial_.sleep(1000); + await this.#serial_.interrupt(); + const startTime = Number(new Date()); + let endTime = startTime; + while (endTime - startTime < 2000) { + await this.#serial_.sleep(50); + if (this.#receiveTemp_.indexOf('>>>') !== -1) { + break; + } + endTime = Number(new Date()); + } + this.#valueTemp_ = ''; + this.empty(); + this.startRead(); + this.#receiveTemp_ = ''; + await this.#serial_.reset(); + } else { + this.startRead(); + } + } + + async close() { + await this.#serial_.close(); + } + + async toggle() { + if (this.isOpened()) { + await this.#serial_.close(); + } else { + await this.#serial_.open(); + await this.#serial_.sleep(200); + try { + await this.#serial_.setDTRAndRTS(this.#config_.dtr, this.#config_.rts); + } catch (error) { + Debug.error(error); + } + this.startRead(); + } + } + + async interrupt() { + await this.#serial_.open(this.#config_.baud); + this.startRead(); + await this.#serial_.interrupt(); + } + + async reset() { + await this.#serial_.open(this.#config_.baud); + this.startRead(); + await this.#serial_.interrupt(); + await this.#serial_.reset(); + } + + setStatus(isOpened) { + if (this.isOpened() === isOpened) { + return; + } + this.#opened_ = isOpened; + if (isOpened) { + this.setMarkStatus('positive'); + } else { + this.setMarkStatus('negative'); + } + this.#output_.setStatus(isOpened); + this.#chart_.setStatus(isOpened); + } + + async setBaudRate(baud) { + if (!this.isOpened()) { + this.#config_.baud = baud; + return; + } + if (this.#serial_.baudRateIsLegal(baud)) { + try { + await this.#serial_.setBaudRate(baud); + this.#config_.baud = baud; + } catch (error) { + Debug.error(error); + } + } + this.#$settingMenu_.filter('[data-id="baud"]').val(this.#config_.baud).trigger('change'); + this.startRead(); + } + + isOpened() { + return this.#opened_; + } + + portExit() { + const portsName = Serial.getCurrentPortsName(); + return portsName.includes(this.getPortName()); + } + + getPortName() { + return this.#port_; + } + + getSerial() { + return this.#serial_; + } + + startRead() { + this.#reading_ = true; + } + + stopRead() { + this.#reading_ = false; + } + + dispose() { + this.#$settingMenu_.select2('destroy'); + this.#$settingMenu_ = null; + this.#serial_.close() + .catch(Debug.error) + .finally(() => { + this.#$sendInput_ = null; + this.#$settingMenu_ = null; + this.#$scroll_ = null; + this.#$timestamp_ = null; + this.#$dtr_ = null; + this.#$rts_ = null; + this.#$hex_ = null; + this.#output_ = null; + this.#chart_ = null; + this.#manager_.dispose(); + this.#manager_ = null; + this.#serial_.dispose(); + this.#serial_ = null; + super.dispose(); + }); + } + + getValue() { + if (!this.isInited()) { + return this.#valueTemp_; + } else { + return this.#output_.getValue(); + } + } + + empty() { + this.#output_.empty(); + } + + setValue(data) { + if (!this.isInited()) { + this.#valueTemp_ = data; + return; + } + this.#output_.setValue(data, this.#output_.scrollChecked()); + } + + addValue(data) { + if (!this.isInited()) { + this.#valueTemp_ += data; + return; + } + this.#valueTemp_ += data; + if (Date.now() - this.#lastUpdate_ < this.#refreshFrequency_ || !this.isOpened()) { + return; + } + this.#output_.addValue(this.#valueTemp_, this.#output_.scrollChecked()); + this.#valueTemp_ = ''; + const editor = this.#output_.getEditor(); + const row = editor.session.getLength(); + if (row > this.#maxLine_) { + const initCursor = editor.selection.getCursor(); + const removedLine = row - this.#maxLine_; + editor.session.removeFullLines(1, removedLine); + } + this.#lastUpdate_ = Date.now(); + } + + getManager() { + return this.#manager_; + } + + resize() { + super.resize(); + this.getManager().resize(); + } + + onMounted() { + super.onMounted(); + this.#manager_.onMounted(); + } + + onUnmounted() { + this.#manager_.onUnmounted(); + super.onUnmounted(); + } +} + +Mixly.StatusBarSerial = StatusBarSerial; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbar.js b/mixly/common/modules/mixly-modules/common/statusbar.js new file mode 100644 index 00000000..19ac0099 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbar.js @@ -0,0 +1,89 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Config'); +goog.require('Mixly.EditorAce'); +goog.require('Mixly.ContextMenu'); +goog.require('Mixly.Menu'); +goog.require('Mixly.Msg'); +goog.require('Mixly.IdGenerator'); +goog.provide('Mixly.StatusBar'); + +const { + XML, + Env, + Config, + EditorAce, + ContextMenu, + Menu, + Msg, + IdGenerator +} = Mixly; +const { USER } = Config; + + +class StatusBar extends EditorAce { + #contextMenu_ = null; + constructor() { + super(); + this.#addContextMenu_(); + } + + init() { + super.init(); + this.#toStatusBar_(); + } + + #addContextMenu_() { + this.#contextMenu_ = new ContextMenu(`div[page-id="${this.getId()}"]`, { + zIndex: 300 + }); + let menu = new Menu(); + menu.add({ + weight: 0, + id: 'copy', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['editor.contextMenu.copy'], 'Ctrl+C'), + callback: (key, opt) => this.copy() + } + }); + this.#contextMenu_.register('code', menu); + this.#contextMenu_.bind('getMenu', () => 'code'); + } + + #toStatusBar_() { + const editor = this.getEditor(); + if (USER.theme === 'dark') { + editor.setOption('theme', 'ace/theme/tomorrow_night'); + } else { + editor.setOption('theme', 'ace/theme/xcode'); + } + editor.getSession().setMode('ace/mode/python'); + editor.setReadOnly(true); + // editor.setScrollSpeed(0.3); + editor.setShowPrintMargin(false); + editor.renderer.setShowGutter(false); + editor.setOptions({ + enableBasicAutocompletion: false, + enableSnippets: false, + enableLiveAutocompletion: false + }); + editor.setHighlightActiveLine(false); + } + + getContextMenu() { + return this.#contextMenu_; + } + + dispose() { + this.#contextMenu_.dispose(); + this.#contextMenu_ = null; + super.dispose(); + } +} + +Mixly.StatusBar = StatusBar; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/statusbars-manager.js b/mixly/common/modules/mixly-modules/common/statusbars-manager.js new file mode 100644 index 00000000..85d94fc1 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/statusbars-manager.js @@ -0,0 +1,289 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Events'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.StatusBarOutput'); +goog.require('Mixly.StatusBarSerial'); +goog.require('Mixly.StatusBarFS'); +goog.require('Mixly.StatusBarLibs'); +goog.require('Mixly.StatusBarAmpy') +goog.require('Mixly.PagesManager'); +goog.require('Mixly.DropdownMenu'); +goog.require('Mixly.Menu'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.Serial'); +goog.require('Mixly.Config'); +goog.require('Mixly.Debug'); +goog.provide('Mixly.StatusBarsManager'); + +const { + XML, + Env, + Msg, + Registry, + Events, + HTMLTemplate, + StatusBarOutput, + StatusBarSerial, + StatusBarFS, + StatusBarLibs, + StatusBarAmpy, + PagesManager, + DropdownMenu, + Menu, + IdGenerator, + Serial, + Config, + Debug +} = Mixly; + +const { layer } = layui; +const { BOARD } = Config; + + +class StatusBarsManager extends PagesManager { + static { + HTMLTemplate.add( + 'html/statusbar/statusbars-manager.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbars-manager.html'))) + ); + HTMLTemplate.add( + 'html/statusbar/statusbars-tab.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/statusbar/statusbars-tab.html'))) + ); + this.typesRegistry = new Registry(); + this.managersRegistry = new Registry(); + this.typesRegistry.register(['#default', 'terminal'], StatusBarOutput); + this.typesRegistry.register(['serial'], StatusBarSerial); + this.typesRegistry.register(['board-fs'], StatusBarFS); + this.typesRegistry.register(['libs'], StatusBarLibs); + this.typesRegistry.register(['ampy'], StatusBarAmpy); + + this.getMain = function() { + if (!this.managersRegistry.length()) { + return null; + } + const key = this.managersRegistry.keys()[0]; + return this.managersRegistry.getItem(key); + } + + this.add = function(manager) { + this.managersRegistry.register(manager.id, manager); + } + + this.remove = function(manager) { + this.managersRegistry.unregister(manager.id); + } + } + + #shown_ = false; + #dropdownMenu_ = null; + #$dropdownBtn_ = null; + + constructor(element) { + const managerHTMLTemplate = HTMLTemplate.get('html/statusbar/statusbars-manager.html'); + const tabHTMLTemplate = HTMLTemplate.get('html/statusbar/statusbars-tab.html'); + const $manager = $(managerHTMLTemplate.render()); + const $tab = $(tabHTMLTemplate.render()); + super({ + parentElem: element, + managerContentElem: $manager[0], + bodyElem: $manager.find('.body')[0], + tabElem: $manager.find('.tabs')[0], + tabContentElem: $tab[0], + typesRegistry: StatusBarsManager.typesRegistry + }); + this.tabId = tabHTMLTemplate.id; + this.id = IdGenerator.generate(); + this.addEventsType(['show', 'hide', 'onSelectMenu', 'getMenu']); + this.#$dropdownBtn_ = $tab.find('.statusbar-dropdown-menu > button'); + $tab.find('.statusbar-close > button').click(() => this.hide()); + this.#addDropdownMenu_(); + this.#addEventsListener_(); + StatusBarsManager.add(this); + } + + getStatusBarById(id) { + return this.get(id); + } + + removeStatusBarById(id) { + this.remove(id); + } + + show() { + this.runEvent('show'); + } + + hide() { + this.runEvent('hide'); + } + + toggle() { + this.isShown() ? this.hide() : this.show(); + } + + isShown() { + return this.#shown_; + } + + openSelectedPort() { + const port = Serial.getSelectedPortName(); + if (port) { + this.show(); + this.#onSelectMenu_(port); + } else { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + } + } + + #addDropdownMenu_() { + let menu = new Menu(); + let serialChildMenu = new Menu(true); + menu.add({ + weight: 0, + id: 'serial-default', + preconditionFn: () => { + return !!Serial.getCurrentPortsName().length; + }, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.openSelectedPort'], ''), + callback: (key, opt) => { + this.openSelectedPort(); + } + } + }); + menu.add({ + weight: 1, + id: 'serial', + children: serialChildMenu, + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.openPort'], '') + } + }); + + /*menu.add({ + weight: 2, + id: 'lib', + data: { + isHtmlName: true, + name: Menu.getItem('第三方库管理', ''), + callback: (key, opt) => { + this.add('libs', 'libs', '第三方库管理'); + this.changeTo('libs'); + } + } + });*/ + + if (['micropython', 'circuitpython'].includes(BOARD.language.toLowerCase()) + && !['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + menu.add({ + weight: 2, + id: 'sep1', + data: '---------' + }); + menu.add({ + weight: 3, + id: 'ampy', + data: { + isHtmlName: true, + name: Menu.getItem(Msg.Lang['statusbar.ampy'], ''), + callback: (key, opt) => { + this.add({ + id: 'ampy', + type: 'ampy', + name: Msg.Lang['statusbar.ampy'], + title: Msg.Lang['statusbar.ampy'] + }); + this.changeTo('ampy'); + } + } + }); + } + serialChildMenu.bind('onRead', () => { + const options = this.#getMenu_() ?? {}; + options.list = options.list ?? []; + options.empty = options.empty ?? Msg.Lang['statusbar.serial.noPort']; + const result = []; + if (!options.list.length) { + result.push({ + weight: 1, + id: 'empty', + data: { + isHtmlName: true, + name: options.empty, + disabled: true + } + }); + } + for (let i in options.list) { + result.push({ + weight: 1, + id: `serial${i}`, + data: { + isHtmlName: true, + name: options.list[i], + callback: (key, opt) => this.#onSelectMenu_(options.list[i]) + } + }); + } + return result; + }); + this.#dropdownMenu_ = new DropdownMenu(this.#$dropdownBtn_[0]); + this.#dropdownMenu_.register('menu', menu); + this.#dropdownMenu_.bind('getMenu', () => 'menu'); + } + + #onSelectMenu_(port) { + this.runEvent('onSelectMenu', port); + } + + #getMenu_() { + let menus = this.runEvent('getMenu'); + if (menus && menus.length) { + return menus[0]; + } + return { list: [], empty: Msg.Lang['statusbar.dropdownMenu.noOptions'] }; + } + + #addEventsListener_() { + this.bind('getMenu', () => { + return StatusBarSerial.getMenu(); + }); + + this.bind('onSelectMenu', (port) => { + this.add('serial', port); + this.changeTo(port); + const statusBarSerial = this.getStatusBarById(port); + if (statusBarSerial.isInited() && !statusBarSerial.isOpened()) { + statusBarSerial.open().catch(Debug.error); + } + }); + } + + getDropdownMenu() { + return this.#dropdownMenu_; + } + + dispose() { + StatusBarsManager.remove(this); + this.#dropdownMenu_.dispose(); + this.#$dropdownBtn_.remove(); + this.#$dropdownBtn_ = null; + super.dispose(); + } +} + +Mixly.StatusBarsManager = StatusBarsManager; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/storage.js b/mixly/common/modules/mixly-modules/common/storage.js new file mode 100644 index 00000000..40c2f060 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/storage.js @@ -0,0 +1,54 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.LocalStorage'); +goog.require('Mixly.Config'); +goog.provide('Mixly.Storage'); + +const { + LocalStorage, + Config, + Storage +} = Mixly; + +const { laytpl } = layui; + +const { BOARD } = Config; + +Storage.user = function (key, value) { + let storagePath = path.join(LocalStorage.PATH['USER'], key); + if (arguments.length > 1) { + LocalStorage.set(storagePath, value); + } else { + value = LocalStorage.get(storagePath); + } + return value; +} + +Storage.board = function (key, value) { + let storagePath = path.join(laytpl(LocalStorage.PATH['BOARD']).render({ + boardType: BOARD.boardType + }), key); + if (arguments.length > 1) { + LocalStorage.set(storagePath, value); + } else { + value = LocalStorage.get(storagePath); + } + return value; +} + +Storage.thirdParty = function (name, key, value) { + let storagePath = path.join(laytpl(LocalStorage.PATH['THIRD_PARTY']).render({ + boardType: BOARD.boardType, + thirdPartyName: name ?? 'default' + }), key); + if (arguments.length > 1) { + LocalStorage.set(storagePath, value); + } else { + value = LocalStorage.get(storagePath); + } + return value; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/title.js b/mixly/common/modules/mixly-modules/common/title.js new file mode 100644 index 00000000..13a8ba06 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/title.js @@ -0,0 +1,70 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.Config'); +goog.require('Mixly.Debug'); +goog.provide('Mixly.Title'); + +let { + Config, + Debug, + Title +} = Mixly; +let { BOARD, SOFTWARE } = Config; + +if (SOFTWARE?.version && BOARD?.boardType) { + document.title = SOFTWARE.version + " For " + BOARD.boardType; +} +Title.title = document.title; +Title.NOWTITLE = Title.title; + +Title.updeteVersionNumber = (newVersionNumber) => { + try { + Title.NOWTITLE = document.title.replace(/Mixly[\s]?[\d.]+/g, "Mixly " + newVersionNumber); + document.title = Title.NOWTITLE; + } catch (error) { + Debug.error(error); + } +} + +Title.getVersionNumber = () => { + try { + Title.NOWTITLE = document.title.match(/Mixly[\s]?[\d.]+/g); + return Title.NOWTITLE; + } catch (error) { + Debug.error(error); + return ''; + } +} + +Title.updeteFilePath = function (newPath) { + try { + var pathArr = Title.NOWTITLE.match(/\([^\n\r]+\)/g); + if (pathArr) { + Title.NOWTITLE = document.title.replace(/\([^\n\r]+\)/g, "(" + newPath + ")"); + document.title = Title.NOWTITLE; + } else { + Title.NOWTITLE = document.title + " (" + newPath + ")"; + document.title = Title.NOWTITLE; + } + } catch (error) { + Debug.error(error); + } +} + +Title.getFilePath = () => { + try { + let filePathArr = document.title.match(/(?<=\()[^\n\r]+(?=\))/g); + if (filePathArr && filePathArr.length > 0) { + return filePathArr[0]; + } + } catch (error) { + Debug.error(error); + } + return null; +} + +Title.updateTitle = (newTitle) => { + Title.NOWTITLE = newTitle; + document.title = newTitle; +} +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/toolbox-searcher.js b/mixly/common/modules/mixly-modules/common/toolbox-searcher.js new file mode 100644 index 00000000..3d521794 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/toolbox-searcher.js @@ -0,0 +1,208 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Blockly'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Debug'); +goog.provide('Mixly.ToolboxSearcher'); + +const { + Env, + XML, + Msg, + HTMLTemplate, + Debug +} = Mixly; + +class ToolboxSearcher { + static { + this.searchHtmlTemplate = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/search-div.html')) + ); + } + + constructor(mainWorkspace) { + this.mainWorkspace = mainWorkspace; + this.searchWorkspace = new Blockly.Workspace(new Blockly.Options({ + toolbox: null + })); + this.mainToolbox = this.mainWorkspace.getToolbox(); + this.$search = $(ToolboxSearcher.searchHtmlTemplate.render({ + search: Msg.Lang['toolboxSearcher.search'] + })); + this.$i = this.$search.find('i'); + this.$input = this.$search.find('input'); + this.prevText = ''; + $(this.mainToolbox.HtmlDiv).append(this.$search); + this.addEventsListener(); + } + + addEventsListener() { + this.$input.change(() => this.startSearch()); + this.$input.bind('input propertychange', (event) => { + const searchCategory = this.mainToolbox.getToolboxItemById('catSearch'); + const keyText = event.target.value; + if (!keyText.replaceAll(' ', '')) { + searchCategory.hide(); + this.$i.addClass('disabled'); + return; + } else { + searchCategory.show(); + } + this.scrollTop(); + if (keyText === this.prevText) { + this.$i.addClass('disabled'); + } else { + this.$i.removeClass('disabled'); + } + }); + } + + scrollTop() { + const { HtmlDiv } = this.mainToolbox; + $(HtmlDiv).scrollTop(HtmlDiv.scrollHeight); + } + + checkBlock(blockxml, keys) { + this.searchWorkspace.clear(); + try { + Blockly.Xml.domToBlock(blockxml, this.searchWorkspace); + } catch (error) { + Debug.error(error); + return false; + } + const blocks = this.searchWorkspace.getAllBlocks(true); + let select = false; + for (let block of blocks) { + const { inputList } = block; + for (let input of inputList) { + const { fieldRow } = input; + for (let field of fieldRow) { + const fieldText = field.getText().toLowerCase(); + let times = 0; + for (let key = 0; key < keys.length; key++) { + if (fieldText.indexOf(keys[key]) === -1) { + continue; + } + times++; + } + if (keys.length === times) { + return true; + } + } + } + } + return false; + } + + searchBlocks(keys) { + return new Promise((resolve, reject) => { + const searchCategory = this.mainToolbox.getToolboxItemById('catSearch'); + let outputXML = []; + let selectedBlocksLen = 0; + const categories = this.mainToolbox.getToolboxItems(); + for (let j = 0; categories[j]; j++) { + const category = categories[j]; + if (category.id_ === 'catSearch') continue; + if (typeof category.getContents !== 'function') continue; + const blocksList = category.getContents(); + let addLabel = true; + for (let blockDef of blocksList) { + const { type, kind, blockxml } = blockDef; + if (kind !== 'BLOCK') { + continue; + } + if (!this.checkBlock(blockxml, keys)) { + continue; + } + if (addLabel) { + const categoryPath = this.getCategoryPath(category); + outputXML.push({ + kind: 'LABEL', + text: categoryPath + }); + addLabel = false; + } + outputXML.push(blockDef); + selectedBlocksLen++; + if (selectedBlocksLen > 30) { + break; + } + } + if (selectedBlocksLen > 30) { + outputXML.unshift({ + kind: 'LABEL', + text: Msg.Lang['toolboxSearcher.tooManyResultsInfo'] + }); + break; + } + } + this.searchWorkspace.clear(); + searchCategory.updateFlyoutContents( + outputXML.length ? + outputXML : [{ + kind: 'LABEL', + text: Msg.Lang['toolboxSearcher.empty'] + }] + ); + this.mainToolbox.refreshSelection(); + this.mainToolbox.setSelectedItem(searchCategory); + const { selectedItem_ } = this.mainToolbox; + if (selectedItem_ && selectedItem_.isCollapsible()) { + selectedItem_.setExpanded(true); + } + this.scrollTop(); + resolve(); + }); + } + + getCategoryPath(category) { + let categoryPath = ''; + for (; category; category = category.getParent()) { + categoryPath = category.toolboxItemDef_.name + (categoryPath && (' > ' + categoryPath)); + } + return categoryPath; + } + + startSearch() { + if (this.$i.hasClass('disabled')) { + return + }; + let text = this.$input.val(); + this.prevText = text; + try { + if (!text.replaceAll(' ', '')) { + return; + } + } catch(error) { + Debug.error(error); + } + this.$input.attr('disabled', true); + this.$i.removeClass('codicon-search-fuzzy'); + this.$i.addClass('codicon-loading layui-anim-rotate layui-anim-loop'); + setTimeout(() => { + let keys = text.toLowerCase().split(' '); + this.searchBlocks(keys) + .catch(Debug.error) + .finally(() => { + this.$i.removeClass('codicon-loading layui-anim-rotate layui-anim-loop'); + this.$i.addClass('codicon-search-fuzzy disabled'); + this.$input.removeAttr('disabled'); + }); + }, 100); + } + + restart() { + this.prevText = ''; + const searchCategory = this.mainToolbox.getToolboxItemById('catSearch'); + this.$input.val(''); + searchCategory.hide(); + } +} + +Mixly.ToolboxSearcher = ToolboxSearcher; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/url.js b/mixly/common/modules/mixly-modules/common/url.js new file mode 100644 index 00000000..7429006b --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/url.js @@ -0,0 +1,213 @@ +goog.loadJs('common', () => { + +goog.require('Mixly'); +goog.provide('Mixly.Url'); + +const { Url } = Mixly; + +/** +* @function 输入url,返回json +* @param url {String} 输入的url字符串 +* @return object +*/ +Url.urlToJson = (url) => { + // 递归字符串生成json对象 + function strToObj(obj, str, value) { + if(str.indexOf('.') !== -1) { + let key = str.substring(0, str.indexOf('.')); + str = str.substring(str.indexOf('.') + 1, str.length); + if (obj[key] === undefined) { + obj[key] = {}; + } + obj[key] = strToObj(obj[key], str, value); + return obj; + } else { + const decodeValue = decodeURIComponent(value); + const decodeKey = decodeURIComponent(str); + if (isNaN(decodeValue)) { + const decodeValueLower = decodeValue.toLowerCase(); + switch (decodeValueLower) { + case 'true': + obj[decodeKey] = true; + break; + case 'false': + obj[decodeKey] = false; + break; + case 'undefined': + obj[decodeKey] = undefined; + break; + case 'null': + obj[decodeKey] = null; + break; + default: + obj[decodeKey] = decodeValue; + } + } else { + obj[decodeKey] = decodeValue-0; + } + return obj; + } + } + var hash; + var myJson = {}; + var hashes = url.slice(url.indexOf('?') + 1).split('&'); + for (var i = 0; i < hashes.length; i++) { + hash = hashes[i].split('='); + try { + var hash0 = hash[0].replaceAll('@', '='); + hash0 = hash0.replaceAll('$', '&'); + var hash1 = hash[1].replaceAll('@', '='); + hash1 = hash1.replaceAll('$', '&'); + myJson = strToObj(myJson, hash0, hash1); + } catch (e) { + myJson = strToObj(myJson, hash[0], hash[1]); + } + } + return myJson; +} + +/** + * @function JSON对象转Url字符串 + * @param param {object | array | string | number | boolean} 传入的JSON对象或者是转换过程中某个键的对应值 + * @param key {null | string} 转换过程中传入的JSON对象中的某个键 + * @return {string} 转换后的Url字符串 + **/ +Url.jsonToUrl = (param, key = null) => { + var paramStr = ''; + if (param instanceof String || param instanceof Number || param instanceof Boolean) { + try { + var newKey = key.toString().replaceAll('=', '@'); + newKey = newKey.replaceAll('&', '$'); + var newParam = param.toString().replaceAll('=', '@') + newParam = newParam.replaceAll('&', '$'); + paramStr += '&' + newKey + '=' + encodeURIComponent(newParam); + } catch (e) { + //console.log(e); + paramStr += '&' + key + '=' + encodeURIComponent(param); + } + } else { + $.each(param, function (i) { + var k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i); + paramStr += '&' + Url.jsonToUrl(this, k); + }); + } + return paramStr.substr(1); +}; + +/** +* @function 获取主页面传递的配置信息 +* @return {object} +*/ +Url.getConfig = () => { + var href = ''; + try { + href = window.location.href.replaceAll('#', ''); + } catch (e) { + //console.log(e); + href = window.location.href; + } + href = href.substring(href.indexOf('?') + 1, href.length); + var boardConfig = Url.urlToJson(href); + return boardConfig; +} + +/** + * @function 更改传入Url字符串中某个参数的值,如果没有则添加该参数 + * @param url {string} Url字符串 + * @param arg {string} 参数名 + * @param argVal {string} 参数名对应值 + * @return {string} 修改后的Url字符串 + **/ +Url.changeURLArg = (url, arg, argVal) => { + var pattern = arg + '=([^&]*)'; + var replaceText = arg + '=' + argVal; + if (url.match(pattern)) { + var tmp = '/(' + arg + '=)([^&]*)/gi'; + tmp = url.replace(eval(tmp), replaceText); + return tmp; + } else { + if (url.match('[\?]')) { + return url + '&' + replaceText; + } else { + return url + '?' + replaceText; + } + } +} + +/** + * @function 求解某个字符串的CRC32值 + * @param str {string} 传入的字符串 + * @param radix {number} 返回文本的进制,默认十进制 + * @return {string} + **/ +Url.CRC32 = (str, radix = 10) => { + const Utf8Encode = function (string) { + string = string.replace(/\r\n/g, '\n'); + let text = ''; + for (let n = 0; n < string.length; n++) { + const c = string.charCodeAt(n); + if (c < 128) { + text += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + text += String.fromCharCode((c >> 6) | 192); + text += String.fromCharCode((c & 63) | 128); + } else { + text += String.fromCharCode((c >> 12) | 224); + text += String.fromCharCode(((c >> 6) & 63) | 128); + text += String.fromCharCode((c & 63) | 128); + } + } + return text; + } + + const makeCRCTable = function () { + let c; + const crcTable = []; + for (let n = 0; n < 256; n++) { + c = n; + for (let k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + crcTable[n] = c; + } + return crcTable; + } + + const crcTable = makeCRCTable(); + const strUTF8 = Utf8Encode(str); + let crc = 0 ^ (-1); + for (let i = 0; i < strUTF8.length; i++) { + crc = (crc >>> 8) ^ crcTable[(crc ^ strUTF8.charCodeAt(i)) & 0xFF]; + } + crc = (crc ^ (-1)) >>> 0; + return crc.toString(radix); +}; + +/** + * @function 获取当前网页的IP地址 + * @return {string | null} + **/ +Url.getIPAddress = () => { + const url = window.location.host; + const IPList = url.match(/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g); + if (IPList && IPList.length > 0) { + return IPList[0]; + } + return null; +} + +/** + * @function 在新窗口打开某个网址 + * @param href {string} 传入的网址 + * @return {void} + **/ +Url.open = (href) => { + if (goog.isElectron) { + const { shell } = Mixly.require('electron'); + shell.openExternal(href); + } else { + window.open(href, '_blank'); + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/user-events.js b/mixly/common/modules/mixly-modules/common/user-events.js new file mode 100644 index 00000000..7fe0de74 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/user-events.js @@ -0,0 +1,134 @@ +goog.loadJs('common', () => { + +goog.require('Blockly'); +goog.require('Mixly.MFile'); +goog.require('Mixly.Config'); +goog.require('Mixly.Boards'); +goog.require('Mixly.LocalStorage'); +goog.provide('Mixly.UserEvents'); + +const { + MFile, + Config, + Boards, + LocalStorage +} = Mixly; + +const { USER, SOFTWARE } = Config; + +class UserEvents { + #DEFAULT_DATA = { + uid: () => { + return LocalStorage.get('Authorization/user_id') ?? ''; + }, + mid: () => { + return LocalStorage.get('module_id') ?? ''; + }, + type: () => { + return Boards.getSelectedBoardName(); + }, + code: () => { + return MFile.getCode(); + }, + blocks: () => { + return MFile.getMil(); + }, + time: () => { + return (new Date()).toLocaleString(); + }, + fileName: () => { + return LocalStorage.get('file_name') ?? ''; + } + }; + + #actionFlow_ = []; + #prevCode_ = ''; + + constructor(workspace) { + this.workspace = workspace; + this.#addBlocklyEventListener_(); + } + + #addBlocklyEventListener_() { + this.blocklyEventListener = this.workspace.addChangeListener((event) => { + if (![ + Blockly.Events.BLOCK_MOVE, + Blockly.Events.BLOCK_DELETE, + Blockly.Events.BLOCK_CREATE + ].includes(event.type)) { + return; + } + const currentCode = MFile.getCode(); + if (Blockly.Events.BLOCK_MOVE === event.type && this.#prevCode_ === currentCode) { + return; + } + this.#prevCode_ = currentCode; + const recordLine = {}; + recordLine.blockId = event.blockId; + recordLine.currentCode = currentCode; + recordLine.currentBlocks = MFile.getMil(); + recordLine.time = (new Date()).toLocaleString(); + let actionType = 1; + switch (event.type) { + case Blockly.Events.BLOCK_MOVE: + let block = this.workspace.getBlockById(event.blockId); + if (!block) { + return; + } + recordLine.blockType = block.type; + actionType = 3; + break; + case Blockly.Events.BLOCK_DELETE: + recordLine.blockType = event.oldJson.type; + actionType = 2; + break; + case Blockly.Events.BLOCK_CREATE: + recordLine.blockType = event.json.type; + actionType = 1; + break; + } + recordLine.actionType = actionType; + this.addFlowItem(recordLine); + }); + } + + addRecord(message) { + if (this.flowIsEmpty()) { + return; + } + let data = {}; + for (let key in this.#DEFAULT_DATA) { + data[key] = this.#DEFAULT_DATA[key](); + } + for (let i in message) { + data[i] = message[i]; + } + data.actionFlow = this.getFlowItems(); + $.post(SOFTWARE?.behaviorRecord?.url, data, () => { + this.resetFlow(); + }) + .fail(() => { + this.resetFlow(); + }); + } + + addFlowItem(data) { + this.#actionFlow_.push(data); + } + + getFlowItems() { + return this.#actionFlow_; + } + + resetFlow() { + this.#actionFlow_ = []; + } + + flowIsEmpty() { + return this.#actionFlow_.length === 0; + } +} + +Mixly.UserEvents = UserEvents; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/user-op-events.js b/mixly/common/modules/mixly-modules/common/user-op-events.js new file mode 100644 index 00000000..90299300 --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/user-op-events.js @@ -0,0 +1,84 @@ +goog.loadJs('common', () => { + +goog.require('Mixly.MFile'); +goog.require('Mixly.Config'); +goog.require('Mixly.Boards'); +goog.provide('Mixly.UserOPEvents'); + +const { + MFile, + Boards, + Config, + Editor +} = Mixly; +const { USER } = Config; + +class UserOPEvents { + #DEFAULT_DATA = { + code: () => { + return MFile.getCode(); + }, + board_name: () => { + return Boards.getSelectedBoardName(); + }, + time: () => { + return (new Date()).toLocaleString(); + }, + blocks: () => { + return MFile.getMil(); + }, + output: () => { + const { mainStatusBarTab } = Mixly; + const statusBarTerminal = mainStatusBarTab.getStatusBarById('output'); + return statusBarTerminal.getValue(); + }, + id: () => { + return USER.visitorId.str32CRC32b; + } + }; + #actionArrayRecord = []; + constructor() { + this.addTimer(); + } + + sendAll() { + let sendPromise = []; + let len = this.#actionArrayRecord.length; + for (;this.#actionArrayRecord.length;) { + let data = this.#actionArrayRecord.shift(); + sendPromise.push(this.send(data)); + } + Promise.all(sendPromise) + .finally(() => { + this.addTimer(); + }); + } + + send(data) { + for (let key in this.#DEFAULT_DATA) { + data[key] = this.#DEFAULT_DATA[key](); + } + return new Promise((resolve, reject) => { + $.post('https://cc.mixly.cn/api/behaviorrecord', data, function() { + resolve(); + }) + .fail(function() { + resolve(); + }); + }); + } + + addTimer() { + setTimeout(() => this.sendAll(), 10000); + } + + addRecord(data) { + if (Editor.mainEditor.selected === 'BLOCK') { + this.#actionArrayRecord.push(data); + } + } +} + +Mixly.UserOPEvents = UserOPEvents; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/workspace.js b/mixly/common/modules/mixly-modules/common/workspace.js new file mode 100644 index 00000000..ececd9fe --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/workspace.js @@ -0,0 +1,223 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('Mixly.XML'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Drag'); +goog.require('Mixly.DragH'); +goog.require('Mixly.DragV'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.EditorsManager'); +goog.require('Mixly.StatusBarsManager'); +goog.require('Mixly.LeftSideBarsManager'); +goog.require('Mixly.RightSideBarsManager'); +goog.require('Mixly.Component'); +goog.provide('Mixly.Workspace'); + +const { + XML, + Env, + Msg, + Drag, + DragH, + DragV, + HTMLTemplate, + EditorsManager, + StatusBarsManager, + LeftSideBarsManager, + RightSideBarsManager, + Component +} = Mixly; + + +class Workspace extends Component { + static { + HTMLTemplate.add( + 'html/workspace.html', + new HTMLTemplate(goog.readFileSync(path.join(Env.templatePath, 'html/workspace.html'))) + ); + + this.workspaces = []; + + this.getAll = () => { + return this.workspaces; + } + + this.add = (workspace) => { + this.remove(workspace); + this.workspaces.push(workspace); + } + + this.remove = (workspace) => { + for (let i in this.workspaces) { + if (this.workspaces[i].id !== workspace.id) { + continue; + } + this.workspaces.slice(i, 1); + } + } + + this.getMain = () => { + if (this.workspaces.length) { + return this.workspaces[0]; + } + return null; + } + } + + #statusBarsManager_ = null; + #editorsManager_ = null; + #leftSideBarsManager_ = null; + #rightSideBarsManager_ = null; + #$dragVLeft_ = null; + #$dragVRight_ = null; + #$dragH_ = null; + + constructor(element) { + super(); + const $content = $(HTMLTemplate.get('html/workspace.html').render()); + this.setContent($content); + this.mountOn($(element)); + this.#$dragVLeft_ = $content.find('.drag-v-left'); + this.#$dragVRight_ = $content.find('.drag-v-right'); + this.#$dragH_ = $content.find('.drag-h'); + this.#statusBarsManager_ = new StatusBarsManager($content.find('.statusbars')[0]); + this.#statusBarsManager_.add({ + type: 'terminal', + id: 'output', + name: Msg.Lang['statusbar.output'], + title: Msg.Lang['statusbar.output'] + }); + this.#statusBarsManager_.changeTo('output'); + this.#editorsManager_ = new EditorsManager($content.find('.editors')[0]); + this.#leftSideBarsManager_ = new LeftSideBarsManager($content.find('.left-sidebars')[0]); + // this.#leftSideBarsManager_.add('local_storage', 'local_storage', '本地'); + // this.#leftSideBarsManager_.changeTo('local_storage'); + this.#rightSideBarsManager_ = new RightSideBarsManager($content.find('.right-sidebars')[0]); + this.dragH = null; + this.dragVLeft = null; + this.dragVRight = null; + Workspace.add(this); + // this.#addEventsListenerForFileTree_(); + this.#addDragEventsListener_(); + // this.#addEventsListenerForEditorManager_(); + this.#addFuncForStatusbarTabs_(); + } + + #addEventsListenerForFileTree_() { + const leftSideBarLocalStorage = this.getLeftSideBarsManager().get('local_storage'); + const fileTree = leftSideBarLocalStorage.getFileTree(); + fileTree.bind('afterSelectLeaf', (selected) => { + const tabs = this.#editorsManager_.getTabs(); + tabs.addTab({ + name: selected[0].text, + title: selected[0].id, + id: selected[0].id, + type: path.extname(selected[0].id), + favicon: selected[0].icon, + attr: { + 'data-link-file': 'true' + } + }); + }); + } + + #addEventsListenerForEditorManager_() { + const tabs = this.#editorsManager_.getTabs(); + tabs.bind('activeTabChange', (event) => { + const leftSideBarLocalStorage = this.getLeftSideBarsManager().get('local_storage'); + const fileTree = leftSideBarLocalStorage.getFileTree(); + const { tabEl } = event.detail; + const tabId = $(tabEl).attr('data-tab-id'); + fileTree.deselectAll(); + fileTree.select(tabId); + }); + tabs.bind('tabDestroyed', (event) => { + const leftSideBarLocalStorage = this.getLeftSideBarsManager().get('local_storage'); + const fileTree = leftSideBarLocalStorage.getFileTree(); + const { tabEl } = event.detail; + const tabId = $(tabEl).attr('data-tab-id'); + fileTree.deselect(tabId); + }); + } + + #addFuncForStatusbarTabs_() { + this.#statusBarsManager_.bind('show', () => this.dragH.show(Drag.Extend.NEGATIVE)); + this.#statusBarsManager_.bind('hide', () => this.dragH.hide(Drag.Extend.NEGATIVE)); + } + + #addDragEventsListener_() { + // 编辑器(上)+状态栏(下) + this.dragH = new DragH(this.#$dragH_[0], { + min: '50px', + startSize: '100%', + startExitFullSize: '70%' + }); + + this.dragH.bind('sizeChanged', () => { + this.resize(); + }); + + /*// 侧边栏(左)+[编辑器(上)+状态栏(下)] + this.dragVLeft = new DragV(this.#$dragVLeft_[0], { + min: '100px', + full: [true, false], + startSize: '0%', + startExitFullSize: '15%' + }); + + this.dragVLeft.bind('sizeChanged', () => { + this.resize(); + }); + + // 侧边栏(右)+[编辑器(上)+状态栏(下)] + this.dragVRight = new DragV(this.#$dragVRight_[0], { + min: '100px', + full: [false, true], + startSize: '100%', + startExitFullSize: '85%' + }); + + this.dragVRight.bind('sizeChanged', () => { + this.resize(); + });*/ + } + + getEditorsManager() { + return this.#editorsManager_; + } + + getLeftSideBarsManager() { + return this.#leftSideBarsManager_; + } + + getRightSideBarsManager() { + return this.#rightSideBarsManager_; + } + + getStatusBarsManager() { + return this.#statusBarsManager_; + } + + resize() { + super.resize(); + this.getEditorsManager().resize(); + this.getLeftSideBarsManager().resize(); + this.getRightSideBarsManager().resize(); + this.getStatusBarsManager().resize(); + } + + dispose() { + Workspace.remove(this); + this.getEditorsManager().dispose(); + this.getLeftSideBarsManager().dispose(); + this.getRightSideBarsManager().dispose(); + this.getStatusBarsManager().dispose(); + super.dispose(); + } +} + +Mixly.Workspace = Workspace; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/common/xml.js b/mixly/common/modules/mixly-modules/common/xml.js new file mode 100644 index 00000000..c43063ed --- /dev/null +++ b/mixly/common/modules/mixly-modules/common/xml.js @@ -0,0 +1,158 @@ +goog.loadJs('common', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.Env'); +goog.require('Mixly.Config'); +goog.require('Mixly.Msg'); +goog.provide('Mixly.XML'); + +const { + Env, + Config, + Msg, + XML +} = Mixly; +const { BOARD } = Config; +const { laytpl } = layui; + + +XML.TEMPLATE_CONFIG = [ + { + type: 'LOADER_DIV', + path: '/html/loader-div.html', + config: { + btnName: Msg.Lang['nav.btn.stop'] + }, + appendToBody: true + }, { + type: 'SELECTOR_DIV', + path: '/html/selector-div.html', + config: { + btn1Name: Msg.Lang['nav.btn.stop'], + btn2Name: Msg.Lang['nav.btn.ok'] + }, + appendToBody: true + }, { + type: 'PARSE_MIX_ERROR_DIV', + path: '/html/parse-mix-error-div.html', + config: {}, + appendToBody: false + }, { + type: 'READ_BITMAP_DIV', + path: '/html/read-bitmap-div.html', + config: {}, + appendToBody: false + }, { + type: 'PROGRESS_BAR_DIV', + path: '/html/progress-bar-div.html', + config: {}, + appendToBody: false + }, { + type: 'LIB_MANAGER_DIV', + path: '/html/lib-manager-div.html', + config: {}, + appendToBody: false + } +]; + +XML.TEMPLATE_ENV = { + LOADER_DIV: true, + SELECTOR_DIV: true, + PARSE_MIX_ERROR_DIV: true, + READ_BITMAP_DIV: true, + PROGRESS_BAR_DIV: goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary, + LIB_MANAGER_DIV: goog.isElectron && BOARD?.nav?.setting?.thirdPartyLibrary +}; + +XML.TEMPLATE_STR = {}; + +XML.TEMPLATE_STR_RENDER = {}; + +XML.TEMPLATE_DOM = {}; + +XML.CATEGORIES_STR = {}; + +XML.getDom = (xmlStr, config = {}) => { + return $(laytpl(xmlStr).render(config)); +} + +XML.render = (xmlStr, config = {}) => { + const newConfig = {}; + for (let i in config) { + if (typeof config[i] === 'function') { + newConfig[i] = config[i](); + } else { + newConfig[i] = config[i]; + } + } + return laytpl(xmlStr).render(newConfig); +} + +XML.convert = function (str, trimEscaped) { + var xml = ""; + var hasComleteAngleBracket = true; + var lenStr = str.length; + for (var i = 0; i < lenStr; i++) { + if (str[i] === "<") { + hasComleteAngleBracket = false; + } else if (str[i] === ">") { + hasComleteAngleBracket = true; + } + + if (trimEscaped + && !hasComleteAngleBracket + && i + 1 < lenStr + && str[i] === "\\" + && str[i + 1] === '"') { + i += 1; + } + + if (!trimEscaped + && !hasComleteAngleBracket + && i > 0 + && str[i - 1] !== "\\" + && str[i] === '"') { + xml += "\\"; + } + xml += str[i]; + } + return xml; +} + +for (let i of XML.TEMPLATE_CONFIG) { + const { type, config, appendToBody } = i; + if (XML.TEMPLATE_ENV[type]) { + const xmlStr = goog.readFileSync(path.join(Env.templatePath, i.path)); + if (xmlStr) { + XML.TEMPLATE_STR[type] = xmlStr; + XML.TEMPLATE_STR_RENDER[type] = XML.render(xmlStr, config); + XML.TEMPLATE_DOM[type] = XML.getDom(xmlStr, config); + if (appendToBody) + $('body').append(XML.TEMPLATE_DOM[type]); + } + } +} + +if (layui._typeof(BOARD.board) === 'object') { + for (let i in BOARD.board) { + const boardConfig = BOARD.board[i]; + if (layui._typeof(boardConfig) === 'object' + && layui._typeof(boardConfig.xmlPath) === 'string') { + const categoriesStr = goog.readFileSync(path.join(Env.boardDirPath, boardConfig.xmlPath)); + if (categoriesStr) + XML.CATEGORIES_STR[i] = categoriesStr; + } + } +} + +window.addEventListener('load', () => { + for (let i of XML.TEMPLATE_CONFIG) { + const { type, appendToBody } = i; + if (XML.TEMPLATE_ENV[type] && XML.TEMPLATE_DOM[type] && appendToBody) { + $('body').append(XML.TEMPLATE_DOM[type]); + } + } +}); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/deps.json b/mixly/common/modules/mixly-modules/deps.json new file mode 100644 index 00000000..f81b39e5 --- /dev/null +++ b/mixly/common/modules/mixly-modules/deps.json @@ -0,0 +1,1968 @@ +[ + { + "path": "/common/ampy-file-tree.js", + "require": [ + "Mixly.Env", + "Mixly.FileTree", + "Mixly.Electron.AmpyFS", + "Mixly.Web.AmpyFS", + "Mixly.WebSocket.AmpyFS" + ], + "provide": [ + "Mixly.AmpyFileTree" + ] + }, + { + "path": "/common/ampy.js", + "require": [], + "provide": [ + "Mixly.Ampy" + ] + }, + { + "path": "/common/app.js", + "require": [ + "path", + "hotkeys", + "Mixly.Url", + "Mixly.Config", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Drag", + "Mixly.Nav", + "Mixly.Menu", + "Mixly.Workspace", + "Mixly.FooterBar", + "Mixly.HTMLTemplate", + "Mixly.LayerExt", + "Mixly.Debug", + "Mixly.Component", + "Mixly.EditorMix", + "Mixly.Electron.Loader", + "Mixly.Electron.FS", + "Mixly.Electron.File", + "Mixly.Electron.LibManager", + "Mixly.Electron.Serial", + "Mixly.Electron.ArduShell", + "Mixly.Electron.BU", + "Mixly.Electron.PythonShell", + "Mixly.Web.BU", + "Mixly.Web.FS", + "Mixly.Web.File", + "Mixly.Web.Serial", + "Mixly.WebCompiler.ArduShell", + "Mixly.WebSocket.File", + "Mixly.WebSocket.Serial", + "Mixly.WebSocket.ArduShell", + "Mixly.WebSocket.BU" + ], + "provide": [ + "Mixly.App" + ] + }, + { + "path": "/common/arduino-cli.js", + "require": [ + "path" + ], + "provide": [ + "Mixly.ArduinoCLI" + ] + }, + { + "path": "/common/arduino-shell.js", + "require": [], + "provide": [ + "Mixly.ArduShell" + ] + }, + { + "path": "/common/board-config-item.js", + "require": [ + "Mixly.Env", + "Mixly.Config", + "Mixly.Storage" + ], + "provide": [ + "Mixly.BoardConfigItem" + ] + }, + { + "path": "/common/boards.js", + "require": [ + "tippy", + "layui", + "path", + "Mixly.LayerExt", + "Mixly.Config", + "Mixly.XML", + "Mixly.Env", + "Mixly.ToolboxSearcher", + "Mixly.MString", + "Mixly.Msg", + "Mixly.BoardConfigItem", + "Mixly.Profile", + "Mixly.EditorBlockly", + "Mixly.Debug", + "Mixly.Nav" + ], + "provide": [ + "Mixly.Boards" + ] + }, + { + "path": "/common/code-formatter.js", + "require": [ + "workerpool" + ], + "provide": [ + "Mixly.Registry", + "Mixly.CodeFormatter" + ] + }, + { + "path": "/common/command.js", + "require": [ + "Mixly.Config", + "Mixly.MJson", + "Mixly.Debug" + ], + "provide": [ + "Mixly.Command" + ] + }, + { + "path": "/common/component.js", + "require": [ + "Mixly.Events", + "Mixly.IdGenerator" + ], + "provide": [ + "Mixly.Component" + ] + }, + { + "path": "/common/config.js", + "require": [ + "path", + "FingerprintJS", + "Mixly.Url", + "Mixly.Env", + "Mixly.LocalStorage" + ], + "provide": [ + "Mixly.Config" + ] + }, + { + "path": "/common/context-menu.js", + "require": [ + "$.contextMenu", + "Mixly.Menu", + "Mixly.Events", + "Mixly.Registry" + ], + "provide": [ + "Mixly.ContextMenu" + ] + }, + { + "path": "/common/css-loader.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.CssLoader" + ] + }, + { + "path": "/common/debug.js", + "require": [ + "Mixly.Config" + ], + "provide": [ + "Mixly.Debug" + ] + }, + { + "path": "/common/drag.js", + "require": [ + "Mixly.Config", + "Mixly.Events" + ], + "provide": [ + "Mixly.Drag", + "Mixly.DragH", + "Mixly.DragV" + ] + }, + { + "path": "/common/dropdown-menu-group.js", + "require": [ + "path", + "tippy", + "Mixly.Env", + "Mixly.Menu", + "Mixly.Registry", + "Mixly.HTMLTemplate", + "Mixly.IdGenerator", + "Mixly.ContextMenu", + "Mixly.DropdownMenu" + ], + "provide": [ + "Mixly.DropdownMenuGroup" + ] + }, + { + "path": "/common/dropdown-menu.js", + "require": [ + "tippy", + "Mixly.IdGenerator", + "Mixly.ContextMenu" + ], + "provide": [ + "Mixly.DropdownMenu" + ] + }, + { + "path": "/common/editor-ace.js", + "require": [ + "ace", + "ace.ExtLanguageTools", + "Mixly.XML", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.HTMLTemplate", + "Mixly.EditorBase" + ], + "provide": [ + "Mixly.EditorAce" + ] + }, + { + "path": "/common/editor-base.js", + "require": [ + "Mixly.Events", + "Mixly.PageBase" + ], + "provide": [ + "Mixly.EditorBase" + ] + }, + { + "path": "/common/editor-blockly.js", + "require": [ + "path", + "Blockly", + "WorkspaceSearch", + "Backpack", + "Minimap", + "PositionedMinimap", + "ContentHighlight", + "ZoomToFitControl", + "Blockly.FieldGridDropdown", + "Blockly.FieldDependentDropdown", + "Blockly.FieldSlider", + "Blockly.FieldBitmap", + "Blockly.FieldColourHsvSliders", + "Blockly.FieldDate", + "Blockly.FieldAngle", + "Blockly.FieldColour", + "Blockly.FieldMultilineInput", + "Blockly.Screenshot", + "Mixly.Config", + "Mixly.Env", + "Mixly.XML", + "Mixly.HTMLTemplate", + "Mixly.ToolboxSearcher", + "Mixly.Debug", + "Mixly.EditorBase" + ], + "provide": [ + "Mixly.EditorBlockly" + ] + }, + { + "path": "/common/editor-code.js", + "require": [ + "Mixly.Config", + "Mixly.XML", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.Menu", + "Mixly.ContextMenu", + "Mixly.IdGenerator", + "Mixly.CodeFormatter", + "Mixly.MonacoTheme", + "Mixly.MonacoTreeSitter", + "Mixly.EditorMonaco" + ], + "provide": [ + "Mixly.EditorCode" + ] + }, + { + "path": "/common/editor-md.js", + "require": [ + "marked", + "markedKatex", + "Mixly.XML", + "Mixly.Env", + "Mixly.Drag", + "Mixly.DragV", + "Mixly.IdGenerator", + "Mixly.HTMLTemplate", + "Mixly.EditorBase", + "Mixly.EditorCode" + ], + "provide": [ + "Mixly.EditorMd" + ] + }, + { + "path": "/common/editor-mix.js", + "require": [ + "layui", + "tippy", + "Base64", + "Blockly", + "Mixly.Drag", + "Mixly.DragV", + "Mixly.XML", + "Mixly.Msg", + "Mixly.Config", + "Mixly.Env", + "Mixly.Debug", + "Mixly.Menu", + "Mixly.Boards", + "Mixly.MJson", + "Mixly.LayerExt", + "Mixly.HTMLTemplate", + "Mixly.EditorBlockly", + "Mixly.EditorCode", + "Mixly.EditorBase" + ], + "provide": [ + "Mixly.EditorMix" + ] + }, + { + "path": "/common/editor-monaco.js", + "require": [ + "Diff", + "monaco", + "Mixly.XML", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.Events", + "Mixly.HTMLTemplate", + "Mixly.EditorBase" + ], + "provide": [ + "Mixly.EditorMonaco" + ] + }, + { + "path": "/common/editor-unknown.js", + "require": [ + "path", + "Mixly.XML", + "Mixly.Env", + "Mixly.HTMLTemplate", + "Mixly.EditorBase" + ], + "provide": [ + "Mixly.EditorUnknown" + ] + }, + { + "path": "/common/editor-welcome.js", + "require": [ + "Mixly.XML", + "Mixly.Env", + "Mixly.HTMLTemplate", + "Mixly.EditorBase" + ], + "provide": [ + "Mixly.EditorWelcome" + ] + }, + { + "path": "/common/editors-manager.js", + "require": [ + "path", + "Mixly.XML", + "Mixly.Env", + "Mixly.Nav", + "Mixly.EditorMix", + "Mixly.EditorCode", + "Mixly.EditorMd", + "Mixly.EditorBlockly", + "Mixly.EditorUnknown", + "Mixly.EditorWelcome", + "Mixly.Registry", + "Mixly.Debug", + "Mixly.PagesManager", + "Mixly.HTMLTemplate", + "Mixly.Electron.FS", + "Mixly.Web.FS" + ], + "provide": [ + "Mixly.EditorsManager" + ] + }, + { + "path": "/common/env.js", + "require": [ + "path", + "Mixly.Url" + ], + "provide": [ + "Mixly.Env" + ] + }, + { + "path": "/common/events.js", + "require": [ + "Mixly.IdGenerator", + "Mixly.MArray", + "Mixly.Registry", + "Mixly.Debug" + ], + "provide": [ + "Mixly.Events" + ] + }, + { + "path": "/common/file-tree.js", + "require": [ + "XScrollbar", + "path", + "$.jstree", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Config", + "Mixly.Events", + "Mixly.Menu", + "Mixly.ContextMenu", + "Mixly.Registry", + "Mixly.IdGenerator", + "Mixly.Debug", + "Mixly.Component", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.FileTree" + ] + }, + { + "path": "/common/file.js", + "require": [], + "provide": [ + "Mixly.File" + ] + }, + { + "path": "/common/footerbar.js", + "require": [ + "path", + "Mixly.Env", + "Mixly.XML", + "Mixly.Msg", + "Mixly.Config", + "Mixly.Boards", + "Mixly.FooterLayer", + "Mixly.FooterLayerBoardConfig", + "Mixly.FooterLayerMessage", + "Mixly.Component", + "Mixly.HTMLTemplate", + "Mixly.Electron.FooterLayerExample", + "Mixly.Web.FooterLayerExample" + ], + "provide": [ + "Mixly.FooterBar" + ] + }, + { + "path": "/common/footerlayer-board-config.js", + "require": [ + "path", + "tippy", + "Blockly", + "layui", + "$.select2", + "Mixly.Env", + "Mixly.XML", + "Mixly.Msg", + "Mixly.HTMLTemplate", + "Mixly.FooterLayer" + ], + "provide": [ + "Mixly.FooterLayerBoardConfig" + ] + }, + { + "path": "/common/footerlayer-example.js", + "require": [ + "path", + "layui", + "Mixly.Title", + "Mixly.Env", + "Mixly.Debug", + "Mixly.Workspace", + "Mixly.HTMLTemplate", + "Mixly.FooterLayer" + ], + "provide": [ + "Mixly.FooterLayerExample" + ] + }, + { + "path": "/common/footerlayer-message.js", + "require": [ + "shortid", + "path", + "Mixly.XML", + "Mixly.Msg", + "Mixly.Env", + "Mixly.HTMLTemplate", + "Mixly.FooterLayer" + ], + "provide": [ + "Mixly.FooterLayerMessage" + ] + }, + { + "path": "/common/footerlayer.js", + "require": [ + "tippy", + "path", + "Mixly.Env", + "Mixly.XML", + "Mixly.Msg" + ], + "provide": [ + "Mixly.FooterLayer" + ] + }, + { + "path": "/common/fs-board-handler.js", + "require": [ + "Mixly.Registry" + ], + "provide": [ + "Mixly.FSBoardHandler" + ] + }, + { + "path": "/common/fs-board.js", + "require": [ + "Mixly.Serial", + "Mixly.Boards", + "Mixly.FSBoardHandler" + ], + "provide": [ + "Mixly.FSBoard" + ] + }, + { + "path": "/common/fs.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.FS" + ] + }, + { + "path": "/common/html-template.js", + "require": [ + "Mixly.XML", + "Mixly.Registry", + "Mixly.IdGenerator" + ], + "provide": [ + "Mixly.HTMLTemplate" + ] + }, + { + "path": "/common/id-generator.js", + "require": [ + "shortid", + "Mixly" + ], + "provide": [ + "Mixly.IdGenerator" + ] + }, + { + "path": "/common/if-visiable.js", + "require": [ + "ifvisible", + "Mixly.Events" + ], + "provide": [ + "Mixly.IfVisible" + ] + }, + { + "path": "/common/js-funcs.js", + "require": [ + "Mixly.Config" + ], + "provide": [ + "Mixly.JSFuncs" + ] + }, + { + "path": "/common/layer-ext.js", + "require": [ + "layui", + "Mixly.Config", + "Mixly.Msg" + ], + "provide": [ + "Mixly.LayerExt" + ] + }, + { + "path": "/common/layer-firmware.js", + "require": [ + "Mixly.Env", + "Mixly.Msg", + "Mixly.Layer", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.LayerFirmware" + ] + }, + { + "path": "/common/layer-new-file.js", + "require": [ + "Mixly.Env", + "Mixly.Msg", + "Mixly.Layer", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.LayerNewFile" + ] + }, + { + "path": "/common/layer-progress.js", + "require": [ + "Mixly.Env", + "Mixly.Layer", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.LayerProgress" + ] + }, + { + "path": "/common/layer.js", + "require": [ + "dialog", + "Mixly.Env", + "Mixly.Registry", + "Mixly.Component", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.Layer" + ] + }, + { + "path": "/common/loader.js", + "require": [ + "path", + "d3", + "Mixly.Config", + "Mixly.Env", + "Mixly.Boards", + "Mixly.App", + "Mixly.Msg", + "Mixly.UserEvents", + "Mixly.UserOPEvents", + "Mixly.JSFuncs", + "Mixly.Title", + "Mixly.LocalStorage", + "Mixly.Storage", + "Mixly.Debug", + "Mixly.API2", + "Mixly.Electron.LibManager", + "Mixly.Electron.File", + "Mixly.WebCompiler.Loader", + "Mixly.WebSocket.Loader" + ], + "provide": [ + "Mixly.Loader" + ] + }, + { + "path": "/common/local-storage.js", + "require": [ + "store", + "Mixly.MArray" + ], + "provide": [ + "Mixly.LocalStorage" + ] + }, + { + "path": "/common/marray.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.MArray" + ] + }, + { + "path": "/common/menu.js", + "require": [ + "Mixly.Env", + "Mixly.Debug", + "Mixly.Events", + "Mixly.IdGenerator", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.Menu" + ] + }, + { + "path": "/common/mfile.js", + "require": [ + "layui", + "Blockly", + "Base64", + "Mixly.Config", + "Mixly.MArray", + "Mixly.Boards", + "Mixly.XML", + "Mixly.LayerExt", + "Mixly.Msg" + ], + "provide": [ + "Mixly.MFile" + ] + }, + { + "path": "/common/mixly.js", + "require": [], + "provide": [ + "Mixly" + ] + }, + { + "path": "/common/mixly2-api.js", + "require": [ + "Blockly", + "Mixly" + ], + "provide": [ + "Mixly.API2", + "Mixly.Editor" + ] + }, + { + "path": "/common/mjson.js", + "require": [ + "Mixly.Debug" + ], + "provide": [ + "Mixly.MJson" + ] + }, + { + "path": "/common/monaco-theme.js", + "require": [ + "monaco", + "Mixly.Registry" + ], + "provide": [ + "Mixly.MonacoTheme" + ] + }, + { + "path": "/common/monaco-tree-sitter.js", + "require": [ + "_", + "monaco", + "Mixly.Registry", + "Mixly.MonacoTheme" + ], + "provide": [ + "Mixly.MonacoTreeSitter" + ] + }, + { + "path": "/common/msg.js", + "require": [ + "path", + "Mixly.MJson", + "Mixly.Config", + "Mixly.Env", + "Blockly", + "Blockly.Lang.ZhHans", + "Blockly.Lang.ZhHant", + "Blockly.Lang.En" + ], + "provide": [ + "Mixly.Msg" + ] + }, + { + "path": "/common/mstring.js", + "require": [ + "Mixly.Debug" + ], + "provide": [ + "Mixly.MString" + ] + }, + { + "path": "/common/nav.js", + "require": [ + "layui", + "$.select2", + "Mixly.Env", + "Mixly.XML", + "Mixly.Msg", + "Mixly.HTMLTemplate", + "Mixly.Component", + "Mixly.DropdownMenuGroup" + ], + "provide": [ + "Mixly.Nav" + ] + }, + { + "path": "/common/page-base.js", + "require": [ + "Mixly.Component", + "Mixly.Events", + "Mixly.Registry" + ], + "provide": [ + "Mixly.PageBase" + ] + }, + { + "path": "/common/pages-manager.js", + "require": [ + "Mixly.PagesTab", + "Mixly.Registry", + "Mixly.Component" + ], + "provide": [ + "Mixly.PagesManager" + ] + }, + { + "path": "/common/pages-tab.js", + "require": [ + "_", + "path", + "ChromeTabs", + "XScrollbar", + "Sortable", + "$.contextMenu", + "Mixly.IdGenerator", + "Mixly.Config", + "Mixly.Events", + "Mixly.Registry", + "Mixly.Component" + ], + "provide": [ + "Mixly.PagesTab" + ] + }, + { + "path": "/common/profile.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.Profile" + ] + }, + { + "path": "/common/registry.js", + "require": [ + "Mixly.Debug" + ], + "provide": [ + "Mixly.Registry" + ] + }, + { + "path": "/common/regression.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.Regression" + ] + }, + { + "path": "/common/script-loader.js", + "require": [ + "Mixly.Env" + ], + "provide": [ + "Mixly.ScriptLoader" + ] + }, + { + "path": "/common/serial.js", + "require": [ + "Mixly.Config", + "Mixly.Events", + "Mixly.Registry", + "Mixly.Nav", + "Mixly.Msg" + ], + "provide": [ + "Mixly.Serial" + ] + }, + { + "path": "/common/sidebar-libs.js", + "require": [ + "XScrollbar", + "Mixly.Env", + "Mixly.Config", + "Mixly.HTMLTemplate", + "Mixly.Debug", + "Mixly.PageBase" + ], + "provide": [ + "Mixly.SideBarLibs" + ] + }, + { + "path": "/common/sidebar-local-storage.js", + "require": [ + "path", + "Mprogress", + "Mixly.IdGenerator", + "Mixly.XML", + "Mixly.Env", + "Mixly.HTMLTemplate", + "Mixly.Debug", + "Mixly.Menu", + "Mixly.PageBase", + "Mixly.Electron.FileTree", + "Mixly.Web.FileTree", + "Mixly.Electron.FS", + "Mixly.Web.FS" + ], + "provide": [ + "Mixly.SideBarLocalStorage" + ] + }, + { + "path": "/common/sidebars-manager.js", + "require": [ + "path", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Registry", + "Mixly.Events", + "Mixly.HTMLTemplate", + "Mixly.SideBarLocalStorage", + "Mixly.SideBarLibs", + "Mixly.PagesManager", + "Mixly.IdGenerator" + ], + "provide": [ + "Mixly.SideBarsManager", + "Mixly.LeftSideBarsManager", + "Mixly.RightSideBarsManager" + ] + }, + { + "path": "/common/socket.js", + "require": [ + "io", + "Mixly" + ], + "provide": [ + "Mixly.Socket" + ] + }, + { + "path": "/common/statusbar-ampy.js", + "require": [ + "path", + "layui", + "Mixly.PageBase", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.HTMLTemplate", + "Mixly.DragV", + "Mixly.StatusBar", + "Mixly.Serial", + "Mixly.Menu", + "Mixly.AmpyFileTree" + ], + "provide": [ + "Mixly.StatusBarAmpy" + ] + }, + { + "path": "/common/statusbar-fs.js", + "require": [ + "path", + "layui", + "Mprogress", + "$.select2", + "Mixly.Env", + "Mixly.Msg", + "Mixly.PageBase", + "Mixly.HTMLTemplate", + "Mixly.Debug", + "Mixly.Component", + "Mixly.Registry", + "Mixly.Serial", + "Mixly.FSBoardHandler", + "Mixly.Electron.FS", + "Mixly.Electron.FSBoard" + ], + "provide": [ + "Mixly.StatusBarFS" + ] + }, + { + "path": "/common/statusbar-libs-code.js", + "require": [ + "path", + "Mixly.Env", + "Mixly.HTMLTemplate", + "Mixly.PageBase" + ], + "provide": [ + "Mixly.StatusBarLibsCode" + ] + }, + { + "path": "/common/statusbar-libs-mix.js", + "require": [ + "path", + "layui", + "Mixly.Env", + "Mixly.HTMLTemplate", + "Mixly.PageBase" + ], + "provide": [ + "Mixly.StatusBarLibsMix" + ] + }, + { + "path": "/common/statusbar-libs.js", + "require": [ + "path", + "dayjs", + "$.select2", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.StatusBar", + "Mixly.SideBarsManager", + "Mixly.HTMLTemplate", + "Mixly.PageBase", + "Mixly.StatusBarLibsMix", + "Mixly.StatusBarLibsCode" + ], + "provide": [ + "Mixly.StatusBarLibs" + ] + }, + { + "path": "/common/statusbar-output.js", + "require": [ + "Mixly.StatusBar" + ], + "provide": [ + "Mixly.StatusBarOutput" + ] + }, + { + "path": "/common/statusbar-serial-chart.js", + "require": [ + "path", + "$.ui", + "$.flot", + "$.select2", + "Mixly.Env", + "Mixly.Msg", + "Mixly.PageBase", + "Mixly.Regression", + "Mixly.HTMLTemplate", + "Mixly.Config" + ], + "provide": [ + "Mixly.StatusBarSerialChart" + ] + }, + { + "path": "/common/statusbar-serial-output.js", + "require": [ + "path", + "Mixly.PageBase", + "Mixly.StatusBar", + "Mixly.Env", + "Mixly.Msg", + "Mixly.HTMLTemplate" + ], + "provide": [ + "Mixly.StatusBarSerialOutput" + ] + }, + { + "path": "/common/statusbar-serial.js", + "require": [ + "path", + "dayjs", + "$.select2", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.Config", + "Mixly.StatusBar", + "Mixly.SideBarsManager", + "Mixly.RightSideBarsManager", + "Mixly.HTMLTemplate", + "Mixly.PageBase", + "Mixly.Menu", + "Mixly.StatusBarSerialOutput", + "Mixly.StatusBarSerialChart", + "Mixly.Electron.Serial", + "Mixly.Web.Serial", + "Mixly.WebSocket.Serial" + ], + "provide": [ + "Mixly.StatusBarSerial" + ] + }, + { + "path": "/common/statusbar.js", + "require": [ + "Mixly.XML", + "Mixly.Env", + "Mixly.Config", + "Mixly.EditorAce", + "Mixly.ContextMenu", + "Mixly.Menu", + "Mixly.Msg", + "Mixly.IdGenerator" + ], + "provide": [ + "Mixly.StatusBar" + ] + }, + { + "path": "/common/statusbars-manager.js", + "require": [ + "path", + "layui", + "Mixly.XML", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Registry", + "Mixly.Events", + "Mixly.HTMLTemplate", + "Mixly.StatusBarOutput", + "Mixly.StatusBarSerial", + "Mixly.StatusBarFS", + "Mixly.StatusBarLibs", + "Mixly.StatusBarAmpy", + "Mixly.PagesManager", + "Mixly.DropdownMenu", + "Mixly.Menu", + "Mixly.IdGenerator", + "Mixly.Serial", + "Mixly.Config", + "Mixly.Debug" + ], + "provide": [ + "Mixly.StatusBarsManager" + ] + }, + { + "path": "/common/storage.js", + "require": [ + "path", + "layui", + "Mixly.LocalStorage", + "Mixly.Config" + ], + "provide": [ + "Mixly.Storage" + ] + }, + { + "path": "/common/title.js", + "require": [ + "Mixly.Config", + "Mixly.Debug" + ], + "provide": [ + "Mixly.Title" + ] + }, + { + "path": "/common/toolbox-searcher.js", + "require": [ + "path", + "Blockly", + "Mixly.Env", + "Mixly.XML", + "Mixly.Msg", + "Mixly.HTMLTemplate", + "Mixly.Debug" + ], + "provide": [ + "Mixly.ToolboxSearcher" + ] + }, + { + "path": "/common/url.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.Url" + ] + }, + { + "path": "/common/user-events.js", + "require": [ + "Blockly", + "Mixly.MFile", + "Mixly.Config", + "Mixly.Boards", + "Mixly.LocalStorage" + ], + "provide": [ + "Mixly.UserEvents" + ] + }, + { + "path": "/common/user-op-events.js", + "require": [ + "Mixly.MFile", + "Mixly.Config", + "Mixly.Boards" + ], + "provide": [ + "Mixly.UserOPEvents" + ] + }, + { + "path": "/common/workspace.js", + "require": [ + "path", + "Mixly.XML", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Drag", + "Mixly.DragH", + "Mixly.DragV", + "Mixly.HTMLTemplate", + "Mixly.EditorsManager", + "Mixly.StatusBarsManager", + "Mixly.LeftSideBarsManager", + "Mixly.RightSideBarsManager", + "Mixly.Component" + ], + "provide": [ + "Mixly.Workspace" + ] + }, + { + "path": "/common/xml.js", + "require": [ + "path", + "layui", + "Mixly.Env", + "Mixly.Config", + "Mixly.Msg" + ], + "provide": [ + "Mixly.XML" + ] + }, + { + "path": "/electron/ampy-fs.js", + "require": [ + "path", + "Mixly.Env", + "Mixly.FS", + "Mixly.Debug", + "Mixly.MJson", + "Mixly.Electron.Ampy" + ], + "provide": [ + "Mixly.Electron.AmpyFS" + ] + }, + { + "path": "/electron/ampy.js", + "require": [ + "path", + "Mustache", + "Mixly.Ampy", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Serial", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.Ampy" + ] + }, + { + "path": "/electron/arduino-shell.js", + "require": [ + "path", + "layui", + "Blockly", + "Mixly.Env", + "Mixly.LayerExt", + "Mixly.Config", + "Mixly.Title", + "Mixly.Boards", + "Mixly.MFile", + "Mixly.MArray", + "Mixly.Msg", + "Mixly.MString", + "Mixly.Workspace", + "Mixly.Serial", + "Mixly.LayerProgress", + "Mixly.Debug", + "Mixly.Electron.Shell" + ], + "provide": [ + "Mixly.Electron.ArduShell" + ] + }, + { + "path": "/electron/burn-upload.js", + "require": [ + "layui", + "Mixly.Config", + "Mixly.LayerExt", + "Mixly.Env", + "Mixly.Boards", + "Mixly.MString", + "Mixly.Msg", + "Mixly.Workspace", + "Mixly.Debug", + "Mixly.HTMLTemplate", + "Mixly.LayerFirmware", + "Mixly.LayerProgress", + "Mixly.Electron.Serial" + ], + "provide": [ + "Mixly.Electron.BU" + ] + }, + { + "path": "/electron/cloud-download.js", + "require": [ + "path", + "Mixly.Env", + "Mixly.MJson", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.CloudDownload" + ] + }, + { + "path": "/electron/electron.js", + "require": [ + "path", + "Mixly.Url" + ], + "provide": [ + "Mixly.Electron" + ] + }, + { + "path": "/electron/events.js", + "require": [ + "Mixly.Command", + "Mixly.Config", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.Events" + ] + }, + { + "path": "/electron/file-tree.js", + "require": [ + "path", + "Mixly.FileTree", + "Mixly.Events", + "Mixly.Registry", + "Mixly.Debug", + "Mixly.Electron.FS" + ], + "provide": [ + "Mixly.Electron.FileTree" + ] + }, + { + "path": "/electron/file.js", + "require": [ + "path", + "Blockly", + "Mixly.Env", + "Mixly.LayerNewFile", + "Mixly.Config", + "Mixly.Title", + "Mixly.MFile", + "Mixly.XML", + "Mixly.Msg", + "Mixly.Workspace", + "Mixly.Electron.ArduShell", + "Mixly.Electron.BU" + ], + "provide": [ + "Mixly.Electron.File" + ] + }, + { + "path": "/electron/footerlayer-example.js", + "require": [ + "path", + "layui", + "Mixly.Env", + "Mixly.Config", + "Mixly.MFile", + "Mixly.Title", + "Mixly.XML", + "Mixly.FooterLayerExample", + "Mixly.Electron.File" + ], + "provide": [ + "Mixly.Electron.FooterLayerExample" + ] + }, + { + "path": "/electron/fs-board.js", + "require": [ + "layui", + "path", + "Mustache", + "Mixly.Env", + "Mixly.FSBoard", + "Mixly.LayerExt", + "Mixly.Debug", + "Mixly.Msg", + "Mixly.Electron.Shell" + ], + "provide": [ + "Mixly.Electron.FSBoard" + ] + }, + { + "path": "/electron/fs.js", + "require": [ + "path", + "Mixly.Msg", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.FS" + ] + }, + { + "path": "/electron/lib-manager.js", + "require": [ + "layui", + "Mixly.Env", + "Mixly.XML", + "Mixly.ScriptLoader", + "Mixly.CssLoader", + "Mixly.Boards", + "Mixly.LayerExt", + "Mixly.Config", + "Mixly.Msg", + "Mixly.Electron.CloudDownload" + ], + "provide": [ + "Mixly.Electron.LibManager" + ] + }, + { + "path": "/electron/loader.js", + "require": [ + "path", + "Mixly.Url", + "Mixly.Config", + "Mixly.Env", + "Mixly.Electron.Serial", + "Mixly.Electron.PythonShell", + "Mixly.Electron.Events" + ], + "provide": [ + "Mixly.Electron.Loader" + ] + }, + { + "path": "/electron/python-shell.js", + "require": [ + "dayjs.duration", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.Workspace", + "Mixly.MString", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.PythonShell" + ] + }, + { + "path": "/electron/serial.js", + "require": [ + "Mixly.Serial", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.MArray", + "Mixly.Config", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.Serial" + ] + }, + { + "path": "/electron/shell.js", + "require": [ + "dayjs.duration", + "Mixly.Env", + "Mixly.MString", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.Shell" + ] + }, + { + "path": "/electron/wiki-generator.js", + "require": [ + "path", + "Blockly", + "Mustache", + "Mixly.Env", + "Mixly.IdGenerator", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.WikiGenerator" + ] + }, + { + "path": "/electron/wiki-manager.js", + "require": [ + "path", + "Mixly.Config", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Electron" + ], + "provide": [ + "Mixly.Electron.WikiManager" + ] + }, + { + "path": "/web/ampy-fs.js", + "require": [ + "path", + "Mixly.FS", + "Mixly.Debug", + "Mixly.Web.Serial", + "Mixly.Web.Ampy" + ], + "provide": [ + "Mixly.Web.AmpyFS" + ] + }, + { + "path": "/web/ampy.js", + "require": [ + "path", + "Mustache", + "Mixly.Env", + "Mixly.Events", + "Mixly.Msg", + "Mixly.Ampy", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.Ampy" + ] + }, + { + "path": "/web/bluetooth.js", + "require": [ + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.Bluetooth" + ] + }, + { + "path": "/web/burn-upload.js", + "require": [ + "path", + "BoardId", + "FSWrapper", + "DAPWrapper", + "PartialFlashing", + "esptooljs", + "CryptoJS", + "JSZip", + "Mixly.Env", + "Mixly.LayerExt", + "Mixly.Config", + "Mixly.MFile", + "Mixly.Boards", + "Mixly.Msg", + "Mixly.Workspace", + "Mixly.Debug", + "Mixly.HTMLTemplate", + "Mixly.MString", + "Mixly.LayerFirmware", + "Mixly.LayerProgress", + "Mixly.Web.Serial", + "Mixly.Web.Ampy", + "Mixly.Web.KFlash", + "Mixly.Web.SerialTransport" + ], + "provide": [ + "Mixly.Web.BU" + ] + }, + { + "path": "/web/file-tree.js", + "require": [ + "path", + "Mixly.FileTree", + "Mixly.Web.FS" + ], + "provide": [ + "Mixly.Web.FileTree" + ] + }, + { + "path": "/web/file.js", + "require": [ + "path", + "Blockly", + "Mixly.MFile", + "Mixly.Title", + "Mixly.LayerNewFile", + "Mixly.Msg", + "Mixly.Workspace" + ], + "provide": [ + "Mixly.Web.File" + ] + }, + { + "path": "/web/footerlayer-example.js", + "require": [ + "path", + "Mixly.Config", + "Mixly.Env", + "Mixly.MJson", + "Mixly.FooterLayerExample", + "Mixly.Boards" + ], + "provide": [ + "Mixly.Web.FooterLayerExample" + ] + }, + { + "path": "/web/fs.js", + "require": [ + "workerpool", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.FS" + ] + }, + { + "path": "/web/hid.js", + "require": [ + "Mixly.Serial", + "Mixly.Config", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.HID" + ] + }, + { + "path": "/web/kflash.js", + "require": [ + "crc", + "pako", + "struct", + "Mixly.Debug", + "Mixly.Events", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.KFlash" + ] + }, + { + "path": "/web/serial-transport.js", + "require": [ + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.SerialTransport" + ] + }, + { + "path": "/web/serial.js", + "require": [ + "path", + "Mixly.Config", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Registry", + "Mixly.Serial", + "Mixly.LayerExt", + "Mixly.HTMLTemplate", + "Mixly.Web.SerialPort", + "Mixly.Web.USB", + "Mixly.Web.USBMini", + "Mixly.Web.HID" + ], + "provide": [ + "Mixly.Web.Serial" + ] + }, + { + "path": "/web/serialport.js", + "require": [ + "Mixly.Serial", + "Mixly.Debug", + "Mixly.Config", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.SerialPort" + ] + }, + { + "path": "/web/usb-mini.js", + "require": [ + "Mixly.Serial", + "Mixly.Registry", + "Mixly.Config", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.USBMini" + ] + }, + { + "path": "/web/usb.js", + "require": [ + "DAPjs", + "Mixly.Serial", + "Mixly.Registry", + "Mixly.Config", + "Mixly.Web" + ], + "provide": [ + "Mixly.Web.USB" + ] + }, + { + "path": "/web/web.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.Web" + ] + }, + { + "path": "/web-compiler/arduino-shell.js", + "require": [ + "layui", + "AVRUploader", + "esptooljs", + "CryptoJS", + "dayjs.duration", + "Mixly.Boards", + "Mixly.Debug", + "Mixly.LayerExt", + "Mixly.Msg", + "Mixly.Workspace", + "Mixly.LayerProgress", + "Mixly.Web.Serial", + "Mixly.Web.SerialTransport", + "Mixly.WebCompiler" + ], + "provide": [ + "Mixly.WebCompiler.ArduShell" + ] + }, + { + "path": "/web-compiler/loader.js", + "require": [ + "Mixly.Debug", + "Mixly.Config", + "Mixly.StatusBarsManager", + "Mixly.Socket", + "Mixly.WebCompiler.ArduShell" + ], + "provide": [ + "Mixly.WebCompiler.Loader" + ] + }, + { + "path": "/web-compiler/web-compiler.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.WebCompiler" + ] + }, + { + "path": "/web-socket/ampy-fs.js", + "require": [ + "path", + "Mixly.Env", + "Mixly.FS", + "Mixly.Debug", + "Mixly.MJson", + "Mixly.WebSocket.Ampy" + ], + "provide": [ + "Mixly.WebSocket.AmpyFS" + ] + }, + { + "path": "/web-socket/ampy.js", + "require": [ + "path", + "Mustache", + "Mixly.Ampy", + "Mixly.Env", + "Mixly.Serial", + "Mixly.WebSocket" + ], + "provide": [ + "Mixly.WebSocket.Ampy" + ] + }, + { + "path": "/web-socket/arduino-shell.js", + "require": [ + "layui", + "dayjs.duration", + "Mixly.Boards", + "Mixly.Debug", + "Mixly.LayerExt", + "Mixly.Msg", + "Mixly.Workspace", + "Mixly.LayerProgress", + "Mixly.WebSocket.Serial" + ], + "provide": [ + "Mixly.WebSocket.ArduShell" + ] + }, + { + "path": "/web-socket/burn-upload.js", + "require": [ + "path", + "layui", + "dayjs.duration", + "Mixly.Debug", + "Mixly.LayerExt", + "Mixly.Msg", + "Mixly.Env", + "Mixly.Config", + "Mixly.Workspace", + "Mixly.MString", + "Mixly.LayerProgress", + "Mixly.WebSocket.Serial" + ], + "provide": [ + "Mixly.WebSocket.BU" + ] + }, + { + "path": "/web-socket/file.js", + "require": [ + "Mixly.Web.File" + ], + "provide": [ + "Mixly.WebSocket.File" + ] + }, + { + "path": "/web-socket/loader.js", + "require": [ + "Mixly.Debug", + "Mixly.Config", + "Mixly.StatusBarsManager", + "Mixly.Socket", + "Mixly.WebSocket.Serial", + "Mixly.WebSocket.ArduShell", + "Mixly.WebSocket.BU", + "Mixly.WebSocket.Ampy" + ], + "provide": [ + "Mixly.WebSocket.Loader" + ] + }, + { + "path": "/web-socket/serial.js", + "require": [ + "Mixly.Serial", + "Mixly.Env", + "Mixly.Msg", + "Mixly.Debug", + "Mixly.Registry", + "Mixly.WebSocket" + ], + "provide": [ + "Mixly.WebSocket.Serial" + ] + }, + { + "path": "/web-socket/web-socket.js", + "require": [ + "Mixly" + ], + "provide": [ + "Mixly.WebSocket" + ] + } +] diff --git a/mixly/common/modules/mixly-modules/electron/ampy-fs.js b/mixly/common/modules/mixly-modules/electron/ampy-fs.js new file mode 100644 index 00000000..9c9897b9 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/ampy-fs.js @@ -0,0 +1,241 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.FS'); +goog.require('Mixly.Debug'); +goog.require('Mixly.MJson'); +goog.require('Mixly.Electron.Ampy'); +goog.provide('Mixly.Electron.AmpyFS'); + +const { + Env, + FS, + Debug, + MJson, + Electron +} = Mixly; +const { Ampy } = Electron; +const fs_extra = Mixly.require('fs-extra'); + + +class AmpyFS extends FS { + #ampy_ = null; + #port_ = ''; + #baud_ = 115200; + #decoder_ = new TextDecoder('utf8'); + + constructor() { + super(); + this.#ampy_ = new Ampy(); + } + + async rename(oldPath, newPath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.rename(this.#port_, this.#baud_, oldPath, newPath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async createFile(filePath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.mkfile(this.#port_, this.#baud_, filePath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async readFile(filePath, encoding = 'utf8') { + let stdout = '', error = null; + try { + const output = await this.#ampy_.get(this.#port_, this.#baud_, filePath); + stdout = output.stdout; + if (encoding = 'utf8') { + stdout = this.#decoder_.decode(this.#ampy_.unhexlify(stdout)); + } else { + stdout = this.#ampy_.unhexlify(stdout); + } + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async writeFile(filePath, data) { + let stdout = '', error = null; + try { + const startFilePath = path.join(Env.clientPath, 'temp/temp'); + if (data.constructor.name === 'ArrayBuffer') { + data = Buffer.from(data); + } + await fs_extra.outputFile(startFilePath, data); + const output = await this.#ampy_.put(this.#port_, this.#baud_, startFilePath, filePath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async isFile(filePath) { + /*const [error, stdout] = await this.readDirectory(filePath); + if (error) { + return true; + } + return false;*/ + let error = null; + if (path.extname(filePath)) { + return [error, true]; + } else { + return [error, false]; + } + } + + async renameFile(oldFilePath, newFilePath) { + return this.rename(oldFilePath, newFilePath); + } + + async moveFile(oldFilePath, newFilePath) { + return this.rename(oldFilePath, newFilePath); + } + + async copyFile(oldFilePath, newFilePath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.cpfile(this.#port_, this.#baud_, oldFilePath, newFilePath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async deleteFile(filePath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.rm(this.#port_, this.#baud_, filePath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async createDirectory(folderPath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.mkdir(this.#port_, this.#baud_, folderPath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async readDirectory(folderPath) { + let stdout = [], error = null; + try { + const output = await this.#ampy_.ls(this.#port_, this.#baud_, folderPath); + const dirs = Array.from(new Set(output.stdout.split('\r\n'))); + for (let i in dirs) { + if (!dirs[i]) { + continue; + } + stdout.push(MJson.parse(dirs[i].replaceAll('\'', '"'))); + } + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async isDirectory(folderPath) { + /*const [error, stdout] = await this.readDirectory(folderPath); + if (error) { + return false; + } + return true;*/ + let error = null; + if (path.extname(folderPath)) { + return [error, false]; + } else { + return [error, true]; + } + } + + async isDirectoryEmpty(folderPath) { + /*const [error, stdout] = await this.readDirectory(folderPath); + let isEmpty = false; + if (error || !stdout.length) { + isEmpty = true; + }*/ + return [null, false]; + } + + async renameDirectory(oldFolderPath, newFolderPath) { + return this.rename(oldFolderPath, newFolderPath); + } + + async moveDirectory(oldFolderPath, newFolderPath) { + return this.rename(oldFolderPath, newFolderPath); + } + + async copyDirectory(oldFolderPath, newFolderPath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.cpdir(this.#port_, this.#baud_, oldFolderPath, newFolderPath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async deleteDirectory(folderPath) { + let stdout = '', error = null; + try { + const output = await this.#ampy_.rmdir(this.#port_, this.#baud_, folderPath); + stdout = output.stdout; + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + setPortName(port) { + this.#port_ = port; + } + + getPortName() { + return this.#port_; + } + + setBaudRate(baud) { + this.#baud_ = baud; + } + + getBaudRate() { + return this.#baud_; + } +} + +Electron.AmpyFS = AmpyFS; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/ampy.js b/mixly/common/modules/mixly-modules/electron/ampy.js new file mode 100644 index 00000000..75cad19c --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/ampy.js @@ -0,0 +1,131 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mustache'); +goog.require('Mixly.Ampy'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Serial'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.Ampy'); + +const { + Ampy, + Env, + Msg, + Serial, + Electron +} = Mixly; + +const util = Mixly.require('node:util'); +const child_process = Mixly.require('node:child_process'); + +class AmpyExt extends Ampy { + static { + this.TEMPLATE = { + ls: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 ls "{{&folderPath}}"', + get: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 get "{{&filePath}}"', + mkdir: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 mkdir "{{&folderPath}}"', + mkfile: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 mkfile "{{&filePath}}"', + isdir: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 isdir "{{&folderPath}}"', + isfile: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 isfile "{{&filePath}}"', + put: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 put "{{&startPath}}" "{{&endPath}}"', + rm: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 rm "{{&filePath}}"', + rmdir: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 rmdir "{{&folderPath}}"', + rename: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 rename "{{&oldPath}}" "{{&newPath}}"', + cpdir: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 cpdir "{{&startPath}}" "{{&endPath}}"', + cpfile: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 cpfile "{{&startPath}}" "{{&endPath}}"', + run: '{{&y}} -p {{&port}} -b {{&baud}} -i 0 run "{{&filePath}}"' + } + + this.AMPY_PATH = path.join(Env.srcDirPath, './tools/python/ampy_main.py'); + + this.AMPY_TEMPLATE = Mustache.render('"{{&python3}}" "{{&y}}"', { + python3: Env.python3Path, + ampy: this.AMPY_PATH + }); + } + + #exec_ = util.promisify(child_process.exec); + + constructor() { + super(); + } + + async ls(port, baud, folderPath) { + return this.exec(port, this.render('ls', { port, baud, folderPath })); + } + + async get(port, baud, filePath, encoding = 'utf8') { + return this.exec(port, this.render('get', { port, baud, filePath, encoding })); + } + + async mkdir(port, baud, folderPath) { + return this.exec(port, this.render('mkdir', { port, baud, folderPath })); + } + + async mkfile(port, baud, filePath) { + return this.exec(port, this.render('mkfile', { port, baud, filePath })); + } + + async isdir(port, baud, folderPath) { + return this.exec(port, this.render('isdir', { port, baud, folderPath })); + } + + async isfile(port, baud, filePath) { + return this.exec(port, this.render('isfile', { port, baud, filePath })); + } + + async put(port, baud, startPath, endPath) { + return this.exec(port, this.render('put', { port, baud, startPath, endPath })); + } + + async rm(port, baud, filePath) { + return this.exec(port, this.render('rm', { port, baud, filePath })); + } + + async rmdir(port, baud, folderPath) { + return this.exec(port, this.render('rmdir', { port, baud, folderPath })); + } + + async rename(port, baud, oldPath, newPath) { + return this.exec(port, this.render('rename', { port, baud, oldPath, newPath })); + } + + async cpdir(port, baud, startPath, endPath) { + return this.exec(port, this.render('cpdir', { port, baud, startPath, endPath })); + } + + async cpfile(port, baud, startPath, endPath) { + return this.exec(port, this.render('cpfile', { port, baud, startPath, endPath })); + } + + async run(port, baud, filePath) { + return this.exec(port, this.render('run', { port, baud, filePath })); + } + + render(templateName, args) { + return Mustache.render(AmpyExt.TEMPLATE[templateName], { + ...args, + ampy: AmpyExt.AMPY_TEMPLATE + }); + } + + async exec(port, command) { + const portsName = Serial.getCurrentPortsName(); + if (!portsName.includes(port)) { + throw new Error(Msg.Lang['statusbar.serial.noPort']); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + if (statusBarSerial) { + await statusBarSerial.close(); + } + return this.#exec_(command); + } +} + +Electron.Ampy = AmpyExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/arduino-shell.js b/mixly/common/modules/mixly-modules/electron/arduino-shell.js new file mode 100644 index 00000000..0beb7c9c --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/arduino-shell.js @@ -0,0 +1,598 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Blockly'); +goog.require('Mixly.Env'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Config'); +goog.require('Mixly.Title'); +goog.require('Mixly.Boards'); +goog.require('Mixly.MFile'); +goog.require('Mixly.MArray'); +goog.require('Mixly.Msg'); +goog.require('Mixly.MString'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.Serial'); +goog.require('Mixly.LayerProgress'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Electron.Shell'); +goog.provide('Mixly.Electron.ArduShell'); + +const { + Env, + Electron, + LayerExt, + Config, + Title, + Boards, + MFile, + MArray, + Msg, + MString, + Workspace, + Serial, + LayerProgress, + Debug +} = Mixly; + +const { BOARD, SOFTWARE, USER } = Config; + +const fs = Mixly.require('node:fs'); +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const child_process = Mixly.require('node:child_process'); +const iconv_lite = Mixly.require('iconv-lite'); + +const { + ArduShell, + Shell +} = Electron; + +ArduShell.DEFAULT_CONFIG = goog.readJsonSync(path.join(Env.templatePath, 'json/arduino-cli-config.json')); +ArduShell.ERROR_ENCODING = Env.currentPlatform == 'win32' ? 'cp936' : 'utf-8'; +ArduShell.binFilePath = ''; +ArduShell.shellPath = null; +ArduShell.shell = null; +ArduShell.compiling = false; +ArduShell.uploading = false; +ArduShell.killing = false; +ArduShell.progressLayer = new LayerProgress({ + width: 200, + cancelValue: Msg.Lang['nav.btn.stop'], + cancel: () => { + if (ArduShell.killing) { + return false; + } + ArduShell.progressLayer.title(`${Msg.Lang['shell.aborting']}...`); + ArduShell.killing = true; + ArduShell.cancel(); + return false; + }, + cancelDisplay: false +}); + + +ArduShell.updateShellPath = () => { + let shellPath = path.join(Env.clientPath, 'arduino-cli'); + if (Env.currentPlatform === 'win32') + shellPath = path.join(shellPath, 'arduino-cli.exe'); + else + shellPath = path.join(shellPath, 'arduino-cli'); + if (!fs_plus.isFileSync(shellPath)) { + const { defaultPath = {} } = SOFTWARE; + if (typeof defaultPath[Env.currentPlatform] === 'object') { + let defaultShellPath = defaultPath[Env.currentPlatform].arduinoCli ?? ''; + defaultShellPath = path.join(Env.clientPath, defaultShellPath); + if (fs_plus.isFileSync(defaultShellPath)) + shellPath = defaultShellPath; + else + shellPath = null; + } + } + ArduShell.shellPath = shellPath; +} + +ArduShell.updateConfig = (config) => { + if (!ArduShell.shellPath) return; + const configPath = path.join(ArduShell.shellPath, '../arduino-cli.json'); + let nowConfig = fs_extra.readJsonSync(configPath, { throws: false }) ?? { ...ArduShell.DEFAULT_CONFIG }; + if (typeof config === 'object') { + if (MArray.equals(nowConfig.directories, config.directories)) + return; + nowConfig = { + ...nowConfig, + ...config + }; + fs_extra.outputJson(configPath, nowConfig, { + spaces: ' ' + }) + .then(() => { + console.log('arduino-cli.json已更新'); + }) + .catch((error) => { + console.log(error); + }); + } +} + +ArduShell.init = () => { + ArduShell.updateShellPath(); + if (!ArduShell.shellPath) return; + ArduShell.updateConfig({ + directories: { + data: path.join(ArduShell.shellPath, '../Arduino15'), + downloads: path.join(ArduShell.shellPath, '../staging'), + user: path.join(ArduShell.shellPath, '../Arduino') + } + }); +} + +ArduShell.init(); + +ArduShell.burn = () => { + Mixly.Electron.BU.initBurn(); +} + +/** +* @function 编译 +* @description 开始一个编译过程 +* @return void +*/ +ArduShell.initCompile = () => { + ArduShell.compile(() => {}); +} + +/** +* @function 编译 +* @description 开始一个编译过程 +* @return void +*/ +ArduShell.compile = (doFunc = () => {}) => { + if (!ArduShell.shellPath) { + ArduShell.shellPath = ''; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.changeTo("output"); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + ArduShell.compiling = true; + ArduShell.uploading = false; + ArduShell.killing = false; + const boardType = Boards.getSelectedBoardCommandParam(); + mainStatusBarTabs.show(); + ArduShell.progressLayer.title(`${Msg.Lang['shell.compiling']}...`); + ArduShell.progressLayer.show(); + statusBarTerminal.setValue(Msg.Lang['shell.compiling'] + "...\n"); + let myLibPath = path.join(Env.boardDirPath, "/libraries/myLib/"); + if (fs_plus.isDirectorySync(myLibPath)) + myLibPath += '\",\"'; + else + myLibPath = ''; + const thirdPartyPath = path.join(Env.boardDirPath, 'libraries/ThirdParty'); + if (fs_plus.isDirectorySync(thirdPartyPath)) { + const libList = fs.readdirSync(thirdPartyPath); + for (let libName of libList) { + const libPath = path.join(thirdPartyPath, libName, 'libraries'); + if (!fs_plus.isDirectorySync(libPath)) continue; + myLibPath += libPath + ','; + } + } + const configPath = path.join(ArduShell.shellPath, '../arduino-cli.json'), + defaultLibPath = path.join(ArduShell.shellPath, '../libraries'), + buildPath = path.join(Env.clientPath, './mixlyBuild'), + buildCachePath = path.join(Env.clientPath, './mixlyBuildCache'), + codePath = path.join(Env.clientPath, './testArduino/testArduino.ino'); + const cmdStr = '\"' + + ArduShell.shellPath + + '\" compile -b ' + + boardType + + ' --config-file \"' + + configPath + + '\" --build-cache-path \"' + buildCachePath + '\" --verbose --libraries \"' + + myLibPath + + defaultLibPath + + '\" --build-path \"' + + buildPath + + '\" \"' + + codePath + + '\" --no-color'; + ArduShell.runCmd('compile', cmdStr, code, doFunc); +} + +/** +* @function 初始化上传 +* @description 关闭已打开的串口,获取当前所连接的设备数,然后开始上传程序 +* @return void +*/ +ArduShell.initUpload = () => { + const { mainStatusBarTabs } = Mixly; + ArduShell.compiling = false; + ArduShell.uploading = true; + ArduShell.killing = false; + const boardType = Boards.getSelectedBoardCommandParam(); + const uploadType = Boards.getSelectedBoardConfigParam('upload_method'); + let port = Serial.getSelectedPortName(); + switch (uploadType) { + case 'STLinkMethod': + case 'jlinkMethod': + case 'usb': + port = 'None'; + break; + } + if (port) { + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + if (statusBarSerial) { + statusBarSerial.close().finally(() => { + ArduShell.upload(boardType, port); + }); + } else { + ArduShell.upload(boardType, port); + } + } else { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + } +} + +/** +* @function 上传程序 +* @description 通过所选择串口号开始一个上传过程 +* @return void +*/ +ArduShell.upload = (boardType, port) => { + if (!ArduShell.shellPath) { + ArduShell.shellPath = ''; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.changeTo('output'); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + ArduShell.progressLayer.title(`${Msg.Lang['shell.uploading']}...`); + mainStatusBarTabs.show(); + ArduShell.progressLayer.title(`${Msg.Lang['shell.uploading']}...`); + ArduShell.progressLayer.show(); + statusBarTerminal.setValue(Msg.Lang['shell.uploading'] + "...\n"); + const configPath = path.join(ArduShell.shellPath, '../arduino-cli.json'), + defaultLibPath = path.join(ArduShell.shellPath, '../libraries'), + buildPath = path.join(Env.clientPath, './mixlyBuild'), + buildCachePath = path.join(Env.clientPath, './mixlyBuildCache'), + codePath = path.join(Env.clientPath, './testArduino/testArduino.ino'); + let cmdStr = ''; + if (ArduShell.binFilePath !== '') { + cmdStr = '\"' + + ArduShell.shellPath + + '\" -b ' + + boardType + + ' upload -p ' + + port + + ' --config-file \"' + + configPath + + '\" --verbose ' + + '-i \"' + ArduShell.binFilePath + '\" --no-color'; + ArduShell.binFilePath = ''; + } else { + let myLibPath = path.join(Env.boardDirPath, "/libraries/myLib/"); + if (fs_plus.isDirectorySync(myLibPath)) { + myLibPath += '\",\"'; + } else { + myLibPath = ''; + } + const thirdPartyPath = path.join(Env.boardDirPath, 'libraries/ThirdParty'); + if (fs_plus.isDirectorySync(thirdPartyPath)) { + const libList = fs.readdirSync(thirdPartyPath); + for (let libName of libList) { + const libPath = path.join(thirdPartyPath, libName, 'libraries'); + if (!fs_plus.isDirectorySync(libPath)) continue; + myLibPath += libPath + ','; + } + } + cmdStr = '\"' + + ArduShell.shellPath + + '\" compile -b ' + + boardType + + ' --upload -p ' + + port + + ' --config-file \"' + + configPath + + '\" --build-cache-path \"' + buildCachePath + '\" --verbose --libraries \"' + + myLibPath + + defaultLibPath + + '\" --build-path \"' + + buildPath + + '\" \"' + + codePath + + '\" --no-color'; + } + ArduShell.runCmd('upload', cmdStr, code, () => { + if (!Serial.portIsLegal(port)) { + return; + } + mainStatusBarTabs.add('serial', port); + mainStatusBarTabs.changeTo(port); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + statusBarSerial.open() + .then(() => { + const baudRates = code.match(/(?<=Serial.begin[\s]*\([\s]*)[0-9]*(?=[\s]*\))/g); + if (!baudRates?.length) { + statusBarSerial.setBaudRate(9600); + } else { + statusBarSerial.setBaudRate(baudRates[0] - 0); + } + }); + + }); +} + +/** +* @function 取消编译或上传 +* @description 取消正在执行的编译或上传过程 +* @return void +*/ +ArduShell.cancel = function () { + ArduShell.shell && ArduShell.shell.kill(); + ArduShell.shell = null; +} + +/** +* @function 检测文件扩展名 +* @description 检测文件扩展名是否在扩展名列表内 +* @param fileName {String} 文件名 +* @param extensionList {Array} 扩展名列表 +* @return Boolean +*/ +ArduShell.checkFileNameExtension = (fileName, extensionList) => { + if (!fileName) return false; + let fileNameToLowerCase = fileName; + let fileNameLen = fileNameToLowerCase.length; + let fileType = fileNameToLowerCase.substring(fileNameToLowerCase.lastIndexOf("."), fileNameLen); + if (extensionList.includes(fileType)) { + return true; + } else { + return false; + } +} + +/** +* @function 检测文件扩展名 +* @description 检测文件扩展名是否为.c/.cpp或.h/.hpp +* @param fileName {String} 文件名 +* @return Boolean +*/ +ArduShell.isCppOrHpp = (fileName) => { + return ArduShell.checkFileNameExtension(fileName, [".c", ".cpp", ".h", ".hpp"]) +} + +/** +* @function 检测文件扩展名 +* @description 检测文件扩展名是否为.mix/.xml或.ino +* @param fileName {String} 文件名 +* @return Boolean +*/ +ArduShell.isMixOrIno = (fileName) => { + return ArduShell.checkFileNameExtension(fileName, [".mix", ".xml", ".ino"]); +} + +/** +* @function 删除给定文件夹下文件 +* @description 删除给定文件夹下.c/.cpp和.h/.hpp文件 +* @param dir {String} 文件夹路径 +* @return void +*/ +ArduShell.clearDirCppAndHppFiles = (dir) => { + if (fs_plus.isDirectorySync(dir)) { + let libDir = fs.readdirSync(dir); + for (let i = 0; i < libDir.length; i++) { + if (ArduShell.isCppOrHpp(libDir[i])) { + const nowPath = path.join(dir, libDir[i]); + fs.unlinkSync(nowPath); + } + } + } +} + +/** +* @function 拷贝文件 +* @description 拷贝给定文件夹下.c/.cpp和.h/.hpp文件到目标目录 +* @param oldDir {String} 起始文件夹路径 +* @param newDir {String} 目标文件夹路径 +* @return void +*/ +ArduShell.copyHppAndCppFiles = (oldDir, newDir) => { + if (fs_plus.isDirectorySync(oldDir) && fs_plus.isDirectorySync(newDir)) { + let oldLibDir = fs.readdirSync(oldDir); + for (let i = 0; i < oldLibDir.length; i++) { + if (ArduShell.isCppOrHpp(oldLibDir[i])) { + const oldPath = path.join(oldDir, oldLibDir[i]); + const newPath = path.join(newDir, oldLibDir[i]); + try { + fs.copyFileSync(oldPath, newPath); + } catch (e) { + console.log(e); + } + } + } + } +} + +/** +* @function 写库文件 +* @description 将库文件数据写入本地 +* @param inPath {string} 需要写入库文件的目录 +* @return void +*/ +ArduShell.writeLibFiles = (inPath) => { + return new Promise((resolve, reject) => { + const promiseList = []; + for (let name in Blockly.Arduino.libs_) { + const data = Blockly.Arduino.libs_[name]; + const codePath = path.join(inPath, name + '.h'); + promiseList.push( + new Promise((childResolve, childReject) => { + fs_extra.outputFile(codePath, data) + .finally(() => { + childResolve(); + }); + } + )); + } + if (!promiseList.length) { + resolve(); + return; + } + Promise.all(promiseList) + .finally(() => { + resolve(); + }); + }); +} + +/** +* @function 运行一个cmd命令 +* @description 输入编译或上传的cmd命令 +* @param cmd {String} 输入的cmd命令 +* @return void +*/ +ArduShell.runCmd = (type, cmd, code, sucFunc) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const testArduinoDirPath = path.join(Env.clientPath, 'testArduino'); + const codePath = path.join(testArduinoDirPath, 'testArduino.ino'); + const nowFilePath = Title.getFilePath(); + ArduShell.clearDirCppAndHppFiles(testArduinoDirPath); + if (USER.compileCAndH === 'yes' && fs_plus.isFileSync(nowFilePath) && ArduShell.isMixOrIno(nowFilePath)) { + const nowDirPath = path.dirname(nowFilePath); + ArduShell.copyHppAndCppFiles(nowDirPath, testArduinoDirPath); + } + ArduShell.writeLibFiles(testArduinoDirPath) + .then(() => { + return fs_extra.outputFile(codePath, code); + }) + .then(() => { + ArduShell.shell = new Shell(cmd); + return ArduShell.shell.exec(cmd); + }) + .then((info) => { + ArduShell.progressLayer.hide(); + let message = ''; + if (info.code) { + message = (type === 'compile' ? Msg.Lang['shell.compileFailed'] : Msg.Lang['shell.uploadFailed']); + statusBarTerminal.addValue("\n==" + message + "==\n"); + } else { + message = (type === 'compile' ? Msg.Lang['shell.compileSucc'] : Msg.Lang['shell.uploadSucc']); + statusBarTerminal.addValue(`\n==${message}(${Msg.Lang['shell.timeCost']} ${info.time})==\n`); + sucFunc(); + } + layer.msg(message, { time: 1000 }); + }) + .catch((error) => { + ArduShell.progressLayer.hide(); + Debug.error(error); + }) + .finally(() => { + statusBarTerminal.scrollToBottom(); + }); +} + +ArduShell.saveBinOrHex = function (writePath) { + ArduShell.writeFile(Env.clientPath + "/mixlyBuild", writePath); +} + +ArduShell.writeFile = function (readPath, writePath) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + ArduShell.compile(function () { + window.setTimeout(function () { + ArduShell.progressLayer.title(`${Msg.Lang['shell.saving']}...`); + ArduShell.progressLayer.show(); + window.setTimeout(function () { + try { + readPath = readPath.replace(/\\/g, "/"); + writePath = writePath.replace(/\\/g, "/"); + } catch (error) { + Debug.error(error); + } + try { + let writeDirPath = writePath.substring(0, writePath.lastIndexOf(".")); + let writeFileName = writePath.substring(writePath.lastIndexOf("/") + 1, writePath.lastIndexOf(".")); + let writeFileType = writePath.substring(writePath.lastIndexOf(".") + 1); + if (!fs.existsSync(writeDirPath)) { + fs.mkdirSync(writeDirPath); + } + if (fs.existsSync(writePath)) { + fs.unlinkSync(writePath); + } + let readBinFilePath = readPath + "/testArduino.ino." + writeFileType; + let binFileData = fs.readFileSync(readBinFilePath); + fs.writeFileSync(writePath, binFileData); + let binFileType = [ + ".eep", + ".hex", + ".with_bootloader.bin", + ".with_bootloader.hex", + ".bin", + ".elf", + ".map", + ".partitions.bin", + ".bootloader.bin" + ] + for (let i = 0; i < binFileType.length; i++) { + let readFilePath = readPath + "/testArduino.ino" + binFileType[i]; + let writeFilePath = writeDirPath + "/" + writeFileName + binFileType[i]; + if (fs.existsSync(readFilePath)) { + let binData = fs.readFileSync(readFilePath); + fs.writeFileSync(writeFilePath, binData); + } + } + layer.msg(Msg.Lang['shell.saveSucc'], { + time: 1000 + }); + } catch (error) { + Debug.error(error); + statusBarTerminal.addValue(e + "\n"); + } + ArduShell.progressLayer.hide(); + }, 500); + }, 1000); + }); +} + +ArduShell.showUploadBox = function (filePath) { + const dirPath = path.dirname(filePath); + const fileName = path.basename(filePath, path.extname(filePath)); + if (fs_plus.isDirectorySync(path.join(dirPath, fileName))) { + filePath = path.join(dirPath, fileName, path.basename(filePath)); + } + const layerNum = layer.msg(Msg.Lang['shell.uploadWithFileInfo'], { + time: -1, + btn: [Msg.Lang['nav.btn.stop'], Msg.Lang['nav.btn.upload']], + shade: LayerExt.SHADE_ALL, + btnAlign: 'c', + yes: function () { + layer.close(layerNum); + ArduShell.binFilePath = ''; + }, + btn2: function () { + layer.close(layerNum); + ArduShell.uploadWithBinOrHex(filePath); + }, + end: function () { + ArduShell.binFilePath = ''; + } + }); +} + +ArduShell.uploadWithBinOrHex = function (filePath) { + layer.closeAll(); + ArduShell.binFilePath = filePath; + ArduShell.initUpload(); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/burn-upload.js b/mixly/common/modules/mixly-modules/electron/burn-upload.js new file mode 100644 index 00000000..12f7dfec --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/burn-upload.js @@ -0,0 +1,701 @@ +goog.loadJs('electron', () => { + +goog.require('layui'); +goog.require('Mixly.Config'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Env'); +goog.require('Mixly.Boards'); +goog.require('Mixly.MString'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.Debug'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.LayerFirmware'); +goog.require('Mixly.LayerProgress'); +goog.require('Mixly.Electron.Serial'); +goog.provide('Mixly.Electron.BU'); + +const { + Electron, + Config, + LayerExt, + Env, + Boards, + MString, + Msg, + Workspace, + Serial, + Debug, + HTMLTemplate, + LayerFirmware, + LayerProgress +} = Mixly; + +const { BU } = Electron; +const { BOARD, SELECTED_BOARD, USER } = Config; + +var downloadShell = null; + +const { form } = layui; + +const fs = Mixly.require('node:fs'); +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const path = Mixly.require('node:path'); +const child_process = Mixly.require('node:child_process'); +const iconv_lite = Mixly.require('iconv-lite'); +const os = Mixly.require('node:os'); + +BU.uploading = false; +BU.burning = false; +BU.shell = null; +BU.firmwareLayer = new LayerFirmware({ + width: 400, + title: Msg.Lang['nav.btn.burn'], + cancelValue: false, + cancel: false, + cancelDisplay: false +}); +BU.firmwareLayer.bind('burn', (info) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + BU.burning = true; + BU.uploading = false; + const port = Serial.getSelectedPortName(); + BU.burnWithPort(port, info); +}); +BU.killing = false; +BU.progressLayer = new LayerProgress({ + width: 200, + cancelValue: Msg.Lang['nav.btn.stop'], + cancel: () => { + if (BU.killing) { + return false; + } + BU.progressLayer.title(`${Msg.Lang['shell.aborting']}...`); + BU.killing = true; + BU.cancel(); + return false; + }, + cancelDisplay: false +}); + +/** + * @function 根据传入的stdout判断磁盘数量并选择对应操作 + * @param type {string} 值为'burn' | 'upload' + * @param stdout {string} 磁盘名称字符串,形如'G:K:F:' + * @param startPath {string} 需要拷贝的文件路径 + * @return {void} + **/ +BU.checkNumOfDisks = function (type, stdout, startPath) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + let wmicResult = stdout; + wmicResult = wmicResult.replace(/\s+/g, ""); + wmicResult = wmicResult.replace("DeviceID", ""); + // wmicResult = 'G:K:F:'; + let result = wmicResult.split(':'); + let pathAdd = (Env.currentPlatform === "win32") ? ':' : ''; + if (stdout.indexOf(":") != stdout.lastIndexOf(":")) { + let form = layui.form; + let devicesName = $('#mixly-selector-type'); + let oldDevice = $('#mixly-selector-type option:selected').val(); + devicesName.empty(); + for (let i = 0; i < result.length; i++) { + if (result[i]) { + if (oldDevice == result[i] + pathAdd) { + devicesName.append(''); + } else { + devicesName.append(''); + } + } + } + form.render(); + let initBtnClicked = false; + const layerNum = layer.open({ + type: 1, + id: "serial-select", + title: Msg.Lang['shell.tooManyDevicesInfo'], + area: ['350px', '150px'], + content: $('#mixly-selector-div'), + shade: LayerExt.SHADE_ALL, + resize: false, + closeBtn: 0, + success: function (layero) { + $('#serial-select').css('height', '195px'); + $(".layui-layer-page").css("z-index","198910151"); + $("#mixly-selector-btn1").off("click").click(() => { + layer.close(layerNum); + BU.cancel(); + }); + $("#mixly-selector-btn2").off("click").click(() => { + layer.close(layerNum); + initBtnClicked = true; + }); + }, + end: function () { + $('#mixly-selector-div').css('display', 'none'); + $("#layui-layer-shade" + layerNum).remove(); + if (initBtnClicked) { + BU.initWithDropdownBox(type, startPath); + } + $("#mixly-selector-btn1").off("click"); + $("#mixly-selector-btn2").off("click"); + } + }); + } else { + const layerNum = layer.open({ + type: 1, + title: (type === 'burn'? Msg.Lang['shell.burning'] : Msg.Lang['shell.uploading']) + '...', + content: $('#mixly-loader-div'), + shade: LayerExt.SHADE_ALL, + resize: false, + closeBtn: 0, + success: function (layero, index) { + if (type === 'burn') { + BU.copyFiles(type, index, startPath, result[0] + pathAdd + '/'); + } else { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + fs_extra.outputFile(startPath, code) + .then(() => { + BU.copyFiles(type, index, startPath, result[0] + pathAdd + '/'); + }) + .catch((error) => { + layer.close(index); + BU.burning = false; + BU.uploading = false; + statusBarTerminal.setValue(error + '\n'); + }); + } + $("#mixly-loader-btn").off("click").click(() => { + layer.close(index); + BU.cancel(); + }); + }, + end: function () { + $('#mixly-selector-div').css('display', 'none'); + $("#layui-layer-shade" + layerNum).remove(); + $("#mixly-loader-btn").off("click"); + } + }); + } +} + +/** + * @function 将文件或文件夹下所有文件拷贝到指定文件夹 + * @param type {string} 值为'burn' | 'upload' + * @param startPath {string} 需要拷贝的文件或文件夹的路径 + * @param desPath {string} 文件的目的路径 + **/ +BU.copyFiles = async (type, startPath, desPath) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const { burn, upload } = SELECTED_BOARD; + if (type === 'upload' && upload.copyLib) { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + let startLibPath = path.dirname(upload.filePath); + let pyFileArr = BU.copyLib(startPath, code); + startPath = path.dirname(startPath); + } + // 如果需要拷贝的是文件,则在目的路径后要加上文件名 + if (fs_plus.isFileSync(startPath)) { + desPath = path.join(desPath, path.basename(startPath)); + } + try { + await fs_extra.copy(startPath, desPath); + BU.progressLayer.hide(); + const message = (type === 'burn'? Msg.Lang['shell.burnSucc'] : Msg.Lang['shell.uploadSucc']); + layer.msg(message, { + time: 1000 + }); + statusBarTerminal.setValue(`==${message}==`); + if (type === 'upload' && Serial.uploadPorts.length === 1) { + if (USER.autoOpenPort === 'no') { + return; + } + mainStatusBarTabs.add('serial', port); + mainStatusBarTabs.changeTo(port); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + statusBarSerial.open(); + } + } catch (error) { + Debug.error(error); + BU.progressLayer.hide(); + statusBarTerminal.setValue(error + '\n'); + console.log(error); + } + BU.burning = false; + BU.uploading = false; +} + +/** +* @function 判断当前环境,以开始一个上传过程 +* @param type {string} 值为'burn' | 'upload' + * @param startPath {string} 需要拷贝的文件或文件夹的路径 +* @return {void} +*/ +BU.initWithDropdownBox = function (type, startPath) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const message = (type === 'burn'? Msg.Lang['shell.burning'] : Msg.Lang['shell.uploading']); + BU.progressLayer.title(`${message}...`); + const desPath = $('#mixly-selector-type option:selected').val(); + if (type === 'burn') { + BU.copyFiles(type, startPath, desPath) + .catch((error) => { + BU.progressLayer.hide(); + BU.burning = false; + BU.uploading = false; + statusBarTerminal.setValue(error + '\n'); + }); + } else { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + fs_extra.outputFile(startPath, code) + .then(() => { + return BU.copyFiles(type, startPath, desPath); + }) + .catch((error) => { + BU.progressLayer.hide(); + BU.burning = false; + BU.uploading = false; + statusBarTerminal.setValue(error + '\n'); + }); + } +} + +/** +* @function 根据传入的盘符名称获取对应的磁盘名称 +* @param type {string} 值为'burn' | 'upload' +* @param volumeName {string} 所要查找盘符的名称 +* @param startPath {string} 需要拷贝文件的路径 +* @return {void} +*/ +BU.getDisksWithVolumesName = function (type, volumeName, startPath) { + let dirPath = path.dirname(startPath); + fs_extra.ensureDirSync(dirPath); + if (Env.currentPlatform === "win32") { + child_process.exec('wmic logicaldisk where "' + volumeName + '" get DeviceID', function (err, stdout, stderr) { + if (err || stderr) { + $('#mixly-loader-div').css('display', 'none'); + console.log("root path open failed" + err + stderr); + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + BU.burning = false; + BU.uploading = false; + return; + } + BU.checkNumOfDisks(type, stdout, startPath); + }); + } else { + let diskPath = '/Volumes/'; + let addChar = ' '; + if (Env.currentPlatform === "linux") { + diskPath = '/media/'; + addChar = ''; + } + let stdout = ''; + let result = null; + result = volumeName.split('/'); + let deviceNum = 0; + for (var i = 0; i < result.length; i++) { + if (result[i] === '') continue; + for (var j = 0; ; j++) { + if (fs_plus.isDirectorySync(diskPath + result[i] + (j == 0 ? '' : (addChar + j)))) { + stdout += diskPath + result[i] + (j == 0 ? '' : (addChar + j)) + ':'; + deviceNum++; + } else if (fs_plus.isDirectorySync(diskPath + os.userInfo().username + '/' + result[i] + (j == 0 ? '' : (addChar + j)))) { + stdout += diskPath + os.userInfo().username + '/' + result[i] + (j == 0 ? '' : (addChar + j)) + ':'; + deviceNum++; + } else { + break; + } + } + } + if (deviceNum === 0) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + BU.burning = false; + BU.uploading = false; + return; + } + BU.checkNumOfDisks(type, stdout, startPath); + } +} + +/** +* @function 取消烧录或上传 +* @return {void} +*/ +BU.cancel = function () { + if (BU.shell) { + BU.shell.stdout.end(); + BU.shell.stdin.end(); + if (Env.currentPlatform === 'win32') { + child_process.exec('taskkill /pid ' + BU.shell.pid + ' /f /t'); + } else { + BU.shell.kill("SIGTERM"); + } + BU.shell = null; + } else { + if (BU.uploading) { + BU.uploading = false; + layer.msg(Msg.Lang['shell.uploadCanceled'], { + time: 1000 + }); + } else if (BU.burning) { + BU.burning = false; + layer.msg(Msg.Lang['shell.burnCanceled'], { + time: 1000 + }); + } + } + BU.killing = false; +} + +/** +* @function 开始一个烧录过程 +* @return {void} +*/ +BU.initBurn = function () { + if (BU.burning) return; + const { burn } = SELECTED_BOARD; + BU.burning = true; + BU.uploading = false; + if (burn.type === 'volume') { + BU.getDisksWithVolumesName('burn', burn.volume, burn.filePath); + } else { + const port = Serial.getSelectedPortName(); + if (burn.special && burn.special instanceof Array) { + BU.burning = false; + BU.burnWithSpecialBin(); + } else { + BU.burnWithPort(port, burn.command); + } + } +} + +/** +* @function 开始一个上传过程 +* @return {void} +*/ +BU.initUpload = function () { + if (BU.uploading) return; + const { upload } = SELECTED_BOARD; + BU.burning = false; + BU.uploading = true; + if (upload.type === "volume") { + BU.getDisksWithVolumesName('upload', upload.volume, upload.filePath); + } else { + const port = Serial.getSelectedPortName(); + BU.uploadWithPort(port, upload.command); + } +} + +/** + * @function 递归代码找出import项并拷贝对应库文件到filePath所在目录 + * @param filePath {string} 主代码文件所在路径 + * @param code {string} 主代码数据 + * @return {array} 库列表 + **/ +BU.copyLib = function (filePath, code) { + const dirPath = path.dirname(filePath); + const fileName = path.basename(filePath); + fs_extra.ensureDirSync(dirPath); + try { + const libFiles = fs.readdirSync(dirPath); + for (let value of libFiles) { + if (value !== fileName) { + fs.unlinkSync(path.join(dirPath, value)); + } + } + } catch (e) { + console.log(e); + } + var pyFileArr = []; + pyFileArr = BU.searchLibs(dirPath, code, pyFileArr); + return pyFileArr; +} + +/** + * @function 获取当前代码数据中所使用的库并检测此文件是否在库目录下存在, + * 若存在则拷贝到主文件所在目录 + * @param dirPath {string} 主代码文件所在目录的路径 + * @param code {string} 主代码数据 + * @param libArr {array} 当前已查找出的库列表 + * @return {array} 库列表 + **/ +BU.searchLibs = function (dirPath, code, libArr) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const { upload } = SELECTED_BOARD; + let arrayObj = new Array(); + code.trim().split("\n").forEach(function (v, i) { + arrayObj.push(v); + }); + let moduleName = ""; + let pyFileArr = []; + for (let i = 0; i < arrayObj.length; i++) { + let fromLoc = arrayObj[i].indexOf("from"); + let importLoc = arrayObj[i].indexOf("import"); + const str = arrayObj[i].substring(0, (fromLoc === -1)? importLoc : fromLoc); + str.split('').forEach((ch) => { + if (ch !== ' ' && ch !== '\t') { + fromLoc = -1; + importLoc = -1; + return; + } + }); + if (fromLoc !== -1) { + moduleName = arrayObj[i].substring(fromLoc + 4, arrayObj[i].indexOf("import")); + } else if (importLoc !== -1) { + let endPos = arrayObj[i].indexOf("as"); + if (endPos === -1) { + endPos = arrayObj[i].length; + } + moduleName = arrayObj[i].substring(importLoc + 6, endPos); + } else { + continue; + } + moduleName = moduleName.replaceAll(' ', ''); + moduleName = moduleName.replaceAll('\r', ''); + let moduleArr = moduleName.split(","); + for (let j = 0; j < moduleArr.length; j++) { + if (!libArr.includes(moduleArr[j] + '.py') && !libArr.includes(moduleArr[j] + '.mpy')) { + try { + let oldLibPath = null; + if (!(upload.libPath && upload.libPath.length)) + return; + for (let nowDirPath of upload.libPath) { + const nowMpyFilePath = path.join(nowDirPath, moduleArr[j] + '.mpy'); + const nowPyFilePath = path.join(nowDirPath, moduleArr[j] + '.py'); + if (fs_plus.isFileSync(nowMpyFilePath)) { + oldLibPath = nowMpyFilePath; + break; + } else if (fs_plus.isFileSync(nowPyFilePath)) { + oldLibPath = nowPyFilePath; + } + } + if (oldLibPath) { + const extname = path.extname(oldLibPath); + const newLibPath = path.join(dirPath, moduleArr[j] + extname); + statusBarTerminal.addValue(Msg.Lang['shell.copyLib'] + ' ' + moduleArr[j] + '\n'); + fs.copyFileSync(oldLibPath, newLibPath); + libArr.push(moduleArr[j] + extname); + if (extname === '.py') { + pyFileArr.push(moduleArr[j] + extname); + code = fs.readFileSync(oldLibPath, 'utf8'); + libArr = BU.searchLibs(dirPath, code, libArr); + } + } + } catch (e) { + console.log(e); + } + } + } + } + return libArr; +} + +/** +* @function 通过cmd烧录 +* @param port {string} 所选择的串口 +* @param command {string} 需要执行的指令 +* @return {void} +*/ +BU.burnByCmd = function (port, command) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(Msg.Lang['shell.burning'] + '...\n'); + command = MString.tpl(command, { + baudrate: Boards.getSelectedBoardConfigParam('BurnSpeed') ?? '460800' + }); + BU.runCmd('burn', port, command); +} + +/** +* @function 通过cmd上传 +* @param port {string} 所选择的串口 +* @param command {string} 需要执行的指令 +* @return {void} +*/ +BU.uploadByCmd = async function (port, command) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(Msg.Lang['shell.uploading'] + '...\n'); + const { upload } = SELECTED_BOARD; + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + if (upload.copyLib) { + BU.copyLib(upload.filePath, code); + } else { + BU.copyLib(upload.filePath, ''); + } + fs_extra.outputFile(upload.filePath, code) + .then(() => { + BU.runCmd('upload', port, command); + }) + .catch((error) => { + BU.progressLayer.hide(); + statusBarTerminal.setValue(error.toString() + '\n'); + Debug.error(error); + BU.uploading = false; + }); +} + +/** +* @function 运行cmd +* @param type {string} 值为 'burn' | 'upload' +* @param port {string} 所选择的串口 +* @param command {string} 需要执行的指令 +* @param sucFunc {function} 指令成功执行后所要执行的操作 +* @return {void} +*/ +BU.runCmd = function (type, port, command, sucFunc) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + let nowCommand = MString.tpl(command, { com: port }); + + BU.shell = child_process.exec(nowCommand, { encoding: 'binary' }, function (error, stdout, stderr) { + BU.progressLayer.hide(); + BU.burning = false; + BU.uploading = false; + BU.shell = null; + const text = statusBarTerminal.getValue(); + if (text.lastIndexOf('\n') !== text.length - 1) { + statusBarTerminal.addValue('\n'); + } + if (error) { + if (Env.currentPlatform === 'win32') { + error = iconv_lite.decode(Buffer.from(error.message, 'binary'), 'cp936'); + } else { + let lines = error.message.split('\n'); + for (let i in lines) { + if (lines[i].indexOf('Command failed') !== -1) { + continue; + } + lines[i] = iconv_lite.decode(Buffer.from(lines[i], 'binary'), 'utf-8'); + } + error = lines.join('\n'); + } + error = MString.decode(error); + statusBarTerminal.addValue(error); + statusBarTerminal.addValue('==' + (type === 'burn' ? Msg.Lang['shell.burnFailed'] : Msg.Lang['shell.uploadFailed']) + '==\n'); + } else { + layer.msg((type === 'burn' ? Msg.Lang['shell.burnSucc'] : Msg.Lang['shell.uploadSucc']), { + time: 1000 + }); + statusBarTerminal.addValue('==' + (type === 'burn' ? Msg.Lang['shell.burnSucc'] : Msg.Lang['shell.uploadSucc']) + '==\n'); + if (type === 'upload') { + mainStatusBarTabs.show(); + mainStatusBarTabs.add('serial', port); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + statusBarSerial.setValue(''); + mainStatusBarTabs.changeTo(port); + statusBarSerial.open().catch(Debug.error); + } + } + }); + + BU.shell.stdout.on('data', function (data) { + if (BU.uploading || BU.burning) { + data = iconv_lite.decode(Buffer.from(data, 'binary'), 'utf-8'); + data = MString.decode(data); + statusBarTerminal.addValue(data); + } + }); +} + +/** + * @function 特殊固件的烧录 + * @return {void} + **/ +BU.burnWithSpecialBin = () => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const firmwares = SELECTED_BOARD.burn.special; + let menu = []; + let commandMap = {}; + for (let firmware of firmwares) { + if (!firmware?.name && !firmware?.command) continue; + menu.push({ + id: firmware.name, + text: firmware.name + }); + commandMap[firmware.name] = firmware.command; + } + BU.firmwareLayer.setMap(commandMap); + BU.firmwareLayer.setMenu(menu); + BU.firmwareLayer.show(); +} + +/** + * @function 通过串口执行命令行烧录或上传操作 + * @param type {string} 值为 'burn' | 'upload' + * @param port {string} 所选择的串口 + * @param command {string} 需要执行的指令 + * @return {void} + **/ +BU.operateWithPort = (type, port, command) => { + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + BU.burning = false; + BU.uploading = false; + return; + } + const title = (type === 'burn' ? Msg.Lang['shell.burning'] : Msg.Lang['shell.uploading']) + '...'; + BU.progressLayer.title(title); + BU.progressLayer.show(); + const { mainStatusBarTabs } = Mixly; + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + let serialClosePromise = null; + if (statusBarSerial) { + serialClosePromise = statusBarSerial.close(); + } else { + serialClosePromise = Promise.resolve(); + } + serialClosePromise.finally(() => { + if (type === 'burn') { + BU.burnByCmd(port, command); + } else { + BU.uploadByCmd(port, command); + } + }); +} + +/** + * @function 通过串口执行命令行烧录操作 + * @param port {string} 所选择的串口 + * @param command {string} 需要执行的指令 + * @return {void} + **/ +BU.burnWithPort = (port, command) => { + BU.operateWithPort('burn', port, command); +} + +/** + * @function 通过串口执行命令行上传操作 + * @param port {string} 所选择的串口 + * @param command {string} 需要执行的指令 + * @return {void} + **/ +BU.uploadWithPort = (port, command) => { + BU.operateWithPort('upload', port, command); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/cloud-download.js b/mixly/common/modules/mixly-modules/electron/cloud-download.js new file mode 100644 index 00000000..1cc4fc79 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/cloud-download.js @@ -0,0 +1,115 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.MJson'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.CloudDownload'); + +const { + Env, + MJson, + Electron +} = Mixly; + +const { CloudDownload } = Electron; + +const fs = Mixly.require('fs'); +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const node_downloader_helper = Mixly.require('node-downloader-helper'); + +CloudDownload.getJson = (url, downloadDir, endFunc) => { + if (url) { + CloudDownload.download(url, downloadDir) + .then((message) => { + if (message[0]) { + throw message[0]; + } else { + let jsonObj = null; + if (fs_plus.isFileSync(message[1])) { + let data = fs.readFileSync(message[1], 'utf-8'); + jsonObj = MJson.parse(data); + } + if (jsonObj) { + return jsonObj; + } else { + throw('解析失败'); + } + } + + }) + .then((configObj) => { + endFunc([null, configObj]); + }) + .catch((error) => { + endFunc([error, null]); + }); + } else { + endFunc(['url读取出错!', null]); + } +} + +CloudDownload.download = (url, downloadDir, options = {}) => { + return new Promise((resolve, reject) => { + const DEFAULT_OPTIONS = { + progress: null, + end: null, + error: null + } + if (typeof options !== 'object') + options = DEFAULT_OPTIONS; + else + options = { ...DEFAULT_OPTIONS, ...options }; + try { + fs_extra.ensureDirSync(downloadDir); + const fileName = path.basename(url); + const filePath = path.join(downloadDir, './' + fileName); + if (fs_plus.isFileSync(filePath)) + fs_extra.removeSync(filePath); + } catch (error) { + resolve([error, url]); + return; + } + const { DownloaderHelper } = node_downloader_helper; + const dl = new DownloaderHelper(url, downloadDir, { + override: true, + timeout: 15000, + retry: false + }); + dl.on('progress', (stats) => { + if (typeof options.progress === 'function') { + options.progress(stats); + } + }); + dl.on('end', (downloadInfo) => { + if (typeof options.end === 'function') { + options.end(downloadInfo); + } + resolve([null, downloadInfo.filePath]); + }); + dl.on('error', (error) => { + console.log('Download Failed', error); + if (typeof options.error === 'function') { + options.error(error); + } + resolve([error, url]); + }); + dl.on('timeout', () => { + console.log('Download Timeout'); + if (typeof options.timeout === 'function') { + options.timeout('Download Timeout'); + } + resolve(['Download Timeout', url]); + }); + dl.start().catch((error) => { + console.log('Download Failed', error); + if (typeof options.error === 'function') { + options.error(error); + } + resolve([error, url]); + }); + }); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/electron.js b/mixly/common/modules/mixly-modules/electron/electron.js new file mode 100644 index 00000000..b780be9a --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/electron.js @@ -0,0 +1,50 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.Url'); +goog.provide('Mixly.Electron'); + +const { + Url, + Env, + Electron +} = Mixly; + +const electron_remote = Mixly.require('@electron/remote'); + +const { + Menu, + BrowserWindow +} = electron_remote; + +Electron.newBrowserWindow = (indexPath, config = {}) => { + Menu.setApplicationMenu(null); + const win = new BrowserWindow({ + ...{ + show: false, + minHeight: 400, + minWidth: 700, + width: 0, + height: 0, + icon: path.join(Env.indexDirPath, '../files/mixly.ico'), + webPreferences: { + nodeIntegration: true, + enableRemoteModule: true, + contextIsolation: false, + spellcheck: false + } + }, + ...(config.window ?? {}) + }); + + win.loadFile(indexPath); + + win.once('ready-to-show', () => { + win.maximize(); + win.show(); + }); + + return win; +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/events.js b/mixly/common/modules/mixly-modules/electron/events.js new file mode 100644 index 00000000..873d8751 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/events.js @@ -0,0 +1,23 @@ +goog.loadJs('electron', () => { + +goog.require('Mixly.Command'); +goog.require('Mixly.Config'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.Events'); + +const { Command, Config, Electron } = Mixly; +const { Events } = Electron; +const { SOFTWARE } = Config; + +const electron = Mixly.require('electron'); +const ipcRenderer = electron.ipcRenderer; + +ipcRenderer.on('command', (event, message) => { + if (SOFTWARE.debug) { + console.log('receive -> ', message); + } + const commandObj = Command.parse(message); + Command.run(commandObj); +}); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/file-tree.js b/mixly/common/modules/mixly-modules/electron/file-tree.js new file mode 100644 index 00000000..f309586b --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/file-tree.js @@ -0,0 +1,172 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.FileTree'); +goog.require('Mixly.Events'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Electron.FS'); +goog.provide('Mixly.Electron.FileTree'); + +const { + FileTree, + Events, + Registry, + Debug, + Electron +} = Mixly; +const { FS } = Electron; + +const chokidar = Mixly.require('chokidar'); + +class FileTreeExt extends FileTree { + static { + /*this.worker = new Worker('../common/modules/mixly-modules/workers/nodejs/node-file-watcher.js', { + name: 'nodeFileWatcher' + }); + this.watcherEventsRegistry = new Registry(); + this.worker.addEventListener('message', (event) => { + const { data } = event; + const events = this.watcherEventsRegistry.getItem(data.watcher); + if (!events) { + return; + } + events.run('change', data); + }); + this.worker.addEventListener('error', (event) => { + Debug.error(event); + });*/ + + this.addEventListener = function(folderPath, func) { + FileTreeExt.watch(folderPath); + let events = this.watcherEventsRegistry.getItem(folderPath); + if (!events) { + events = new Events(['change']); + this.watcherEventsRegistry.register(folderPath, events); + } + return events.bind('change', func); + } + + this.removeEventListener = function(folderPath, eventId) { + let events = this.watcherEventsRegistry.getItem(folderPath); + if (!events) { + return; + } + if (!events.length('change')) { + this.watcherEventsRegistry.unregister(folderPath); + this.unwatch(folderPath); + } + } + + this.watch = function(folderPath) { + FileTreeExt.worker.postMessage({ + func: 'watch', + args: [folderPath] + }); + } + + this.unwatch = function(folderPath) { + FileTreeExt.worker.postMessage({ + func: 'unwatch', + args: [folderPath] + }); + } + } + + constructor() { + super(FS); + this.watcher = null; + this.watcherEventsListenerIdRegistry = new Registry(); + } + + async readFolder(inPath) { + let output = []; + const fs = this.getFS(); + const status = await fs.isDirectory(inPath); + if (!status) { + return output; + } + const children = await fs.readDirectory(inPath); + for (let data of children) { + const dataPath = path.join(inPath, data); + if (await fs.isDirectory(dataPath)) { + const isDirEmtpy = await fs.isDirectoryEmpty(dataPath); + output.push({ + type: 'folder', + id: dataPath, + children: !isDirEmtpy + }); + if (isDirEmtpy) { + this.watchEmptyFolder(dataPath); + } + } else { + output.push({ + type: 'file', + id: dataPath, + children: false + }); + } + } + return output; + } + + watchFolder(folderPath) { + super.watchFolder(folderPath); + let id = this.watcherEventsListenerIdRegistry.getItem(folderPath); + if (id) { + return; + } + id = FileTreeExt.addEventListener(folderPath, (data) => { + if (data.event === 'unlinkDir') { + this.unwatchFolder(path.join(data.path)); + } + const watcherPath = path.join(data.watcher); + if (this.isWatched(watcherPath)) { + this.refreshFolder(watcherPath); + } + }); + this.watcherEventsListenerIdRegistry.register(folderPath, id); + } + + watchEmptyFolder(folderPath) { + super.watchFolder(folderPath); + let id = this.watcherEventsListenerIdRegistry.getItem(folderPath); + if (id) { + return; + } + id = FileTreeExt.addEventListener(folderPath, (data) => { + const watcherPath = path.join(data.watcher); + if (this.isWatched(watcherPath)) { + this.refreshFolder(watcherPath); + } + if (this.isClosed(watcherPath)) { + this.unwatchFolder(watcherPath); + } + }); + this.watcherEventsListenerIdRegistry.register(folderPath, id); + } + + unwatchFolder(folderPath) { + const keys = this.watchRegistry.keys(); + for (let key of keys) { + if (key.indexOf(folderPath) === -1) { + continue; + } + const type = this.watchRegistry.getItem(key); + if (type === 'file') { + this.unwatchFile(key); + } + const id = this.watcherEventsListenerIdRegistry.getItem(key); + if (!id) { + continue; + } + FileTreeExt.removeEventListener(key, id); + this.watcherEventsListenerIdRegistry.unregister(key); + } + super.unwatchFolder(folderPath); + } +} + +Electron.FileTree = FileTreeExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/file.js b/mixly/common/modules/mixly-modules/electron/file.js new file mode 100644 index 00000000..ecbd4102 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/file.js @@ -0,0 +1,285 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Blockly'); +goog.require('Mixly.Env'); +goog.require('Mixly.LayerNewFile'); +goog.require('Mixly.Config'); +goog.require('Mixly.Title'); +goog.require('Mixly.MFile'); +goog.require('Mixly.XML'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.Electron.ArduShell'); +goog.require('Mixly.Electron.BU'); +goog.provide('Mixly.Electron.File'); + +const { + Env, + LayerNewFile, + Config, + Title, + MFile, + XML, + Msg, + Workspace, + Electron +} = Mixly; + +const { BOARD } = Config; + +const { ArduShell, BU, File } = Electron; + +const fs = Mixly.require('fs'); +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const fs_promise = Mixly.require('node:fs/promises'); +const electron_remote = Mixly.require('@electron/remote'); +const { dialog, app } = electron_remote; + +const { MSG } = Blockly.Msg; + +File.DEFAULT_PATH = path.join(app.getAppPath(), 'src/sample'); +File.workingPath = File.DEFAULT_PATH; +File.openedFilePath = null; + +File.userPath = { + img: null, + mix: null, + code: null, + hex: null +}; + +File.newFileLayer = new LayerNewFile(); +File.newFileLayer.bind('empty', () => { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const blockEditor = editor.getPage('block').getEditor(); + const codeEditor = editor.getPage('code').getEditor(); + const generator = Blockly.generator; + blockEditor.clear(); + blockEditor.scrollCenter(); + Blockly.hideChaff(); + codeEditor.setValue(generator.workspaceToCode(blockEditor) || '', -1); + File.openedFilePath = null; + Title.updateTitle(Title.title); +}); + +File.showSaveDialog = (title, filters, endFunc) => { + const currentWindow = electron_remote.getCurrentWindow(); + currentWindow.focus(); + dialog.showSaveDialog(currentWindow, { + title, + defaultPath: File.workingPath, + filters, + // nameFieldLabel: Msg.Lang['替换文件'], + showsTagField: true, + properties: ['showHiddenFiles'], + message: title + }).then(result => { + let res = result.filePath; + if (res) + endFunc(res); + }).catch(error => { + console.log(error); + }); +} + +File.showOpenDialog = (title, filters, endFunc) => { + const currentWindow = electron_remote.getCurrentWindow(); + currentWindow.focus(); + dialog.showOpenDialog(currentWindow, { + title, + defaultPath: File.workingPath, + filters, + properties: ['openFile', 'showHiddenFiles'], + message: title + }) + .then(result => { + let res = result.filePaths[0]; + if (res) + endFunc(res); + }) + .catch(error => { + console.log(error); + }); +} + +File.save = (endFunc = () => {}) => { + if (File.openedFilePath) { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const extname = path.extname(File.openedFilePath); + let data = ''; + switch (extname) { + case '.mix': + data = editor.getValue(); + break; + case '.py': + case '.ino': + data = editor.getCode(); + break; + default: + layer.msg(Msg.Lang['file.type.error'], { time: 1000 }); + return; + } + fs_extra.outputFile(File.openedFilePath, data) + .then(() => { + Title.updeteFilePath(File.openedFilePath); + layer.msg(Msg.Lang['file.saveSucc'], { time: 1000 }); + }) + .catch((error) => { + File.openedFilePath = null; + console.log(error); + layer.msg(Msg.Lang['file.saveFailed'], { time: 1000 }); + }) + .finally(() => { + endFunc(); + }) + } else { + File.saveAs(endFunc); + } +} + +File.saveAs = (endFunc = () => {}) => { + File.showSaveDialog(Msg.Lang['file.saveAs'], MFile.saveFilters, (filePath) => { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const extname = path.extname(filePath); + if (['.mix', '.py', '.ino'].includes(extname)) { + File.openedFilePath = filePath; + File.workingPath = path.dirname(filePath); + File.save(endFunc); + } else { + switch (extname) { + case '.bin': + case '.hex': + if (BOARD?.nav?.compile) { + ArduShell.saveBinOrHex(filePath); + } else { + const hexStr = MFile.getHex(); + fs_extra.outputFile(filePath, hexStr) + .then(() => { + layer.msg(Msg.Lang['file.saveSucc'], { time: 1000 }); + }) + .catch((error) => { + console.log(error); + layer.msg(Msg.Lang['file.saveFailed'], { time: 1000 }); + }) + .finally(() => { + endFunc(); + }); + } + break; + case '.mil': + const milStr = editor.getMil(); + const $mil = $(milStr); + $mil.attr('name', path.basename(filePath, '.mil')); + fs_extra.outputFile(filePath, $mil[0].outerHTML) + .then(() => { + layer.msg('file.saveSucc', { time: 1000 }); + }) + .catch((error) => { + console.log(error); + layer.msg(Msg.Lang['file.saveFailed'], { time: 1000 }); + }) + .finally(() => { + endFunc(); + }); + break; + default: + layer.msg(Msg.Lang['file.type.error'], { time: 1000 }); + endFunc(); + } + } + }); +} + +File.exportLib = (endFunc = () => {}) => { + File.showSaveDialog(Msg.Lang['file.exportAs'], [ MFile.SAVE_FILTER_TYPE.mil ], (filePath) => { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const milStr = editor.getMil(); + const $mil = $(milStr); + $mil.attr('name', path.basename(filePath, '.mil')); + fs_extra.outputFile(filePath, $mil[0].outerHTML) + .then(() => { + layer.msg('file.saveSucc', { time: 1000 }); + }) + .catch((error) => { + console.log(error); + layer.msg(Msg.Lang['file.saveFailed'], { time: 1000 }); + }) + .finally(() => { + endFunc(); + }); + }); +} + +File.new = () => { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const blockEditor = editor.getPage('block').getEditor(); + const codeEditor = editor.getPage('code').getEditor(); + const generator = Blockly.generator; + const blocksList = blockEditor.getAllBlocks(); + if (editor.getPageType() === 'code') { + const code = codeEditor.getValue(), + workspaceToCode = generator.workspaceToCode(blockEditor) || ''; + if (!blocksList.length && workspaceToCode === code) { + layer.msg(Msg.Lang['editor.codeEditorEmpty'], { time: 1000 }); + File.openedFilePath = null; + Title.updateTitle(Title.title); + return; + } + } else { + if (!blocksList.length) { + layer.msg(Msg.Lang['editor.blockEditorEmpty'], { time: 1000 }); + File.openedFilePath = null; + Title.updateTitle(Title.title); + return; + } + } + File.newFileLayer.show(); +} + +File.open = () => { + File.showOpenDialog(Msg.Lang['file.open'], [ + { name: Msg.Lang['file.type.mix'], extensions: MFile.openFilters } + ], (filePath) => { + File.openFile(filePath); + }); +} + +File.openFile = (filePath) => { + const extname = path.extname(filePath); + let data; + if (!fs_plus.isFileSync(filePath)) { + console.log(filePath + '不存在'); + return; + } + try { + data = fs.readFileSync(filePath, 'utf-8'); + } catch (error) { + console.log(error); + return; + } + if (['.bin', '.hex'].includes(extname)) { + if (BOARD?.nav?.compile) { + ArduShell.showUploadBox(filePath); + } else { + MFile.loadHex(data); + } + } else if (['.mix', '.xml', '.ino', '.py'].includes(extname)) { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + editor.setValue(data, extname); + File.openedFilePath = filePath; + File.workingPath = path.dirname(filePath); + Title.updeteFilePath(File.openedFilePath); + } else { + layer.msg(Msg.Lang['file.type.error'], { time: 1000 }); + } +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/footerlayer-example.js b/mixly/common/modules/mixly-modules/electron/footerlayer-example.js new file mode 100644 index 00000000..76206cee --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/footerlayer-example.js @@ -0,0 +1,110 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('Mixly.Env'); +goog.require('Mixly.Config'); +goog.require('Mixly.MFile'); +goog.require('Mixly.Title'); +goog.require('Mixly.XML'); +goog.require('Mixly.FooterLayerExample'); +goog.require('Mixly.Electron.File'); +goog.provide('Mixly.Electron.FooterLayerExample'); + +const { + Env, + Config, + MFile, + Title, + XML, + FooterLayerExample, + Electron +} = Mixly; + +const { dropdown, tree } = layui; + +const { File } = Electron; + +const { BOARD } = Config; + +const fs = Mixly.require('fs'); +const fs_plus = Mixly.require('fs-plus'); +const electron_remote = Mixly.require('@electron/remote'); +const { app } = electron_remote; + +class FooterLayerExampleExt extends FooterLayerExample { + constructor(element) { + super(element); + } + + getRoot() { + let exampleList = []; + let samplePath = path.join(Env.boardDirPath, 'examples'); + const sampleList = this.getExamplesByPath(samplePath, '.mix'); + if (sampleList.length) { + exampleList.push({ + id: samplePath, + title: BOARD.boardType, + children: [] + }); + } + const thirdPartyPath = path.join(Env.boardDirPath, 'libraries/ThirdParty'); + if (fs_plus.isDirectorySync(thirdPartyPath)) { + const libList = fs.readdirSync(thirdPartyPath); + for (let lib of libList) { + const libPath = path.join(thirdPartyPath, lib); + if (fs_plus.isFileSync(libPath)) + continue; + const examplesPath = path.join(libPath, 'examples'); + if (fs_plus.isFileSync(examplesPath)) + continue; + const thirdPartyList = this.getExamplesByPath(examplesPath, '.mix'); + if (thirdPartyList.length) { + exampleList.push({ + id: examplesPath, + title: lib, + children: [] + }); + } + } + } + return exampleList; + } + + getChildren(inPath) { + return this.getExamplesByPath(inPath, '.mix'); + } + + dataToWorkspace(inPath) { + if (!fs_plus.isFileSync(inPath)) { + return; + } + const data = fs.readFileSync(inPath, 'utf8'); + const extname = path.extname(inPath); + this.updateCode(extname, data); + File.openedFilePath = null; + } + + getExamplesByPath(inPath, fileExtname) { + let exampleList = []; + if (fs_plus.isDirectorySync(inPath)) { + const dataList = fs.readdirSync(inPath); + for (let data of dataList) { + const dataPath = path.join(inPath, data); + if (fs_plus.isDirectorySync(dataPath)) { + exampleList.push({ title: data, id: dataPath, children: [] }); + } else { + const extname = path.extname(data); + if (extname === fileExtname) { + exampleList.push({ title: data, id: dataPath }); + } + } + } + } + return exampleList; + } +} + +Electron.FooterLayerExample = FooterLayerExampleExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/fs-board.js b/mixly/common/modules/mixly-modules/electron/fs-board.js new file mode 100644 index 00000000..220091ae --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/fs-board.js @@ -0,0 +1,153 @@ +goog.loadJs('electron', () => { + +goog.require('layui'); +goog.require('path'); +goog.require('Mustache'); +goog.require('Mixly.Env'); +goog.require('Mixly.FSBoard'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Electron.Shell'); +goog.provide('Mixly.Electron.FSBoard'); + +const { + Env, + FSBoard, + LayerExt, + Debug, + Msg, + Electron = {} +} = Mixly; + +const { Shell } = Electron; + +const fs_extra = Mixly.require('fs-extra'); + +const { layer } = layui; + + +class FSBoardExt extends FSBoard { + #shell_ = null; + constructor() { + super(); + this.#shell_ = new Shell(); + } + + download(usrFolder, fsType) { + return new Promise(async (resolve, reject) => { + try { + await super.download(usrFolder, fsType); + } catch (error) { + Debug.error(error); + resolve(); + return; + } + const layerNum = layer.open({ + type: 1, + title: `${Msg.Lang['shell.downloading']}...`, + content: $('#mixly-loader-div'), + shade: LayerExt.SHADE_NAV, + resize: false, + closeBtn: 0, + success: () => { + $("#mixly-loader-btn").off("click").click(() => { + $("#mixly-loader-btn").css('display', 'none'); + layer.title(Msg.Lang['shell.aborting'] + '...', layerNum); + this.cancel(); + }); + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.changeTo('output'); + const commandTemplate = this.getSelectedFSDownloadCommand(); + const command = this.#renderTemplate_(commandTemplate); + this.#shell_.exec(command) + .then((info) => { + if (info.code) { + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.downloadFailed']}==\n`); + } else { + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.downloadSucc']}(${Msg.Lang['shell.timeCost']} ${info.time})==\n`); + } + }) + .catch(Debug.error) + .finally(() => { + layer.close(layerNum); + resolve(); + }); + }, + end: function () { + $("#mixly-loader-btn").off("click"); + $("#mixly-loader-btn").css('display', 'inline-block'); + } + }); + }); + } + + upload(usrFolder, fsType) { + return new Promise(async (resolve, reject) => { + try { + await super.upload(usrFolder, fsType); + } catch (error) { + Debug.error(error); + resolve(); + return; + } + const layerNum = layer.open({ + type: 1, + title: Msg.Lang['shell.uploading'] + '...', + content: $('#mixly-loader-div'), + shade: LayerExt.SHADE_NAV, + resize: false, + closeBtn: 0, + success: () => { + $("#mixly-loader-btn").off("click").click(() => { + $("#mixly-loader-btn").css('display', 'none'); + layer.title('上传终止中...', layerNum); + this.cancel(); + }); + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(''); + mainStatusBarTabs.changeTo('output'); + const commandTemplate = this.getSelectedFSUploadCommand(); + const command = this.#renderTemplate_(commandTemplate); + this.#shell_.exec(command) + .then((info) => { + if (info.code) { + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.uploadFailed']}==\n`); + } else { + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.uploadSucc']}(${Msg.Lang['shell.timeCost']} ${info.time})==\n`); + } + }) + .catch(Debug.error) + .finally(() => { + layer.close(layerNum); + resolve(); + }); + }, + end: function () { + $("#mixly-loader-btn").off("click"); + $("#mixly-loader-btn").css('display', 'inline-block'); + } + }); + }); + } + + #renderTemplate_(template) { + const config = this.getConfig(); + return Mustache.render(template, { + ...config, + python3: `"${Env.python3Path}"`, + esptool: `"${Env.python3Path}" "${path.join(Env.srcDirPath, 'tools/python/esptool_main.py')}"` + }); + } + + cancel() { + this.#shell_ && this.#shell_.kill(); + } +} + +Electron.FSBoard = FSBoardExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/fs.js b/mixly/common/modules/mixly-modules/electron/fs.js new file mode 100644 index 00000000..b865344b --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/fs.js @@ -0,0 +1,158 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.FS'); + +const { Msg, Electron } = Mixly; +const { FS } = Electron; + +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const fs_promise = Mixly.require('node:fs/promises'); +const electron_remote = Mixly.require('@electron/remote'); +const { dialog, app } = electron_remote; + +FS.showOpenFilePicker = () => { + return new Promise((resolve, reject) => { + const currentWindow = electron_remote.getCurrentWindow(); + currentWindow.focus(); + dialog.showOpenDialog(currentWindow, { + title: Msg.Lang['file.openFile'], + defaultPath: File.workingPath, + filters, + properties: ['openFile', 'showHiddenFiles'], + message: Msg.Lang['file.openFile'] + }) + .then(result => { + const filePath = result.filePaths[0]; + if (filePath) { + resolve(new File(filePath)); + } else { + reject('file not found'); + } + }) + .catch(error => { + reject(error); + }); + }); +} + +FS.showDirectoryPicker = () => { + return new Promise((resolve, reject) => { + const currentWindow = electron_remote.getCurrentWindow(); + currentWindow.focus(); + dialog.showOpenDialog(currentWindow, { + title: Msg.Lang['file.openFolder'], + // defaultPath: File.workingPath, + // filters, + properties: ['openDirectory', 'createDirectory'], + message: Msg.Lang['file.openFolder'] + }) + .then(result => { + const folderPath = result.filePaths[0]; + if (folderPath) { + resolve(folderPath); + } else { + resolve(null); + } + }) + .catch(reject); + }); +} + +FS.showSaveFilePicker = (fileName, ext) => { + return new Promise((resolve, reject) => { + const currentWindow = electron_remote.getCurrentWindow(); + currentWindow.focus(); + dialog.showSaveDialog(currentWindow, { + filters: [{ + name: Msg.Lang['file.type.mix'], + extensions: [ext.substring(ext.lastIndexOf('.') + 1)] + }], + defaultPath: fileName, + showsTagField: true, + properties: ['showHiddenFiles'] + }).then(result => { + let filePath = result.filePath; + if (filePath) { + resolve(filePath); + } else { + resolve(null); + } + }).catch(reject); + }); +} + +FS.createFile = (filePath) => { + return fs_extra.ensureFile(filePath); +} + +FS.readFile = (filePath) => { + return fs_promise.readFile(filePath, { encoding: 'utf8' }); +} + +FS.writeFile = (filePath, data) => { + return fs_promise.writeFile(filePath, data, { encoding: 'utf8' }); +} + +FS.isFile = (filePath) => { + return new Promise((resolve, reject) => { + resolve(fs_plus.isFileSync(filePath)); + }); +} + +FS.renameFile = (oldFilePath, newFilePath) => { + return fs_promise.rename(oldFilePath, newFilePath); +} + +FS.moveFile = (oldFilePath, newFilePath) => { + return fs_extra.move(oldFilePath, newFilePath, { overwrite: true }); +} + +FS.copyFile = (oldFilePath, newFilePath) => { + return fs_extra.copy(oldFilePath, newFilePath); +} + +FS.deleteFile = (filePath) => { + return fs_extra.remove(filePath); +} + +FS.createDirectory = (folderPath) => { + return fs_extra.ensureDir(folderPath); +} + +FS.readDirectory = (folderPath) => { + return fs_promise.readdir(folderPath); +} + +FS.isDirectory = (folderPath) => { + return new Promise((resolve, reject) => { + fs_plus.isDirectory(folderPath, (status) => { + resolve(status); + }); + }); +} + +FS.isDirectoryEmpty = async (folderPath) => { + return !(await FS.readDirectory(folderPath)).length; +} + +FS.renameDirectory = (oldFolderPath, newFolderPath) => { + return fs_promise.rename(oldFolderPath, newFolderPath); +} + +FS.moveDirectory = (oldFolderPath, newFolderPath) => { + return fs_extra.move(oldFolderPath, newFolderPath, { overwrite: true }); +} + +FS.copyDirectory = (oldFolderPath, newFolderPath) => { + return fs_extra.copy(oldFolderPath, newFolderPath); +} + +FS.deleteDirectory = (folderPath) => { + return fs_extra.remove(folderPath); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/lib-manager.js b/mixly/common/modules/mixly-modules/electron/lib-manager.js new file mode 100644 index 00000000..5b910d90 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/lib-manager.js @@ -0,0 +1,1186 @@ +goog.loadJs('electron', () => { + +goog.require('layui'); +goog.require('Mixly.Env'); +goog.require('Mixly.XML'); +goog.require('Mixly.ScriptLoader'); +goog.require('Mixly.CssLoader'); +goog.require('Mixly.Boards'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Config'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Electron.CloudDownload'); +goog.provide('Mixly.Electron.LibManager'); + +const { + Env, + Electron, + XML, + ScriptLoader, + CssLoader, + Boards, + LayerExt, + Config, + Msg +} = Mixly; + +const fs = Mixly.require('fs'); +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const path = Mixly.require('path'); +const electron_remote = Mixly.require('@electron/remote'); +const compressing = Mixly.require('compressing'); + +const { BOARD, USER } = Config; +const { CloudDownload, LibManager } = Electron; +const { table, element } = layui; +const { dialog, shell } = electron_remote; + +LibManager.URL = { + mixly: BOARD?.lib?.mixly?.url[0], + arduino: BOARD?.lib?.arduino?.url[0], + python: BOARD?.lib?.python?.url[0] +} + +LibManager.LOCAL_IMPORT_FILTERS = { + 'MIXLY': [ + { name: 'Mixly Lib File', extensions: ['xml', 'mil', 'zip'] } + ], + 'ARDUINO': [ + { name: 'ZIP File', extensions: ['zip'] } + ], + 'PYTHON': [ + { name: 'Python File', extensions: ['py'] } + ] +}; + +LibManager.getDefaultXML = () => { + let $toolbox = $('#toolbox'); + return $toolbox.html(); +} + +LibManager.getLibs = (libsDir) => { + let thirdPartyXML = []; + let loadJs = []; + let loadCss = []; + if (!fs_plus.isDirectorySync(libsDir)) + return { + xml: thirdPartyXML, + js: loadJs, + css: loadCss + }; + const libList = fs.readdirSync(libsDir); + for (let libName of libList) { + const nowPath = path.join(libsDir, './' + libName); + if (fs_plus.isDirectorySync(nowPath)) { + const dataList = fs.readdirSync(nowPath); + for (let dataName of dataList) { + const extname = path.extname(dataName); + if (extname !== '.xml') continue; + let text = fs.readFileSync(path.join(nowPath, './' + dataName), 'utf8'); + const $xml = XML.getDom(text, { + libPath: nowPath + }); + for (let i = 0; $xml[i]; i++) { + if (['SCRIPT', 'LINK'].includes($xml[i].nodeName)) { + let loader, src; + if ($xml[i].nodeName == 'SCRIPT') { + loader = loadJs; + src = $($xml[i]).attr('src'); + } else { + loader = loadCss; + src = $($xml[i]).attr('href'); + } + const srcThirdDir = path.join(nowPath, src); + if (fs_plus.isFileSync(srcThirdDir)) { + loader.push(srcThirdDir); + } + } else if ($xml[i].nodeName == 'CATEGORY') { + thirdPartyXML.push($xml[i].outerHTML); + } + } + } + } else { + const extname = path.extname(nowPath); + const fileName = path.basename(nowPath, '.mil'); + if (extname !== '.mil') continue; + const text = fs.readFileSync(nowPath, 'utf8'); + const $mil = $(''); + $mil.append($(text).html()); + thirdPartyXML.push($mil[0].outerHTML); + } + } + return { + xml: thirdPartyXML, + js: loadJs, + css: loadCss + }; +} + +LibManager.convertLibs = (libsDir) => { + if (!fs_plus.isDirectorySync(libsDir)) return; + const libList = fs.readdirSync(libsDir); + for (let libName of libList) { + const libDir = path.join(libsDir, './' + libName); + if (!fs_plus.isDirectorySync(libDir)) continue; + const dataList = fs.readdirSync(libDir); + const blocksDir = path.join(libDir, './block'); + // 将1.x版本xml转化为2.0可用 + for (let data of dataList) { + const extname = path.extname(data); + if (extname !== '.xml') continue; + const xmlPath = path.join(libDir, './' + data); + let xmlData = fs.readFileSync(xmlPath, 'utf8'); + try { + xmlData = xmlData.replace(/\.\.\/\.\.\/blocks\/company\//g, "libraries/ThirdParty/" + libName + "/block/"); + xmlData = xmlData.replace(/\.\.\/\.\.\/generators\/arduino\/company\//g, "libraries/ThirdParty/" + libName + "/generator/"); + fs.writeFileSync(xmlPath, xmlData); + } catch (e) { + console.log(e); + } + } + } +} + +LibManager.loadLibsAndUpdateJsCssList = (doFunc = () => {}) => { + const { + js, + css, + xml + } = LibManager.getLibs(path.join(Env.boardDirPath, './libraries/ThirdParty/')); + Env.thirdPartyXML = xml; + let loadPromise = []; + if (js.length) { + loadPromise.push(new Promise((resolve, reject) => { + LazyLoad.js(js, function () { + resolve(); + }); + })); + } + if (css.length) { + loadPromise.push(new Promise((resolve, reject) => { + LazyLoad.css(css, function () { + resolve(); + }); + })); + } + if (loadPromise.length) + Promise.all(loadPromise) + .catch((error) => { + console.log(error); + }) + .finally(() => { + doFunc(); + }) + else + doFunc(); + Env.thirdPartyCSS = [...Env.thirdPartyCSS, ...(css ?? [])]; + Env.thirdPartyJS = [...Env.thirdPartyJS, ...(js ?? [])]; +} + +LibManager.init = (doFunc = () => {}) => { + Env.defaultXML = LibManager.getDefaultXML(); + Env.thirdPartyXML = []; + LibManager.reloadThirdPartyLibs(doFunc); +} + +LibManager.reloadThirdPartyLibs = (doFunc = () => {}) => { + for (let i = 0; i < Env.thirdPartyJS.length; i++) { + ScriptLoader.removeScript(Env.thirdPartyJS[i]); + } + for (let i = 0; i < Env.thirdPartyCSS.length; i++) { + CssLoader.removeCss(Env.thirdPartyCSS[i]); + } + Env.thirdPartyJS = []; + Env.thirdPartyCSS = []; + $('#toolbox').html(Env.defaultXML); + LibManager.loadLibsAndUpdateJsCssList(function() { + const board = Boards.getSelectedBoardName(); + Boards.updateCategories(board, true); + doFunc(); + }); +} + +LibManager.menuAddEvent = (layero) => { + const thirdPartyPath = path.join(Env.boardDirPath, './libraries/ThirdParty'); + // 左侧菜单状态, 右侧菜单状态×2 + let menuStatus = [0, 0, 0]; + element.tab({ + headerElem: '#libs-menu-options>li', + bodyElem: '#libs-menu-body>.menu-body' + }); + element.render('nav', 'libs-menu-filter'); + // 左侧菜单点击事件 + element.on('tab(libs-menu-filter)', function (data) { + const { index } = data; + if (index === menuStatus[0]) return; + if (index) { + LibManager.onclickManageLibs(); + } else { + LibManager.onclickImportLibs(); + } + menuStatus[0] = index; + }); + // 右侧菜单点击事件 + element.on('tab(import-lib-page-filter)', function (data) { + const { index } = data; + if (index === menuStatus[1]) return; + if (data.index) { + + } else { + + } + menuStatus[1] = index; + }); + // 右侧菜单点击事件 + element.on('tab(del-lib-page-filter)', function (data) { + const { index } = data; + if (index === menuStatus[2]) return; + if (data.index) { + + } else { + + } + menuStatus[2] = index; + }); + // 按钮点击事件 + layero.find('button').off().click(function () { + const $this = $(this); + const mId = $this.attr('m-id'); + let importType, delType; + if (menuStatus[1]) { + if (BOARD?.nav?.compile) { + importType = 'ARDUINO'; + } else { + importType = 'PYTHON'; + } + } else { + importType = 'MIXLY'; + } + if (menuStatus[2]) { + if (BOARD?.nav?.compile) { + delType = 'ARDUINO'; + } else { + delType = 'PYTHON'; + } + } else { + delType = 'MIXLY'; + } + switch (mId) { + case 'cloud-import': + const cloudTableId = menuStatus[1] ? 'cloud-code-lib-table' : 'cloud-mixly-lib-table'; + const cloudCheckStatus = table.checkStatus(cloudTableId); + var selected = cloudCheckStatus.data; + var libList = []; + for (let i = 0; i < selected.length; i++) { + libList.push({ + desPath: thirdPartyPath, + ...selected[i] + }); + } + if (libList.length > 0) { + LibManager.showCloudImportProgress(libList); + } else { + layer.msg(Msg.Lang['libManager.selectAtLeastOneLibInfo'], { time: 1000 }); + } + break; + case 'local-import': + LibManager.showLocalImportDialog(importType); + break; + case 'del': + const delTableId = menuStatus[2] ? 'del-code-lib-table' : 'del-mixly-lib-table'; + const delCheckStatus = table.checkStatus(delTableId); + var selected = delCheckStatus.data; + var libPathList = []; + for (let i = 0; i < selected.length; i++) { + libPathList.push(selected[i].path); + } + if (libPathList.length > 0) { + LibManager.showDelLibsProgress((index) => { + LibManager.delLibs(delType, libPathList, index); + }); + } else { + layer.msg(Msg.Lang['libManager.selectAtLeastOneLibInfo'], { time: 1000 }); + } + break; + case 'open-folder': + const arduinoLibPath = path.join(Env.boardDirPath, 'libraries/myLib'); + const pyLibPath = path.join(Env.boardDirPath, 'build/lib'); + let needOpenedPath; + switch (delType) { + case 'ARDUINO': + needOpenedPath = arduinoLibPath; + break; + case 'PYTHON': + needOpenedPath = pyLibPath; + break; + default: + needOpenedPath = thirdPartyPath; + } + fs_extra.ensureDir(needOpenedPath) + .then(() => { + return shell.openPath(needOpenedPath); + }) + .catch(console.log); + } + }); +} + +LibManager.showManageDialog = () => { + const htmlStr = XML.render(XML.TEMPLATE_STR.LIB_MANAGER_DIV, { + importBoard: Msg.Lang['libManager.import'], + delBoard: Msg.Lang['libManager.manage'], + mixlyLib: 'Mixly', + codeLib: BOARD?.nav?.compile? 'Arduino' : 'Python', + cloudImport: Msg.Lang['libManager.import.cloud'], + localImport: Msg.Lang['libManager.import.local'], + openFolder: Msg.Lang['file.openFolder'], + del: Msg.Lang['libManager.delete'] + }); + LayerExt.open({ + title: [Msg.Lang['libManager.layerTitle'], '35px'], + id: 'lib-manage-layer', + content: htmlStr, + shade: LayerExt.SHADE_ALL, + area: ['60%', '60%'], + min: ['400px', '200px'], + max: ['800px', '400px'], + success: (layero) => { + LibManager.onclickImportLibs(); + LibManager.menuAddEvent(layero); + } + }); +} + +LibManager.compareLibConfig = (cloudConfig) => { + const { version, url } = cloudConfig; + cloudConfig.downloadIndex = true; + const libDir = path.join(Env.boardDirPath, 'libraries/ThirdParty', path.basename(url, '.zip')); + if (fs_plus.isDirectorySync(libDir)) { + const localConfigPath = path.join(libDir, './config.json'); + const localConfig = fs_extra.readJsonSync(localConfigPath, { throws: false }); + if (localConfig !== null) { + if (localConfig.version === version) + cloudConfig.downloadIndex = false; + } + if (cloudConfig.downloadIndex) + cloudConfig.status = Msg.Lang['libManager.pendingUpgrade']; + else + cloudConfig.status = Msg.Lang['libManager.installed']; + } else { + cloudConfig.status = Msg.Lang['libManager.notInstalled']; + } + return cloudConfig; +} + +LibManager.onclickImportLibs = () => { + // 显示mixly云端库 + let mixlyTableConfig = { + id: 'cloud-mixly-lib-table', + elem: '#import-mixly-lib-page', + data: [], + defaultToolbar: [], + title: Msg.Lang['libManager.lib.cloud'], + cols: [[ + { type: 'checkbox', unresize: false, align: "center" }, + { field: 'status', title: Msg.Lang['libManager.lib.status'], sort: true, unresize: false, align: "center", minWidth: 100 }, + { field: 'name', title: Msg.Lang['libManager.lib.name'], sort: true, unresize: false, align: "center", minWidth: 200 }, + { field: 'version', title: Msg.Lang['libManager.lib.version'], unresize: false, align: "center", minWidth: 80 }, + { field: 'desc', title: Msg.Lang['libManager.lib.desc'], unresize: false, align: "center", minWidth: 250 } + ]], + limit: 1000, + skin: 'line', + even: false, + size: 'sm' + }; + // 显示code云端库 + let codeTableConfig = { + id: 'cloud-code-lib-table', + elem: '#import-code-lib-page', + data: [], + defaultToolbar: [], + title: Msg.Lang['libManager.lib.cloud'], + cols: [[ + { type: 'checkbox', unresize: false, align: "center" }, + { field: 'name', title: Msg.Lang['libManager.lib.name'], sort: true, unresize: false, align: "center", minWidth: 200 }, + { field: 'version', title: Msg.Lang['libManager.lib.version'], unresize: false, align: "center", minWidth: 80 }, + { field: 'desc', title: Msg.Lang['libManager.lib.desc'], unresize: false, align: "center", minWidth: 250 } + ]], + limit: 1000, + skin: 'line', + even: false, + size: 'sm' + }; + table.render({ + ...mixlyTableConfig, + text: { + none: Msg.Lang['libManager.json.downloading'] + '...' + } + }); + table.render({ + ...codeTableConfig, + text: { + none: Msg.Lang['libManager.json.downloading'] + '...' + } + }); + + table.on('row(import-mixly-lib-page-filter)', function(obj) { + let $checkbox = obj.tr.first().find('.layui-form-checkbox'); + obj.setRowChecked({ + checked: !$checkbox.hasClass('layui-form-checked') + }); + }); + + const thirdPartyPath = path.join(Env.boardDirPath, './libraries/ThirdParty'); + if (LibManager.URL.mixly) { + CloudDownload.getJson(LibManager.URL.mixly, thirdPartyPath, (message) => { + if (message[0]) { + console.log(message[0]); + table.render({ + ...mixlyTableConfig, + text: { + none: Msg.Lang['libManager.empty'] + } + }); + return; + } + let libsConfig = []; + for (let i of message[1]) { + libsConfig.push(LibManager.compareLibConfig({ ...i })); + } + mixlyTableConfig.data = libsConfig; + table.render(mixlyTableConfig); + }); + } else { + table.render({ + ...mixlyTableConfig, + text: { + none: Msg.Lang['libManager.empty'] + } + }); + } + let codeLibPath, codeLibUrl; + if (BOARD?.nav?.compile) { + codeLibPath = path.join(Env.boardDirPath, './libraries/myLib'); + codeLibUrl = LibManager.URL.arduino; + } else { + codeLibPath = path.join(Env.boardDirPath, './build/lib'); + codeLibUrl = LibManager.URL.python; + } + if (codeLibUrl) { + CloudDownload.getJson(codeLibUrl, codeLibPath, (message) => { + if (message[0]) { + console.log(message[0]); + table.render({ + ...codeTableConfig, + text: { + none: Msg.Lang['libManager.empty'] + } + }); + return; + } + let libsConfig = []; + for (let i of message[1]) { + libsConfig.push(LibManager.compareLibConfig({ ...i })); + } + codeTableConfig.data = libsConfig; + table.render(codeTableConfig); + }); + } else { + table.render({ + ...codeTableConfig, + text: { + none: Msg.Lang['libManager.empty'] + } + }); + } +} + +LibManager.onclickManageLibs = () => { + // 显示mixly云端库 + let mixlyTableConfig = { + id: 'del-mixly-lib-table', + elem: '#del-mixly-lib-page', + data: [], + defaultToolbar: [], + title: Msg.Lang['libManager.manage'], + cols: [[ + { type: 'checkbox', unresize: false, align: "center" }, + { field: 'name', title: Msg.Lang['libManager.lib.name'], sort: true, unresize: false, align: "center", minWidth: 150 }, + { field: 'path', title: Msg.Lang['libManager.lib.path'], unresize: false, align: "center", minWidth: 300 } + ]], + limit: 1000, + skin: 'line', + even: false, + size: 'sm' + }; + // 显示code云端库 + let codeTableConfig = { + id: 'del-code-lib-table', + elem: '#del-code-lib-page', + data: [], + defaultToolbar: [], + title: Msg.Lang['libManager.manage'], + cols: mixlyTableConfig.cols, + limit: 1000, + skin: 'line', + even: false, + size: 'sm' + }; + table.render({ + ...mixlyTableConfig, + text: { + none: Msg.Lang['libManager.lib.local.reading'] + '...' + } + }); + table.render({ + ...codeTableConfig, + text: { + none: Msg.Lang['libManager.lib.local.reading'] + '...' + } + }); + const thirdPartyPath = path.join(Env.boardDirPath, 'libraries/ThirdParty'); + const arduinoLibPath = path.join(Env.boardDirPath, 'libraries/myLib'); + const pythonLibPath = path.join(Env.boardDirPath, 'build/lib'); + let codeLibPath = BOARD?.nav?.compile ? arduinoLibPath : pythonLibPath; + let needReadPathList = [{ + path: thirdPartyPath, + tableConfig: mixlyTableConfig + }, { + path: codeLibPath, + tableConfig: codeTableConfig + }]; + for (let needRead of needReadPathList) { + if (fs_plus.isDirectorySync(needRead.path)) { + fs.readdir(needRead.path, (error, readList) => { + if (error) { + console.log(error); + table.render({ + ...needRead.tableConfig, + text: { + none: Msg.Lang['libManager.lib.local.readFailed'] + } + }); + return; + } + let data = []; + for (let read of readList) { + const extname = path.extname(read); + if (extname === '.json') continue; + data.push({ + name: read, + path: path.join(needRead.path, read) + }); + } + if (data.length) + table.render({ + ...needRead.tableConfig, + data + }); + else + table.render({ + ...needRead.tableConfig, + text: { + none: Msg.Lang['libManager.empty'] + } + }); + }); + } else { + table.render({ + ...needRead.tableConfig, + text: { + none: Msg.Lang['libManager.empty'] + } + }); + } + } +} + +LibManager.showLocalImportDialog = (type) => { + const currentWindow = electron_remote.getCurrentWindow(); + currentWindow.focus(); + let layerNum; + dialog.showOpenDialog(currentWindow, { + title: Msg.Lang['libManager.import'], + defaultPath: Env.clientPath, + buttonLabel: Msg.Lang['nav.btn.ok'], + // 限制能够选择的文件类型 + filters: LibManager.LOCAL_IMPORT_FILTERS[type], + properties: ['openFile', 'showHiddenFiles'], + message: Msg.Lang['libManager.import'] + }).then(result => { + const selectedPath = result.filePaths[0]; + + if (!selectedPath) return; + + console.log('待导入文件路径:', selectedPath); + + LibManager.importFromLocal(type, selectedPath, () => { + layerNum = layer.open({ + type: 1, + id: "import-local-lib-layer", + title: Msg.Lang['libManager.lib.importing'] + "...", + content: $('#mixly-loader-div'), + shade: LayerExt.SHADE_ALL, + closeBtn: 0, + success: function (layero) { + $("#mixly-loader-btn").css('display', 'none'); + }, + end: function () { + $("#mixly-loader-btn").css('display', 'inline-block'); + $('#layui-layer-shade' + layerNum).remove(); + } + }); + }, (error) => { + console.log(error); + layer.msg(error, { time: 1000 }); + }, (error) => { + layer.close(layerNum); + if (error) { + console.log(error); + layer.msg(Msg.Lang['libManager.lib.importFailed'], { time: 1000 }); + } else { + layer.msg(Msg.Lang['libManager.lib.importSucc'], { time: 1000 }); + } + }); + }).catch(error => { + layer.close(layerNum); + console.log(error); + layer.msg(Msg.Lang['libManager.lib.importFailed'], { time: 1000 }); + }); +} + +LibManager.importFromLocal = (type, inPath, sucFunc, errorFunc, endFunc) => { + const extname = path.extname(inPath); + const pyLibPath = path.join(Env.boardDirPath, './build/lib'); + const thirdPartyPath = path.join(Env.boardDirPath, './libraries/ThirdParty'); + if (fs_plus.isFileSync(inPath)) { + switch (extname) { + case '.py': + var dirPath = path.join(inPath, '../'); + if (pyLibPath === dirPath) { + errorFunc(Msg.Lang['libManager.lib.exist']); + return; + } + sucFunc(); + LibManager.importFromLocalWithFile(type, inPath, endFunc); + break; + case '.mil': + var dirPath = path.join(inPath, '../'); + if (thirdPartyPath === dirPath) { + errorFunc(Msg.Lang['libManager.lib.exist']); + return; + } + sucFunc(); + LibManager.importFromLocalWithFile(type, inPath, endFunc); + break; + case '.xml': + var dirPath = path.join(inPath, '../../'); + if (dirPath === thirdPartyPath) { + errorFunc(Msg.Lang['libManager.lib.exist']); + return; + } + sucFunc(); + LibManager.importFromLocalWithFile(type, inPath, endFunc); + break; + case '.zip': + sucFunc(); + LibManager.importFromLocalWithZip(type, inPath, endFunc); + break; + default: + errorFunc(Msg.Lang['file.type.error']); + } + } else { + errorFunc(Msg.Lang['file.notExist']); + } +} + +LibManager.importFromLocalWithFile = (type, filePath, endFunc) => { + const thirdPartyPath = path.join(Env.boardDirPath, './libraries/ThirdParty'); + const extname = path.extname(filePath); + const basename = path.basename(filePath); + let copyPromiseList = []; + switch (extname) { + case '.xml': + const dirPath = path.dirname(filePath); + const dirName = path.basename(dirPath); + const desPath = path.join(thirdPartyPath, dirName) + copyPromiseList.push(LibManager.copyDir(dirPath, desPath)); + break; + case '.mil': + const milPath = path.join(thirdPartyPath, path.basename(filePath)); + copyPromiseList.push(LibManager.copyFile(filePath, milPath)); + break; + case '.py': + const pyPath = path.join(Env.boardDirPath, 'build/lib', path.basename(filePath)); + copyPromiseList.push(LibManager.copyFile(filePath, pyPath)); + break; + default: + layer.msg(Msg.Lang['file.type.error'], { time: 1000 }); + endFunc(Msg.Lang['file.type.error']); + } + Promise.all(copyPromiseList) + .then((message) => { + if (type === 'MIXLY') { + LibManager.reloadThirdPartyLibs(); + } + endFunc(null); + }) + .catch((error) => { + endFunc(error); + }) + .finally(() => { + }); +} + +LibManager.importFromLocalWithZip = (type, filePath, endFunc) => { + const thirdPartyPath = path.join(Env.boardDirPath, './libraries/ThirdParty/'); + const myLibPath = path.join(Env.boardDirPath, './libraries/myLib/'); + let desPath; + switch (type) { + case 'MIXLY': + desPath = thirdPartyPath; + break; + case 'ARDUINO': + desPath = myLibPath; + break; + default: + endFunc(Msg.Lang['libManager.lib.unzipFailed']); + return; + } + LibManager.unZip(filePath, desPath, false, (error) => { + if (type === 'MIXLY') + LibManager.reloadThirdPartyLibs(); + endFunc(error); + }); +} + +LibManager.delLibs = (type, libPathList, layerNum) => { + let delPromiseList = []; + for (let libPath of libPathList) { + delPromiseList.push(new Promise((resolve, reject) => { + fs_extra.remove(libPath, (error) => { + resolve(error); + }); + })); + } + Promise.all(delPromiseList) + .then((message) => { + LibManager.onclickManageLibs(); + if (type === 'MIXLY') { + LibManager.reloadThirdPartyLibs(); + } + }) + .catch((error) => { + console.log(error); + }) + .finally(() => { + layer.close(layerNum); + }); +} + +LibManager.showDelLibsProgress = (sucFunc) => { + const layerNum = layer.open({ + type: 1, + id: "del-local-lib-layer", + title: Msg.Lang['libManager.lib.deleting'] + "...", + content: $('#mixly-loader-div'), + shade: LayerExt.SHADE_ALL, + closeBtn: 0, + success: function (layero, index) { + $("#mixly-loader-btn").css('display', 'none'); + sucFunc(index); + }, + end: function () { + $('#layui-layer-shade' + layerNum).remove(); + $("#mixly-loader-btn").css('display', 'inline-block'); + } + }); +} + +LibManager.unZip = (inPath, desPath, delZip, endFunc = (errorMessage) => {}) => { + const dirName = path.basename(inPath, '.zip'); + const unZipPath = path.join(desPath, dirName); + compressing.zip.uncompress(inPath, desPath, { + zipFileNameEncoding: 'GBK' + }) + .then(() => { + if (delZip) + try { + fs.unlinkSync(inPath); + } catch (error) { + console.log(error); + } + endFunc(null); + }) + .catch((error) => { + endFunc(error); + }); +} + +LibManager.copyDir = (startPath, endPath) => { + return new Promise((resolve, reject) => { + fs_extra.ensureDir(endPath) + .then(() => { + return fs_extra.emptyDir(endPath); + }) + .then(() => { + return fs_extra.copy(startPath, endPath); + }) + .then(() => { + resolve({ error: null, endPath }); + }) + .catch((error) => { + resolve({ error, endPath }); + }); + }); +} + +LibManager.copyFile = (startPath, endPath) => { + return new Promise((resolve, reject) => { + const endDirPath = path.dirname(endPath); + fs_extra.ensureDir(endDirPath) + .then(() => { + return fs_extra.copy(startPath, endPath); + }) + .then(() => { + resolve({ error: null, endPath }); + }) + .catch((error) => { + resolve({ error, endPath }); + }); + }); +} + +LibManager.showCloudImportProgress = (importList, endFunc = (errorMessages) => {}) => { + const parentDom = $('
'); + parentDom.css({ + 'overflow': 'hidden', + 'width': '100%', + 'height': '100%', + 'display': 'none' + }); + const childDom = $('
'); + childDom.css({ + 'overflow-x': 'hidden', + 'overflow-y': 'auto', + 'left': '5px', + 'right': '5px', + 'top': '5px', + 'bottom': '5px', + 'position': 'absolute' + }); + for (let i in importList) { + const info = importList[i]; + const panelConfig = { + panelId: i + '-panel-id', + name: info.name, + progressFilter: i + '-progress-filter', + progressStatusId: i + '-progress-status-id' + }; + childDom.append( + XML.render(XML.TEMPLATE_STR.PROGRESS_BAR_DIV, panelConfig) + ); + } + parentDom.append(childDom); + $('body').append(parentDom); + element.render('progress'); + LayerExt.open({ + title: Msg.Lang['libManager.lib.importing'] + '...', + id: 'setting-menu-layer1', + content: parentDom, + shade: LayerExt.SHADE_ALL, + area: ['40%', '60%'], + max: ['800px', (importList.length * 106 + 42) + 'px'], + min: ['500px', '100px'], + success: (layero, index) => { + layero.find('.layui-layer-setwin').css('display', 'none'); + LibManager.importFromCloud(importList, layero, index); + }, + end: () => { + parentDom.remove(); + } + }); +} + +LibManager.importFromCloud = (importList, layero, layerIndex) => { + let importPromise = []; + for (let i in importList) { + importList[i].index = i; + importPromise.push(LibManager.importWithUrl(importList[i])); + } + + Promise.all(importPromise) + .then((message) => { + let sucTimes = 0; + let failedTimes = 0; + for (let i of message) { + const progressStatusDom = $('#' + i.index + '-progress-status-id'); + const panelDom = $('#' + i.index + '-panel-id'); + const cardHeadDom = panelDom.children('.layui-card-header').first(); + progressStatusDom.removeClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + if (i.error) { + progressStatusDom.addClass('layui-icon-close-fill'); + cardHeadDom.html(i.name + ' - ' + Msg.Lang['libManager.lib.importFailed']); + failedTimes++; + console.log(i.error); + } else { + progressStatusDom.addClass('layui-icon-ok-circle'); + cardHeadDom.html(i.name + ' - ' + Msg.Lang['libManager.lib.importSucc']); + sucTimes++; + // BoardManager.writePackageConfig(i); + } + } + const sucIcon = ``; + const errIcon = ``; + layer.title(Msg.Lang['libManager.lib.importSucc'] + ' ' + sucTimes + sucIcon + ' ' + failedTimes + errIcon, layerIndex); + }) + .catch((error) => { + layer.title(Msg.Lang['libManager.lib.importFailed'], layerIndex); + }) + .finally(() => { + layero.find('.layui-layer-setwin').css('display', 'block'); + LibManager.onclickImportLibs(); + LibManager.reloadThirdPartyLibs(); + }); +} + +LibManager.writeLibConfig = (info) => { + const { + desPath, + version, + name, + url + } = info; + if (!name) return; + const libDir = path.join(desPath, path.basename(url, '.zip')); + if (fs_plus.isDirectorySync(libDir)) { + const configPath = path.join(libDir, 'config.json'); + const libConfig = { + version + }; + try { + fs_extra.outputJsonSync(configPath, libConfig, { + spaces: ' ' + }); + } catch (error) { + console.log(error); + } + } +} + +/*{ + "index": Number, + "desPath": String, + "error": Object, + "name": "TFT", + "version": "1.0.0", + "desc": "TFT彩色屏幕扩展库", + "url": "https://gitee.com/mixly2/cloud-libraries/raw/master/cloud-libs/c_common/TFT.zip" +}*/ +LibManager.importWithUrl = (info) => { + return new Promise((resolve, reject) => { + if (!info.url) { + info.error = 'url读取出错'; + resolve(info); + } + // 下载板卡文件 + LibManager.downloadPromise(info, { + desPath: path.join(Env.clientPath, './download'), + url: info.downloadIndex ? info.url : 'None', + startMessage: Msg.Lang['libManager.lib.donwloading'] + '...', + endMessage: Msg.Lang['libManager.lib.donwloadSucc'], + errorMessage: Msg.Lang['libManager.lib.donwloadFailed'] + }) + .then((newInfo) => { + if (newInfo.error) + throw newInfo.error; + else + // 解压板卡文件 + return LibManager.unZipPromise(newInfo, { + desPath: newInfo.desPath, + zipPath: newInfo.downloadPath, + startMessage: Msg.Lang['libManager.lib.unzipping'] + '...', + endMessage: Msg.Lang['libManager.lib.unzipSucc'], + errorMessage: Msg.Lang['libManager.lib.unzipFailed'] + }); + }) + .then((newInfo) => { + if (newInfo.error) + throw newInfo.error; + const panelDom = $('#' + newInfo.index + '-panel-id'); + const cardHeadDom = panelDom.children('.layui-card-header').first(); + const progressStatusDom = $('#' + newInfo.index + '-progress-status-id'); + if (!info.downloadIndex) { + progressStatusDom.removeClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + cardHeadDom.html(newInfo.name + ' - ' + Msg.Lang['libManager.lib.latestVersion']); + progressStatusDom.addClass('layui-icon-ok-circle'); + element.progress(newInfo.index + '-progress-filter', '100%'); + element.render('progress', newInfo.index + '-progress-filter'); + } else { + LibManager.writeLibConfig(newInfo); + } + resolve(newInfo); + }) + .catch((error) => { + info.error = error; + resolve(info); + }); + }); +} + +LibManager.downloadPromise = (info, config) => { + return new Promise((resolve, reject) => { + const DEFAULT_CONFIG = { + desPath: path.join(Env.clientPath, './download'), + url: null, + startMessage: Msg.Lang['libManager.lib.donwloading'] + '...', + endMessage: Msg.Lang['libManager.lib.donwloadSucc'], + errorMessage: Msg.Lang['libManager.lib.donwloadFailed'] + }; + if (typeof config !== 'object') + config = DEFAULT_CONFIG + else + config = { ...DEFAULT_CONFIG, ...config }; + + const { + desPath, + url, + startMessage, + endMessage, + errorMessage + } = config; + + if (!url || url === 'None' || !desPath) { + info.error = null; + info.downloadPath = null; + resolve(info); + return; + } + + try { + fs_extra.ensureDirSync(desPath); + } catch (error) { + info.error = error; + info.downloadPath = null; + resolve(info); + return; + } + const panelDom = $('#' + info.index + '-panel-id'); + const cardHeadDom = panelDom.children('.layui-card-header').first(); + cardHeadDom.html(info.name + ' - ' + startMessage); + const progressStatusDom = $('#' + info.index + '-progress-status-id'); + progressStatusDom.removeClass('layui-icon-ok-circle layui-icon-close-fill'); + progressStatusDom.addClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + element.progress(info.index + '-progress-filter', '0%'); + element.render('progress', info.index + '-progress-filter'); + CloudDownload.download(url, desPath, { + progress: (stats) => { + const { speed, progress } = stats; + const speedUnit = ['B/s', 'KB/s', 'MB/s', 'GB/s']; + let type = 0; + let nowProgress = parseInt(progress); + nowProgress = nowProgress > 100 ? 100 : nowProgress; + let nowSpeed = speed; + for (let i = 0; i < 3; i++) { + if (nowSpeed / 1000 > 1) { + nowSpeed /= 1024; + type++; + } else { + break; + } + } + + nowSpeed = nowSpeed.toFixed(1); + cardHeadDom.html(info.name + ' - ' + startMessage + ' - ' + nowSpeed + speedUnit[type]); + element.progress(info.index + '-progress-filter', parseInt(progress) + '%'); + element.render('progress', info.index + '-progress-filter'); + }, + error: (message) => { + progressStatusDom.removeClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + progressStatusDom.addClass('layui-icon-close-fill'); + cardHeadDom.html(info.name + ' - ' + errorMessage); + }, + end: (downloadInfo) => { + progressStatusDom.removeClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + progressStatusDom.addClass('layui-icon-ok-circle'); + cardHeadDom.html(info.name + ' - ' + endMessage); + }, + timeout: this.error + }) + .then((message) => { + if (message[0]) + throw message[0]; + info.error = null; + info.downloadPath = message[1]; + resolve(info); + }) + .catch((error) => { + info.error = error; + info.downloadPath = null; + resolve(info); + }); + }); +} + +LibManager.unZipPromise = (info, config) => { + return new Promise((resolve, reject) => { + const DEFAULT_CONFIG = { + desPath: path.join(Env.clientPath, './download'), + zipPath: null, + startMessage: Msg.Lang['libManager.lib.unzipping'] + '...', + endMessage: Msg.Lang['libManager.lib.unzipSucc'], + errorMessage: Msg.Lang['libManager.lib.unzipFailed'], + delZip: true + }; + if (typeof config !== 'object') + config = DEFAULT_CONFIG + else + config = { ...DEFAULT_CONFIG, ...config }; + + const { + zipPath, + desPath, + delZip, + startMessage, + endMessage, + errorMessage + } = config; + + if (!zipPath || !desPath) { + info.error = null; + info.unZipPath = null; + resolve(info); + return; + } + const panelDom = $('#' + info.index + '-panel-id'); + const cardHeadDom = panelDom.children('.layui-card-header').first(); + cardHeadDom.html(info.name + ' - ' + startMessage); + const progressStatusDom = $('#' + info.index + '-progress-status-id'); + progressStatusDom.removeClass('layui-icon-ok-circle layui-icon-close-fill'); + progressStatusDom.addClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + element.progress(info.index + '-progress-filter', '0%'); + element.render('progress', info.index + '-progress-filter'); + LibManager.unZip(zipPath, desPath, delZip, (error) => { + if (error) { + progressStatusDom.removeClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + progressStatusDom.addClass('layui-icon-close-fill'); + cardHeadDom.html(info.name + ' - ' + errorMessage); + info.error = error; + info.unZipPath = null; + resolve(info); + } else { + progressStatusDom.removeClass('layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop'); + progressStatusDom.addClass('layui-icon-ok-circle'); + cardHeadDom.html(info.name + ' - ' + endMessage); + info.error = null; + info.unZipPath = desPath; + element.progress(info.index + '-progress-filter', '100%'); + element.render('progress', info.index + '-progress-filter'); + resolve(info); + } + }) + }); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/loader.js b/mixly/common/modules/mixly-modules/electron/loader.js new file mode 100644 index 00000000..47d07be9 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/loader.js @@ -0,0 +1,64 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.Url'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.Electron.Serial'); +goog.require('Mixly.Electron.PythonShell'); +goog.require('Mixly.Electron.Events'); +goog.provide('Mixly.Electron.Loader'); + +const { + Url, + Config, + Env, + Electron +} = Mixly; + +const { BOARD } = Config; + +const { + Serial, + PythonShell, + Loader +} = Electron; + + +Loader.onbeforeunload = function(reload = false) { + const pageReload = (href) => { + if (!reload) { + window.location.replace(href); + } else { + window.location.reload(true); + } + } + let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' }); + let endPromise = []; + const { mainStatusBarTabs } = Mixly; + Serial.getCurrentPortsName().map((name) => { + const statusBarSerial = mainStatusBarTabs.getStatusBarById(name); + if (statusBarSerial) { + endPromise.push(statusBarSerial.close()); + } + }); + endPromise.push(PythonShell.stop()); + Promise.all(endPromise) + .finally(() => { + pageReload(href); + }); +}; + +Loader.closePort = (serialport) => { + return new Promise((resolve, reject) => { + serialport.close(() => { + resolve(); + }); + }) +} + +Loader.reload = () => { + Loader.onbeforeunload(true); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/python-shell.js b/mixly/common/modules/mixly-modules/electron/python-shell.js new file mode 100644 index 00000000..ebe716c2 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/python-shell.js @@ -0,0 +1,214 @@ +goog.loadJs('electron', () => { + +goog.require('dayjs.duration'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.MString'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.PythonShell'); + +const { + Env, + Msg, + Debug, + Workspace, + MString, + Electron +} = Mixly; + +const iconv_lite = Mixly.require('iconv-lite'); +const python_shell = Mixly.require('python-shell'); +const child_process = Mixly.require('node:child_process'); +const fs_extra = Mixly.require('fs-extra'); + + +class PythonShell { + static { + this.ENCODING = Env.currentPlatform == 'win32' ? 'cp936' : 'utf-8'; + this.pythonShell = null; + + this.init = function () { + this.pythonShell = new PythonShell(); + } + + this.run = function () { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + return this.pythonShell.run(code); + } + + this.stop = function () { + return this.pythonShell.stop(); + } + } + + #shell_ = null; + #statusBarTerminal_ = null; + #options_ = { + pythonPath: Env.python3Path, + pythonOptions: ['-u'], + encoding: 'binary', + mode: 'utf-8' + }; + #cursor_ = { + row: 0, + column: 0 + }; + #prompt_ = ''; + #waittingForInput_ = false; + #running_ = false; + #onCursorChangeEvent_ = () => this.#onCursorChange_(); + #commands_ = [ + { + name: 'REPL-Enter', + bindKey: 'Enter', + exec: (editor) => { + const session = editor.getSession(); + const cursor = session.selection.getCursor(); + if (cursor.row === this.#cursor_.row) { + const newPos = this.#statusBarTerminal_.getEndPos(); + let str = this.#statusBarTerminal_.getValueRange(this.#cursor_, newPos); + str = str.replace(this.#prompt_, ''); + this.#shell_.stdin.write(escape(str) + '\n'); + this.#statusBarTerminal_.addValue('\n'); + this.#exitInput_(); + return true; + } + return false; + } + }, { + name: 'REPL-ChangeEditor', + bindKey: 'Delete|Ctrl-X|Backspace', + exec: (editor) => { + const session = editor.getSession(); + const cursor = session.selection.getCursor(); + if (cursor.row < this.#cursor_.row || cursor.column <= this.#cursor_.column) { + return true; + } + return false; + } + } + ]; + constructor(config) { + Object.assign(this.#options_, config); + const { mainStatusBarTabs } = Mixly; + this.#statusBarTerminal_ = mainStatusBarTabs.getStatusBarById('output'); + } + + #addEventsListener_() { + const { stdout, stderr } = this.#shell_; + stdout.setEncoding('binary'); + stdout.on('data', (data) => { + data = iconv_lite.decode(Buffer.from(data, 'binary'), PythonShell.ENCODING); + data = MString.decode(data); + this.#statusBarTerminal_.addValue(data); + const keyIndex = data.lastIndexOf('>>>'); + if (keyIndex !== -1) { + this.#prompt_ = data.substring(keyIndex); + setTimeout(() => this.#enterInput_(), 500); + } + }); + stderr.setEncoding('binary'); + stderr.on('data', (data) => { + data = iconv_lite.decode(Buffer.from(data, 'binary'), PythonShell.ENCODING); + data = MString.decode(data); + data = data.replace(/(? { + try { + code = code.replace(/(? { + this.#statusBarTerminal_.setValue(`${Msg.Lang['shell.running']}...\n`); + const startTime = Number(new Date()); + this.#shell_ = new python_shell.PythonShell(Env.pyFilePath, this.#options_); + this.#running_ = true; + this.#addEventsListener_(); + this.#shell_.on('close', (code) => { + this.#running_ = false; + const endTime = Number(new Date()); + const duration = dayjs.duration(endTime - startTime).format('HH:mm:ss.SSS'); + this.#statusBarTerminal_.addValue(`\n==${Msg.Lang['shell.finish']}(${Msg.Lang['shell.timeCost']} ${duration})==`); + }); + }) + .catch(Debug.error); + } + + stop() { + return new Promise((resolve, reject) => { + if (this.#waittingForInput_) { + this.#exitInput_(); + } + if (this.#running_) { + this.#shell_.childProcess.on('exit', () => { + resolve(); + }); + this.#shell_.stdin.end(); + this.#shell_.stdout.end(); + if (Env.currentPlatform === 'win32') { + child_process.exec(`taskkill /pid ${this.#shell_.childProcess.pid} /f /t`); + } else { + this.#shell_.kill('SIGTERM'); + } + } else { + resolve(); + } + }); + } +} + +Electron.PythonShell = PythonShell; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/serial.js b/mixly/common/modules/mixly-modules/electron/serial.js new file mode 100644 index 00000000..22f4a6db --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/serial.js @@ -0,0 +1,272 @@ +goog.loadJs('electron', () => { + +goog.require('Mixly.Serial'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.MArray'); +goog.require('Mixly.Config'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.Serial'); + +const child_process = Mixly.require('node:child_process'); +const serialport = Mixly.require('serialport'); + +const { + SerialPort, + ReadlineParser, + ByteLengthParser +} = serialport; + +const { + Serial, + Env, + Msg, + Debug, + MArray, + Config, + Electron +} = Mixly; + +const { BOARD } = Config; + + +class ElectronSerial extends Serial { + static { + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.getPorts = async function () { + return new Promise((resolve, reject) => { + if (Env.currentPlatform === 'linux') { + child_process.exec('ls /dev/ttyACM* /dev/tty*USB*', (err, stdout, stderr) => { + let portsName = MArray.unique(stdout.split('\n')); + let newPorts = []; + for (let i = 0; i < portsName.length; i++) { + if (!portsName[i]) { + continue; + } + newPorts.push({ + vendorId: 'None', + productId: 'None', + name: portsName[i] + }); + } + resolve(newPorts); + }); + } else { + SerialPort.list().then(ports => { + let newPorts = []; + for (let i = 0; i < ports.length; i++) { + let port = ports[i]; + newPorts.push({ + vendorId: port.vendorId, + productId: port.productId, + name: port.path + }); + } + resolve(newPorts); + }).catch(reject); + } + }); + } + + this.refreshPorts = function () { + this.getPorts() + .then((ports) => { + Serial.renderSelectBox(ports); + }) + .catch(Debug.error); + } + } + + #serialport_ = null; + #parserBytes_ = null; + #parserLine_ = null; + + constructor(port) { + super(port); + } + + #addEventsListener_() { + this.#parserBytes_.on('data', (buffer) => { + this.onBuffer(buffer); + }); + + this.#parserLine_.on('data', (str) => { + this.onString(str); + }); + + this.#serialport_.on('error', (error) => { + this.onError(String(error)); + this.onClose(1); + }); + + this.#serialport_.on('open', () => { + this.onOpen(); + }); + + this.#serialport_.on('close', () => { + this.onClose(1); + }); + } + + async open(baud) { + return new Promise((resolve, reject) => { + const portsName = Serial.getCurrentPortsName(); + const currentPort = this.getPortName(); + if (!portsName.includes(currentPort)) { + reject('无可用串口'); + return; + } + if (this.isOpened()) { + resolve(); + return; + } + baud = baud ?? this.getBaudRate(); + + this.#serialport_ = new SerialPort({ + path: currentPort, + baudRate: baud, // 波特率 + dataBits: 8, // 数据位 + parity: 'none', // 奇偶校验 + stopBits: 1, // 停止位 + flowControl: false, + autoOpen: false, // 不自动打开 + rtscts: BOARD?.serial?.rts ?? false + }, false); + this.#parserBytes_ = this.#serialport_.pipe(new ByteLengthParser({ length: 1 })); + this.#parserLine_ = this.#serialport_.pipe(new ReadlineParser()); + this.#serialport_.open((error) => { + if (error) { + this.onError(error); + reject(error); + } else { + super.open(baud); + this.setBaudRate(baud); + resolve(); + } + }); + this.#addEventsListener_(); + }); + } + + async close() { + return new Promise((resolve, reject) => { + if (!this.isOpened()) { + resolve(); + return; + } + super.close(); + this.#serialport_.close((error) => { + if (error) { + reject(error); + } else { + resolve(); + } + }); + }); + } + + async setBaudRate(baud) { + return new Promise((resolve, reject) => { + if (!this.isOpened() + || this.getRawBaudRate() === baud + || !this.baudRateIsLegal(baud)) { + resolve(); + return; + } + this.#serialport_.update({ baudRate: baud }, (error) => { + if (error) { + reject(error); + return; + } + super.setBaudRate(baud); + this.setDTRAndRTS(this.getDTR(), this.getRTS()).finally(resolve); + }); + }); + } + + async send(data) { + return new Promise((resolve, reject) => { + if (!this.isOpened()) { + resolve(); + return; + } + this.#serialport_.write(data, (error) => { + if (error) { + reject(error); + } else { + resolve(); + } + }); + }); + } + + async sendString(str) { + return this.send(str); + } + + async sendBuffer(buffer) { + return this.send(buffer); + } + + async setDTRAndRTS(dtr, rts) { + return new Promise((resolve, reject) => { + if (!this.isOpened()) { + resolve(); + return; + } + this.#serialport_.set({ dtr, rts }, (error) => { + if (error) { + reject(error); + } else { + super.setDTRAndRTS(dtr, rts); + resolve(); + } + }); + }); + } + + async setDTR(dtr) { + return this.setDTRAndRTS(dtr, this.getRTS()); + } + + async setRTS(rts) { + return this.setDTRAndRTS(this.getDTR(), rts); + } + + onBuffer(buffer) { + super.onBuffer(buffer); + for (let i = 0; i < buffer.length; i++) { + super.onByte(buffer[i]); + } + const string = this.decodeBuffer(buffer); + if (!string) { + return; + } + for (let char of string) { + super.onChar(char); + } + } + + async dispose() { + await super.dispose(); + this.#parserBytes_ = null; + this.#parserLine_ = null; + this.#serialport_ = null; + } +} + +Electron.Serial = ElectronSerial; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/shell.js b/mixly/common/modules/mixly-modules/electron/shell.js new file mode 100644 index 00000000..50b4d5c7 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/shell.js @@ -0,0 +1,96 @@ +goog.loadJs('electron', () => { + +goog.require('dayjs.duration'); +goog.require('Mixly.Env'); +goog.require('Mixly.MString'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.Shell'); + +const { + Env, + MString, + Electron +} = Mixly; + +const child_process = Mixly.require('node:child_process'); +const iconv_lite = Mixly.require('iconv-lite'); + +class Shell { + static { + this.ENCODING = Env.currentPlatform == 'win32' ? 'cp936' : 'utf-8'; + } + + #shell_ = null; + #killed_ = false; + constructor() {} + + #addEventsListener_() { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const { stdout, stderr } = this.#shell_; + stdout.on('data', (data) => { + if (data.length > 1000) { + return; + } + data = iconv_lite.decode(Buffer.from(data, 'binary'), 'utf-8'); + statusBarTerminal.addValue(data); + }); + stderr.on('data', (data) => { + let lines = data.split('\n'); + for (let i in lines) { + let encoding = 'utf-8'; + if (lines[i].indexOf('can\'t open device') !== -1) { + encoding = Shell.ENCODING; + } + lines[i] = iconv_lite.decode(Buffer.from(lines[i], 'binary'), encoding); + } + data = lines.join('\n'); + data = MString.decode(data); + statusBarTerminal.addValue(data); + }); + } + + exec(command) { + return new Promise((resolve, reject) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const startTime = Number(new Date()); + this.#shell_ = child_process.exec(command, { + maxBuffer: 4096 * 1000000, + encoding: 'binary' + }); + this.#addEventsListener_(); + this.#shell_.on('close', (code) => { + this.#killed_ = true; + if (code === null) { + code = 1; + } + const endTime = Number(new Date()); + const duration = dayjs.duration(endTime - startTime).format('HH:mm:ss.SSS'); + const info = { code, time: duration }; + resolve(info); + }); + }); + } + + kill() { + if (this.#killed_) { + return; + } + this.#shell_.stdin.end(); + this.#shell_.stdout.end(); + if (Env.currentPlatform === 'win32') { + child_process.exec(`taskkill /pid ${this.#shell_.pid} /f /t`); + } else { + this.#shell_.kill('SIGTERM'); + } + } + + getShell() { + return this.#shell_; + } +} + +Mixly.Electron.Shell = Shell; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/wiki-generator.js b/mixly/common/modules/mixly-modules/electron/wiki-generator.js new file mode 100644 index 00000000..93a50ef8 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/wiki-generator.js @@ -0,0 +1,154 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Blockly'); +goog.require('Mustache'); +goog.require('Mixly.Env'); +goog.require('Mixly.IdGenerator'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.WikiGenerator'); + +const { + Env, + IdGenerator, + Electron +} = Mixly; +const fs_extra = Mixly.require('fs-extra'); +const fs = Mixly.require('fs'); + +class WikiGenerator { + static { + this.WIKI_PAGE_FILE = goog.readFileSync(path.join(Env.templatePath, 'markdown/wiki-page-file.md')); + this.WIKI_PAGE_DIR = goog.readFileSync(path.join(Env.templatePath, 'markdown/wiki-page-dir.md')); + } + + #$xml_ = null; + #desPath_ = ''; + #tree_ = []; + constructor(workspace, generator, $xml, desPath) { + this.#$xml_ = $xml; + this.#desPath_ = desPath; + this.workspace = workspace; + this.generator = generator; + } + + buildTree($nodes) { + let output = []; + for (let i = 0; i < $nodes.length; i++) { + let child = {}; + child.id = $nodes[i].getAttribute('id') ?? IdGenerator.generate(); + if ($nodes[i].nodeName == 'CATEGORY') { + child.name = $nodes[i].getAttribute('name') ?? child.id; + child.children = this.buildTree($($nodes[i]).children()); + output.push(child); + } else if ($nodes[i].nodeName == 'BLOCK') { + child.name = $nodes[i].getAttribute('type') ?? child.id; + child.children = false; + child.xml = $nodes[i].outerHTML; + output.push(child); + } + } + return output; + } + + async generate() { + let output = this.buildTree(this.#$xml_.children()); + fs_extra.ensureDirSync('./outputBlock/'); + fs_extra.emptyDirSync('./outputBlock/'); + let info = await this.generateWikiPage('./outputBlock/', { + title: 'Micropython ESP32', + order: 1 + }, output); + fs_extra.outputFileSync(path.join('./outputBlock/', 'README.md'), info.md); + } + + generateImage(desPath) { + return new Promise((resolve, reject) => { + Blockly.Screenshot.workspaceToSvg_(this.workspace, (datauri) => { + const base64 = datauri.replace(/^data:image\/\w+;base64,/, ''); + const dataBuffer = new Buffer(base64, 'base64'); + fs_extra.outputFile(desPath, dataBuffer, (error) => { + resolve(error); + }); + }); + }); + } + + async generateWikiPage(rootPath, parentInfo, nodes) { + let config = { + id: parentInfo.id, + title: parentInfo.title, + order: parentInfo.order + }; + let blocksNum = 0; + for (let node of nodes) { + if (!node.children) { + blocksNum += 1; + } + } + config.index = !!blocksNum; + if (blocksNum) { + let blocks = []; + for (let node of nodes) { + if (node.children) { + continue; + } + this.workspace.clear(); + let xmlNode = Blockly.utils.xml.textToDom(`${node.xml}`); + Blockly.Xml.domToWorkspace(xmlNode, this.workspace); + let code = this.generator.workspaceToCode(this.workspace) || ''; + code = code.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/g, function (s) { + try { + return decodeURIComponent(s.replace(/_/g, '%')); + } catch (error) { + return s; + } + }); + await this.generateImage(path.join(rootPath, '../assets', parentInfo.title, node.id + '.png')) + blocks.push({ + imgPath: `./assets/${parentInfo.title}/${node.id}.png`, + code: code, + type: node.name + }); + } + config.blocks = blocks; + return { + file: true, + md: Mustache.render(WikiGenerator.WIKI_PAGE_FILE, config) + }; + } else { + let index = 0; + for (let i in nodes) { + if (!nodes[i].children) { + continue; + } + index += 1; + let order = String(index * 5); + let mdIndex = Array(4 - Math.min(order.length, 4)).fill('0').join('') + order; + let desPath = path.join(rootPath, mdIndex + '-' + nodes[i].id); + let info = await this.generateWikiPage(desPath, { + id: nodes[i].id, + title: nodes[i].name, + order: order, + }, nodes[i].children); + if (info.file) { + fs_extra.outputFileSync(`${desPath}.md`, info.md); + } else if (!info.isEmpty) { + fs_extra.outputFileSync(path.join(desPath, 'README.md'), info.md); + } else if (info.isEmpty) { + index -= 1; + } + } + config.blocks = []; + return { + file: false, + isEmpty: !index, + md: Mustache.render(WikiGenerator.WIKI_PAGE_DIR, config) + }; + } + } +} + +Electron.WikiGenerator = WikiGenerator; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/electron/wiki-manager.js b/mixly/common/modules/mixly-modules/electron/wiki-manager.js new file mode 100644 index 00000000..1bdb03b3 --- /dev/null +++ b/mixly/common/modules/mixly-modules/electron/wiki-manager.js @@ -0,0 +1,284 @@ +goog.loadJs('electron', () => { + +goog.require('path'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Electron'); +goog.provide('Mixly.Electron.WikiManager'); + +const { + Config, + Env, + Msg, + Electron +} = Mixly; + +const { WikiManager } = Electron; + +const { BOARD } = Config; + +const fs = Mixly.require('fs'); +const fs_plus = Mixly.require('fs-plus'); +const fs_extra = Mixly.require('fs-extra'); +const path = Mixly.require('path'); +const json2md = Mixly.require('json2md'); +const electron_localshortcut = Mixly.require('electron-localshortcut'); +const electron_remote = Mixly.require('@electron/remote'); +const { ipcMain } = electron_remote; + + +class WikiPage { + constructor(indexPath, gotoInfo = null) { + this.gotoInfo = gotoInfo; + this.updateContentFile(); + this.win = Electron.newBrowserWindow(indexPath); + this.isDestroyed = false; + this.addReceiveCommandEvent(); + this.addLocalShortcutEvent(); + this.win.on('close', () => { + this.isDestroyed = true; + }); + $(window).unload(() => { + if (!this.isDestroyed) + this.win.close(); + }); + } + + addLocalShortcutEvent() { + //打开或关闭开发者工具 + electron_localshortcut.register(this.win, 'CmdOrCtrl+Shift+I', () => { + if (!this.isDestroyed) + this.win.webContents.toggleDevTools(); + }); + + //重载页面 + electron_localshortcut.register(this.win, 'CmdOrCtrl+R', () => { + this.reload(); + }); + } + + addReceiveCommandEvent() { + ipcMain.on('command', (event, command) => { + if (typeof command !== 'object') return; + + switch (command.func) { + case 'getPath': + this.updateWiki(); + break; + } + }); + } + + sendCommand(command) { + if (this.isDestroyed || typeof command !== 'object') return; + this.win.webContents.send('command', command); + } + + reload() { + if (!this.isDestroyed) { + this.updateContentFile(); + this.win.reload(); + } + } + + getPagePath(contentPath, contentList) { + if (typeof contentList !== 'object' || !contentPath.length) return null; + if (contentPath.length === 1) { + for (let key in contentList) { + const child = contentList[key]; + if (child?.link?.title !== contentPath[0]) { + continue; + } + const { title, source } = child.link; + if (title !== contentPath[0] || typeof source !== 'string') { + return null; + } + try { + const filePath = source.match(/(?<=(\?file=))[^\s]*/g); + if (filePath?.length) { + return filePath[0]; + } + } catch (error) { + console.log(error); + } + return null; + } + return null; + } else { + for (let key in contentList) { + const child = contentList[key]; + if (child + && child.length === 2 + && child[0].h5 === contentPath[0]) { + let childPath = [ ...contentPath ]; + childPath.shift(); + return this.getPagePath(childPath, child[1].ul); + } + } + } + } + + goto(pageList, scrollPos) { + const args = []; + const pagePath = this.getPagePath(pageList, this.contentList); + if (!pageList) return; + args.push(pagePath); + scrollPos && args.push(scrollPos); + this.sendCommand({ + func: 'goto', + args + }); + this.win.focus(); + } + + updateContentFile() { + const wikiContentPath = path.join(Env.boardDirPath, 'wiki/content.md'); + const defaultWikiPath = path.join(Env.boardDirPath, 'wiki/wiki-libs/' + Msg.nowLang); + const wikiHomePagePath = path.join(defaultWikiPath, 'home'); + const thirdPartyLibsPath = path.join(Env.boardDirPath, 'libraries/ThirdParty/'); + const changelogPath = path.join(Env.clientPath, 'CHANGELOG'); + const wikiList = []; + if (fs_plus.isFileSync(wikiHomePagePath + '.md')) + wikiList.push({ + h4: { + link: { + title: Msg.Lang['wiki.home'], + source: '?file=' + encodeURIComponent(wikiHomePagePath) + } + } + }); + if (fs_plus.isDirectorySync(defaultWikiPath)) { + const childContentList = this.getContentJson(defaultWikiPath, BOARD.boardType); + if (childContentList) + wikiList.push(childContentList); + } + if (fs_plus.isDirectorySync(thirdPartyLibsPath)) { + const libsName = fs.readdirSync(thirdPartyLibsPath); + for (let name of libsName) { + const libWikiPath = path.join(thirdPartyLibsPath, name , 'wiki', Msg.nowLang); + if (fs_plus.isDirectorySync(libWikiPath)) { + const childContentList = this.getContentJson(libWikiPath, name); + if (childContentList) { + wikiList.push(childContentList); + } + } + } + } + this.contentList = wikiList; + try { + const md = json2md(wikiList); + const lineList = md.split('\n'); + for (let i = 0; i < lineList.length; i++) { + if (!lineList[i].replaceAll(' ', '')) { + lineList.splice(i, 1); + i--; + } else { + if (!lineList[i].indexOf('#####')) + lineList[i] = '\n' + lineList[i]; + } + } + fs_extra.outputFile(wikiContentPath, lineList.join('\n')); + } catch (error) { + console.log(error); + } + } + + updateWiki() { + const args = [ + { + default: path.join(Env.boardDirPath, 'wiki/wiki-libs/'), + thirdParty: path.join(Env.boardDirPath, 'libraries/ThirdParty/'), + content: path.join(Env.boardDirPath, 'wiki/content.md') + } + ]; + if (this.gotoInfo) { + const { page, scrollPos } = this.gotoInfo; + const pagePath = this.getPagePath(this.gotoInfo.page, this.contentList); + if (pagePath) { + const goto = []; + goto.push(pagePath); + scrollPos && goto.push(scrollPos); + args[0].goto = goto; + } + this.gotoInfo = null; + } + this.sendCommand({ + func: 'setPath', + args + }); + } + + getContentJson(dirPath, title = null) { + const dirNameList = path.basename(dirPath).split('-'); + if (dirNameList.length !== 2 && !title) return null; + const contentList = []; + contentList.push({ h5: title ?? dirNameList[1] }); + contentList.push({ ul: [] }); + const { ul } = contentList[1]; + const keyList = fs.readdirSync(dirPath); + for (let key of keyList) { + const nowPath = path.join(dirPath, key); + if (fs_plus.isDirectorySync(nowPath)) { + const childContentList = this.getContentJson(nowPath); + if (childContentList && childContentList[1].ul.length) + ul.push(childContentList); + } else { + const extname = path.extname(key); + if (extname !== '.md') continue; + const fileNameList = path.basename(key, '.md').split('-'); + if (fileNameList.length !== 2) continue; + const newPath = path.join(path.dirname(nowPath), path.basename(key, '.md')); + ul.push({ link: { title: fileNameList[1], source: '?file=' + encodeURIComponent(newPath) + ' \"' + fileNameList[1] + '\"' } }); + } + } + return contentList; + } +} + +WikiManager.WikiPage = WikiPage; + +WikiManager.openWiki = (gotoInfo) => { + const goto = (gotoInfo && typeof gotoInfo === 'object') ? gotoInfo[Msg.nowLang] : null; + if (!WikiManager.wiki || WikiManager.wiki.isDestroyed) { + const wikiPath = path.join(Env.indexDirPath, '../common/wiki/index.html'); + if (fs_plus.isFileSync(wikiPath)) { + WikiManager.wiki = new WikiPage(wikiPath, goto); + } else { + layer.msg(Msg.Lang['wiki.pageNotFound'], { time: 1000 }); + } + } else { + const { win } = WikiManager.wiki; + win && win.focus(); + if (goto) { + const { page, scrollPos } = goto; + WikiManager.wiki.goto(page, scrollPos); + } + } +} + +WikiManager.registerContextMenu = () => { + const openWikiPage = { + displayText: Msg.Lang['wiki.open'], + preconditionFn: function(scope) { + const { wiki } = scope.block; + if (typeof wiki === 'object') { + if (typeof wiki[Msg.nowLang] === 'object' + && typeof wiki[Msg.nowLang].page === 'object') { + return 'enabled'; + } + } + return 'hidden'; + }, + callback: function(scope) { + const { wiki } = scope.block; + WikiManager.openWiki(wiki); + }, + scopeType: Blockly.ContextMenuRegistry.ScopeType.BLOCK, + id: 'wiki_open', + weight: 200 + }; + Blockly.ContextMenuRegistry.registry.register(openWikiPage); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-compiler/arduino-shell.js b/mixly/common/modules/mixly-modules/web-compiler/arduino-shell.js new file mode 100644 index 00000000..c1c15955 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-compiler/arduino-shell.js @@ -0,0 +1,399 @@ +goog.loadJs('web', () => { + +goog.require('layui'); +goog.require('AVRUploader'); +goog.require('esptooljs'); +goog.require('CryptoJS'); +goog.require('dayjs.duration'); +goog.require('Mixly.Boards'); +goog.require('Mixly.Debug'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.LayerProgress'); +goog.require('Mixly.Web.Serial'); +goog.require('Mixly.Web.SerialTransport'); +goog.require('Mixly.WebCompiler'); +goog.provide('Mixly.WebCompiler.ArduShell'); + +const { + Boards, + Debug, + LayerExt, + Msg, + Workspace, + LayerProgress, + Web, + WebCompiler +} = Mixly; + +const { Serial, SerialTransport } = Web; +const { layer } = layui; +const { ESPLoader, Transport } = esptooljs; + + +function hexToBinaryString (hex) { + let binaryString = ''; + for (let i = 0; i < hex.length; i += 2) { + const byte = parseInt(hex.substr(i, 2), 16); + binaryString += String.fromCharCode(byte); + } + return binaryString; +} + +class WebCompilerArduShell { + static { + this.mixlySocket = null; + this.socket = null; + this.shell = null; + + this.getSocket = function () { + return this.socket; + } + + this.getMixlySocket = function () { + return this.mixlySocket; + } + + this.init = function (mixlySocket) { + this.mixlySocket = mixlySocket; + this.socket = mixlySocket.getSocket(); + this.shell = new WebCompilerArduShell(); + const socket = this.socket; + + socket.on('arduino.dataEvent', (data) => { + if (data.length > 1000) { + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.addValue(data); + }); + + socket.on('arduino.errorEvent', (data) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + try { + data = unescape(data.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/gm, '%$1')); + data = unescape(data.replace(/\\(u[0-9a-fA-F]{4})/gm, '%$1')); + } catch (error) { + Debug.error(error); + } + statusBarTerminal.addValue(data); + }); + } + + this.initCompile = function () { + if (!this.mixlySocket.isConnected()) { + layer.msg(Msg.Lang['websocket.offline'], { time: 1000 }); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + statusBarTerminal.setValue(`${Msg.Lang['shell.compiling']}...\n`); + this.shell.compile(code) + .then((info) => { + this.endCallback(info.code, info.time); + }) + .catch((error) => { + Debug.error(error); + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.compileFailed']}==\n`); + }); + } + + this.initUpload = function () { + if (!this.mixlySocket.isConnected()) { + layer.msg(Msg.Lang['websocket.offline'], { time: 1000 }); + return; + } + const port = Serial.getSelectedPortName(); + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + statusBarTerminal.setValue(`${Msg.Lang['shell.uploading']}...\n`); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + const closePromise = statusBarSerial ? statusBarSerial.close() : Promise.resolve(); + closePromise + .then(() => { + return this.shell.upload(port, code) + }) + .then((info) => { + this.endCallback(info.code, info.time); + if (info.code || !Serial.portIsLegal(port)) { + return; + } + mainStatusBarTabs.add('serial', port); + mainStatusBarTabs.changeTo(port); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + statusBarSerial.open() + .then(() => { + const baudRates = code.match(/(?<=Serial.begin[\s]*\([\s]*)[0-9]*(?=[\s]*\))/g); + if (!baudRates?.length) { + return statusBarSerial.setBaudRate(9600); + } else { + return statusBarSerial.setBaudRate(baudRates[0] - 0); + } + }) + .catch(Debug.error); + }) + .catch((error) => { + Debug.error(error); + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.uploadFailed']}==\n`); + }); + } + + this.endCallback = function (code, time) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + let message = ''; + if (code) { + message = (this.shell.isCompiling() ? Msg.Lang['shell.compileFailed'] : Msg.Lang['shell.uploadFailed']); + statusBarTerminal.addValue(`\n==${message}==\n`); + } else { + message = (this.shell.isCompiling() ? Msg.Lang['shell.compileSucc'] : Msg.Lang['shell.uploadSucc']); + statusBarTerminal.addValue(`\n==${message}(${Msg.Lang['shell.timeCost']} ${ + dayjs.duration(time).format('HH:mm:ss.SSS') + })==\n`); + } + layer.msg(message, { time: 1000 }); + } + } + + #running_ = false; + #upload_ = false; + #killing_ = false; + #layer_ = null; + + constructor() { + this.#layer_ = new LayerProgress({ + width: 200, + cancelValue: Msg.Lang['nav.btn.stop'], + skin: 'layui-anim layui-anim-scale', + cancel: () => { + if (this.#killing_) { + return false; + } + this.#layer_.title(`${Msg.Lang['shell.aborting']}...`); + this.#killing_ = true; + this.kill().catch(Debug.error); + return false; + }, + cancelDisplay: false + }); + } + + async compile(code) { + return new Promise(async (resolve, reject) => { + this.#running_ = true; + this.#upload_ = false; + this.#killing_ = false; + this.showProgress(); + const key = Boards.getSelectedBoardCommandParam(); + const config = { key, code }; + const mixlySocket = WebCompilerArduShell.getMixlySocket(); + mixlySocket.emit('arduino.compile', config, (response) => { + this.hideProgress(); + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async upload(port, code) { + return new Promise(async (resolve, reject) => { + this.#running_ = true; + this.#upload_ = true; + this.#killing_ = false; + this.showProgress(); + const key = Boards.getSelectedBoardCommandParam(); + const config = { key, code }; + const mixlySocket = WebCompilerArduShell.getMixlySocket(); + mixlySocket.emit('arduino.upload', config, async (response) => { + if (response.error) { + this.hideProgress(); + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + this.hideProgress(); + reject(error); + return; + } + if (result.code !== 0) { + this.hideProgress(); + resolve(result); + return; + } + const { files } = result; + try { + const keys = Boards.getSelectedBoardKey().split(':'); + if (`${keys[0]}:${keys[1]}` === 'arduino:avr') { + await this.uploadWithAVRUploader(port, files); + } else { + await this.uploadWithEsptool(port, files); + } + } catch (error) { + this.hideProgress(); + reject(error); + return; + } + this.hideProgress(); + result.files = null; + resolve(result); + }); + }); + } + + async uploadWithEsptool(port, files) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + let esploader = null; + let transport = null; + let baudrate = 115200; + let eraseAll = true; + try { + const keys = Boards.getSelectedBoardKey().split(':'); + if (`${keys[0]}:${keys[1]}` === 'esp32:esp32') { + baudrate = Boards.getSelectedBoardConfigParam('UploadSpeed') || 115200; + eraseAll = Boards.getSelectedBoardConfigParam('EraseFlash') === 'all'; + } else { + baudrate = Boards.getSelectedBoardConfigParam('baud') || 115200; + eraseAll = Boards.getSelectedBoardConfigParam('wipe') === 'all'; + } + const serial = new Serial(port); + transport = new SerialTransport(serial, false); + esploader = new ESPLoader({ + transport, + baudrate, + terminal: { + clean() {}, + writeLine(data) { + statusBarTerminal.addValue(data + '\n'); + }, + write(data) { + statusBarTerminal.addValue(data); + } + } + }); + let chip = await esploader.main(); + } catch (error) { + await transport.disconnect(); + throw new Error(error); + } + let data = []; + statusBarTerminal.addValue("\n"); + for (let file of files) { + if (file.data && file.offset) { + data.push({ + address: parseInt(file.offset, 16), + data: hexToBinaryString(file.data) + }); + } + } + const flashOptions = { + fileArray: data, + flashSize: 'keep', + eraseAll, + compress: true, + calculateMD5Hash: (image) => CryptoJS.MD5(CryptoJS.enc.Latin1.parse(image)) + }; + try { + await esploader.writeFlash(flashOptions); + await transport.setDTR(false); + await new Promise((resolve) => setTimeout(resolve, 100)); + await transport.setDTR(true); + await transport.disconnect(); + } catch (error) { + await transport.disconnect(); + throw new Error(error); + } + } + + async uploadWithAVRUploader(port, files) { + const key = Boards.getSelectedBoardKey(); + const boardId = key.split(':')[2]; + let boardName = 'uno'; + if (boardId === 'nano') { + const cpu = Boards.getSelectedBoardConfigParam('cpu'); + if (cpu === 'atmega328old') { + boardName = 'nanoOldBootloader'; + } else { + boardName = 'nano'; + } + } else if (boardId === 'pro') { + boardName = 'proMini'; + } else if (boardId === 'mega') { + boardName = 'mega'; + } else if (boardId === 'leonardo') { + boardName = 'leonardo'; + } + const serial = Serial.getPort(port); + const text = files[0].data; + await AVRUploader.upload(serial, boardName, text); + } + + async kill() { + return new Promise(async (resolve, reject) => { + const mixlySocket = WebCompilerArduShell.getMixlySocket(); + mixlySocket.emit('arduino.kill', (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + showProgress() { + const message = this.isCompiling() ? Msg.Lang['shell.compiling'] : Msg.Lang['shell.uploading']; + this.#layer_.title(`${message}...`); + this.#layer_.show(); + } + + hideProgress() { + this.#layer_.hide(); + } + + isUploading() { + return this.#running_ && this.#upload_; + } + + isCompiling() { + return this.#running_ && !this.#upload_; + } +} + +WebCompiler.ArduShell = WebCompilerArduShell; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-compiler/loader.js b/mixly/common/modules/mixly-modules/web-compiler/loader.js new file mode 100644 index 00000000..227135fa --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-compiler/loader.js @@ -0,0 +1,54 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Debug'); +goog.require('Mixly.Config'); +goog.require('Mixly.StatusBarsManager'); +goog.require('Mixly.Socket'); +goog.require('Mixly.WebCompiler.ArduShell'); +goog.provide('Mixly.WebCompiler.Loader'); + +const { + Debug, + Config, + StatusBarsManager, + Socket, + WebCompiler +} = Mixly; + +const { + Loader, + ArduShell +} = WebCompiler; + +const { SOFTWARE } = Config; + + +Loader.init = function () { + let url = ''; + if (SOFTWARE.webCompiler?.url) { + const info = new window.URL(SOFTWARE.webCompiler.url); + if (window.location.protocol === 'http:') { + info.protocol = 'ws:'; + } + if (info.hostname === 'default') { + info.hostname = window.location.hostname; + } + url = info.origin; + } else { + url = `wss://${window.location.host}`; + } + const mixlySocket = new Socket(`${url}/compile`, { + path: '/mixly-socket/', + reconnection: true, + reconnectionDelayMax: 10000, + transports: ['websocket'], + protocols: ['my-protocol-v1'] + }); + + const socket = mixlySocket.getSocket(); + socket.on('connect', () => {}); + socket.on('disconnect', () => {}); + ArduShell.init(mixlySocket); +} + +}); diff --git a/mixly/common/modules/mixly-modules/web-compiler/web-compiler.js b/mixly/common/modules/mixly-modules/web-compiler/web-compiler.js new file mode 100644 index 00000000..781c9181 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-compiler/web-compiler.js @@ -0,0 +1,6 @@ +goog.loadJs('web', () => { + +goog.require('Mixly'); +goog.provide('Mixly.WebCompiler'); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/ampy-fs.js b/mixly/common/modules/mixly-modules/web-socket/ampy-fs.js new file mode 100644 index 00000000..5623b151 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/ampy-fs.js @@ -0,0 +1,201 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mixly.Env'); +goog.require('Mixly.FS'); +goog.require('Mixly.Debug'); +goog.require('Mixly.MJson'); +goog.require('Mixly.WebSocket.Ampy'); +goog.provide('Mixly.WebSocket.AmpyFS'); + +const { + Env, + FS, + Debug, + MJson, + WebSocket +} = Mixly; + +const { Ampy } = WebSocket; + + +class AmpyFS extends FS { + #ampy_ = null; + #port_ = ''; + #baud_ = 115200; + #decoder_ = new TextDecoder('utf8'); + + constructor() { + super(); + this.#ampy_ = new Ampy(); + } + + async rename(oldPath, newPath) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.rename(this.#port_, this.#baud_, oldPath, newPath); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async createFile(filePath) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.mkfile(this.#port_, this.#baud_, filePath); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async readFile(filePath) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.get(this.#port_, this.#baud_, filePath); + stdout = this.#decoder_.decode(this.#ampy_.unhexlify(stdout)); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async writeFile(filePath, data) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.put(this.#port_, this.#baud_, filePath, data); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async isFile(filePath) { + /*const [error, stdout] = await this.readDirectory(filePath); + if (error) { + return true; + } + return false;*/ + let error = null; + if (path.extname(filePath)) { + return [error, true]; + } else { + return [error, false]; + } + } + + async renameFile(oldFilePath, newFilePath) { + return this.rename(oldFilePath, newFilePath); + } + + // async moveFile(oldFilePath, newFilePath) {} + + // async copyFile(oldFilePath, newFilePath) {} + + async deleteFile(filePath) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.rm(this.#port_, this.#baud_, filePath); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async createDirectory(folderPath) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.mkdir(this.#port_, this.#baud_, folderPath); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async readDirectory(folderPath) { + let stdout = [], error = null; + try { + const output = await this.#ampy_.ls(this.#port_, this.#baud_, folderPath); + const dirs = Array.from(new Set(output.split('\r\n'))); + for (let i in dirs) { + if (!dirs[i]) { + continue; + } + stdout.push(MJson.parse(dirs[i].replaceAll('\'', '"'))); + } + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async isDirectory(folderPath) { + /*const [error, stdout] = await this.readDirectory(folderPath); + if (error) { + return false; + } + return true;*/ + let error = null; + if (path.extname(folderPath)) { + return [error, false]; + } else { + return [error, true]; + } + } + + async isDirectoryEmpty(folderPath) { + /*const [error, stdout] = await this.readDirectory(folderPath); + let isEmpty = false; + if (error || !stdout.length) { + isEmpty = true; + }*/ + return [null, false]; + } + + async renameDirectory(oldFolderPath, newFolderPath) { + return this.rename(oldFolderPath, newFolderPath); + } + + // async moveDirectory(oldFolderPath, newFolderPath) {} + + // async copyDirectory(oldFolderPath, newFolderPath) {} + + async deleteDirectory(folderPath) { + let stdout = '', error = null; + try { + stdout = await this.#ampy_.rmdir(this.#port_, this.#baud_, folderPath); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + setPortName(port) { + this.#port_ = port; + } + + getPortName() { + return this.#port_; + } + + setBaudRate(baud) { + this.#baud_ = baud; + } + + getBaudRate() { + return this.#baud_; + } +} + +WebSocket.AmpyFS = AmpyFS; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/ampy.js b/mixly/common/modules/mixly-modules/web-socket/ampy.js new file mode 100644 index 00000000..1248bf25 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/ampy.js @@ -0,0 +1,108 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mustache'); +goog.require('Mixly.Ampy'); +goog.require('Mixly.Env'); +goog.require('Mixly.Serial'); +goog.require('Mixly.WebSocket'); +goog.provide('Mixly.WebSocket.Ampy'); + +const { + Ampy, + Env, + Serial, + WebSocket +} = Mixly; + + +class AmpyExt extends Ampy { + static { + this.mixlySocket = null; + this.socket = null; + + this.getSocket = function () { + return this.socket; + } + + this.getMixlySocket = function () { + return this.mixlySocket; + } + + this.init = function (mixlySocket) { + this.mixlySocket = mixlySocket; + this.socket = mixlySocket.getSocket(); + } + } + + constructor() { + super(); + } + + async ls(port, baud, folderPath) { + return this.exec('ampy.ls', port, baud, folderPath); + } + + async get(port, baud, filePath) { + return this.exec('ampy.get', port, baud, filePath); + } + + async mkdir(port, baud, folderPath) { + return this.exec('ampy.mkdir', port, baud, folderPath); + } + + async mkfile(port, baud, filePath) { + return this.exec('ampy.mkfile', port, baud, filePath); + } + + async isdir(port, baud, folderPath) { + return this.exec('ampy.isdir', port, baud, folderPath); + } + + async isfile(port, baud, filePath) { + return this.exec('ampy.isfile', port, baud, filePath); + } + + async put(port, baud, filePath, data) { + return this.exec('ampy.put', port, baud, filePath, data); + } + + async rm(port, baud, filePath) { + return this.exec('ampy.rm', port, baud, filePath); + } + + async rmdir(port, baud, folderPath) { + return this.exec('ampy.rmdir', port, baud, folderPath); + } + + async rename(port, baud, oldPath, newPath) { + return this.exec('ampy.rename', port, baud, oldPath, newPath); + } + + async run(port, baud, filePath) { + return this.exec('ampy.run', port, baud, filePath); + } + + async exec(eventType, port, ...args) { + const portsName = Serial.getCurrentPortsName(); + if (!portsName.includes(port)) { + throw new Error('无可用串口'); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + if (statusBarSerial) { + await statusBarSerial.close(); + } + const mixlySocket = AmpyExt.getMixlySocket(); + const output = await mixlySocket.emitAsync(eventType, port, ...args); + if (output[0]) { + throw new Error(output[0]); + } + return output[1]; + } +} + +WebSocket.Ampy = AmpyExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js b/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js new file mode 100644 index 00000000..84f71d16 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js @@ -0,0 +1,275 @@ +goog.loadJs('web', () => { + +goog.require('layui'); +goog.require('dayjs.duration'); +goog.require('Mixly.Boards'); +goog.require('Mixly.Debug'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.LayerProgress'); +goog.require('Mixly.WebSocket.Serial'); +goog.provide('Mixly.WebSocket.ArduShell'); + +const { + Boards, + Debug, + LayerExt, + Msg, + Workspace, + LayerProgress, + WebSocket +} = Mixly; + +const { Serial } = WebSocket; + +const { layer } = layui; + + +class WebSocketArduShell { + static { + this.mixlySocket = null; + this.socket = null; + this.shell = null; + + this.getSocket = function () { + return this.socket; + } + + this.getMixlySocket = function () { + return this.mixlySocket; + } + + this.init = function (mixlySocket) { + this.mixlySocket = mixlySocket; + this.socket = mixlySocket.getSocket(); + this.shell = new WebSocketArduShell(); + const socket = this.socket; + + socket.on('arduino.dataEvent', (data) => { + if (data.length > 1000) { + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.addValue(data); + }); + + socket.on('arduino.errorEvent', (data) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + try { + data = unescape(data.replace(/(_E[0-9A-F]{1}_[0-9A-F]{2}_[0-9A-F]{2})+/gm, '%$1')); + data = unescape(data.replace(/\\(u[0-9a-fA-F]{4})/gm, '%$1')); + } catch (error) { + Debug.error(error); + } + statusBarTerminal.addValue(data); + }); + } + + this.initCompile = function () { + if (!this.mixlySocket.isConnected()) { + layer.msg(Msg.Lang['websocket.offline'], { time: 1000 }); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + statusBarTerminal.setValue(`${Msg.Lang['shell.compiling']}...\n`); + this.shell.compile(code) + .then((info) => { + this.endCallback(info.code, info.time); + }) + .catch((error) => { + Debug.error(error); + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.compileFailed']}==\n`); + }); + } + + this.initUpload = function () { + if (!this.mixlySocket.isConnected()) { + layer.msg(Msg.Lang['websocket.offline'], { time: 1000 }); + return; + } + const port = Serial.getSelectedPortName(); + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + statusBarTerminal.setValue(`${Msg.Lang['shell.uploading']}...\n`); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + const closePromise = statusBarSerial ? statusBarSerial.close() : Promise.resolve(); + closePromise + .then(() => { + return this.shell.upload(port, code) + }) + .then((info) => { + this.endCallback(info.code, info.time); + if (info.code || !Serial.portIsLegal(port)) { + return; + } + mainStatusBarTabs.add('serial', port); + mainStatusBarTabs.changeTo(port); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + statusBarSerial.open() + .then(() => { + const baudRates = code.match(/(?<=Serial.begin[\s]*\([\s]*)[0-9]*(?=[\s]*\))/g); + if (!baudRates?.length) { + return statusBarSerial.setBaudRate(9600); + } else { + return statusBarSerial.setBaudRate(baudRates[0] - 0); + } + }) + .catch(Debug.error); + }) + .catch((error) => { + Debug.error(error); + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.uploadFailed']}==\n`); + }); + } + + this.endCallback = function (code, time) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + let message = ''; + if (code) { + message = (this.shell.isCompiling() ? Msg.Lang['shell.compileFailed'] : Msg.Lang['shell.uploadFailed']); + statusBarTerminal.addValue(`\n==${message}==\n`); + } else { + message = (this.shell.isCompiling() ? Msg.Lang['shell.compileSucc'] : Msg.Lang['shell.uploadSucc']); + statusBarTerminal.addValue(`\n==${message}(${Msg.Lang['shell.timeCost']} ${ + dayjs.duration(time).format('HH:mm:ss.SSS') + })==\n`); + } + layer.msg(message, { time: 1000 }); + } + } + + #running_ = false; + #upload_ = false; + #killing_ = false; + #layer_ = null; + + constructor() { + this.#layer_ = new LayerProgress({ + width: 200, + cancelValue: Msg.Lang['nav.btn.stop'], + skin: 'layui-anim layui-anim-scale', + cancel: () => { + if (this.#killing_) { + return false; + } + this.#layer_.title(`${Msg.Lang['shell.aborting']}...`); + this.#killing_ = true; + this.kill().catch(Debug.error); + return false; + }, + cancelDisplay: false + }); + } + + async compile(code) { + return new Promise(async (resolve, reject) => { + this.#running_ = true; + this.#upload_ = false; + this.#killing_ = false; + this.showProgress(); + const key = Boards.getSelectedBoardCommandParam(); + const config = { key, code }; + const mixlySocket = WebSocketArduShell.getMixlySocket(); + mixlySocket.emit('arduino.compile', config, (response) => { + this.hideProgress(); + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async upload(port, code) { + return new Promise(async (resolve, reject) => { + this.#running_ = true; + this.#upload_ = true; + this.#killing_ = false; + this.showProgress(); + const key = Boards.getSelectedBoardCommandParam(); + const config = { key, code, port }; + const mixlySocket = WebSocketArduShell.getMixlySocket(); + mixlySocket.emit('arduino.upload', config, (response) => { + this.hideProgress(); + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async kill() { + return new Promise(async (resolve, reject) => { + const mixlySocket = WebSocketArduShell.getMixlySocket(); + mixlySocket.emit('arduino.kill', (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + showProgress() { + const message = this.isCompiling() ? Msg.Lang['shell.compiling'] : Msg.Lang['shell.uploading']; + this.#layer_.title(`${message}...`); + this.#layer_.show(); + } + + hideProgress() { + this.#layer_.hide(); + } + + isUploading() { + return this.#running_ && this.#upload_; + } + + isCompiling() { + return this.#running_ && !this.#upload_; + } +} + +WebSocket.ArduShell = WebSocketArduShell; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/burn-upload.js b/mixly/common/modules/mixly-modules/web-socket/burn-upload.js new file mode 100644 index 00000000..ec301439 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/burn-upload.js @@ -0,0 +1,350 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('layui'); +goog.require('dayjs.duration'); +goog.require('Mixly.Debug'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Env'); +goog.require('Mixly.Config'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.MString'); +goog.require('Mixly.LayerProgress'); +goog.require('Mixly.WebSocket.Serial'); +goog.provide('Mixly.WebSocket.BU'); + +const { + Debug, + LayerExt, + Config, + Msg, + Env, + Workspace, + MString, + LayerProgress, + WebSocket +} = Mixly; + +const { SELECTED_BOARD } = Config; + +const { Serial } = WebSocket; + +const { layer } = layui; + + +class WebSocketBU { + static { + this.mixlySocket = null; + this.socket = null; + this.shell = null; + + this.getSocket = function () { + return this.socket; + } + + this.getMixlySocket = function () { + return this.mixlySocket; + } + + this.init = function (mixlySocket) { + this.mixlySocket = mixlySocket; + this.socket = mixlySocket.getSocket(); + this.shell = new WebSocketBU(); + const socket = this.socket; + + socket.on('micropython.dataEvent', (data) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.addValue(data); + }); + + socket.on('micropython.errorEvent', (data) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.addValue(data); + }); + } + + this.initBurn = function () { + if (!this.mixlySocket.isConnected()) { + layer.msg(Msg.Lang['websocket.offline'], { time: 1000 }); + return; + } + const port = Serial.getSelectedPortName(); + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + statusBarTerminal.setValue(`${Msg.Lang['shell.burning']}...\n`); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + const closePromise = statusBarSerial ? statusBarSerial.close() : Promise.resolve(); + closePromise + .then(() => { + return this.shell.burn(port); + }) + .then((info) => { + this.endCallback(info.code, info.time); + }) + .catch((error) => { + Debug.error(error); + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.burnFailed']}==\n`); + }); + } + + this.initUpload = function () { + if (!this.mixlySocket.isConnected()) { + layer.msg(Msg.Lang['websocket.offline'], { time: 1000 }); + return; + } + const port = Serial.getSelectedPortName(); + if (!port) { + layer.msg(Msg.Lang['statusbar.serial.noDevice'], { + time: 1000 + }); + return; + } + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + mainStatusBarTabs.show(); + statusBarTerminal.setValue(`${Msg.Lang['shell.uploading']}...\n`); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + const closePromise = statusBarSerial ? statusBarSerial.close() : Promise.resolve(); + closePromise + .then(() => { + return this.shell.upload(port, code) + }) + .then((info) => { + this.endCallback(info.code, info.time); + if (info.code || !Serial.portIsLegal(port)) { + return; + } + mainStatusBarTabs.add('serial', port); + mainStatusBarTabs.changeTo(port); + const statusBarSerial = mainStatusBarTabs.getStatusBarById(port); + statusBarSerial.open() + .then(() => { + return statusBarSerial.setBaudRate(115200); + }) + .catch(Debug.error); + }) + .catch((error) => { + Debug.error(error); + statusBarTerminal.addValue(`\n==${Msg.Lang['shell.uploadFailed']}==\n`); + }); + } + + this.endCallback = function (code, time) { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + mainStatusBarTabs.changeTo('output'); + let message = ''; + if (code) { + message = (this.shell.isBurning() ? Msg.Lang['shell.burnFailed'] : Msg.Lang['shell.uploadFailed']); + statusBarTerminal.addValue(`\n==${message}==\n`); + } else { + message = (this.shell.isBurning() ? Msg.Lang['shell.burnSucc'] : Msg.Lang['shell.uploadSucc']); + statusBarTerminal.addValue(`\n==${message}(${Msg.Lang['shell.timeCost']} ${ + dayjs.duration(time).format('HH:mm:ss.SSS') + })==\n`); + } + layer.msg(message, { time: 1000 }); + } + } + + #running_ = false; + #upload_ = false; + #killing_ = false; + #layer_ = null; + + constructor() { + this.#layer_ = new LayerProgress({ + width: 200, + cancelValue: Msg.Lang['nav.btn.stop'], + skin: 'layui-anim layui-anim-scale', + cancel: () => { + if (this.#killing_) { + return false; + } + this.#layer_.title(`${Msg.Lang['shell.aborting']}...`); + this.#killing_ = true; + this.kill().catch(Debug.error); + return false; + }, + cancelDisplay: false + }); + } + + async burn(port) { + return new Promise(async (resolve, reject) => { + this.#running_ = true; + this.#upload_ = false; + this.#killing_ = false; + this.showProgress(); + const config = { + boardDirPath: `.${Env.boardDirPath}`, + port, + command: SELECTED_BOARD.burn.command + }; + const mixlySocket = WebSocketBU.getMixlySocket(); + mixlySocket.emit('micropython.burn', config, (response) => { + this.hideProgress(); + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async upload(port, code) { + return new Promise(async (resolve, reject) => { + this.#running_ = true; + this.#upload_ = true; + this.#killing_ = false; + this.showProgress(); + const importsMap = this.getImportModules(code); + let libraries = {}; + for (let key in importsMap) { + const filename = importsMap[key]['__name__']; + const data = goog.readFileSync(importsMap[key]['__path__']); + libraries[filename] = data; + } + const config = { + boardDirPath: `.${Env.boardDirPath}`, + command: SELECTED_BOARD.upload.command, + filePath: SELECTED_BOARD.upload.filePath, + port, code, libraries + }; + + const mixlySocket = WebSocketBU.getMixlySocket(); + mixlySocket.emit('micropython.upload', config, (response) => { + this.hideProgress(); + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + getImportModulesName(code) { + // 正则表达式: 匹配 import 或 from 导入语句 + const importRegex = /(?:import\s+([a-zA-Z0-9_]+)|from\s+([a-zA-Z0-9_]+)\s+import)/g; + + let imports = []; + let match; + while ((match = importRegex.exec(code)) !== null) { + if (match[1]) { + imports.push(match[1]); // 'import module' + } + if (match[2]) { + imports.push(match[2]); // 'from module import ...' + } + } + return imports; + } + + getImportModules(code) { + let importsMap = {}; + const libPath = SELECTED_BOARD.upload.libPath; + for (let i = libPath.length - 1; i >= 0; i--) { + const dirname = MString.tpl(libPath[i], { indexPath: Env.boardDirPath }); + const map = goog.readJsonSync(path.join(dirname, 'map.json')); + if (!(map && map instanceof Object)) { + continue; + } + for (let key in map) { + importsMap[key] = structuredClone(map[key]); + importsMap[key]['__path__'] = path.join(dirname, map[key]['__name__']); + } + } + + let usedMap = {}; + let currentImports = this.getImportModulesName(code); + while (currentImports.length) { + let temp = []; + for (let moduleName of currentImports) { + let moduleInfo = importsMap[moduleName]; + if (!moduleInfo) { + continue; + } + usedMap[moduleName] = moduleInfo; + const moduleImports = moduleInfo['__require__']; + if (!moduleImports) { + continue; + } + for (let name of moduleImports) { + if (usedMap[name] || !importsMap[name] || temp.includes(name)) { + continue; + } + temp.push(name); + } + } + currentImports = temp; + } + return usedMap; + } + + async kill() { + return new Promise(async (resolve, reject) => { + const mixlySocket = WebSocketBU.getMixlySocket(); + mixlySocket.emit('micropython.kill', (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + showProgress() { + const message = this.isBurning() ? Msg.Lang['shell.burning'] : Msg.Lang['shell.uploading']; + this.#layer_.title(`${message}...`); + this.#layer_.show(); + } + + hideProgress() { + this.#layer_.hide(); + } + + isUploading() { + return this.#running_ && this.#upload_; + } + + isBurning() { + return this.#running_ && !this.#upload_; + } +} + +WebSocket.BU = WebSocketBU; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/file.js b/mixly/common/modules/mixly-modules/web-socket/file.js new file mode 100644 index 00000000..c06cc82a --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/file.js @@ -0,0 +1,11 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Web.File'); +goog.provide('Mixly.WebSocket.File'); + + +const { Web, WebSocket } = Mixly; + +WebSocket.File = Web.File; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/loader.js b/mixly/common/modules/mixly-modules/web-socket/loader.js new file mode 100644 index 00000000..9cd9654c --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/loader.js @@ -0,0 +1,101 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Debug'); +goog.require('Mixly.Config'); +goog.require('Mixly.StatusBarsManager'); +goog.require('Mixly.Socket'); +goog.require('Mixly.WebSocket.Serial'); +goog.require('Mixly.WebSocket.ArduShell'); +goog.require('Mixly.WebSocket.BU'); +goog.require('Mixly.WebSocket.Ampy'); +goog.provide('Mixly.WebSocket.Loader'); + +const { + Debug, + Config, + StatusBarsManager, + Socket, + WebSocket +} = Mixly; + +const { + Loader, + Serial, + ArduShell, + BU, + Ampy +} = WebSocket; + +const { SOFTWARE } = Config; + + +Loader.init = function () { + let url = ''; + if (SOFTWARE.webSocket?.url) { + const info = new window.URL(SOFTWARE.webSocket.url); + if (window.location.protocol === 'http:') { + info.protocol = 'ws:'; + } + if (info.hostname === 'default') { + info.hostname = window.location.hostname; + } + url = info.origin; + } else { + url = `wss://${window.location.host}`; + } + const mixlySocket = new Socket(`${url}/all`, { + path: '/mixly-socket/', + reconnection: true, + reconnectionDelayMax: 10000, + transports: ['websocket'], + protocols: ['my-protocol-v1'] + }); + + const socket = mixlySocket.getSocket(); + + socket.on('connect', () => { + Serial.getPorts() + .then((ports) => { + let portsName = []; + for (let port of ports) { + portsName.push(port.name); + } + const { mainStatusBarTabs } = Mixly; + let keys = mainStatusBarTabs.keys(); + const statusBarType = StatusBarsManager.typesRegistry.getItem('serial'); + for (let key of keys) { + const statusBar = mainStatusBarTabs.getStatusBarById(key); + if (!(statusBar instanceof statusBarType)) { + continue; + } + const portName = statusBar.getPortName(); + if (!portsName.includes(portName)) { + continue; + } + socket.emit('serial.create', portName); + } + Serial.renderSelectBox(ports); + }) + .catch(Debug.error); + }); + + socket.on('disconnect', () => { + const { mainStatusBarTabs } = Mixly; + let keys = mainStatusBarTabs.keys(); + const statusBarType = StatusBarsManager.typesRegistry.getItem('serial'); + for (let key of keys) { + const statusBar = mainStatusBarTabs.getStatusBarById(key); + if (statusBar instanceof statusBarType) { + statusBar.close().catch(Debug.error); + } + } + Serial.refreshPorts(); + }); + + Serial.init(mixlySocket); + ArduShell.init(mixlySocket); + BU.init(mixlySocket); + Ampy.init(mixlySocket); +} + +}); diff --git a/mixly/common/modules/mixly-modules/web-socket/serial.js b/mixly/common/modules/mixly-modules/web-socket/serial.js new file mode 100644 index 00000000..644c7125 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/serial.js @@ -0,0 +1,360 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Serial'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Registry'); +goog.require('Mixly.WebSocket'); +goog.provide('Mixly.WebSocket.Serial'); + + +const { + Serial, + Env, + Msg, + Debug, + Registry, + WebSocket +} = Mixly; + + +class WebSocketSerial extends Serial { + static { + this.eventRegistry = new Registry(); + this.mixlySocket = null; + this.socket = null; + + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.renderSelectBox = function (ports) { + return Serial.renderSelectBox(ports); + } + + this.getPorts = async function () { + return new Promise((resolve, reject) => { + if (this.socket.connected) { + this.socket.emit('serial.getPorts', (response) => { + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + } else { + resolve([]); + } + }); + } + + this.refreshPorts = function () { + this.getPorts() + .then((ports) => { + Serial.renderSelectBox(ports); + }) + .catch(Debug.error); + } + + this.init = function (mixlySocket) { + this.mixlySocket = mixlySocket; + this.socket = mixlySocket.getSocket(); + const socket = this.socket; + + socket.on('serial.attachEvent', () => { + this.refreshPorts(); + }); + + socket.on('serial.detachEvent', () => { + this.refreshPorts(); + }); + + socket.on('serial.bufferEvent', (port, buffer) => { + const eventName = `${port}-buffer`; + if (!this.eventRegistry.hasKey(eventName)) { + return; + } + const event = this.eventRegistry.getItem(eventName); + event(buffer); + }); + + socket.on('serial.stringEvent', (port, str) => { + const eventName = `${port}-string`; + if (!this.eventRegistry.hasKey(eventName)) { + return; + } + const event = this.eventRegistry.getItem(eventName); + event(str); + }); + + socket.on('serial.errorEvent', (port, error) => { + const eventName = `${port}-error`; + if (!this.eventRegistry.hasKey(eventName)) { + return; + } + const event = this.eventRegistry.getItem(eventName); + event(error); + }); + + socket.on('serial.openEvent', (port) => { + const eventName = `${port}-open`; + if (!this.eventRegistry.hasKey(eventName)) { + return; + } + const event = this.eventRegistry.getItem(eventName); + event(); + }); + + socket.on('serial.closeEvent', (port, code) => { + const eventName = `${port}-close`; + if (!this.eventRegistry.hasKey(eventName)) { + return; + } + const event = this.eventRegistry.getItem(eventName); + event(code); + }); + } + + this.getSocket = function () { + return this.socket; + } + + this.getMixlySocket = function () { + return this.mixlySocket; + } + + this.getEventRegistry = function () { + return this.eventRegistry; + } + } + + constructor(port) { + super(port); + this.#addEventsListener_(); + const socket = WebSocketSerial.getSocket(); + if (socket.connected) { + socket.emit('serial.create', port); + } + } + + #addEventsListener_() { + const port = this.getPortName(); + const eventRegistry = WebSocketSerial.getEventRegistry(); + eventRegistry.register(`${port}-buffer`, (buffer) => { + this.onBuffer(buffer); + }); + eventRegistry.register(`${port}-string`, (str) => { + this.onString(str); + }); + eventRegistry.register(`${port}-error`, (error) => { + this.onError(error); + this.onClose(1); + }); + eventRegistry.register(`${port}-open`, () => { + this.onOpen(); + }); + eventRegistry.register(`${port}-close`, (code) => { + this.onClose(code); + }); + } + + async open(baud) { + return new Promise((resolve, reject) => { + const portsName = Serial.getCurrentPortsName(); + const currentPort = this.getPortName(); + if (!portsName.includes(currentPort)) { + reject('无可用串口'); + return; + } + if (this.isOpened()) { + resolve(); + return; + } + baud = baud ?? this.getBaudRate(); + const mixlySocket = WebSocketSerial.getMixlySocket(); + mixlySocket.emit('serial.open', currentPort, baud, (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + this.onError(error); + reject(error); + } else { + super.open(baud); + this.setBaudRate(baud); + resolve(result); + } + }); + }); + } + + async close() { + return new Promise((resolve, reject) => { + if (!this.isOpened()) { + resolve(); + return; + } + super.close(); + const mixlySocket = WebSocketSerial.getMixlySocket(); + mixlySocket.emit('serial.close', this.getPortName(), (response) => { + if (response.error) { + this.onClose(1); + resolve(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async setBaudRate(baud) { + return new Promise((resolve, reject) => { + if (!this.isOpened() + || this.getRawBaudRate() === baud + || !this.baudRateIsLegal(baud)) { + resolve(); + return; + } + const mixlySocket = WebSocketSerial.getMixlySocket(); + mixlySocket.emit('serial.setBaudRate', this.getPortName(), baud, (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error,] = response; + if (error) { + reject(error); + } else { + super.setBaudRate(baud); + this.setDTRAndRTS(this.getDTR(), this.getRTS()).finally(resolve); + } + }); + }); + } + + async send(data) { + return new Promise((resolve, reject) => { + if (!this.isOpened()) { + resolve(); + return; + } + const mixlySocket = WebSocketSerial.getMixlySocket(); + mixlySocket.emit('serial.send', this.getPortName(), data, (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async sendString(str) { + return this.send(str); + } + + async sendBuffer(buffer) { + return this.send(buffer); + } + + async setDTRAndRTS(dtr, rts) { + return new Promise((resolve, reject) => { + if (!this.isOpened()) { + resolve(); + return; + } + const mixlySocket = WebSocketSerial.getMixlySocket(); + mixlySocket.emit('serial.setDTRAndRTS', this.getPortName(), dtr, rts, (response) => { + if (response.error) { + reject(response.error); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + super.setDTRAndRTS(dtr, rts); + resolve(result); + } + }); + }); + } + + async setDTR(dtr) { + return this.setDTRAndRTS(dtr, this.getRTS()); + } + + async setRTS(rts) { + return this.setDTRAndRTS(this.getDTR(), rts); + } + + onBuffer(buffer) { + super.onBuffer(buffer); + for (let i = 0; i < buffer.length; i++) { + super.onByte(buffer[i]); + } + const string = this.decodeBuffer(buffer); + if (!string) { + return; + } + for (let char of string) { + super.onChar(char); + } + } + + async #awaitDispose_() { + return new Promise((resolve, reject) => { + const mixlySocket = WebSocketSerial.getMixlySocket(); + mixlySocket.emit('serial.dispose', this.getPortName(), (response) => { + if (response.error) { + resolve(); + return; + } + const [error, result] = response; + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + + async dispose() { + const port = this.getPortName(); + const eventRegistry = WebSocketSerial.getEventRegistry(); + eventRegistry.unregister(`${port}-buffer`); + eventRegistry.unregister(`${port}-string`); + eventRegistry.unregister(`${port}-error`); + eventRegistry.unregister(`${port}-open`); + eventRegistry.unregister(`${port}-close`); + await super.dispose(); + await this.#awaitDispose_(); + } +} + +WebSocket.Serial = WebSocketSerial; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web-socket/web-socket.js b/mixly/common/modules/mixly-modules/web-socket/web-socket.js new file mode 100644 index 00000000..c045b486 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web-socket/web-socket.js @@ -0,0 +1,6 @@ +goog.loadJs('web', () => { + +goog.require('Mixly'); +goog.provide('Mixly.WebSocket'); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/ampy-fs.js b/mixly/common/modules/mixly-modules/web/ampy-fs.js new file mode 100644 index 00000000..37762015 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/ampy-fs.js @@ -0,0 +1,292 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mixly.FS'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Web.Serial'); +goog.require('Mixly.Web.Ampy'); +goog.provide('Mixly.Web.AmpyFS'); + +const { FS, Debug, Web } = Mixly; +const { Serial, Ampy } = Web; + + +class AmpyFS extends FS { + #ampy_ = null; + #port_ = ''; + #baud_ = 115200; + + constructor() { + super(); + this.#ampy_ = Ampy; + } + + async getAmpy() { + const { mainStatusBarTabs } = Mixly; + const statusBarSerial = mainStatusBarTabs.getStatusBarById(this.#port_); + if (statusBarSerial) { + await statusBarSerial.close(); + } + const serial = new Serial(this.#port_); + const ampy = new Ampy(serial); + return ampy; + } + + async rename(oldPath, newPath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.rename(oldPath, newPath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async createFile(filePath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.mkfile(filePath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async readFile(filePath, encoding = 'utf8') { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.get(filePath, encoding); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async writeFile(filePath, data) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.put(filePath, data); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async isFile(filePath) { + let error = null; + if (path.extname(filePath)) { + return [error, true]; + } else { + return [error, false]; + } + } + + async renameFile(oldFilePath, newFilePath) { + return this.rename(oldFilePath, newFilePath); + } + + async moveFile(oldFilePath, newFilePath) { + return this.rename(oldFilePath, newFilePath); + } + + async copyFile(oldFilePath, newFilePath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.cpfile(oldFilePath, newFilePath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async deleteFile(filePath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.rm(filePath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async createDirectory(folderPath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.mkdir(folderPath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async readDirectory(folderPath) { + let stdout = [], error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.ls(folderPath, false, false); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async isDirectory(folderPath) { + let error = null; + if (path.extname(folderPath)) { + return [error, false]; + } else { + return [error, true]; + } + } + + async isDirectoryEmpty(folderPath) { + return [null, false]; + } + + async renameDirectory(oldFolderPath, newFolderPath) { + return this.rename(oldFolderPath, newFolderPath); + } + + async moveDirectory(oldFolderPath, newFolderPath) { + return this.rename(oldFolderPath, newFolderPath); + } + + async copyDirectory(oldFolderPath, newFolderPath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.cpdir(oldFolderPath, newFolderPath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + async deleteDirectory(folderPath) { + let stdout = '', error = null, ampy = null; + try { + ampy = await this.getAmpy(); + await ampy.enter(); + stdout = await ampy.rmdir(folderPath); + } catch (e) { + error = e; + Debug.error(error); + } + try { + await ampy.exit(); + await ampy.dispose(); + } catch (e) { + error = e; + Debug.error(error); + } + return [error, stdout]; + } + + setPortName(port) { + this.#port_ = port; + } + + getPortName() { + return this.#port_; + } + + setBaudRate(baud) { + this.#baud_ = baud; + } + + getBaudRate() { + return this.#baud_; + } +} + +Web.AmpyFS = AmpyFS; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/ampy.js b/mixly/common/modules/mixly-modules/web/ampy.js new file mode 100644 index 00000000..19249ff5 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/ampy.js @@ -0,0 +1,429 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mustache'); +goog.require('Mixly.Env'); +goog.require('Mixly.Events'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Ampy'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.Ampy'); + +const { + Env, + Events, + Msg, + Ampy, + Web +} = Mixly; + + +class AmpyExt extends Ampy { + static { + this.LS = goog.readFileSync(path.join(Env.templatePath, 'python/ls.py')); + this.LS_RECURSIVE = goog.readFileSync(path.join(Env.templatePath, 'python/ls-recursive.py')); + this.LS_LONG_FORMAT = goog.readFileSync(path.join(Env.templatePath, 'python/ls-long-format.py')); + this.MKDIR = goog.readFileSync(path.join(Env.templatePath, 'python/mkdir.py')); + this.MKFILE = goog.readFileSync(path.join(Env.templatePath, 'python/mkfile.py')); + this.RENAME = goog.readFileSync(path.join(Env.templatePath, 'python/rename.py')); + this.RM = goog.readFileSync(path.join(Env.templatePath, 'python/rm.py')); + this.RMDIR = goog.readFileSync(path.join(Env.templatePath, 'python/rmdir.py')); + this.GET = goog.readFileSync(path.join(Env.templatePath, 'python/get.py')); + this.CWD = goog.readFileSync(path.join(Env.templatePath, 'python/cwd.py')); + this.CPDIR = goog.readFileSync(path.join(Env.templatePath, 'python/cpdir.py')); + this.CPFILE = goog.readFileSync(path.join(Env.templatePath, 'python/cpfile.py')); + } + + #device_ = null; + #receiveTemp_ = []; + #writeBuffer_ = true; + #active_ = false; + #dataLength_ = 256; + #events_ = new Events(['message', 'replaceMessage']) + constructor(device, writeBuffer = true, dataLength = 256) { + super(); + this.#device_ = device; + this.#writeBuffer_ = writeBuffer; + this.#dataLength_ = dataLength; + this.#addEventsListener_(); + } + + #addEventsListener_() { + this.#device_.bind('onChar', (char) => { + if (['\r', '\n'].includes(char)) { + this.#receiveTemp_.push(''); + } else { + let line = this.#receiveTemp_.pop() ?? ''; + this.#receiveTemp_.push(line + char); + } + }); + } + + bind(...args) { + return this.#events_.bind(...args); + } + + message(message) { + this.#events_.run('message', message); + } + + replaceMessage(lineNumber, message) { + this.#events_.run('replaceMessage', lineNumber, message); + } + + getProgressMessage(name, percent) { + const sended = parseInt(percent * 45); + const left = percent === 0 ? '' : Array(sended).fill('=').join(''); + const right = percent === 100 ? '' : Array(45 - sended).fill('-').join(''); + return `${name} → |${left}${right}| ${(percent * 100).toFixed(1)}%`; + } + + isActive() { + return this.#active_; + } + + async readUntil(ending, withEnding = true, timeout = 5000) { + const startTime = Number(new Date()); + let nowTime = startTime; + let readStr = ''; + while (nowTime - startTime < timeout) { + const nowTime = Number(new Date()); + let len = this.#receiveTemp_.length; + for (let i = 0; i < len; i++) { + const data = this.#receiveTemp_.shift(); + let index = data.toLowerCase().indexOf(ending); + if (index !== -1) { + if (withEnding) { + index += ending.length; + } + this.#receiveTemp_.unshift(data.substring(index)); + readStr += data.substring(0, index); + return readStr; + } else { + readStr += data; + if (i !== len - 1) { + readStr += '\n'; + } + } + } + if (nowTime - startTime >= timeout) { + return ''; + } + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.dataReadInterrupt']); + } + await this.#device_.sleep(100); + } + } + + async interrupt(timeout = 1000) { + for (let i = 0; i < 5; i++) { + // 中断两次 + await this.#device_.sendBuffer([0x0D, 0x03]); + await this.#device_.sleep(100); + await this.#device_.sendBuffer([0x03]); + await this.#device_.sleep(100); + if (await this.readUntil('>>>', true, timeout)) { + return true; + } + } + return false; + } + + async enterRawREPL(timeout = 1000) { + for (let i = 0; i < 5; i++) { + await this.#device_.sendBuffer([0x01]); + await this.#device_.sleep(100); + if (await this.readUntil('raw repl; ctrl-b to exit', true, timeout)) { + return true; + } + } + return false; + } + + async exitRawREPL(timeout = 5000) { + await this.#device_.sendBuffer([0x02]); + await this.#device_.sleep(100); + let succeed = false; + if (await this.readUntil('>>>', true, timeout)) { + succeed = true; + } + return succeed; + } + + async exitREPL(timeout = 5000) { + await this.#device_.sendBuffer([0x04]); + await this.#device_.sleep(100); + let succeed = false; + if (await this.readUntil('soft reboot', false, timeout)) { + succeed = true; + } + return succeed; + } + + async exec(str, timeout = 5000) { + if (this.#writeBuffer_) { + const buffer = this.#device_.encode(str); + const len = Math.ceil(buffer.length / this.#dataLength_); + for (let i = 0; i < len; i++) { + const start = i * this.#dataLength_; + const end = Math.min((i + 1) * this.#dataLength_, buffer.length); + const writeBuffer = buffer.slice(start, end); + await this.#device_.sendBuffer(writeBuffer); + await this.#device_.sleep(10); + } + } else { + for (let i = 0; i < str.length / this.#dataLength_; i++) { + const start = i * this.#dataLength_; + const end = Math.min((i + 1) * this.#dataLength_, str.length); + let data = str.substring(start, end); + await this.#device_.sendString(data); + await this.#device_.sleep(10); + } + } + await this.#device_.sendBuffer([0x04]); + return await this.follow(timeout); + } + + async follow(timeout = 1000) { + let data = await this.readUntil('\x04', true, timeout); + if (data.length < 1) { + throw new Error(Msg.Lang['ampy.waitingFirstEOFTimeout']); + } + let start = data.toLowerCase().lastIndexOf('ok'); + if (start === -1) { + start = 0; + } else { + start += 2; + } + data = data.substring(start, data.length - 1); + let dataError = await this.readUntil('\x04', true, timeout); + if (dataError.length < 1) { + throw new Error(Msg.Lang['ampy.secondEOFTimeout']); + } + dataError = dataError.substring(0, dataError.length - 1); + return { data, dataError }; + } + + async enter() { + if (this.isActive()) { + return; + } + this.#active_ = true; + await this.#device_.open(115200); + await this.#device_.sleep(500); + await this.#device_.sendBuffer([0x02]); + if (!await this.interrupt()) { + throw new Error(Msg.Lang['ampy.interruptFailed']); + } + if (!await this.enterRawREPL()) { + throw new Error(Msg.Lang['ampy.enterRawREPLFailed']); + } + } + + async exit() { + if (!this.isActive()) { + return; + } + if (!await this.exitRawREPL()) { + throw new Error(Msg.Lang['ampy.exitRawREPLFailed']); + } + /*if (!await this.exitREPL()) { + throw new Error(Msg.Lang['ampy.exitREPLFailed']); + }*/ + await this.#device_.close(); + this.#active_ = false; + } + + async get(filename, encoding = 'utf8', timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.GET, { + path: filename + }); + const { data, dataError } = await this.exec(code, timeout); + if (dataError) { + return ''; + } + if (encoding === 'utf8') { + return this.#device_.decode(this.unhexlify(data)); + } else { + return this.unhexlify(data); + } + } + + async put(filename, data, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + this.message(`Writing ${filename}...\n`); + this.message(this.getProgressMessage('', 0)); + await this.exec(`file = open('${filename}', 'wb')`, timeout); + let buffer = null; + if (data.constructor === String) { + buffer = this.#device_.encode(data); + } else if (data.constructor === ArrayBuffer) { + buffer = new Uint8Array(data); + } else { + buffer = data; + } + const len = Math.ceil(buffer.length / 64); + if (!len) { + this.replaceMessage(-1, this.getProgressMessage('', 1)); + } + let sendedLength = 0; + for (let i = 0; i < len; i++) { + const writeBuffer = buffer.slice(i * 64, Math.min((i + 1) * 64, buffer.length)); + sendedLength += writeBuffer.length; + const percent = sendedLength / buffer.length; + this.replaceMessage(-1, this.getProgressMessage('', percent)); + let writeStr = ''; + for (let num of writeBuffer) { + let numStr = num.toString(16); + if (numStr.length === 1) { + numStr = '0' + numStr; + } + writeStr += '\\x' + numStr; + } + await this.exec(`file.write(b'${writeStr}')`, timeout); + } + await this.exec('file.close()', timeout); + this.message('\n'); + } + + async ls(directory = '/', longFormat = true, recursive = false, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + let code = ''; + if (longFormat) { + code = Mustache.render(AmpyExt.LS_LONG_FORMAT, { + path: directory + }); + } else if (recursive) { + code = Mustache.render(AmpyExt.LS_RECURSIVE, { + path: directory + }); + } else { + code = Mustache.render(AmpyExt.LS, { + path: directory + }); + } + const { data, dataError } = await this.exec(code, timeout); + if (dataError) { + return []; + } + return JSON.parse(data.replaceAll('\'', '\"')); + } + + async mkdir(directory, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.MKDIR, { + path: directory + }); + const { dataError } = await this.exec(code, timeout); + return !dataError; + } + + async mkfile(file, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.MKFILE, { + path: file + }); + const { dataError } = await this.exec(code, timeout); + return !dataError; + } + + async rename(oldname, newname, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.RENAME, { + oldPath: oldname, + newPath: newname + }); + const { dataError } = await this.exec(code, timeout); + return !dataError; + } + + async rm(filename, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.RM, { + path: filename + }); + await this.exec(code); + const { dataError } = await this.exec(code, timeout); + return !dataError; + } + + async rmdir(directory, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.RMDIR, { + path: directory + }); + const { dataError } = await this.exec(code, timeout); + return !dataError; + } + + async cpdir(oldname, newname, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.CPDIR, { + oldPath: oldname, + newPath: newname + }); + const { data, dataError } = await this.exec(code, timeout); + console.log(data, dataError) + return !dataError; + } + + async cpfile(oldname, newname, timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.CPFILE, { + oldPath: oldname, + newPath: newname + }); + const { dataError } = await this.exec(code, timeout); + return !dataError; + } + + async cwd(timeout = 5000) { + if (!this.isActive()) { + throw new Error(Msg.Lang['ampy.portIsNotOpen']); + } + const code = Mustache.render(AmpyExt.CWD, {}); + const { data, dataError } = await this.exec(code, timeout); + if (dataError) { + return '/'; + } + return data; + } + + getDevice() { + return this.#device_; + } + + async dispose() { + this.#active_ = false; + await this.#device_.dispose(); + this.#device_ = null; + this.#events_.reset(); + this.#events_ = null; + } +} + +Web.Ampy = AmpyExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/bluetooth.js b/mixly/common/modules/mixly-modules/web/bluetooth.js new file mode 100644 index 00000000..fbc03643 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/bluetooth.js @@ -0,0 +1,185 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.Bluetooth'); + +const { Web } = Mixly; +const { Bluetooth } = Web; + +Bluetooth.output = []; +Bluetooth.mtu = 100; +Bluetooth.encoder = new TextEncoder('utf-8'); +Bluetooth.decoder = new TextDecoder('utf-8'); +Bluetooth.nordicUartServiceUuid = 0xfff0; +Bluetooth.uartRxCharacteristicUuid = 0xfff2; +Bluetooth.uartTxCharacteristicUuid = 0xfff1; +Bluetooth.obj = null; +Bluetooth.server = null; +Bluetooth.service = null; +Bluetooth.uartRxCharacteristic = null; +Bluetooth.uartTxCharacteristic = null; +Bluetooth.name = 'bluetooth'; + +Bluetooth.connect = (baud = 115200, onDataLine = (message) => {}) => { + return new Promise((resolve, reject) => { + if (Bluetooth.isConnected()) { + resolve(); + return; + } + navigator.bluetooth.requestDevice({ + // filters: [{name: ['Mixly']}] + optionalServices: [Bluetooth.nordicUartServiceUuid], + acceptAllDevices: true + }) + .then((device) => { + Bluetooth.obj = device; + return device.gatt.connect(); + }) + .then((server) => { + Bluetooth.server = server; + return server.getPrimaryService(Bluetooth.nordicUartServiceUuid); + }) + .then((service) => { + Bluetooth.service = service; + return service.getCharacteristic(Bluetooth.uartRxCharacteristicUuid); + }) + .then((uartRxCharacteristic) => { + Bluetooth.uartRxCharacteristic = uartRxCharacteristic; + return Bluetooth.service.getCharacteristic(Bluetooth.uartTxCharacteristicUuid); + }) + .then((uartTxCharacteristic) => { + Bluetooth.uartTxCharacteristic = uartTxCharacteristic; + return uartTxCharacteristic.startNotifications(); + }) + .then(() => { + Bluetooth.onDataLine = onDataLine; + Bluetooth.addReadEvent(onDataLine); + resolve(); + }) + .catch((error) => { + Bluetooth.obj = null; + Bluetooth.server = null; + Bluetooth.service = null; + Bluetooth.uartRxCharacteristic = null; + Bluetooth.uartTxCharacteristic = null; + reject(error); + }); + }); +} + +Bluetooth.close = async () => { + if (Bluetooth.isConnected()) { + await Bluetooth.obj.gatt.disconnect(); + Bluetooth.obj = null; + Bluetooth.server = null; + Bluetooth.service = null; + Bluetooth.uartRxCharacteristic = null; + Bluetooth.uartTxCharacteristic = null; + } +} + +Bluetooth.isConnected = () => { + return Bluetooth.obj && Bluetooth.obj.gatt.connected; +} + +Bluetooth.addReadEvent = (onDataLine = (message) => {}) => { + Bluetooth.uartTxCharacteristic.addEventListener('characteristicvaluechanged', event => { + let data = Bluetooth.decoder.decode(event.target.value); + let dataList = data.split('\n'); + if (!dataList.length) { + return; + } + let endStr = ''; + if (Bluetooth.output.length) { + endStr = Bluetooth.output.pop(); + Bluetooth.output.push(endStr + dataList.shift()); + if (dataList.length) { + // console.log(Bluetooth.output[Bluetooth.output.length - 1]); + onDataLine(Bluetooth.output[Bluetooth.output.length - 1]); + } + } + let i = 0; + for (let value of dataList) { + i++; + Bluetooth.output.push(value); + if (i < dataList.length) { + // console.log(value); + onDataLine(value); + } + } + while (Bluetooth.output.length > 500) { + Bluetooth.output.shift(); + } + }); +} + +Bluetooth.AddOnConnectEvent = (onConnect) => { +} + +Bluetooth.AddOnDisconnectEvent = (onDisconnect) => { + Bluetooth.obj.addEventListener('gattserverdisconnected', () => { + onDisconnect(); + }); +} + +Bluetooth.writeString = async (str) => { + let buffer = Bluetooth.encoder.encode(str); + await Bluetooth.writeByteArr(buffer); +} + +Bluetooth.writeByteArr = async (buffer) => { + buffer = new Uint8Array(buffer); + for (let chunk = 0; chunk < Math.ceil(buffer.length / Bluetooth.mtu); chunk++) { + let start = Bluetooth.mtu * chunk; + let end = Bluetooth.mtu * (chunk + 1); + await Bluetooth.uartRxCharacteristic.writeValueWithResponse(buffer.slice(start, end)) + .catch(error => { + if (error == "NetworkError: GATT operation already in progress.") { + Bluetooth.writeByteArr(buffer); + } + else { + return Promise.reject(error); + } + }); + } + await Bluetooth.sleep(200); +} + +Bluetooth.writeCtrlA = async () => { + await Bluetooth.writeByteArr([1, 13, 10]); +} + +Bluetooth.writeCtrlB = async () => { + await Bluetooth.writeByteArr([2, 13, 10]); +} + +Bluetooth.writeCtrlC = async () => { + await Bluetooth.writeByteArr([3, 13, 10]); +} + +Bluetooth.writeCtrlD = async () => { + await Bluetooth.writeByteArr([3, 4]); +} + +Bluetooth.write = async (type, data, dataTail) => { + switch (type) { + case 'string': + return Bluetooth.writeString(data + dataTail); + break; + default: + await Bluetooth.writeByteArr(data); + return Bluetooth.writeString(dataTail); + } +} + +Bluetooth.setSignals = async (dtr, rts) => { +} + +Bluetooth.setBaudRate = async (baud) => { +} + +Bluetooth.sleep = (ms) => { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/burn-upload.js b/mixly/common/modules/mixly-modules/web/burn-upload.js new file mode 100644 index 00000000..245bb5bc --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/burn-upload.js @@ -0,0 +1,738 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('BoardId'); +goog.require('FSWrapper'); +goog.require('DAPWrapper'); +goog.require('PartialFlashing'); +goog.require('esptooljs'); +goog.require('CryptoJS'); +goog.require('JSZip'); +goog.require('Mixly.Env'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.Config'); +goog.require('Mixly.MFile'); +goog.require('Mixly.Boards'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Workspace'); +goog.require('Mixly.Debug'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.MString'); +goog.require('Mixly.LayerFirmware'); +goog.require('Mixly.LayerProgress'); +goog.require('Mixly.Web.Serial'); +goog.require('Mixly.Web.Ampy'); +goog.require('Mixly.Web.KFlash'); +goog.require('Mixly.Web.SerialTransport'); +goog.provide('Mixly.Web.BU'); + +const { + Env, + Web, + LayerExt, + Config, + MFile, + Boards, + Msg, + Workspace, + Debug, + HTMLTemplate, + MString, + LayerFirmware, + LayerProgress +} = Mixly; + +const { + Serial, + BU, + Ampy, + KFlash, + SerialTransport +} = Web; + +const { BOARD, SELECTED_BOARD } = Config; +const { ESPLoader } = esptooljs; + + +BU.uploading = false; +BU.burning = false; +BU.firmwareLayer = new LayerFirmware({ + width: 400, + title: Msg.Lang['nav.btn.burn'], + cancelValue: false, + cancel: false, + cancelDisplay: false +}); +BU.firmwareLayer.bind('burn', (info) => { + const { web } = SELECTED_BOARD; + BU.burnWithEsptool(info, web.burn.erase); +}); +BU.progressLayer = new LayerProgress({ + width: 200, + cancelValue: false, + cancel: false, + cancelDisplay: false +}); + +if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + FSWrapper.setupFilesystem(path.join(Env.boardDirPath, 'build')); +} + +BU.requestPort = async () => { + await Serial.requestPort(); +} + +const readBinFile = (path, offset) => { + return new Promise((resolve, reject) => { + fetch(path) + .then((response) => { + return response.blob(); + }) + .then((blob) => { + const reader = new FileReader(); + reader.onload = function (event) { + resolve({ + address: parseInt(offset), + data: event.target.result + }); + }; + reader.onerror = function (error) { + throw(error); + } + reader.readAsBinaryString(blob); + }) + .catch((error) => { + reject(error); + }); + }); +} + +const readBinFileAsArrayBuffer = (path, offset) => { + return new Promise((resolve, reject) => { + fetch(path) + .then((response) => { + return response.blob(); + }) + .then((blob) => { + const reader = new FileReader(); + reader.onload = function (event) { + resolve({ + address: parseInt(offset), + data: event.target.result + }); + }; + reader.onerror = function (error) { + throw(error); + } + reader.readAsArrayBuffer(blob); + }) + .catch((error) => { + reject(error); + }); + }); +} + +const decodeKfpkgFromArrayBuffer = async(arrayBuf) => { + const zip = await JSZip.loadAsync(arrayBuf); + const manifestEntry = zip.file('flash-list.json'); + if (!manifestEntry) { + throw new Error('kfpkg is missing flash-list.json'); + } + const manifestText = await manifestEntry.async('string'); + const manifest = JSON.parse(manifestText); + + const items = []; + for (const f of manifest.files || []) { + const entry = zip.file(f.bin); + if (!entry) { + throw new Error(`Missing files in package: ${f.bin}`); + } + const data = new Uint8Array(await entry.async('uint8array')); + items.push({ + address: f.address >>> 0, + filename: f.bin, + sha256Prefix: !!f.sha256Prefix, + data + }); + } + + return { manifest, items }; +} + +BU.initBurn = async () => { + if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + await BU.burnWithDAP(); + } else if (['MixGo AI'].includes(BOARD.boardType)) { + const { web } = SELECTED_BOARD; + const boardKey = Boards.getSelectedBoardKey(); + if (!web?.burn?.binFile) { + return; + } + if (typeof web.burn.binFile !== 'object') { + return; + } + await BU.burnWithKFlash(web.burn.binFile, web.burn.erase); + } else { + const { web } = SELECTED_BOARD; + const boardKey = Boards.getSelectedBoardKey(); + if (!web?.burn?.binFile) { + return; + } + if (typeof web.burn.binFile !== 'object') { + return; + } + if (web.burn.special && web.burn.special instanceof Array) { + BU.burnWithSpecialBin(); + } else { + await BU.burnWithEsptool(web.burn.binFile, web.burn.erase); + } + } +} + +BU.burnWithDAP = async () => { + const { mainStatusBarTabs } = Mixly; + let portName = Serial.getSelectedPortName(); + if (!portName) { + try { + await BU.requestPort(); + portName = Serial.getSelectedPortName(); + if (!portName) { + return; + } + } catch (error) { + Debug.error(error); + return; + } + } + const statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + if (statusBarSerial) { + await statusBarSerial.close(); + } + + const { web } = SELECTED_BOARD; + const { burn } = web; + const hexStr = goog.readFileSync(path.join(Env.boardDirPath, burn.filePath)); + const hex2Blob = new Blob([ hexStr ], { type: 'text/plain' }); + const buffer = await hex2Blob.arrayBuffer(); + if (!buffer) { + layer.msg(Msg.Lang['shell.bin.readFailed'], { time: 1000 }); + return; + } + BU.burning = true; + BU.uploading = false; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(`${Msg.Lang['shell.burning']}...\n`); + mainStatusBarTabs.show(); + mainStatusBarTabs.changeTo('output'); + const port = Serial.getPort(portName); + const webUSB = new DAPjs.WebUSB(port); + const dapLink = new DAPjs.DAPLink(webUSB); + try { + await dapLink.connect(); + await dapLink.setSerialBaudrate(115200); + } catch (error) { + Debug.error(error); + return; + } + let prevPercent = 0; + dapLink.on(DAPjs.DAPLink.EVENT_PROGRESS, progress => { + const nowPercent = Math.floor(progress * 100); + if (nowPercent > prevPercent) { + prevPercent = nowPercent; + } else { + return; + } + const nowProgressLen = Math.floor(nowPercent / 2); + const leftStr = new Array(nowProgressLen).fill('=').join(''); + const rightStr = (new Array(50 - nowProgressLen).fill('-')).join(''); + statusBarTerminal.addValue(`[${leftStr}${rightStr}] ${nowPercent}%\n`); + }); + BU.progressLayer.title(`${Msg.Lang['shell.burning']}...`); + BU.progressLayer.show(); + try { + await dapLink.flash(buffer); + BU.progressLayer.hide(); + layer.msg(Msg.Lang['shell.burnSucc'], { time: 1000 }); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnSucc']}==\n`); + } catch (error) { + Debug.error(error); + BU.progressLayer.hide(); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnFailed']}==\n`); + } finally { + dapLink.removeAllListeners(DAPjs.DAPLink.EVENT_PROGRESS); + await dapLink.disconnect(); + await webUSB.close(); + await port.close(); + } +} + +BU.burnWithEsptool = async (binFile, erase) => { + const { mainStatusBarTabs } = Mixly; + let portName = Serial.getSelectedPortName(); + if (!portName) { + try { + await BU.requestPort(); + portName = Serial.getSelectedPortName(); + if (!portName) { + return; + } + } catch (error) { + Debug.error(error); + return; + } + } + const port = Serial.getPort(portName); + if (['HIDDevice'].includes(port.constructor.name)) { + layer.msg(Msg.Lang['burn.notSupport'], { time: 1000 }); + return; + } + const statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + if (statusBarSerial) { + await statusBarSerial.close(); + } + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(Msg.Lang['shell.burning'] + '...\n'); + mainStatusBarTabs.show(); + mainStatusBarTabs.changeTo('output'); + BU.progressLayer.title(`${Msg.Lang['shell.burning']}...`); + BU.progressLayer.show(); + let esploader = null; + let transport = null; + try { + const baudrate = Boards.getSelectedBoardConfigParam('BurnSpeed') ?? '460800'; + const serial = new Serial(portName); + transport = new SerialTransport(serial, false); + esploader = new ESPLoader({ + transport, + baudrate, + terminal: { + clean() { + statusBarTerminal.setValue(Msg.Lang['shell.burning'] + '...\n'); + }, + writeLine(data) { + statusBarTerminal.addValue(data + '\n'); + }, + write(data) { + statusBarTerminal.addValue(data); + } + } + }); + await esploader.main(); + } catch (error) { + Debug.error(error); + statusBarTerminal.addValue(`\n${error.toString()}\n`); + try { + await transport.disconnect(); + } catch (error) { + Debug.error(error); + } + BU.progressLayer.hide(); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnFailed']}==\n`); + return; + } + + statusBarTerminal.addValue(Msg.Lang['shell.bin.reading'] + "..."); + let firmwarePromise = []; + statusBarTerminal.addValue("\n"); + for (let i of binFile) { + if (i.path && i.offset) { + let absolutePath = path.join(Env.boardDirPath, i.path); + firmwarePromise.push(readBinFile(absolutePath, i.offset)); + } + } + let data = null; + try { + data = await Promise.all(firmwarePromise); + } catch (error) { + statusBarTerminal.addValue("Failed!\n" + Msg.Lang['shell.bin.readFailed'] + "!\n"); + statusBarTerminal.addValue("\n" + error + "\n", true); + try { + await transport.disconnect(); + } catch (error) { + Debug.error(error); + } + BU.progressLayer.hide(); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnFailed']}==\n`); + return; + } + statusBarTerminal.addValue("Done!\n"); + BU.burning = true; + BU.uploading = false; + const flashOptions = { + fileArray: data, + flashSize: 'keep', + eraseAll: erase, + compress: true, + calculateMD5Hash: (image) => CryptoJS.MD5(CryptoJS.enc.Latin1.parse(image)) + }; + try { + await esploader.writeFlash(flashOptions); + await transport.setDTR(false); + await new Promise((resolve) => setTimeout(resolve, 100)); + await transport.setDTR(true); + BU.progressLayer.hide(); + layer.msg(Msg.Lang['shell.burnSucc'], { time: 1000 }); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnSucc']}==\n`); + } catch (error) { + Debug.error(error); + BU.progressLayer.hide(); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnFailed']}==\n`); + } finally { + try { + await transport.disconnect(); + } catch (error) { + Debug.error(error); + } + } +} + +BU.burnWithKFlash = async (binFile, erase) => { + const { mainStatusBarTabs } = Mixly; + let portName = Serial.getSelectedPortName(); + if (!portName) { + try { + await BU.requestPort(); + portName = Serial.getSelectedPortName(); + if (!portName) { + return; + } + } catch (error) { + Debug.error(error); + return; + } + } + const port = Serial.getPort(portName); + if (['HIDDevice', 'USBDevice'].includes(port.constructor.name)) { + layer.msg(Msg.Lang['burn.notSupport'], { time: 1000 }); + return; + } + const statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + if (statusBarSerial) { + await statusBarSerial.close(); + } + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + statusBarTerminal.setValue(Msg.Lang['shell.burning'] + '...\n'); + mainStatusBarTabs.show(); + mainStatusBarTabs.changeTo('output'); + BU.progressLayer.title(`${Msg.Lang['shell.burning']}...`); + BU.progressLayer.show(); + + let data = []; + try { + for (let i of binFile) { + if (i.path && i.offset) { + const extname = path.extname(i.path); + const absolutePath = path.join(Env.boardDirPath, i.path); + const info = await readBinFileAsArrayBuffer(absolutePath, i.offset); + if (extname === '.kfpkg') { + const result = await decodeKfpkgFromArrayBuffer(info.data); + data.push(...result.items); + } else { + data.push(info); + } + } + } + } catch (error) { + statusBarTerminal.addValue(`\n[ERROR] ${error}\n`, true); + BU.progressLayer.hide(); + statusBarTerminal.addValue(`==${Msg.Lang['shell.burnFailed']}==\n`); + return; + } + let serial = null; + try { + serial = new Serial(portName); + const kflash = new KFlash(serial); + kflash.bind('message', (message) => { + statusBarTerminal.addValue(message); + }); + kflash.bind('replaceMessage', (lineNumber, message) => { + statusBarTerminal.replaceLine(lineNumber, message); + }); + await kflash.enter(); + for (let item of data) { + await kflash.write(item.data, item.address, item.sha256Prefix ?? true, item?.filename ?? 'main.bin'); + } + BU.progressLayer.hide(); + layer.msg(Msg.Lang['shell.burnSucc'], { time: 1000 }); + statusBarTerminal.appendLine(`==${Msg.Lang['shell.burnSucc']}==\n`); + } catch (error) { + statusBarTerminal.appendLine(`[ERROR] ${error.message}\n`); + BU.progressLayer.hide(); + statusBarTerminal.appendLine(`==${Msg.Lang['shell.burnFailed']}==\n`); + } finally { + try { + serial && await serial.close(); + } catch (error) { + Debug.error(error); + } + } +} + +BU.getImportModulesName = (code) => { + // 正则表达式: 匹配 import 或 from 导入语句 + const importRegex = /(?:import\s+([a-zA-Z0-9_]+)|from\s+([a-zA-Z0-9_]+)\s+import)/g; + + let imports = []; + let match; + while ((match = importRegex.exec(code)) !== null) { + if (match[1]) { + imports.push(match[1]); // 'import module' + } + if (match[2]) { + imports.push(match[2]); // 'from module import ...' + } + } + return imports; +} + +BU.getImportModules = (code) => { + let importsMap = {}; + const libPath = SELECTED_BOARD.upload.libPath; + for (let i = libPath.length - 1; i >= 0; i--) { + const dirname = MString.tpl(libPath[i], { indexPath: Env.boardDirPath }); + const map = goog.readJsonSync(path.join(dirname, 'map.json')); + if (!(map && map instanceof Object)) { + continue; + } + for (let key in map) { + importsMap[key] = structuredClone(map[key]); + importsMap[key]['__path__'] = path.join(dirname, map[key]['__name__']); + } + } + + let usedMap = {}; + let currentImports = BU.getImportModulesName(code); + while (currentImports.length) { + let temp = []; + for (let moduleName of currentImports) { + let moduleInfo = importsMap[moduleName]; + if (!moduleInfo) { + continue; + } + usedMap[moduleName] = moduleInfo; + const moduleImports = moduleInfo['__require__']; + if (!moduleImports) { + continue; + } + for (let name of moduleImports) { + if (usedMap[name] || !importsMap[name] || temp.includes(name)) { + continue; + } + temp.push(name); + } + } + currentImports = temp; + } + return usedMap; +} + +BU.initUpload = async () => { + let portName = Serial.getSelectedPortName(); + if (!portName) { + try { + await BU.requestPort(); + portName = Serial.getSelectedPortName(); + if (!portName) { + return; + } + } catch (error) { + Debug.error(error); + return; + } + } + if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + await BU.uploadWithDAP(portName); + } else { + await BU.uploadWithAmpy(portName); + } +} + +BU.uploadWithDAP = async (portName) => { + const { mainStatusBarTabs } = Mixly; + if (!portName) { + try { + await BU.requestPort(); + portName = Serial.getSelectedPortName(); + if (!portName) { + return; + } + } catch (error) { + Debug.error(error); + return; + } + } + let statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + if (statusBarSerial) { + await statusBarSerial.close(); + } + + const port = Serial.getPort(portName); + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const dapWrapper = new DAPWrapper(port, { + event: () => {}, + log: () => {} + }); + const partialFlashing = new PartialFlashing(dapWrapper, { + event: () => {} + }); + + let boardId = 0x9901; + const boardKey = Boards.getSelectedBoardKey(); + if (boardKey === 'micropython:nrf51822:v2') { + boardId = 0x9903; + } + + BU.burning = false; + BU.uploading = true; + statusBarTerminal.setValue(Msg.Lang['shell.uploading'] + '...\n'); + mainStatusBarTabs.show(); + mainStatusBarTabs.changeTo('output'); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const code = editor.getCode(); + FSWrapper.writeFile('main.py', code); + const importsMap = BU.getImportModules(code); + for (let key in importsMap) { + const filename = importsMap[key]['__name__']; + const data = goog.readFileSync(importsMap[key]['__path__']); + FSWrapper.writeFile(filename, data); + } + BU.progressLayer.title(`${Msg.Lang['shell.uploading']}...`); + BU.progressLayer.show(); + try { + let prevPercent = 0; + await partialFlashing.flashAsync(new BoardId(0x9900), FSWrapper, progress => { + const nowPercent = Math.floor(progress * 100); + if (nowPercent > prevPercent) { + prevPercent = nowPercent; + } else { + return; + } + const nowProgressLen = Math.floor(nowPercent / 2); + const leftStr = new Array(nowProgressLen).fill('=').join(''); + const rightStr = (new Array(50 - nowProgressLen).fill('-')).join(''); + statusBarTerminal.addValue(`[${leftStr}${rightStr}] ${nowPercent}%\n`); + }); + BU.progressLayer.hide(); + layer.msg(Msg.Lang['shell.uploadSucc'], { time: 1000 }); + statusBarTerminal.addValue(`==${Msg.Lang['shell.uploadSucc']}==\n`); + if (!statusBarSerial) { + mainStatusBarTabs.add('serial', portName); + statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + } + statusBarSerial.setValue(''); + mainStatusBarTabs.changeTo(portName); + await statusBarSerial.open(); + } catch (error) { + await dapWrapper.disconnectAsync(); + Debug.error(error); + BU.progressLayer.hide(); + statusBarTerminal.addValue(`${error}\n`); + statusBarTerminal.addValue(`==${Msg.Lang['shell.uploadFailed']}==\n`); + } +} + +BU.uploadWithAmpy = async (portName) => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + let statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + BU.burning = false; + BU.uploading = true; + statusBarTerminal.setValue(`${Msg.Lang['shell.uploading']}...\n`); + mainStatusBarTabs.show(); + mainStatusBarTabs.changeTo('output'); + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const port = Serial.getPort(portName); + BU.progressLayer.title(`${Msg.Lang['shell.uploading']}...`); + BU.progressLayer.show(); + const serial = new Serial(portName); + const ampy = new Ampy(serial); + ampy.bind('message', (message) => { + statusBarTerminal.addValue(message); + }); + ampy.bind('replaceMessage', (lineNumber, message) => { + statusBarTerminal.replaceLine(lineNumber, message); + }); + const code = editor.getCode(); + let closePromise = Promise.resolve(); + if (statusBarSerial) { + closePromise = statusBarSerial.close(); + } + try { + await closePromise; + await ampy.enter(); + await ampy.put('main.py', code); + /*const importsMap = BU.getImportModules(code); + let libraries = {}; + for (let key in importsMap) { + const filename = importsMap[key]['__name__']; + const data = goog.readFileSync(importsMap[key]['__path__']); + libraries[filename] = { + data, + size: importsMap[key]['__size__'] + }; + } + let cwd = await ampy.cwd(); + const rootInfo = await ampy.ls(cwd); + let rootMap = {}; + for (let item of rootInfo) { + rootMap[item[0]] = item[1]; + } + if (cwd === '/') { + cwd = ''; + } + if (libraries && libraries instanceof Object) { + for (let key in libraries) { + if (rootMap[`${cwd}/${key}`] !== undefined && rootMap[`${cwd}/${key}`] === libraries[key].size) { + statusBarTerminal.addValue(`Writing ${key} (Skipped)\n`); + continue; + } + await ampy.put(key, libraries[key].data); + } + }*/ + await ampy.exit(); + await ampy.dispose(); + BU.progressLayer.hide(); + layer.msg(Msg.Lang['shell.uploadSucc'], { time: 1000 }); + statusBarTerminal.appendLine(`==${Msg.Lang['shell.uploadSucc']}==\n`); + if (!statusBarSerial) { + mainStatusBarTabs.add('serial', portName); + statusBarSerial = mainStatusBarTabs.getStatusBarById(portName); + } + statusBarSerial.setValue(''); + mainStatusBarTabs.changeTo(portName); + await statusBarSerial.open(); + } catch (error) { + ampy.dispose(); + BU.progressLayer.hide(); + Debug.error(error); + statusBarTerminal.appendLine(`[ERROR] ${error.message}\n`); + statusBarTerminal.appendLine(`==${Msg.Lang['shell.uploadFailed']}==\n`); + } +} + +/** + * @function 特殊固件的烧录 + * @return {void} + **/ +BU.burnWithSpecialBin = () => { + const { mainStatusBarTabs } = Mixly; + const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output'); + const firmwares = SELECTED_BOARD.web.burn.special; + let menu = []; + let firmwareMap = {}; + for (let firmware of firmwares) { + if (!firmware?.name && !firmware?.binFile) continue; + menu.push({ + id: firmware.name, + text: firmware.name + }); + firmwareMap[firmware.name] = firmware.binFile; + } + BU.firmwareLayer.setMap(firmwareMap); + BU.firmwareLayer.setMenu(menu); + BU.firmwareLayer.show(); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/file-tree.js b/mixly/common/modules/mixly-modules/web/file-tree.js new file mode 100644 index 00000000..a968a7c1 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/file-tree.js @@ -0,0 +1,47 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mixly.FileTree'); +goog.require('Mixly.Web.FS'); +goog.provide('Mixly.Web.FileTree'); + +const { FileTree, Web } = Mixly; +const { FS } = Web; + +class FileTreeExt extends FileTree { + constructor() { + super(FS); + } + + async readFolder(inPath) { + const fs = this.getFS(); + const status = await fs.isDirectory(inPath); + let output = []; + if (!status) { + return output; + } + const children = await fs.readDirectory(inPath); + for (let data of children) { + const dataPath = path.join(inPath, data); + if (await fs.isDirectory(dataPath)) { + const isDirEmpty = await fs.isDirectoryEmpty(dataPath); + output.push({ + type: 'folder', + id: dataPath, + children: !isDirEmpty + }); + } else { + output.push({ + type: 'file', + id: dataPath, + children: false + }); + } + } + return output; + } +} + +Web.FileTree = FileTreeExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/file.js b/mixly/common/modules/mixly-modules/web/file.js new file mode 100644 index 00000000..93468011 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/file.js @@ -0,0 +1,218 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Blockly'); +goog.require('Mixly.MFile'); +goog.require('Mixly.Title'); +goog.require('Mixly.LayerNewFile'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Workspace'); +goog.provide('Mixly.Web.File'); + +const { + MFile, + Web, + LayerNewFile, + Msg, + Title, + Workspace +} = Mixly; + +const { MSG } = Blockly.Msg; + +const { File } = Web; + +const platform = goog.platform(); + +File.obj = null; +File.newFileLayer = new LayerNewFile(); +File.newFileLayer.bind('empty', () => { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const blockEditor = editor.getPage('block').getEditor(); + const codeEditor = editor.getPage('code').getEditor(); + const generator = Blockly.generator; + blockEditor.clear(); + blockEditor.scrollCenter(); + Blockly.hideChaff(); + codeEditor.setValue(generator.workspaceToCode(blockEditor) || '', -1); + Title.updateTitle(Title.title); + File.obj = null; +}); + + +File.getFileTypes = (filters) => { + let fileTypes = []; + if (platform === 'mobile') { + fileTypes.push({ + description: 'Mixly File', + accept: { + 'application/octet-stream': filters + } + }); + } else { + fileTypes.push({ + description: 'Mixly File', + accept: { + 'application/xml': filters + } + }); + } + return fileTypes; +} + +File.open = async () => { + if (window.location.protocol === 'https:') { + let filters = []; + MFile.openFilters.map((data) => { + filters.push(`.${data}`); + }); + const fileConfig = { + multiple: false, + types: File.getFileTypes(filters), + excludeAcceptAllOption: true + }; + try { + const [ obj ] = await window.showOpenFilePicker(fileConfig); + if (!obj) { + return; + } + File.obj = obj; + const extname = path.extname(obj.name); + const fileInfo = await File.obj.getFile(); + if (!fileInfo) { + return; + } + File.parseData(extname, await fileInfo.text()); + Title.updateTitle(`${obj.name} - ${Title.title}`); + } catch (error) { + console.log(error); + } + } else { + const filters = '.' + MFile.openFilters.join(',.'); + MFile.openFile(filters, 'text', (fileObj) => { + let { data, filename } = fileObj; + const extname = path.extname(filename); + File.parseData(extname, data); + Title.updateTitle(`${filename} - ${Title.title}`); + }); + } +} + +File.parseData = (extname, text) => { + const index = extname.indexOf(' '); + if (index !== -1) { + extname = extname.substring(0, index); + } + if (['.bin', '.hex'].includes(extname)) { + MFile.loadHex(text); + } else if (['.mix', '.xml', '.ino', '.py'].includes(extname)) { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + editor.setValue(text, extname); + } else { + layer.msg(Msg.Lang['file.type.error'], { time: 1000 }); + File.obj = null; + } +} + +File.save = async () => { + window.userEvents && window.userEvents.addRecord({ + operation: 'save' + }); + if (!File.obj) { + File.saveAs(); + return; + } + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + let text = ''; + let extname = path.extname(File.obj.name); + const index = extname.indexOf(' '); + if (index !== -1) { + extname = extname.substring(0, index); + } + if (['.mix', '.xml'].includes(extname)) { + text = editor.getValue(); + } else if (['.ino', '.py'].includes(extname)) { + text = editor.getCode(); + } else { + return; + } + try { + let currentLayero = null; + const loadIndex = layer.msg(Msg.Lang['file.saving'], { + icon: 16, + shade: 0, + time: 0, + success: function(layero) { + currentLayero = layero; + } + }); + const writer = await File.obj.createWritable({ + keepExistingData: true + }); + await writer.write(text); + await writer.close(); + let $content = currentLayero.children('.layui-layer-content'); + $content.html(`${Msg.Lang['file.saveSucc']}`); + currentLayero = null; + $content = null; + setTimeout(() => { + layer.close(loadIndex); + }, 500); + } catch (error) { + console.log(error); + } +} + +File.saveAs = async () => { + let filters = []; + MFile.saveFilters.map((data) => { + filters.push(`.${data.extensions[0]}`); + }); + const fileConfig = { + types: File.getFileTypes(filters), + suggestedName: 'mixly.mix' + }; + try { + const obj = await window.showSaveFilePicker(fileConfig); + if (!obj) { + return; + } + File.obj = obj; + File.save(); + Title.updateTitle(`${obj.name} - ${Title.title}`); + } catch (error) { + console.log(error); + } +} + +File.new = async () => { + const mainWorkspace = Workspace.getMain(); + const editor = mainWorkspace.getEditorsManager().getActive(); + const blockEditor = editor.getPage('block').getEditor(); + const codeEditor = editor.getPage('code').getEditor(); + const generator = Blockly.generator; + const blocksList = blockEditor.getAllBlocks(); + if (editor.getPageType() === 'code') { + const code = codeEditor.getValue(), + workspaceToCode = generator.workspaceToCode(blockEditor) || ''; + if (!blocksList.length && workspaceToCode === code) { + layer.msg(Msg.Lang['editor.codeEditorEmpty'], { time: 1000 }); + Title.updateTitle(Title.title); + File.obj = null; + return; + } + } else { + if (!blocksList.length) { + layer.msg(Msg.Lang['editor.blockEditorEmpty'], { time: 1000 }); + Title.updateTitle(Title.title); + File.obj = null; + return; + } + } + File.newFileLayer.show(); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/footerlayer-example.js b/mixly/common/modules/mixly-modules/web/footerlayer-example.js new file mode 100644 index 00000000..75b44f49 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/footerlayer-example.js @@ -0,0 +1,87 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.MJson'); +goog.require('Mixly.FooterLayerExample'); +goog.require('Mixly.Boards'); +goog.provide('Mixly.Web.FooterLayerExample'); + +const { + Config, + Env, + FooterLayerExample, + MJson, + Boards, + Web +} = Mixly; + +const { BOARD } = Config; + +class FooterLayerExampleExt extends FooterLayerExample { + static DIR_TREE = MJson.get(path.join(Env.boardDirPath, 'examples/map.json')) ?? []; + + constructor(element) { + super(element); + } + + getRoot() { + const { DIR_TREE } = FooterLayerExampleExt; + let exampleList = []; + if (DIR_TREE instanceof Object) { + exampleList = [{ + title: BOARD.boardType, + id: '', + children: [] + }]; + } + return exampleList; + } + + getChildren(inPath) { + const { DIR_TREE } = FooterLayerExampleExt; + let pathList = []; + if (inPath) { + pathList = inPath.split('/'); + } + let obj = DIR_TREE; + for (let key of pathList) { + if (!key) { + continue; + } + if (obj[key]) { + obj = obj[key]; + } else { + return []; + } + } + if (!(obj instanceof Object)) { + return []; + } + let exampleList = []; + for (let key in obj) { + if (!(obj[key] instanceof Object)) { + continue; + } + const exampleObj = { + title: obj[key]['__name__'], + id: inPath ? (inPath + '/' + key) : key + }; + if (!obj[key]['__file__']) { + exampleObj.children = []; + } + exampleList.push(exampleObj); + } + return exampleList; + } + + dataToWorkspace(inPath) { + const data = goog.readFileSync(path.join(Env.boardDirPath, 'examples', inPath)); + this.updateCode(path.extname(inPath), data); + } +} + +Web.FooterLayerExample = FooterLayerExampleExt; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/fs.js b/mixly/common/modules/mixly-modules/web/fs.js new file mode 100644 index 00000000..a0b15828 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/fs.js @@ -0,0 +1,161 @@ +goog.loadJs('web', () => { + +goog.require('workerpool'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.FS'); + +const { FS } = Mixly.Web; + +FS.pool = workerpool.pool('../common/modules/mixly-modules/workers/web/file-system-access.js', { + workerOpts: { + name: 'fileSystemAccess' + }, + workerType: 'web' +}); + +FS.showOpenFilePicker = async () => { + return new Promise((resolve, reject) => { + resolve(); + }); +} + +FS.showDirectoryPicker = async () => { + const directoryHandle = await window.showDirectoryPicker({ mode: 'readwrite' }); + const permissionStatus = await directoryHandle.requestPermission({ mode: 'readwrite' }); + if (permissionStatus !== 'granted') { + throw new Error('readwrite access to directory not granted'); + } + await FS.pool.exec('addFileSystemHandler', [directoryHandle]); + return directoryHandle; +} + +FS.showSaveFilePicker = async () => { + return new Promise((resolve, reject) => { + + }); +} + +FS.readFile = (path) => { + return new Promise(async (resolve, reject) => { + const [data] = await FS.pool.exec('readFile', [path, 'utf8']); + resolve(data); + }); +} + +FS.writeFile = (path, data) => { + return new Promise(async (resolve, reject) => { + const [error, entries] = await FS.pool.exec('writeFile', [path, data, 'utf8']); + if (error) { + reject(error); + } else { + resolve(entries); + } + }); +} + +FS.isFile = (path) => { + return new Promise(async (resolve, reject) => { + const [_, stats] = await FS.pool.exec('stat', [path]); + if (!stats) { + resolve(false); + return; + } + if (stats.mode === 33188) { + resolve(true); + } else { + resolve(false); + } + }); +} + +FS.renameFile = (oldFilePath, newFilePath) => { + return new Promise(async (resolve, reject) => { + const [error] = await FS.pool.exec('rename', [oldFilePath, newFilePath]); + if (error) { + reject(error); + } else { + resolve(); + } + }); +} + +FS.moveFile = (oldFilePath, newFilePath) => { + return FS.renameFile(oldFilePath, newFilePath); +} + +FS.deleteFile = (filePath) => { + return new Promise(async (resolve, reject) => { + const [error] = await FS.pool.exec('unlink', [filePath]); + if (error) { + reject(error); + } else { + resolve(); + } + }); +} + +FS.createDirectory = (folderPath) => { + return new Promise(async (resolve, reject) => { + const [error] = await FS.pool.exec('mkdir', [folderPath, 0o777]); + if (error) { + reject(error); + } else { + resolve(); + } + }); +} + +FS.readDirectory = (path) => { + return new Promise(async (resolve, reject) => { + const [error, entries] = await FS.pool.exec('readdir', [path]); + if (error) { + reject(error); + } else { + resolve(entries); + } + }); +} + +FS.isDirectory = (path) => { + return new Promise(async (resolve, reject) => { + const [_, stats] = await FS.pool.exec('stat', [path]); + if (!stats) { + resolve(false); + return; + } + if (stats.mode === 33188) { + resolve(false); + } else { + resolve(true); + } + }); +} + +FS.isDirectoryEmpty = async (path) => { + return !(await FS.readDirectory(path) ?? []).length; +} + +FS.moveDirectory = (oldFolderPath, newFolderPath) => { + return new Promise(async (resolve, reject) => { + resolve(); + }); +} + +FS.copyDirectory = (oldFolderPath, newFolderPath) => { + return new Promise(async (resolve, reject) => { + resolve(); + }); +} + +FS.deleteDirectory = (folderPath) => { + return new Promise(async (resolve, reject) => { + const [error] = await FS.pool.exec('rmdir', [folderPath]); + if (!error) { + resolve(); + } else { + reject(); + } + }); +} + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/hid.js b/mixly/common/modules/mixly-modules/web/hid.js new file mode 100644 index 00000000..c739fe87 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/hid.js @@ -0,0 +1,247 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Serial'); +goog.require('Mixly.Config'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.HID'); + +const { + Serial, + Config, + Web +} = Mixly; + +const { SELECTED_BOARD } = Config; + +class WebHID extends Serial { + static { + this.type = 'hid'; + + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.refreshPorts = function () { + Serial.refreshPorts();; + } + + this.requestPort = async function () { + let options = SELECTED_BOARD?.web?.devices?.hid; + if (!options || typeof(options) !== 'object') { + options = { + filters: [] + }; + } + const devices = await navigator.hid.requestDevice(options); + if (!devices.length) { + return; + } + for (let device of devices) { + this.addPort(device); + } + this.refreshPorts(); + } + + this.getPort = function (name) { + return Serial.nameToPortRegistry.getItem(name); + } + + this.addPort = function (device) { + if (Serial.portToNameRegistry.hasKey(device)) { + return; + } + let name = ''; + for (let i = 1; i <= 20; i++) { + name = `hid${i}`; + if (Serial.nameToPortRegistry.hasKey(name)) { + continue; + } + break; + } + Serial.portToNameRegistry.register(device, name); + Serial.nameToPortRegistry.register(name, device); + } + + this.removePort = function (device) { + if (!Serial.portToNameRegistry.hasKey(device)) { + return; + } + const name = Serial.portToNameRegistry.getItem(device); + if (!name) { + return; + } + Serial.portToNameRegistry.unregister(device); + Serial.nameToPortRegistry.unregister(name); + } + + this.addEventsListener = function () { + navigator?.hid?.addEventListener('connect', (event) => { + this.addPort(event.device); + this.refreshPorts(); + }); + + navigator?.hid?.addEventListener('disconnect', (event) => { + event.device.onclose && event.device.onclose(); + this.removePort(event.device); + this.refreshPorts(); + }); + } + + this.init = function () { + navigator?.hid?.getDevices().then((devices) => { + for (let device of devices) { + this.addPort(device); + } + }); + this.addEventsListener(); + } + } + + #device_ = null; + #keepReading_ = null; + #reader_ = null; + #writer_ = null; + #stringTemp_ = ''; + #dataLength_ = 31; + constructor(port) { + super(port); + this.#device_ = WebHID.getPort(port); + } + + #addEventsListener_() { + this.#device_.oninputreport = (event) => { + const { data } = event; + const length = Math.min(data.getUint8(0) + 1, data.byteLength); + let buffer = []; + for (let i = 1; i < length; i++) { + buffer.push(data.getUint8(i)); + } + this.onBuffer(buffer); + }; + + this.#device_.onclose = () => { + if (!this.isOpened()) { + return; + } + super.close(); + this.#stringTemp_ = ''; + this.onClose(1); + } + } + + async open(baud) { + return new Promise((resolve, reject) => { + const portsName = Serial.getCurrentPortsName(); + const currentPortName = this.getPortName(); + if (!portsName.includes(currentPortName)) { + reject('no device available'); + return; + } + if (this.isOpened()) { + resolve(); + return; + } + baud = baud ?? this.getBaudRate(); + this.#device_ = WebHID.getPort(currentPortName); + this.#device_.open() + .then(() => { + super.open(baud); + super.setBaudRate(baud); + this.onOpen(); + this.#addEventsListener_(); + resolve(); + }) + .catch(reject); + }); + } + + async close() { + if (!this.isOpened()) { + return; + } + super.close(); + await this.#device_.close(); + this.#stringTemp_ = ''; + this.#device_.oninputreport = null; + this.#device_.onclose = null; + this.onClose(1); + } + + async setBaudRate(baud) { + return Promise.resolve(); + } + + async sendString(str) { + const buffer = this.encode(str); + return this.sendBuffer(buffer); + } + + async sendBuffer(buffer) { + if (buffer.constructor.name !== 'Uint8Array') { + buffer = new Uint8Array(buffer); + } + const len = Math.ceil(buffer.length / this.#dataLength_); + for (let i = 0; i < len; i++) { + const start = i * this.#dataLength_; + const end = Math.min((i + 1) * this.#dataLength_, buffer.length); + const writeBuffer = buffer.slice(start, end); + let temp = new Uint8Array(end - start + 1); + temp[0] = writeBuffer.length; + temp.set(writeBuffer, 1); + await this.#device_.sendReport(0, temp); + await this.sleep(10); + } + } + + async setDTRAndRTS(dtr, rts) { + return Promise.resolve(); + } + + async setDTR(dtr) { + return this.setDTRAndRTS(dtr, this.getRTS()); + } + + async setRTS(rts) { + return this.setDTRAndRTS(this.getDTR(), rts); + } + + getVID() { + return this.#device_.vendorId; + } + + getPID() { + return this.#device_.productId; + } + + onBuffer(buffer) { + super.onBuffer(buffer); + for (let i = 0; i < buffer.length; i++) { + super.onByte(buffer[i]); + } + const string = this.decodeBuffer(buffer); + if (!string) { + return; + } + for (let char of string) { + super.onChar(char); + if (['\r', '\n'].includes(char)) { + super.onString(this.#stringTemp_); + this.#stringTemp_ = ''; + } else { + this.#stringTemp_ += char; + } + } + } +} + +Web.HID = WebHID; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/kflash.js b/mixly/common/modules/mixly-modules/web/kflash.js new file mode 100644 index 00000000..40488af9 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/kflash.js @@ -0,0 +1,531 @@ +goog.loadJs('web', () => { + +goog.require('crc'); +goog.require('pako'); +goog.require('struct'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Events'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.KFlash'); + +const { + Debug, + Events, + Web +} = Mixly; + +const ISP_PROG = '789cbcbc7d5c1357d6007c6792c924080a0e1890d82201a2acebc38a4aab960d428862eb636b85ea56171d10b5dacafa416dcb4a48263122453a60c0604bb182b25bd71535ada8011569edf787623fb4688080a2420522cac77befcc04d0769f7dff787faffec2ccbdf7dc73cf3df79c73cfb91f33f1e0dd331f5ec300061efdb7695144c4a64541f0a746bfe9161c00363b7bcca6dd2f44e8d4588c2e069bab9b8bc5ea62b1385d1ca6d169b0785d3ca6d569b179ba79d87cdd7c2c4197802dd02dc09ed53d8b3da77b0e5ba85b88fdafee7f8b576d2ac52336794780c500747c077f8b31f884bfc5387cc2df62117cc2df62317cc2df62023ee16fb1043ee16f31099ff0b7580a9ff0b758069ff0b7d8033ee16ff128f884bfc59ef0097f8bbde013fe168f864ff85b3c063ee1cfe283015617532cff9b0c50f85117f537bc6f53a8ba93c2fc40343636ffb5a08db12b7dc635de0b0e9a4eff8ce346bc6d2c5d84e32b7dc6375a7058371bbfbd49a9ee1c2ddafb0e4e4fc4f4477140efc041f6aa89d86b20287013088a40ef58baa4c9a37574fbd88e715de3ef3fd157d658de54d97ab8fd68c789ae93f7cff4cdbd1edf9cd0b6f0f60b9d89ddcb7a57f4dfb8ded27cb3edceed5f3b7bba1ff40ef4ab82306f55888fb76ad2446fd5943f79ab8262c6aa429e1fab9ab472ac6a4afa585590ce571592efab9af4beaf6acabf7d5541b5e35421df8c534dba3e4e35a5731cac1f00eb07c0fa01b07e00ac1f08eb07c2fa81b07e20ac3f01d69f00eb4f80f527c0fa4fc2fa4fc2fa4fc2fa4f6e0a0d9a7e2fd47bba87d117a79710e06ed0918501a57723364edae4ed37bd2c79eeca1b2bf1bf95fd6deea61b9b2429e529f1a92da992ade55be3335a323cd654ae49587b73adc71b956f24bc79f3cdd1eb0faf5fb8e1ce86d17f3ffcf785dbef6c2761df4c413a6f7222e6639aa8f32183b1b1a660dd5852895126a58e2243305f5388ce970cc5fc4ca13a3f320c1b670ad38d235598dca4d2c9c94998bf6992ce9f9c8c059826eb02c8706cbc295c379efc031668fa832e909c82294c53740af28fd804d31f7513c8a9d813a6a9ba27c8ffc19e34fd8fee490ac382d038010047a9d1a3696cebb8f6f11d4f7405df0febab6c3cdc74b4f544fbc98e335d67ef5fe84bb8beb0f985b6c4dbcb3a5774afea5ddd7ff3fa9de65fdb7a6e3fe81ce8be171c01f6f4de0bf69ebea71f2f93947b548e3e3cf6e8b813e34f3e71a6acacbcbcb2f2f0e1a3474f9c3879f2cc99b9fbe32b12feb1f05f2f5425da9655afb0dfd8df5271f31f77fef56b558fed41f5809d97adb99fbb650bc995f24830b02c02c099551a22945f74978bfe8d037ce5977fdbb47b1ab803ff8e9d6e0b06c09a8def409a969d1cbc72eeaa1babf04d659be66ebeb159925a9e1abfba65b524a33c23fef596d73dd656ae4d5877739dc79b956f26bc75f3add11b0e6f58f8ea9d57476f3fbc7d6cd0d1a01726fe3a71ecb4a3d35e88fc35725cc88990c4d09ed071334fcc4c8cea891a3fe9e4a465931f4c1e3febe4ac65b31fcc7e62ca99292bfe38f0c727a2cf44aff8f3c09fdddc8df191346d52a93b192dad7001426351a39e349aee65c4456c028bbcbbed166f94937ca42c19d3c460d95972020314c1b45848d85713d9429b2b805c04b22851ec715a2402b8de0da369b2c027cbd439ccb9b98c595b55d78deb3ee561f547ddb0088fbede749db98b68b100d45ad0030b09b25893ea88f933a1bd5fb812f82b4b66b472584789bbae217a1006049bf661eeb9181fbec5d026be56e8cf0246ae5e0c06db066940df2397624034efa51f27686743547c4fd27eb2c05cfd276b7ef29a5742cff6f7c722d3480c53159d0b34f50c5e3947688bea2b0be909c771f8f6d9e78b75a1812602d05d2740a04902749a4006a6e8669cf523715d7ef1bb53f7740e280f9240f90109304d76164188b4dd831f7d9769171d242591c409c0104a4060d76d3c35af7fc353c3cc13e8f996cf5ff32da4a6483a448df2033906e918775cbc6b314502bc9ab0a9a79a1ea363fd301d8476ea9ea2cf2802e0cccdfcf8a224bf1cc7130dbf4bd9161ba24aa421206507bf4bb5ef5a8c30ce961e57d39baf8040528ab0ef80d8d7b4021efbd43dc5ef6eb0454a61ad7952d49f5292ecb5633ec5da4900ce39f18c46d2ae1477027e541b3b6f40192256f263ce9ab4e74be840d2cd5bdf9863dfbd087f459f7dbf5817865aa6375f86adc23ec5073230f56a3360c7c156df0978f74461fa233de038ca5c028c0471f453fbb6f4b0f6fea44ac3164d7087a44be9db09e44d0050e20f8ef2f29d75a5b969825bd6bf7f46780b6ad069428577f5d57f6b266a2c119c5ea7d5a17ceebd7175be66b2f01eb4ba50f347e13d39b558f327377cca3ecd0c373cad48e6a475b6eb582d27b7fb25aea3eff3124cb88e5de2dfa4aea3823e5595d032c8bd2b9f29cb49dcdd4728e148223c39d859aec3ba783ea7622e166fd670b991aec33c97b37e2adb886fbe9182693490d39385fe645d982fbcd57ca24394f27dff52b19eab3dc75589dadfbf833c7888a7887455fea02db4613ec1ad85da704304f060187e3c817b3cc1e77aad0ea03155822e3037058d2ce643119d40d22ed0d227d2744208c28ccab6a59bb54acf4e604d22b0fdf0c926318075b9c60413cb73255dc11d539ba6352a27bcefc6fe73596af6ea49d2a9c67c8d203f5f107142d9032cd4318a19403de5fb89f9b064563f92350ebbf831eced4a3f37deaccbbc6cbab1667de2964a840348464a6ccd776e3916d2756ed8e5e9658d0bbb5ee8486c5fd6baa2c9d814d69770bfd23c75e73403eb01bca95100b78c82e3999353206b2f4f96a4dcd83c775bd936fc8d1bebe6be52f60aa6590971b0aede31b34d0fd4274df4a6265066b21a4830a124cc4c6fb6024a068da36d14f89659c8044a6420dbc2ca65b88ead3684c454cb9ec6a2f75eef5b6e9b90fec27d6aaf044fec5ad6b1aa955a7613937f0ee5dcf39fff237b257f5d59ebc5c6857d2bda8dede54de186a9e6a3e61339abf6068e0a0cb6eedc39917e4f065a92e3a15720597b63dbdc37cadec0dfbcf1cadcf5982614d1062d8bd52083f62d0a63c5002fd4d27732447a9507b861c936e56a794e8b054e1b00253770dcfe214fe9d709ca8d0970d426b9397e88b58821eda125d1c5d5e662f552db87ffa57e7f9252c26329d46cb0b3e41151f479413f740534924f91d69965d6565b9c40de0380287e4f26b29ef5e0873c3e2df93b21a4832fe854256795958963c28c1719374dea8f8edb20de51d1e7adb0e5e80b1617d227d59b103b7c1369c93747623f91f128f6b0d7ddd8116e96f40e5656f68cd6208c124829872b6deb6ea8c9e85d5fafda6ae986cfba199bf6c557c306aaf79c0097f22c1097fec2ea4db3e50d029d8ab3caf0c431efa31e8f7e943253fa30366d3a8f6dc9abbfc5667c95c7c6e35a3de64f36269e9ff5f65f7d3a3da1234a2605d083ea8a1487629506229e85da2ad32c6c97f4ed47f3f0d30620580909f408bcbbc5487f59e253acbc90e75bf2ff5a4938037c46e28a67034d72902dd7b1fe9f7f6951665500ff676bd36a49badb092047462bbebeb171eee6b2cdf8b61b6b31cd44a4ff490e8b73c037c5468a413e4999e240b985dedb027c5b154d3638bb9c2950fe530cda6c8a56ffa63a3bd2466f2f497b702bb2dfe106c106cc310fc9558d3a9811de52ad0401dc29f59f052f62d68d64de2a553230fe899f182fd3c863112f684c5fef0744f50428237fc8b39a9cbfb27b4851ed3b7e5a7a6dc313706001453afb584b1838692989dd961edc11d69ed02ae95ad874d272d430d5106ece3689ea0ae1583080d0220ba3af3f00ce92e8791cdc203f85fca737bb406ed29252914a0664398483ea768d11f4610f169a9f34bf590f4b58a70a28837a812ee9c3838a18734e6f030f536a13f8fd0f2c34b3f70b1b2afbe2277dfd1238c61a48791da4fc529efe422aa08c0c382b41ef5bc00dc9d5b7f5f597802e0cf54b54df0ce672cf6e60633ebacd32c4b455e4f2bc89aafea480bb6cbd6b907ebb073727edcfea02fc9c31776dd95a644d451a09389437511378450e989c6ab2437d3bafaa9ec43267e8545bba09496654ad4daf2d00a2f906484795538589e67f00e6caaad27a61de31b04a16b9b6176093a1cd12d5b2c55fe19bcb36f2d8e57590b7c48156cd4a5e2a453762b6446e39e4b6f91f30f38571b6220b3f6350affd1eeadb79288362ac8cfc264f14df041298b912f4d605564996bf8d8509a35eb1e5b408f65d0f79130c7ba987bd3fcb3dbbe188208df0d1d20627609230fb0e772bd7561ecfce8af16109b5d847037d457efe6e2d4b668945623fe8efca23398fd1b92d1dcd50480a04d9eae761d577047fe113997b7ebddf99ca4b1be477903b57fd23df73e247615c9f8e9248012531e23a8dbc1b9534cf164a9e146cd16cbe46f315b94b8ae6f75982accfd069dc584b7f853601ea3d6b943c2597406849d859f350a9fa571e834690a9a069f22ed8a6386e062b0eea97f7c2329979bae71aa659b1e8f62f8a45fd3f21dd42165929ce0716d4ea07e474812aafeb763dd49704260220dbbd5f8cb9b5f0334e2311f471324290708fe7a0feee27df07c8be1050efa047c0d1947c1e7a0350c2a03feac94b80a31ff9fdd093f5a4bd9b718a38e225b4d84711355ec35e3bfd90228f7839fc9b0784f20714f1b5579d8dd74e4957a5018bb342cb423b6d82342349ae321980a88e04539b08b1405b6f59ea75489da43dbc696aa390e7ca4e0d4e15f03e44140ad2d983e82a89a1039b81cec9684b6a271e549612a037299a817eb396363981399e7ebb01ce58fd362b0c3a108dd60632c6e1dd3c60d6d6424b5ee3458feb0645b57046f56cb3b192afbdfa931c3e97fa50ce11af54fb33b1e1263afd1cce66b840ade3f47576ab64f0999d27f7783a3c9d31a46343c380cf0dd80fc939f54e095aebd9b3272dab1cfa6736e849da8012fef613f0097ffbc5f0097ffb45f0097ffb71f884bffd187cc2df7e009ff00767f7eeee31ec1e065cca65f71018f717bf94bbd4c6ee5101be0d63b6332becc19eac5af984bce83d8ef473f7f7d996a697b7571aa63265d0533376093235da52cfcd4f47cf3432da334d0affb2d4e876b336faeb53f3c2fb0862eafdf0aeac35f9ce30c13667f93f2b1d8a3263f52af128264777570f3d01d64506153b2942ec21c8b6875e2ec6288b4a443f4702591af40cfcbb00aab12d2353de9ba79cd4e511c64448cbdc734040ff8b3ed70fc5fd5f38c1981734cf4a85f739e51b259bc3989694541491f03af76b25b38316a2c4ce4a13438aa095dc3018c954a833fd90a5086e94405f4ae97f1c2803ea80328200cae9f03789f050ce81cf2002578610f8c4789d06c6ac1e8265ba619173de7a97a28f7f4b73cd6914defae634f16fa641707f4e2ba2154fe1a49e9ba9627b2c7e0045b4be3c55b1cff0d682e914caef0be90e3eed007c9ae870d717d27785f201771f84f1e89f334ff799d022af67fd7c6ce1bc3fa75d9a023dbd90ae1758d2b058f954d70bc86b5646885f10eade95ae21e20f08be71e91de97a59fca76e4ff936a39df349aa4db14ee7d46991b6e81b082c20bdecfec58e6f5b8d7de55d5fb65f6efab17145dfaafbabbbd675bcdafe7eceb49d6866bd545fb2a1ae1e8d9efe690f40b954801e4b7ac3114da0b3487f4ca35b802da0c1a849b2dbcb8c87342b18617d6207ed45841144b5c79698c45df4a6bf60cb76499315eb7d17d15d15617171c74be8af0daa6b4c9851807f47915cc62430e51645a3901346fb13ded53bf7aa090d5dec0150295f521392d9a68ff2c0caad91a3acea2a8345ad7c6a2f38de77a8741806b4f627fde9d21f0fea4fca80fe9819d4cafaaf941be94d56f0a3714eb2e7ebbab0446302936da113a15c435c957bcdbb9054299faa04db7a75da968df19bcb374bb6b5ac8d5f57be4ef2ca8d37e7be55f6169e796343342383f219350a64e9127471d4825135cb6da815d169d44a5c5cb9c921f31a10417e4993d9ad64109d2df1a637ec93c2f7799f5e142ff25c5f2d2ec1bd72ad5e041cd509e0a6a5fa7c8188eeee024468b5f800466590eae5e7ca514ff839f809bfe67f6b914fc26990931423bdeb4ffad88e686017dc1ac49ea3163c1cf47ad6fcec7c9be7fa578de1c2aa4d4d3aa2a22c8dca70d9a83452aaf46f028a76f1d7772cd58663318ac6b8f3374d370df4a67e70d3244d8e365e66a2859a59db5e8a2b4b9bf0de4be7fd934fc211e1b8bd37d26bdf10b7757d9da7c38c6e1a83322b4dcb3b3dd7bbb99f1ccc6bbbcb856835db14ebe9e60a00c7fecdab38bd691fb8690883ad0954feede5b8d9268b5a91fcd27934facf3f1c1ec520c9d26f26db6e9ae87bffc07e3455d737e04fc1b14323576d6cc0714ba5c1115bdad37c5c5f0df95f6d0698a65656586df50804e955f4829f011ae915dc3843c805a53f669e5e65bce6f64a5f7939ee86a1da648a79f9bc22f9066ab91a4591617dc35164c2fd855de13b0fef64c5c40b581cb1a0ff2fe6f660e6b7f1238a1e451f430d396400fd4fd3dfcb8021f907bb3e4986d16f3e047af9648c36656017991798ecbdf3776121709e1f75dd3e21ddd85ed65ade84a2c217eea3987145fbaad6d54dac690b9cb71a71fa0d17ce76918336b49e86bcc32e0bfe6fada216d3fc5e9c58b69e8b13616ce8b873ac2fdc2c8ce44a96dcf8a4a50d5a10f3a7bfd28d1631db301de85428560894cbc16872a105a4b11272901ef73d00af9955f468935891e2bfde774da7b5cc5274c7f756511a95260745ce95a55443018c253a44d867f95abad929651b5280d564123d868d20073335b4ec18f04f49b7464a2c6afa853a8ffe2846253a26c32dcdc87e12b768fc98b77f4a7fbc00f1f30529ebf4058aa62a490180811e501e6db8c93d4f36b4b269e3c0ae3bbb6e96b4045bbc1d6ea9ab79115a67ecd2e96f102dc04ada8803707e5713b413463c0de721654ec93e1803aafdf89c2e989341e6db59897a094b36928ee6962eb62104b39aeac967ecbeebe97912a0585370b7e46615d90426db661a66d82d2d9082d3271ab9e7f1138d0826d8a248639d72a070ee83b83a9e147d6406f48d96715e7a4c1598a852132a261e71a36acf058e23552d124c8eea3f7df9475f9a82bcf66ef76d058eac3b810d103a36927200910de2589526a9da9a068a5b3aad12117acb57355fcb5c38ccdd18f942cbac1dd18c68fa0e8c0e100710a1ecd6192046dafc80ed8902f43e8902e161b5f7067bf3e4887711aeef518e4444a7c0992440a4809a82898ee500f68df383b4732f8834ed55f76be92f9ce1fc8c4b9a503d8a24dfcca27de9fea4c85d7fc1c20a66eda4f7f5f85362315e3664979233fb93c273e831dd41f46606a3adb3275afaa480ddd5be5354e10926bec779a0a5ce9df4b8f57256feac887e871ca7b7c9b0c4022ac51764398576b6eb21b43f4d6f75018ee23fbbdee24b9c993077a34bc1e53ee57a6b4925956801f9f1f4f50b6236310d588d4651a0711c081c370e8c962cdc43119241ef55b47f9d84d05a2f87a9abc635008ef3a8fe9c86b3d276ef56d006eea41fff269e6ebe00ac9213442df4ff90bc5c006c623dc4d822c944397e7c8e0be66c25d3ed1401e54502e5656ddd7d365185598d17c8a536ef75b4a40ef8aeeedceb78a56140faaac6e69be2bdbe736fd58e3d6afa2f4f88786956ac89240b40d99edd7715bc34db9ca7b8a7dd799275fa03cfbb9eb7144ee59171d81fabe8cfa410b2643592ad9216c51a54c7a77a9a21e0748cdcf795fe28c7db2d8d5ea7f355bc6c345f6baeaa345db5136999e4ac82fe8ccc5d85c7f5333de0cc40efe9f1e0da389ef657eaad8740a7a5259ea0565b056d5db495488ddc5901961564fa55657c00223d1ea823dfa804df0e8d6be35f2186806e18bdd38427f4543c07830bb104344a91446a4cb5498b85ef953be1d806bbd653ebc6f3ba7a24ed5fcae90b308771b623534bbf9a2462b4cae9d0f2c1f12e49ebb44642fb4e375b0094b44f9ce221fdf59f70a68acc89f9f83d0e5fb86bb5d9aeb7e500cab07320a688c9a9cd531e7b080ec45799724081b3e09623c3f433cb8cc286e6f8535baaa145c104bb01f9cc69e9c99e0f746790471dbe87f6ade3d6a3f55a0238726d0304d16fabaa3f00f6e54492753082d8a7a5efd4834a13bdb1d9437f81000cc910fbf31a061c379d03d0966edd02cbf22f8e2c617b3240bf8ddd6a1aa48c923ebaa35ea2af2280fe2803f4760213d9194c7f86c04567185c544588f41f31229661c4ca231940f41133a83c9604941fb930e52927a63cd220521eab17293f4ac395a7e422e8718a95a7c8c12db6dd2bdf27df2794a7ea071cb7202d4dce9eec2cfade017195b10ed0db2fe1aca66750a7ed97d36c378c1d224d3d40348f849a5c0fc22d4a4062576d91a66ea08f87796437a45c091a8043de037ba4d336dbe5cd9cff399f8fa4639f13d2f3f8b463c984f4b25663fb54c3a3f3d25126a03d3ea525f9d159275488cbceb1953ba735b9e3c0b254fd4cc320b4b0386bde82b1a3c48354ef8541fa419408cd64d443d9203f9ba589a05f53fa006009683e7b81791c378c4a47c1d9ecd5ea3e3a69ed0cde2a988cdeaf5499fe8015a5d1d21e406d710e46174a5309f3c4dbe9d62a591ba0bd7bc414310aa72f1c12ff68ad32af8de1e5338361db0280f2d86ce8c51a061399e09d6c6f00a86a5b8b29e74c1f14e4f1ee013b7d712d56f45ac92b457715b7ae196694a17d7a66279d2f09d64f170f5619ac6ad14903a0deb83898b0973692fe55322d462b7a3c5812b6f965efb8a23525eb29897990da29c614778b6e516496984ead97b2928df8b726baff02502497b42a524adae1bc2ca21df5e218316b12e3fec9450eff9422a7ff9aa25b55a6140c512e6f00689de1759ef228ac2485c9a96a4bc394c7a66389eef8ade99be38a35251d8af5255d34d902908d86f8441abb62237c1795dc1745c1b13089c5457de9f632e88108a3f4d35a3b7d61ad17ea2b472f23c6509f11fd886e16d1dd58ef41911b713ab31e40fa5a217ded14a2fa354435ac812b9215d715298a66c51a455b514a95716d4c663c9153659a8ed11b2f8faf5a7b0b205aab98148c6d19070a9a8bd26a894486f726049e6f77f7a4b101f1ec6a35e44087fffa22d89b1eae37b01dd14ad41b462ce67ba4873d2ae97bdee68e344bbf7cde46abd7c94ad617ad71f765a80f77eac5bfdb870df5e0b77df8d6fc47fbefb5dff93bed5f1f6effc2751bec45c7e020f458e9f09d0e9c68413014490cf65aaf59e82227d03fcd0cb2bd9f0e5e2cde508568e4686ba99770b46daf17fb27fb5ff74ff16fe668a3eb718a84fe334960be7481c337adc0e9ff4ad1ad32c6cdabe4f5d871ff35fe6dfeebfd6f73749270d44902ff14d1498a458a4edfcd302df2edaeb5559a824d1bec6e5a1bab37d82f9a275455b5b57163e3f6ed3e3c8de2d070c354c6922403ca7f925f4b9a2c47382b5bc8cf07281ffa075f97c4e69f53d49425e32968b717d59a6ad0178662109eb3caa57be8f90478794da5e5e55637148a0632f95502180fdcb6a1d8d3bd8abbb049d2c5ba48ef4ac354c334f309b3f93384cd1c8fc50b12fed6a3b5f57e21185abffcd298602c5b3b776d1883569684f521e2117af8faaff727a138880eec06fd19fd021637658cb08e31afb5df866a096b6063dddc38cacc34721cd94fd6b8391294339223ce338f7204f341168735a5b58435551a76d0c1ad12684d03eae6cc373b7919516322391c5d3929aa65d91e13f8f80edb4362e63b07b42535304e13a3382d73095a2b2fe356cbf37398cfa6acd77dc19271240d2dbb7bed063cab9c231623ee2843c48075d9fa514f14eb61bcc6458a26c0a78bb9b5178a044190cf93e81d4e184bbb71346ee4ca5c7240d42b1629c3c400ad2e2bbe57acc734a707b9151f17299df1933bee3c6033e760da7c87ffa297ce77da1f919932f230e45029c7f3e5233954ffcf473934bc767bbc168dfa48de64dd5d8f4e3df07bb5e3ffc3da11bf2a7c1d51b7cfc1c33c52d2364db31e08efe3b0f9cf950ef7b7d463ce9a707371bde7eb6128fa5f4c80cca5027629cc5def8653cffc3d8e374e471c9ff296ee53774e4d24cc91f0b4d7fc826851fac3b1108b3d981c6e958da322abd1fd56f32d0f0bae0dd398ec89d6471318b4228fd648f5165e3b280b298a61d15a2ad212e87300c42dfa1d893791063de7ac1ff28a34caa26e403fd7083e5a4a2734425fe7d17d83a752321b4487203d7ba244ca5231a07f944817ad41fdcdcf29ae57c44d787bcefae273735e82cf14cfd775f18827fd49fa44a82d13ba41897a8b964e7549a3487510414626b90091f3c7affa3358936bbbfffaee3cab85c4d0daaa7f23920c248394254a44bf44221fd417d5cf77cc6b9db25e591a829dfee6715e0605215e7e6cf37c1d8b6760cb386c39dce818dbdd53a2fef817d832e3044bb57481538cea4fb0b14e092781994bfe64d77fcc608e9db20ed1c704f0ca511e9981cd963d1da3d3fa384a9e7ff9bc6379d05d14f95f342e3472a3ac2d1d5a3bc9b45716cf961d5277daddebd409ad8fcba0ba1e491636fff8b961590cfaf5ff92c5c68f86252cab0941869bff136c8d7d78e46bda1f1df9619b38d520e98231fc0f286e9fef12e42b05f9d3449a218d255dfd910693bab328ace04f5999bed3c4f45fd13e8c403ffdb81ce83443ab49650847b9c531bebbaf8ac852bbf3b34ae1984de8c6872193df1341c8fef82ab259edf8aee701f2ad59a3b1b860151ffbfae55a5aa0d7feaff2ca95368453b78b6df20506a705faf2d097ad2c894d6066431a515af94fd34141bf97129a421b6d249e402719c29ac20d870d9276a17f89fae3d057318a07e597904f5ae7645dcd8391c61ee0bf5af4148131e6742b3de113f1498bb94d64130f16bfbd7bdd494bd1abfe77bc6f5190a6a216ce639ad5d0c4fb8ada3c1841b63b81608f8b77d1ee1dc9c6b660666eca8d64645fe5f70607e1ccb1c8bf059b57785d7f5c3c68b902e177b436e6be7dd8b26b1dbdd34fa6ffc8087d763f4cf9d147a08a6801bb52197361f3498bff3a7a825462b98456349aafd2729b447e195230e3f235eef9cce59f8bee14dd24e6f1d4214f5de17050d2fb14d9f1249de212530d51805f3360b455967ae09dfa4d1e57737acf152b2907568b1cbc4d565a8a68ca480eee86b8a0377037df46ccfbd0eefdaaf75dff9bcb6dd4650bf0d1d22ba19fd3900602499328502217a2e2f03d2c1f1517d549186d60924a1d0999a1485d9e67419cfab7f3db5d7776df2c68f3bd5377fa79a8ebf5b03e8a8a29b48a92560fa80694e3845131855651b81c17ccc98051310ba3620aada2b4d5dda71a54582059cf47c5304af15f9d6e75dc720e78c2a898f71186e6522d9c293e2413dc3345a9549829b468a650253c3a53cc480f6b3ecccde6c16d92dbd30cf4cf30d66a80f35da904208bcddc6549a09e7030423ad31d7d8c2d5bedf85fa2ef57ed3369446a6f9e2cad388fb5c178fa2c825434c248276b72297c172b1a31cdcde48494ca14af95fc6a38d23e4917d23f73ce5483f92b96dc4c2a1a15ed8c56f1b55b9f9036bd0822a02516e6899eb2d47073985bf3ce61b7853933689babd3caed26439bb5dc6e710e422fbce2ad53edc826481ba5edd01a49394f244df1f53b5ae61cf26b866c880cfb14c1210c720e034aa13d5ca57f085668ff0d473f2067ba395ad33392a3e48cdffa6b7c4daede41729abb5e63ebc87aa63ffd7e3d61fca6ba6ba96f3e327e531fad85fe8f262c0da8efce29488e337f41d608d34cd3e37ab4e737bf0d49226c6f991c6280f15df8c4d27c5279981c70dc760e4c6db20471b44d117ccb5eb9065986504638219625ec4d9904b8361eaed14b483bcb52e59707072949cb3a4c63698096a89a5c35f414f61a050b9f294dcbb65cb287bbfd58198fa3d4e1de89acb9278735a15df9ab82ee7c884e63629a6f6c01e9173bbe6c0f371f36cb0f70fbc37d96039c3d7860ec2bbb5fdef56debe5a6a3869982bc80f485c68b0c0fa97928e07dcd7288b3f3a388f9964af8b6b3f221e5e18d8b3e32702b2805c9a213329060b212bd3072954d76c700ac5986d78a1d13e6f7cb0fa1bde3f92a268eaf1fced5f74d163d2543f12e58dc3df36bab490ce6f645df9fd92578462b443365b0e4e9afad4cd7e0b4f6a9ade11d7c0958beeaf5b3197846d9d655abcfa686377eb92391318708f4a75232191e2376bc13f79022762f1678a5a7e43380a582df4b3b6911559100d797688a36e43b645fe85ba0edd6462676e3f4eb97c18179ba5b251b26e41575a2dde006bcd956054b441026708704446ee9c6ab1a60fc230122fa672926fa84009464a3887a7d1ea07dd10efd468220fffdeefe310d03a9f6ff7f5af834aff8ab82f98c36a0b4dad483cf86b81c6f5d1e3830cfec74b732fba56e7cf7fcd910f35963f5ff4bdc9fda96a72f6b15cd96e02f74bc3c57146e84767514286b9ced71533ddbe0548bb417003ac5b6b02bb1ddd8b4a20949d851837e9611f33997395d5f2f06e69cfcfa9279315a3adf29d9369d7e518dcd16c7c594245b4789c1819c03e7f475e741716d02935dcc43ef3bc741bfe714b30410b9f359228b80dea0033e4994476bd404ca0ff4100326e7d0ad44eb81d2895a47bef341e67464f5018ea0fa673b166c1c0c24bb06cb4cf46231d069678b5dea6d3608b9dbd987f02fb1bb5bc99cb5c536fcee58a0fe4dbd743bd7b2711dc678e8eb1e0cdeee2d499ea8c5420ee4d0d94efcf7f75bdc94644e772cc81ae8b44f65e44a6e9fb8b56025a60d8df59b7768dee4855692e867075c63742a7afb779895ecee45a7dae8e4fbb8952c7c403372ace0baff593882e41d9c9188ea7a069f79afd306e11e2238c7aafb0310aeefba1dcd4409d7bfecfbf6fee52ec9ede0b61f3ba0d7689ed6c4ca309cf2f81a673d80a82c8d32c9c1ac267d1d098adbf8b9c5636dcbb6f837cadf90bce9c59de25b84d366e403cf6cc48bb357cf349419db6c7aad4e845f53e298b8d6aaf4ecc4fb93ced47cd99add4e492270374e7466625bb3084252300ec02e6c8390d7718a2cc569aa793465527130709e9b4b198c20fa1afd130910348ae6a834180942e8e86b684d0e5aeb47b072387c9a3d791cfe6a8485250d805e4c82cca49335d1068996d6920051d9cbd1c792a564b811e2f1284b638d723093c3c36859c96e093dea9227ed28f766255904ed75692c7dabdcc3318ab8837a0e7dce0e965884435fbf78a28d1ea5c168b044e41857f72bc28de6cac9a5fc1ba2b713f7b1f12939f8c2ce8d231c9150ed4c836383ebd78dd229eed38cd77fd54eb00d97d3afb8c07069e92fbf6acfd43c63cfaef9a39d95d448745ac7844b5d65ab59d338100de99640ba1dbe755dac298c4b8f03666d28848c90d0e24b6359895ae278f252d3a1f813e7e9174940684fd6c8b4d428c89d12a7549a4cbf44405e7d8d4712a56a25de299ee22f58f423a907210e92f6b8349abe510e39d621a1b16e4fe877900e7977a3bbbfa8978c5606611791347109875c83e597aed5c2f6b0507d3c1c6d827940cdf003b7f77a104b72959eefe301a5bf43cd3e276c5b9a3cdf46206b80ff67cad41f3e7d50aa7697ce7eac34ebdf11fe17872299e413c441423bc51f6207d2e45adbfbda335cbb0ce4286a15b6a8be6ed36bc4509e511a2f5e6620aa15c9e8fd4ceb33ef598d24a0250d8021f5175c83ba1624d71a5bcb6a4672a2fd926d42fa99a639dee83ce1d4ae69f767f69d6c3cdb7aa13dbae95e98ba93f709ea0f6626461ba699fea7c2e989a9c6808e315b1e5e89f573305acecf9fe42ae7bcd8f2867254c6bdff93fc0003b9a5255abaa807102a2eef03e70775b621887f906518e84f24e25f56eb54dd83e8aec509d3bf545d9e3aae85dbae97d5dfdc421ebdf2605d29f72c6f2e45255c9b53c87731d07b8fa74f7b29dc58b67a076d21d07c9ffa9130f6a7510fa0e68cc0dafd5011475b7bc42fabad46d720e7e14fbebc974ef81a70341d70eee59eff228b86e8ac208b3080d680f8f3bf9e7174800d302a8e8a3fb8f6e8b4c76dfd490786fbf52fb20003acf46b82bf61b609d2b2c48ef98435210e571a368580235e1a7eb6562fc1fdb0fc48a210b769c7201f31247249377e4f058ee8f21cb72b06f89527e10cb686ff899e324a85f99dc67ca88cfb634e5af4f524086e9d668051bf30f757a49fb48435e93f22c161c39cbf3ff5c6f4ad53d64f5a13f137497b76d1a456849762e200bfaa854e99859b10afee858223f272745aae7c31ef191d582cac115cc34a79b8c3a6b3460e8e2b0f4d9cb683af615ce43e658f95224f6caab99291172298d414defffab21d7960d35a4f1866093e58cd95b9ab2f0a50042dd46fe07d30990cfa607b910fb58efeef3e58d0f78ffb60b250e88371f56faefaef3e58f285ffe483d59cffcf3e58cde7c33ed8a3e754641c5f679a8e1aa71a2b052f33b5cdbd129a7c87f3d8f8feb6fe06ee861baef1d6301c68791cae79082eb96d043ec76ff0fd3c84af6504beebbfc1f7d310bea611f8aefd06df8f43f8ae8fc0f7b3fe1a01d05a82a49d1d8806b9daa9067af78078570ca10dbcb205047ed70cac57ba81b54183b183dda4f5521dc83553afdfc702c788007bff3e16fdf66cb90dd03b7e11edd3300b69c68ecf345532478d7cabccb560a340d18fc3ad967eaf5b18b8e28c9a968c46a7e4ff8cf6b3de961e2dd21f9702a87ff30e5baa886ea0af2340e0133300415415d66155ad1f01742ada71ae79808abd37486d7912509b28c0fa3d05bcdae8bda371733c3dba01ed7083069c89a7c735006bd10ecc7a6547ccd1c28083d622297c97c65cb2eb26d5d91da6d103270a9547fcb061edb9f0e4d6a6f18d6502e5a99f09dc3a441171c07df21ac6b902b77273bc10aff63811af688c0a841ce239b50550033ca7223739c03ec82d17d69f4368ab9c6900f18a252270c439e853c9cee02cb111276269e2cc237c23be73f30dd40ff32da8168b652fd9d4e6bac7b946412e1cb6d032917866a1fe2902dd31da331354310d20f2f227e81e51561d08344a8043d33230c25e780ff7b7f9bcd0dfbd23fb3badf0397be60c382b2657e0313e320d3a6b37cd20442dbec18c3b52a588ac07d959136b2df57f45762c86ee41f092a6e1b65a64423b12415a0bca929f5f82eaa213974a5bc59aec2cf90c0fb46e15939d155a67b171e729628ba0bdfc771a6f87a32da210d3a05e553f5869c07db3e5d86e2fcdf25d42ccfad0e67a805b4da4b43aa91b8fd28c415c0cb9918c4ef4572575e17353221b2af02a57055ed488694a9a782b8a6c33531be33395a12459121d3a33fd35b7befc625932ead370df8623b4fa127784c668e9db158095878228e84d47172a62b8b5bd5a84357309c4aca5ef56000fc2068161f41e0be7849c80faa25842b3cd5a748e87599ebe4563143413bc05231fb14ee3c1f054942ec0e2e5fb21d744225f4a0abca9a444353b2e0ccabc0a9480bd7bce1496ccd51f24faa82d3d98f5b209637656ef2907552de3b089a4b2f4529f075900665af461649fb5c1823139d5b00397f29441ae3e22cc315ef270a709d346117f5834317ed762769c0a54ee51969e18bd2b9650e5c3fa273c1d7ef503e5c9fced1e8aecc02b4df4ba0ae835778cc95c42afb6e1d97ef20ab452a8f2e8d59d2c2c8ab149fa40ff388471275969d9925774cecd09e8c1e1f49d0ac9f01ad1c2a6171a11a6a986fe247a8d4dcc925924369f7ebb1baf344479fc61112b03a24042c671f75b4b492c1777ec35015a5a88622e52e0988b98ec98f074ff881d996e9d7678f5165f17cda035a77eee84f33de8ad502612b74980673039d3a20c82febbc5044eee91a5c154300994212440f72544da34b59fc346004f4ae22d46bc39bc07ad9a112ac7f8fa01426bb9006556d712cdee69005124f09c69b14982201e6e654d02e6a2b8d972410a58e3eae7294990f8844517af3c02f11f83fe5f582de9d87b6100d5807ebd64a6e5c5585d58f1d9fea8e641260d4a70d6bd0a6d04e299b7986eaec0918f654d5a02c693272d3bc92815f03c096589894763bd240fdda11ce632ac71b302e07e50e23cb7e9a20b3d876491eb3b1924ae323971e4bfc8ebd15a8c495b697907e2dd05c34e0e663a65d18ae845a4c7d3e9923e74b326a163613baa7b6fb23a02f18d2a6800330ba2c820106c898b154d26812e84da23c6b17728bf3028410573b1c9ba30df73149925dd14a58dd894268e70b7cbb7a9551fe5da2ca265f53bd2a636e196b2541bc4175d1057732f431c61463cd871af828cd8b47b7e843228041bbe79339541376fa6c2b1ecd4d2372a46e382049221db74b3a0fe31e693966c531419b748f1975eebd55ccf9fb2b350ea652ef5ec50ca5ae807baadfd36772a14dcb6d60da56680abd64fedee94069cb67e3354b604cd58fd4b864a5351fae192a1f22d28ed7a7ea89cbbb577f7f9a1f24294fea570a8fc004adb0b6d3649dca29f976566580b8fc3feb8b6f7e65dcdfdfcc7ec2c3edf5a5807d01eee6d9b3b7d096ccba8b3bb53cd203de38ba1b26eb032e39ba132028bc9f861a8cc0fc3325287ca42b128b26f3075a874064cdf1f5c3954ae81e98ec19543e54b60ba71f0c050792a4cd70c1e182adf02d35983ef0f9533300d06df1f2a2f44e981d0a1f20328dd173adc2b946e9c68e722fdd60adc3dbe5aaf91e38ba04be211a64c39c28978b5eb0292740ecf63259f5fb8cae12f4978acc6c55e6e5414499ca434d40aa991b28152c3b28152c3b28152c3b281528fc80687f5d9860ff9917f04ebcb8f607df911ac2f3f8215a578895932542ab432542e48d850392f51cff33c4d7c4ca22eb79de6f31f93a8c447242af111894a7c44a2121f91a8c447242af131894a1c92a0a1725e82560e950b123454ce4bd081a1725e42de1f2ae725f4fda1725ec24287ca05091b2a3f8ed2f7270e950b1236c43d5e7f8b4fbbd3bcfe161f8ff161a0378056ed057fe5e3c91a61eff9c96006dd30d069dc770cf6db58b40ae4a890209f27900c1dbcaaa51b9d38da957282a87a15089567e6118e28ed15909937c1519cb3cf397407f71bf79708782942ab378a862f6cee14897d611f7ac7afda902d6fd3d2ce8ab021dbd7ccebc690e55b9c6b46d2d66cfd224ff11dd20a3e779f19c919ebcae86bb60de770fd77fcc0f1a7e485cc0ce8af92ae2791d4f5e67d9157f2ada0157f3d6dae455af28bc6ee4e233985753b602bbface5ebaf386d46f2c620791bc3d5bf166373972089d340896be6724e9b4b5620498a223b07bbf9d1f82b778fc7457640bdf94518e115282fe6119c3f5f9bc195a19228121bfc99c39329bf24d480e38b212d6778edbfd6cf8ded9cd861ec53cedd3e8e604fcdfd2df653677b8f8fc47e6aee48eca7e2511e2a432d101857e342fa6977d9c896ff79e1f9e3a8e5b7b4c32dafaf6738d8bef8dfb6dc7721fff4c896fbe247b6dcf718f6f60b1338ec73168ce8d767329e9284980c948b30a316382a2f5eade6a8893deb57bbb536bf1be2587fee8b2a3e0fb574565ecbf22331473b0c33a53eb31ac95cbe966e479e052f73a6f3c33287244c383fe44768f837252ed35cb543cf19174a7ca3ea7661d0233f38f2fccac226e82113dd1ea15f98b534e8f6e4bef0331fd3f03b4741e72bcd090cff9e7cae9259289c5b2d9dcfed18f23b54b5958c1b06e82b0dc16ef89a4ae411f2f0f17c5ecd4758e8a3fbfa36d857d121133068b3b4d4b65e60fd3e0eb05d5d2242c688035ffc003cb303514d8811ddc76d3c743d38afadf90d34b4dd62a815f3bcb498c6da5081e5e638729cf785b92b03c60b75a4fbab11b74493c598781e98e7c6815a42789ed98185225c8418b361021ff7dfe62c4b7bc51437e7558779ce234b13dcc8f3df1d858dbcf714db476846a6456d324d1d4fe52226877e9b0cc334d71bdc7708158b904f686d9083dc1c4615b9a41b60a11b6c68fc043ffb3eea7dc95f4fe7e4960ee796f6f0b9d6062db83a023aa8db9d4f62bd23f24befb9f3ebc172fb08f85fb9fcc5d68628b00fb63f7b49373e6324be0e77791aa81b89ef8e3bdf02aedb08c1a226ffe86ec504747699900b7e40b97db148ca030eba734b1bf85c4429a342e7059eb7b9cb1a2fa1b253da5e6ee40f2ea0b6748f2142ad723f80a42210ca049c95b892c0250cf842b8e15cd384f27efe2b8a57326deed51d3e0f51d46c73dfa273e791d83776f7ea0e478df6ba3bddc8a73bdde95ff834c48399edeebed7032647f715a6c9af17faf43316cae3be6e776b5ddd1074c363d0353ff0d0a7623fb6fd16daf91874e36537b4dfefe0763d060dbe77434f1e01ed7e3b5435c2727ccbc7fbdab53b62d1a9427714740f460fd9597c597dda8ed86813d1cc59b817ac0d2ad85afe5766ade5045abfed49e1f351047eea5b29c48260a2204cf1b95cc84194d2c254db2f0c1c517d1ac1ad4f0cafbda6e94f5ad0b74a4ab468e4d81e17a0f35b70bee5b4e492589dca5caf585b7c4eba21dbe29eb1f7e5f8681d7b9d038a95fd0dd2d4661bee47255dc284f5d3bfebb4b30ae9c27a10c890203bcb77e595042267cb4f0573d1e972fe54f917420dd48ab2945cc6d7ac7b4358fb583aabb0281653a173253b62b150c8174254df3d287a8a00fab07918db23c19b07309532a81514c1989de3c3872d2f76dad0f762ace21383e88e7fb839b8239011835c2ddd5d815bf6a05348615b2909186329e4d6ddff2eac77e9792b99958b95166a69ff1e1cda646b8f98af61dc424922841a9a3785fdf72cc1d6eec44aa11d2fec11b0c76fa6241b0558e675be4f4ca6701ac08495ce6c9ada08713739bd71b9b0ee1d8ab1d196008d28ce6d25c12fd9a97800b5f4076cf692e378d9ea40dfe9a06ca335a90e50f75d6302f7d4039b6b0cc87cdb62e1eaa74517eba36460b6a44e1d98180f4415f51e986a9b5559eef4e0df978f787f867bd71fa8f7a0327ac6048e8b07ba50b6590394e5362ed7671fd2745d6877319f438ed285f6162b0fda3c3ed7224842fa79bdb28cc48ace45467d0d02e52aa0c953965678c6e429cbe114adba527f45cb7db1464565b85c57ea8b1660aa746bd16757e058a27b8457606cbc5b5454cf9f86e17926a1294996b7c0df549e679a75c26dc0cd58696a287fcecab114f76387642cf4a5e842c54ae5619b94fbda8b9cc0d12a19334fc7ca3f8191b6f4e017f43e3f922d84325e84ce644d5a72b848542505fa49b14037896d9d0494c114c64ab3f0aa1d72d1d922e5479f00e5a92b00d2825799eaf140f17170928994dc07d26f8399694d82fffb2078359c67b95d9be6cf8473690ff81361eef360fbbbccf31cfbfc1e0eb7bde6b947dbf67fbced23b0ed6357008a94c153beb1d6cb3dd8ed01452cf26c3ecd53706b1c313e5e9aa155ec539dc84a04a1b9c2066b14fd6fedd62d799933e6fac5e42fcdddf15591963b990dc7023dafd41768a3c8dec14c79efdb05f5df6bb7e4c1515ac0957c869e2af82c5ab00d8e5211972afa0ccd9cc2aa1fa78dceae9316425be4e0fb77ae869f7fa70ad141d0b3c2de1023fb54b0c209829def1b5e2545a78004ddeea07c6780326871244d4367774f0b36f06e9905ad1509b607a6507d94c39f8f0e6b4a68e4f6fd843b8a208e8554ca6d9c5fd61e6d61e27d1d7caae266b4c59fae34d04f3600f931f4c528c3ade8026972409d40f572658478e84469560f5af54d60ca52f0b5fc0e5370238f47d582a80db62846505b7a54a0cff1287da309815f8e4acb0e3a724629ba9f4f423f3649d1ecffa9e2b6a213dd32cfce52a416bd52d25cd456f48aa773d72dc5ca1d9d0ca9b80eed64aaff5a457ad14d5f67411acd96832267110d6be099f222c70e1aea0bb7aa66acd069679aa01553ef5a45ef3d00b2e52b353ab6ca548147122e889d515d9738d8fa012435c23adc07c335f26fa355e1ebf16895eea4658703adca293f22015a23e46abe57dfa7d37e6147bb8398f67fa29a3d318893db938ceaf644b9fd0f61af1ed92d44238346058dcea6c9eacefe2437ec69873b862ced9a70dd7d8612b864b787ce53f60ab2f2501f9505f0dd8ad44207a355342b9f0ac574716ea82c171a9f30065fcbaf5dfbafed7fd131563508f9d6dc66ef7ff10b9b70e3bdf3d13bf18d5d6e0ca5ed01754377fc9f425f9819e921ea3bf99d0d74aaf45e88ba53a0b373e8ab34adc3d407dd1aa61edc11fcaebb6eeacd7711f5e291a74479ca6ef9afa50b9b00a2f8926da8fe4dcb79384286b89d2529fd8343bdbdb5a177f80cbf7b2736a1b1d280b82bf06be83b0ce09770834fdbd01ab06023d42d8a35b4bc1757a4f4cb154df4bc0ed86b31ec3dfc41b947b4e16bc39811f45d1f3a972e7c4923e8469b5dbe07ed5fac1e8bcee008769712bcf3a04d68b79d97f713fd4ba24d878dff2a6ff0d48571bbd60fbe8f2dbcc168910e2927bb8e71b37c45fd316ecf19bd7f481e45725582665bc0847179071a8e0abbed366e3ffe0806321319cdcbb168b71dedf61e35fd4be51ade6d8f2d74c88f23fcc70f734fd5a5c35c6dce1790fc13edb6676749b574713960780fe1839e7feaa03fd49f74dd8ebe41caef2407376e4223ce9f234ee36765ed3f4a684a3e1dc67c272d3e6968cd19cb2f4b46dfacbb12ab7b074fc1e54bf298d550179f8a5c72092f889d5548c11908638bce61f957623f39c75b3c49136a45188fea11df6578fed1b2c653b26661e4e911503739a8212e9b4afb13673e72a2a1484bcb5bc43fc7069a5c8372d4bf909677d1597edea76a78977b569225433c2d234b3030dc6ef271bfe611edfd7508ee303a41f0a88e6fb1f3b302aa2dc0bf8ba2d9f0f6a9add39a366d1447b8a511ed7b95a5cd4dbbb19a971e63b7b05fde6369e46c7d53e612213a6de367b6a16f453a396b2e47a739554ba3a1cdf5200a68bef7aa8f8a5b2a2d994965c9451c77a16db7f8bf06ff6bfb6dcbd38d4d658dfc79b765ade816fe8aa6558dee7bec35d7c37304dada28dfd9c2dc52915b6629a22d1fa39dfbb61ccb7819da775f4c90458e489319f8d27481c45719a1c28a68e8df8d7709dfff00575971966795b8100fdfa95be0f7ece58230861925b4f33e6b30e08ea29c4108835789f7e27205ec89e7ae344b20c49e336afd688fb092556e3d7db7dcbac26d51de95fbc9d0fee0ab61c2b7b9c03e3ea72ec39dd368e5730ea4bb736af65ae4dc79dbf86fe19c69c2f854457cf45e65c41b98309f66a35e8a669809d43361fee5f2e84d1560878325b3e0acd18dc3a7274b9841e4a887f8b2c244779bee678330df65a159fbe3fa85058ae48f5ed34799093add2596a494273f7ac60e5fbf52b02afaabc2bee15ba8e67197823ec6d5735c6fe841dc3d64ffed093d543b3b0b7d5f047d5b049d9045a730467e5f44d0a8f3686616f0ff0de1a7df21c7b3e343851136155e867a1b6e0ef494436d3061f4584f09cfa3b4c8489309f8d3670cfe34718e4915e4f412cb145608fee797421bdff2d2a8fd13fafa50b0a580f6a6773bf8364daffa3a102739cef223f29d057a1aac2125b7caf42256126b0980ad99cd53e59510a7c7ce549d0a7b8e5ed787b39e50863c8b45722817d4a89c70cb3f00fabee09a2a722708b69659a31bf551a340097dc071b9a03fa9a42678af3eca03b0d0333df51a9ab7e19b67a4ec073cba7861b17ea60c4009bdd70088e778bac8b468383ef9e788e7d0098f75ccef7f8b049df7e05a794d7fda84e9cb7301bde56770b9a0a066be9d6572c15466aadbe7cdd09ff022ca52751729c64b24d8c92d65a9a2e3b984fec42840779503e5917f00b72cad2e5c58c84335a667a7e94fe412bbe939af3a9c3dbf12cf85da84f14a449cc39e43bc3b645b9a7eb1d5d855d651defe65d3b78d897dcbeeafe85ad5b1ba7d5debabee9b7807a800f758932f5e449acbdbe99788fae86246ab8ce805e81b402d29f16bcbd74ad6dd7863ee9b656fe26fdd583f7743d906f455a08b16cb07686c429e43de5aa42904f3a51574e5ce8255a736d1371b8094f6a461cc26ecd037eea6a09e471a76e202bd0b234d2a4c340b7aa6dc98cef7615e89de05c7115f9823df0747d7ebc3236cce3f3eb6c077367743659564afa8ca64045f424a27d617a5c5886716f8a72d2c2872d2be50f2d28a9c682507695d95e9017eb160557124518947172e2b54a496bc56d2a88c988f9524c3be7aa0952fe52c578a978d0ef000eb8cd79857dd5ec2c1ccf12beddc1c316c7d59e883f271a5a6126a44f16702fdcf4417faaf9cb39d21e70c2a56f2967cd8ee96e6b96b69e7a25a85e78475815928c63ab53dff3354b75f8eea9eda5eecd8942c8e403f1ecff274f4bd13f4f5136481f92fa01cced9141e043297b24b35226ae9a780ededdd8e85476e3b04d865dd223a4b86ce356ea7737b71463b5a764d8eee27b0e6801a6c812e2ef4204dc8a4ee9bfaa5d958a895640659d9d7359101bda0ca7c48dd66a74999849543bcb28eed5e0b6ae31c75641fdbb04094f9e29fb258976b7be4e6cd18fbd343d1c7f5146a47ef9410dad1e215f2a5bb5893bc06d3b2e3fe007e78bbcadcabee1ff7b136f2c21b18ddd2201162d0a29d92c37b4ae61eb6649b74f38905a76da815d9827d36af4f86be4bb88da72ad2b70b9d86ac31e76db1c93e67e5e701fd2589be73b2dd4b5b1bb7d6aed312dae7ed282dd3a6dbf8fce76d949f01d0af9bbdfb0374f1d48b045ef59219ef4fd2b16d79ba772233ccf8052612c685c8c7a0df22b1700bcbdc1fa4d32aa0869218cbb40e865b22493226f225131e9961c2ab8ca4889593f85c13ddd7002a2d1409a19d10babb015aaed641985340e085794b7755457580e59003bd7fa697748ca6323603af73322dba7b458b6f7a7a69e9d1373d687f0f406574a1b344a206e023a6e49b017f2fef86bc5f9e096bcbd414d9b8dd2b8bfeab0b98619d07d25c2d2d7920a5090f69e68b2c2c639b5e04994bd038fc49b732f75b39e5db235a9e1b935b5cb3a9d417fc8733d9e37aa1a40480bad389c604c33213c2ec422b37b8cb97d13ac6b9bab038a26c85b1d9c6361900168778996e27e216fa62f15eda4fed1307268af3ed937fbc6d9f31c0977e684f1d60ec8476df2d76eb66106cda7756e8eba89b52d857d14d69b009e914bb15f656431b4e406ec581952ca595032287d05491dd6a686945f4d91e295ac742377fccef55257e00d0a8474ecf024b76b19087b9e7cc3c5ee28118d23be6018e78c8f23cd4231eb27238de57481c416171b0373879876d0a019da7834d310f28d200d6da824d4bbfbd6adff660a2f853fb4ad80baf2c9dd6319abc49b97c41adddab4668037b80c336c807c02f8e967800222ea034346ec3805716c2a7d3ae3d1e1ab7e5c16d1be20be201165f1bb7eff470eac3e3bfafadf7a0b6f6bf48416dfd7716b5ad77bb2ebc6d17bb146aea181927cdf428a4a96f8bafc9afeea264484fb104bf83b5e787eebccee3f581825a5a5500b9c3dd933c7d9eb59c0714a7a331098efadfd7d1f73fe374d4f0fb3a7ad10235541379611b46ed9003baf9928785415a7a60e5b09662504b193bc569e981115ada18fdb8966ef88d96c624ace4b474bea0a56b052d9d3f82873109bf27cdb4d8036c0a1aff1fe439330963d9cb629c5d22c67b776ddb154914e0910623d4d61378155388b350efcb0a0f17d0dd06406871f9c93d992f62bb235d06b0321797875b285f0bd0ed4652b69c3d511093572e8e6c6a029c362e23a56c922f2076405d26efff995ed4e1e1d665f455153aefa604cab7f9a6842efa2fba4c4a055d762c72fd0a35cecc49b0ee8198cef210f3ba4cad5b0664b685c6305e2709d758a4edaeb1508ac7baee63714f733a19bd639ffdb95f278ab7d99fbf76dbbeed575e03bfb1a50e6c784c03390a73380dd4731a58fcff8d067278198efe3ca88145bfaf81088ad3402979835a170e428fff170d14938d54c6784103b936749c069a380d348ed440844fa7fda19ad7409e03d7ab86a5684bf53d15d4b2242a096a999eca706d67258d7f6ecbcbcca72fb400e2eebe5b281a9ad0067363e88b2d38138fa9be1d471111b197f202f605920d3591972a00da55c742cd5f31da4da572b4daa3c53457edb5dadbf097b9a4dbe68e69bdbea07c6144ba7b68d562341ccd58f37b1419113b9b70a9237d3f0054b76b7b7fd2bff599bb5ef08bc91dfa0a419c4e7bd536bca2b398201a11e536320b042edd82f5cbdbf2a08d18a353595fecc6282200500590b35b9ac760bb7dea2842f6d456b14eab2ba5c7ca70a8599f0fad7548ace412411777cf9acd54c0797c624d14a906bd798466a11fba6bb9553c7fd73b2445746ca7b6746fa7e41a51e612a47503be4b7335b9c5e7509ff995117e9d0e41a2f9354b1499d40d65dd3526c0715ddefd9082923221af0ae6c9196e5f21b892db879c4d54a8d13784d197c0310d7feb476411fccaafd01a5b8c8f4e23ac2071abf6ea52619dfdd00e7ace86fc73d916d89f64ceff4ac47cf8b2b4cae05679015a638cab9cb00badd67819ce187c9a86d770327d59f974500e7dab6c4bb3cd5d4f5eeeaeb7f900aa87d636bd0cbab86833bdc780f330aa0f7888900f26ec12cade333cc203d6321d5c84981971b6e5ba6d64ea07fb8474743fe24cd3d42efe8e84e0d7d594d0d3bdc38dbb5e896624edeefbafea513792d17d01c53af42d3bfe3be8c3df459f6628beab0c91004cf3fbf64e5f418c3a6ce6bef1b982148b9e9680ca9d997fd14f3703fd6c19c012cc59ba102be901e8af2c40b166a7384686be07286eededc334dcca5488182cb7b1f27070cdb22b76a13151d8cdae791f0b253c1c546a7fe692eb76cb112efa68e8b55118f69372ba4f88724e7eb0f2a9894ae5f43f29954fad9c78d830cd3c334719a10b5146c42895739e9fa89c9e3e11a627b60cde7c78c75569164ec9c728564633671a798cc967c25bb3dbb26fd33b65405f2123f29d0b19be24e8e294004238fd92d5adaf106ef2370cddce67c41ec20dde537acb635f392dea02a886f095d3835d1ea8defb39c5e74ad6bfef2847bbfa355c9c54e3f5e9ff89b966dd922901c2fbedfea4e876dd41043759cbf65460f4be1689c81282d1f34989086221727c6e3d8e21e8d43086a0b61f8d09c6f2a13305357f096fd7437e89a66321ab52f5d3754ad1d39852ffb42e58340b0bd6cfd24d14cdc626ea67eb824473b0a081b756649ec984dc0fcdce2a197ba633bb37fb129610bd2bbb3dbb156fc4fbb29bf0f60403452ec2f55a31283e475b9dd26a8f901834a37c99a18c988229a7bf8c5db69ce93d9c14e389be4f77f2d23e2d7dd50976fb7034f1d6ea0a4d112f529ed8b81b69d5a6242cba9dc3e678cd1b3cc792be603f8979f42fc73bb0b8430b429fd35f24017f2b8d95941294a414b79a3c06024d2470dc6a89cb96cb4ddcfec0afbd689f33169d1b20c4b9b685c2773582262a52a1243409b2b52fbccf5d92f5a4626d74e38d8cdc73d969c55fa13b2bbaafa814b11a0bc10eeab59d1e6627fab6fe7eb2d3a32cedb81d7d9beeaa4daf1a05268e8aee70349003e8065d74079512077ad1f7e4f11fecc1696569fa04123024fdee455c347514a42b07b0e346e3f4771290b9c2ea351accca896ed2d867bf5d2d6248fd45d760b5d71d60653cfaa79a1c5b4f0f4437f9d974cfd5c1d6c4d203f6b234bc03cfb0eef4e867c8d9a65bf86cd34d80eaccea083479f43b36dd1ea8859006f0b1ad2c4d548f66d02c09edef026569b07e1043426c0893f899a1f21aa11c95c112dc0795634f43fa73407417ea1de2bdd2b37334b680790ed362cfe916e89ea564ba31278df4621b76c7288aeff4b09a2420fa3e76c18aeecadd67b786009473a643577f36c3ac82391971d2335d1fdfcdce38bbb5dad8a0a6977d2dae9d27df01c7492abdbf6fe1e125ca084f6ce1d640c60f5432d4184fccf1d59549cae93f83a37b4ef4565eda17ffc62efaeb729c979993f785f5976301b5af79abc3e23390e4e8211d87ceb2924e0f65c4cf808947b5bfdc1ae3c9484ef41e4e44dfff3b0af1d05f5f780c4bf21184a571228fc598f1fe39df0084c13c84c1fc9f30740896f49f0843cd040987a13c83950029bdbb4132b2b731f3fe9ff6de04ae896bfd1f3e936d121605230404351871a1ad55e3be50628188556aad806b0b0e8b581565116d4bcb164258448c8a8a0b5ab77a7bfdb5a61a2b95c50db555ab15b0b65a34026ad5caad082890f739331308a35deef2fe7f9ff7ffdee1f3e599b36fcf9c6532df73b64e3e1054a0a5df9fdf550c6d45b8ac812bf66bf4dda0b493aff6b12eed0aebd2b2a9d4ecc6a984ca9854c693461535ab868e774830136fd46d1c6fa1d019723d24432ac4f1de71578cb88f46151c6d3950d95bed9543bd63ecf2e42517e158510f1ca77e85c02130d15420723f10a25cfd00e1a7173fb18a115f13ff68c1cfadcace74a97e4297f05be8f0dd70f818b46c1cd61ea23fa33dfa44016ffd45fe785b44f9daa21807790fcc24c4cf8fd23654a5512785509a07eff7d34ae31f3711fda9beb62b4dc9f662a19ada5abf12e27480f0c4dddfe0bf20a582ef668b9694c2bd1cee6d6d519291ff922d8a30ea13d3d1b18a89b6d20f6ccd7ad296009d1d6d8b4aeea68dce46250f32252c4ffd86d78f309beddb28088c7818814f5563ce7d2afb840a66f88d38577a729940a6a3f9f167a9aa1082b9979c65f247bc910bfa9fb2973fd21631e563e605353bf6df3df06076a9464d3937f21e465155e40b621c7cca743de419737ff7649251ffec691bfd0dbbfe99187a15be42dc6023251d44981b40a5dfc34faef0136c17de1fee878aa07eae195f29d4f4461d23d5762f1dd553f8323d82e03d97d8d1e705a30afd1ebe664ee79850a3657d084cd9e4b65547db42a894b64138b7c41bd48667885a678f96666ba6e9a3040e4b17a50c2c7994da7a6129351bef19d92e534e794a97b0a4952ec19a678356682eb3b3a4b2ad535dd9deb49aad9f3c463bc92fd645116cbd8716e036f0ba39248bdd5b7e85eb4d8ddafb47a6e78e3240bca271cd78d6cd84ad3078371764e0af07f6fc7d4ba49bb6cd7c2ec7bb767fa40db4e565cdd1c74cac68ed902caf5cf644af95f8b48b92663657c90732bc322e6b166918579fdf8e27fa276aecbc6e1a32ead180c4b4d3307fc92c244954f2f893bc9fdadb4286e40ec9a26c9a9c9346e39c8ebbebf5803d23e0bd2951f716ce6e60725ab19b3f4e8b087f7fcde58c7b1aff9beceefd71d4a4225ed642c85b86bfe69e65078a85d05a3d4f27e21db4a8ee648fe38975b5f87736fee926742052aa7d623e5acbaf7862a678150e52d11a3ee558e1703c915fb1177d9257d71e992585d6196fe3a5ba368f5afb8b7b420875f23ea2bedbaa68195798d16a1ef5a3f4c9d336a9d041206d7ada3dc58f72de8326e2af32ba6bfc14e8a61d1e8fa86a11f48bc5191b54b47ea206bbdd6aea5a752f29d960374ef3a99f543c54545c7f98271535990bb524ff93ee4dedc515877954e05567c6fca47d954c2af2b0a316ee75de4214934f7c4aee14e7aa09a1faa196f25313d2c49e88a89814559c5b8fe0a929859e0034a8e411336ad425ea2aa4f49371d346144fa8938e126fe09124bad82b7b7631f1c6a669aae2b69092c741873ec93bdcde784848e75f6214da7cd2fd5afb78ad5a659a4bb6d71edb931899057d2cbf58db8a1ec048152aa0b29f617e8960692eb5ee1972cbed0dbdb76bd1d2dc5cff79ae4f347a718a9d545c6ebb483b232350b3a299fdfaa711ebbb97eef847540184869c6f320d59147d4c0af119ec3e25a84dbff0d2fcf1af01888fbf8f5aa1c19a70198767daf38de31f494e09d5e3edf7aa16fd3827e4e816ec4e3f098c7b80e34d6861c8e7b022a948860ed6e2efa0864499161598c34a712aa675bfdcc635a6ac7f80888154d01aa1eae2f1a8f1da02a2d8de48e86d4245c78a866b4b320e1d129269ea26b350845be0ad4352d2c36e532ddd6b100d765272981d8cb67c9c860235a1dd87c67e733c0af7db4b4aa96fa7d26d52974b541c875629805897893cf61d8fc212b71ce5bf8618bf7aabaad0be0fb498c007ef08414c3365dbde4e79c3346b0de4ff51f7de4575b9b9a5383f9a690da590d3e905fcd4a8e29cfb3efc0a19b23fa121352f79d7a4d2330a936375fbadc4f1dabf11e3c9261e2ec7e043c2572a8d78de33eeb1144604dc3fbb562c88da68eaf741bfe898476ffe04b644c433f82f9080bd624d3dfec2325e205f10459c5424d7a39ba51b4f5c2ae58e2cf9dfe09185d1b214359ea5f81dc523c683263c62e0d1415731c94d3ad796dfc08e1bd20f9e752f2fe5613bde4d76867333515f41a6e15e56e1d2605390488fa3ef95dcc77113fd756abd4d3219c4faa567a121fcb1309e25b7f19666d03b60317df116af6c134fb8add8de5345bc71f728d817d1fd6c13debbbdcdc8cdbbae02c7af517f6ac4396e7cc6cdf17563678eefb2393e5bcae48ea44aee77c6b495ae05acbd2917295b3c32213e5d1a183b3e11bf654bf4676a48a76e39c684d7ce2fa753bdf95c3d2db1aaa7242393ea7c633fad46fdd511a1da945eef2c515379f536ad36d2c40ff0d7f8fc4ff2eadba573c723a9aec94cb9d8f2f42b7a22dd39acf398cdff49f71fdaa5ba7ab3b45bb9d3522df146b1fd1015d313e0563fa785f43e80d9f594569b4fa7a6bc24153feaee394d9958c8c7b109bddcd8f8a93c5b5e6a149e8d53bd9ef2a84c924fad58c2bf95b8278298a294b4f8786758be8a967f9c1a85634903ad4ca948c573da1a434821dfb46c498b77f6396d90512a29778a8cd2273e4349ae0c2b5d3af70d786a5a90c9c9b67d472976fff499307b6c35aec74fec1b7ac62007b149632350d8bdd51db7ff9cc7318ff22eaa448a11eec441985351d5072cf3b4d6c3cdec9acd9692093f8c4c3cbd42da9d70de1a285b89e7b99901e593cb47bd9f0365bf84c3db31e1bfdf6709fff8f023363c09e1570e48cc58a1ef06e127ab20dc0a08f7ea4fe574b8c32d072ba9ef8e74ce0f99319d4fb90be34589993d7008d5682f089177432f9a2ea2aa82675be63de09b19a3cca2c4250f587d7f0dcf1bf13eccade84088903cda6259a7a9ecac566acc9ab88d72152ec5b3bd6b21d4693581358fd292bd32a22645a9ec14635adb8f472926b4b65f483c4aaff95eb0e2637e656ca19c848b703c6e92a7662a582e2b9fb2f58d21211712a5223ba210fab2515aea84175f96488fb3a31423602539f43ef2de74aee530c4373c87faa9ba47cca398ea8204fafdf088725231f46b84579b253057a57efab16b7affa07a0b17ace9a11a3b3c27baf45a30e5fb9d33fb3cbcfad74b5ff480ea257c87293dd6f5c04443d45354999732f07c454694946f47e0b8a00620ae3f29ff5d28ff1c291f629a4355db088a6da6ab366bcbdfe83ded407060a28adeaffc6006553157a2f83284285881e73e91038e6e5e67aa82d6c7f155748def36946f268e0fafba15b0ea7e9db84ce7406ac7273a7271a2fea46326d54310c883b5496a08f576353a1eb220eaabeddef72f24e67f631d63cd0d98af4c4fad8479f90c5c62ddd74c4d0bfba8c81c93e2cb44e228b40435ff7c57fdf811f4632ace47f9b8cd5aa7d23a58256e262e6714e68a1035f773fe5258890c0961de0b7c4de0fde70ec2ba046a7a3ea73cd5503f9371ba0fb3a8efed51ca94e2ac792a2a64bab07c1aaca48299b6533bd12b29a8abc0c483197a58f150c7e73b611d38ba19d7536ff5901c6ecca1972817e1247abd9328f031d86c22f22f1ac80062ebb4921c6aa36d0fcac5be073653bf85102559a0e5a7182d5f7ff19fd5f1b27394543881d696b933368d97cc561593efab4ab2a9992da8d05682a879cbf8b8b5e6415d7c48dcf8fd77244c7b9c82e77b148eed8696fade16a5a8e7cc1e2ff1528d873ed0142c373dfffc982e7b9d67daec14ef8f9f0e7919d5473894793a124a55246e1bba75af9fe9aaffc740ff87e4400f533e6e48cedf8f51427b9ba4897ba2162432f5722bf1f97aa1ae3fe85aff5f41fd7be172f0a28ab5f3547c35f4ec57ea117e7f43cdafe1596ae43efb04a9ec0a336408f2f2f375d4b5c72bfb12ea7700b31ec66f234894e29f1aa59a8cfbf5f5dba9c98f04ccb851b2d9f3506a54dbf83699774d7ea92c81de37a4014a39f43384fb53baa43f5bf4b8c4d29f1e00fd976724e6f480fe77f4901cfc5c620d639e4cd3b4e6a7f829679eccd3f78f16e0770625a07343724c95e79bad4becb39fea2bec8573a929851ec61f6b3f2e93903cacd5db82cefafb13fa04e84793853d85fe25958a11dfa2a32d5803aabbead36eca4de8acb7259cb12696db2a8e3cc39af8f5b33fd544f94e68df1e38a4651c28b4796a6677c4dbe6597e20243051f1e55c265792a39b159fbf4454d1fd6cb92df4b35ddb6f6bc45d1cd31642f1f933743aca3f4a9a634be0fdf7b9b930fd587f24a6e6dd36d3dce96daa80ded368edccb0b5f4ee3eb3f9384da687df7bb50452fd0531a91ecc8e36329aeb590d9afb7931527cf912a3b973af77ed6fd6bd72734d8ff27107b3a719997ac3e1bf30a6264e4ac47ba399e6257f5e3e45b60aafbba32fe12704d7fe8544360fe7b3788a1139c87bdd4e3a9ca9b2fa40177d5f6db2137e46096db3ae692ceb6e1f63cca3ffd141aed86709fa2eced3e493bdaa11b7b66a44406967b832c392af2f24a6d4a75642784d17ff99096017837707d8dc7607d664b551bfbad9dac2fc23cc492af9c229e651f7fb78d74929417ca118e331adb150d1b38187dfc07be906b9969c4aabf684e7c5315031342550e1d4c0dbb24a31217fea90f492db5f870dbf3daaa6e4fe1689f77def66bcafa5f765ef9f52cb983d17e4535323fb45be2cb6ec062bcfda9f4e4d1122da86c9f31ac7f2b6996921293cfcae605385f5b942835c99587c26a741bafc1144e0000d7f2c312d6d44ca34c8e99bcc1eb55ee9cc2f32bbfd86dc1f7e67d46dd1632654e864a6071f28dd48ed8c9c1499365adbf756047ec34aca15139afa6c5427f951efd65a7ecf51b1bb44042605615e1b6613d89f913a8d46deeb15634e39f0f791c384fee39deb9072e119bc57e530c5984ab9ce9f925d41697bd4c382562bf6570cc56d2e21bb91eb2a8e1630f1fa4dc831b1bb6004107ef38df39707dfdf9fc5b869c6e15f43e6dcb1fc7afeceed21596c2e26b0f32632ed2b1209df48fb52d7776bcdf3dfc531f108478585c9bea7bfa49f94eceb26796cee2618b0ce142069a52436286d74ba9cd2a889a4b1613d1b8d5b7c7b86b78da60a06f215bbfa138d55fcbd8261e39d5f22d2fe968e96e7110325bfa66ed8e26bda98d89266d4f5356514b4be65c4dff8fe509ab6d77758dac8748706988ba4d4076b5237dc2c1d02ffcf965a4e2a62ce28c2bfee78651d481fcefede55f3393e3fbc9157a87d6c969235dda9c8261e3e4350134004b4cd19fc06251d2bc49c1aeeaf40f4371ca2749b01192fa31996f7e7a3da42f6eb4c3d1b5badf52429e89271023a5780f7ba9be78bbf5d9d75920a2191fb4c6a6a13a2b22208f750fc36dfa546916c84de6795b15f8625c6a2fe26972073127d2a34bdfbb24ee8b718e17d3520ff8cf6cdfd9ddd969956edd77112ddd4ae27d1d1f7f43974fd32ce59be847e805d0a0542f47bf1150da0776466eedfc69a384033299a39af504ffa1112a1a2afb0ddd4bb913e41e32db541d488f8552264c868443a52b1e634c2e7a862bfbb397ec37ec7af620b6610e4aba3fdb13b7d5a07f8e143fd51da3a24f4a3165623cc59d591a6350c07402ff2c35f8608c356f0ab45489f20439bca31534cdf381009d336ddc5cc3fc59a3a745ca61395eb4d7d2a5b5393dfca7b60d48b2208429d563d00b96d2009b760914aef24e251578408734770a8e332e98a81a85cef7a0f9f31a4c87f8226c95a9c557a93338e03a7510b2b653f4440ea69552494c2ad2a03bd95a7d85edfee569001bec16fcf46bafc745a5503518b4cba81f6b3b61e49ab3390c99971f783314143e8481c8f627b75bbc9ada95de12ea419161a420aee2d32da2dbf1ad16e3db0db4da114624ef1c77b17ad92b5381d2e480b56a3c3058afc46549ea67f224326696dfbf3fed6e7617febf3b8fe084715a5cfd4100a370229dc09942f1c214e92f2abc5a8c5b9c54558afd82e6a376d723243fba80dc2069456294406d113bafd0ed3ed877fb155927b79fcab039021310a1d2f905e25095c77fa1092c02d74b4e0788162cd134857b1fd49fbb4d2b4104f02ef77242d90f125bfe8494fd0147e48ad59526fdab2976e61a15fe77986ecef676d92bb7ca7fe845b5023d1f1bbbedff5d2349927d1f9cb3ef52329680b51ac013d83347644b5c992a0c4b530320a09aa57936048ba65af6279b3f0ac9e0c478a1e0224d59c34af72e5870cc6a5829634f5fab4ddfaf768c51a21f22bd593be482fdc45603f64bb69abb1bda154af8d408ab550c34edcf058ab134a7b2fc727c7e093cdbc74072ca71a3e0a78d0c14cf8d52bfdaddaac8ef386927fb373e870fb073f84406921048fcaa9e7e9d437fd95a206c40f1621e12d0707ef0df8cef51e3c15ebabdbfb692ca7a0e1dfbb85be113f26cd6c346afc1d4fb405a7a86ffa29491c92442e0ede05f49325ae43a3d24d1115ade305dff99c35422cdb8dad4b4a57cd9cdfa575885f3bbfa944b53b43f1ee8b4ccde33d843c89fd5a4b6dd4b7e3701e514932e8755cf1593c6397f76bc66737e35d6766dc09bebd5f37249dba24b41b6ff3b9cf0c5d8aefb12954c514bedbec00541e542cfc8ad77bca789dc6674a3ae5efc52f0c1a816e86146b1a79af6c11de518e5c83b6ee4babd611811ad5b8eb396c7e2e941bd32ab05dd8588b5dd1e9b346c65fd2084db6c536f45842a9e5d79c9a33e5234c5336b51706f9a2723a85de01c5822fd100487713cf3a5dfbdb845fe75e359316ed5c8477ab39903e31a0dc68890d1dbf39e2668729f468d288bbc6b410e81fac182eba8b98f546f85a78b4a15f87cd944a1e3df9fbbe345904227ca51264435d2279fd34d63a3740a3b2ec7077ccc4ef6f4eab0e478dd5f83f8e4d7302874a2b0847f83bd1011a21ebd7e7a02958d73ebfb4834973c4a37f837100d4061bd76726fbfe2d69d5bea8b149552a25855d5ad05861fed8fd6c6ab297360d746588262d6420da74fce68a4aba45f9c103d18ec836673d1985a8de55289aeeb9b6de02ddd952dfceee14f0b34a1846e23eaddebcca49e1588930a3d6c20ba65ac62e1ff0787fba8da65fb3a8d5c2b62bdbcaafbe8d0a65ccf909fa0d248f3a2be2291c083ab5843cbdf636a27a548b06d0b9da74a18353f498691d0f7a47288543032a2f9590a66df5ad161fa1eb3bb852956905b791e92ad9e1263f12dd9016d29f084bfc0a4af71805952a1c6fa2ac8c16191ff7eb22c55a189d363f6e77fc45d183403b353696981e461b35eab6201b8da24783e594e14ba78c58db99fd95b0ae8fd279a78b5af7a71fd00dcf3a9ac56ade0d989d4af0778454f55ede8ea81619757ca050afed8fee0a2c6d50d0febcc651efe22f165113f57a4bcf42a1a483e1178ad7de3da9741b87593eee3e944d93400abd135b3799f37ca464329f4aad77a62635f508535369f52e52723a9fcaa8771e4d12c949a3679d11aa15eeb7d12b6a9e6c18e9727b966f5a703ae1418ac87e050aa76ae45e46a9e4fc593e38d7945d134aab4e270668f0a94b2d96dd0fb4eebefc605f62aa8f7e830cedd980fbfae57952d1233135f930d20cfcc2cf0def7afafda91e6921be041ef971bfd29087c782b49070c2f0a41eda93caafef416d9538ccf3e587a41319e49e82b46a12b5e451eb49076aaa9c60734036759e3c92863578538565a7f9d08f85921d518a2d021831a9cb03bbe337de4d6645fe6398c1faa29b02c51a3c529bb63e6e9f76885bdfaa639a808463f8eb2a2aa59e27251d48537efdc3d15ae4836b282c11d7d060a8a1c164cbb1aef566af16c97a93370f8dc65f91914ddd679d81581cb08b2bf8772593c00509c0e5630811e54692c995c6e7fd3a825f4732e090146a70c0067e10f4e9e57836a27010210d597ec8d4d7e6e11e4d67cb8626371ea28224302b10a04bc58afcfe448b61ecf21977f8733c51bfe621e94c7f1b7c7b4ecd709dd4d69f1f08b37db6d60ea7cdec8f9436fb3b4fa63fa4cb9963a9c308aad297df4f3329fed63246f778ef9dd3eec9e0adda194fa8613dede76139dfec127df612f30e2b2225800a28429d36352b35011d7146a7859c15f4d3b4f5c43aa3701e2b64fd44bd55ba7c79bf86010f026b67dc14354eb95bd57aadf9c6e35b781fe9f483ba5159acbfa4dee5173496564e9ebd7f994dfcbdf029d1fba36d16d5bdefffc19e0f441f4e8327a49f25edf789531734fd34e51dfd5f917e6207cbb166adebd982089ac72ee9788632069fefd0aa35aeb51dbdc39a61672de9d624d23b9130ebc7442a7b17ef66a262530bea1851f2761b997885828eb492031a3bc688fd3b8c8a4d1284739565a9b7847e1a3b07766d1ccf9fe981d2667af0a24fa68578f00664b77c931a22954ce1eb6def09145e4f797a328b6fd1e1447356bad4aebc3d650abf329d909cb7735883d87727d4394d267b8fde490b392798a269e969b8f7d46237d724dbd27a4ee3eec08739a14ec8ce553627981b56cc59a7135dd6e2a760e706c2bf4a237660f36ee89883383689a04fe65de874dba639867b7a1823ce75f48e6b9482229f574ab3b4b3c4a6b5f5ed1def7526e41f727798e562caac6f67c2b45db3c4139aabccdee533d648f7e13c3fe3b0e5fd5a06344e6908ae15b5053e987177cecd1badb79aeb1eb36762b1ba219f273c75ae4337ca46df5b36257e7fbccdaa7bd15316ed5f64f35edd07fe1feef970b09576a0d90484e8a769615bcbf3ae25348a1c7caa43cb96edd7594294c5509b248261e73b4eb408e9d484e4604ab7cb1d34c1b5a5f3ac9998bf97327147982cfe7c42e737749c22a3fbb434a1c5e23bf9a52f8c9d1a51f376a746c8dfc6da80b5824a1140dfe98176665399644f5e885e9bc597668356ecbfc72bd1597ab128b3980d5936843f2f0ca91625f532d84de5a785a8209630de717267c18c74aaae1529af68f9937aaad664413d58f4c6c7c7cea1436f06516f17f172908da5662674baf90ca05e2fea96340287efb4ad192b7650acd1219d84350f37398d6f7171d08bc2f847b5297efc2a35e8eda55cd39627ed299e86919f439f3c85cfac9d24a4a22fac7b7a3d6bcf8f34a4c7abda9cab681ddc033a68d18e9aac0e0decc368e0398da5b435098319add2d6dfb3d22a26e70b0da089970e59692853eb9106db5d3ef38f5934d4123bacb06e295c25c8e9d82a2821ae01d51ab64e5f929432ba391b7fa379fd465349b69e74900c79942a7b79799b4c3134057fafe95165bef64c31c2b19f6242be5c3162988762a8cae3d66f75bfdefbe561bd7fcdf0c7254fbd407bc7654f4ad79d1f13a4511717d4a38da77e3ac57cb398fc8562a8442476c811b3a92ec964ef6a5ea5ba099d356af7b25c3595f3d4f9922f9563830ac96766bc5b7d613a8cb0339b905e50c44b1ba892658abd2d2c372f583b31fdd25a939bb0071e45735c32c50aaf0667b67f16806e8989296e05b01a0e81b99733ccbd7e10213c8b6fc9532d52383688937ad949609a8a79d2bbd878093e8432f524edb6c08cc2438cdbb211af43dc9bda7324628b1e0cb09364b2f745284792e9c2a6e9097960ede5e635bd725c2004d39fac4b9b5dee265b0c69d92dfe1f6ab304ddd25842d5bc44c984efe06f3aa89e367836c453881b7ae4aa076451854fd1786d3ac23b2b8dcbc26fd9a53645bc4fd5d4fa96506825fe27e00feff4af9034f490da0d9352b37d08fa974f30278d93daa9a4c2fed46c9b77fa653075e597bac0726ef7ce18e44028e4021476e89af6ad636932425c10448f1f1f53df931fe5b830f5b27b2d5b4a0fc9256a9e70829d6b47591fe647156aebc5508f76782dea7da721513750358d29e3679bbd2facebe520b173b53068cb3e7fd9c5527f45f78e47a5cdde2130b4b5a07fa88bb56da824979af648d051a7f5859b2444e10f1295be40c2a32e930e29ea312ede05788ebc51c2aef292eb4630798cc864b54aec793ec7d29e5acbef6a3fe0338024c53946558e64904b5d2efba4dca242d6d86e91446a8ff953dfd6f10aaba621698188b7459294e65d006b27bc2b6a30bd9f4c4cb1d60833b7c3f4cc0de7a0314fe1d084be2ac5a3966ab48e2c3776ea02712a473244f396511644bff7fc88cd85eb7e9dc58f8fcbfe1c2a4bd283e2091d185f111f5a34a6d357683bb5f6d36e1df12a53d42e124ef9b7d5412f13a036adab6fb773b5d42caa1c2fc8456fd91544d1bf8d664ae7f74626f7d63a7816ecb0668346ba7eb57d79a21b39b0e9abedb8edd8fab8044f029d1b4d1c9b83ef848b0b66d37cebb80268537dcee2543bd748cb9b75640a28ba60e7daf1a6dd4cf916f11c5c0f6ad6f5b2cc0d8af21d24eb7a1decfc4d3066bc200749e7b92353f6a66f2e49a695b2e55f9c637966ce5a4a8ceebb36429ebbd12b18c7866e84d1d453782fc79509e1176dd1413b9b8e3a7a003d5df7b4f91eddd3667b38d2736497866e06cd441535eb739e5d2f31fb6d75d1290863f98eee648eabb8179bf64983e62b150efb55b99e7cf484bad828b2f84b26f6e7f271ec2184230e4db93759bef5aedcd20bf7ea173222331e6a2c6984be9252d4994a72d9b00796d094b8097568c257af1c82323ae69ad264618e98e3d491c713d0d758e272723ce46e2325c37ae0be5e775a2351b80e733c85df6ab834b55796a64c33bd5df4c4aa7c46abf21db62adfe189a56c7ebed54cfdd448ebce86fa73f30db89f645a3a20fcec45dc9be55beaf76a8babd46e7a5b5a484ab7add95ffd0a4fbf25ef5f88d934420f59eecabeec742f3b01b1dae60e54b836d8c0486dfbe05788c32eff576c4bfdd2027da6d815d6ed4c7e3e3339a43febec397d44c3f6ad71b1d69cd0379246e01eca5449b677f6b63e7b2c3aeb37992de3ee94a96dab0ae663566fee28a9bd8f8352bb952808a19f05750eeb3bc26fdc1d654e01c16ada954951d48c22418e649c65b67299f215f2d648b02e2fb0cc745e6774b9c33c697c3acc0bd497ec8acfb6f04c5b3f6bc1ee4c0f1af1da70cb781cd670d0523b353b71d93503db0e75e47f77676feab3a5c3df27963b9f4ff0d3cad6e701763461caf92ad4078c2711470b75123e1e013e110f935a46815bba62ad4e454d7f0a2360b99ba35a9ad36236bddbb4cd494d25d78b6f69a5a21a9e5e98ccc7dff9b4c9f0575fd2c426929a6183bf60e5e32fb684fd5b0e768c4e9b3b7359936fc94ff2a68efc6eeccc65e82eeb5c96f54f5397bb6924f4b787792ded7f37da75b41dbac3d4d56e6f8befe4e2890da6a936ebd22aee9af5da816d985f849fe25bf4773e9aec1d4daf1ca51c2a787cb0a3596675754838107f61647f50d81fe7bcb294aaab053b5c82b10715c9d5c8de5848f6448aa267480f65beacc56525eaa5e474c1d87dd20c19a204d5e8a0f681117f07a721715c49cfce1bdb6469a7a17f4daf43a6f79eb62b9249e8be35e4b0fd8775bd77b6b92a9225885fd162c6bbf62bb5012a53457d3bcc5d363d157b6ea142044821267a288a6cd1655dda5e5b343e3b8ab07f49d15f22ca574bb515449aa74e4425fdd27132badc5531f453d1658de54d70d92ba951f915065d806ae726c5e7a3897e9a349881f14710fdd246a478f0c7121e696353e4fc7184bcfdfd773e28f9a0cf87ed8bdf5952b204e66e8ad4648da7a2ff57227a6fc052cf97a28d785c36499b5299baae459883cadc7b9ac5bd24e16c3fed21153c5eb6330a664ff21497ce1954d1dfa5368494b86b99ab95ad354984f7f09ed74dcb709d5ec67b14f1f4a2ef78f49783dd2bee9becabef5fd66948ba8d325ce92f5f4d4ee47d895aa3a632ef217c2a0675251de67702bcf7383fe2987bd8d8e57662ef1af7081b8da8d532bb2bfb06af1509bfcef7e862360fc959f82dad50786b197e7bc48cf5b51473c7f7f38b863ab8a9725c8c083fc773ab8252cea5a945684b39df4f84f0fe4eccdb5d5770d1715cf0f97513923a77acc2bf55e57e73e443bd6c2c3a5a90498dbd29f41ddfb33fe1267a6cf610d988347e1dfb7a663a9e57f4f7247c4ef52ec23bb0ef60f7040dd5ee6b0d6b20fcacdf7bba846d34e1dd8c1a8dbab35bfcf08e7e1392f0eee21b6fe698989d838c02948cd3d7870827e94f3e361b9e1480fe0ad168d1a38fbdb4d4cfa705caba3d881830ec1cb6495a3d24dde916d3bf91f63914c34f924fc4a1a5a2a2562f2d0eef50e6e05358e5af2acc1850f6c5b69e65469143729b73639e5154f35a655e5b70cada545942defc3c26a7e33438a78ecb4b1af119eeb805bcaf789f2b4f2cd46ae507ef1e7e70b4e178cbe936ef6f9919c6de60afdb5e8f32a9759221192fa38cda51ec6e4445829d51f8c93910ea08b1ed87274f084f9846889fb18467d846728ed9235043263963db8867de1b287d05e648c29348c2c8f6bb9c31ddc1f43fe28c59769249bec172c696d1b53237ad5a4230bc317ca2e4fa6fd28c3a626bbd5e88f0d3984cf765bb159f7f8a145f7f8a5c6bbf502be42da82dc4fbd1fcbf6126aba2a885f73b0caa47039e6350adf3b130a8b6a0df67505dd058f64d285b4cf5601854a9893483ea9185415533d58a4175ff2f32a842e8eff0ef776550759c0c7b9e6550d1f55214e0d5dab186ffe65f6650ddef6050ddff7f9941757f41d40b1854f7ffcf32a876b9fe2bfca95b515df853b368fed4dd17f2a7caae7abd883f8535e66833bbaa0ef857f953d6b1c8fdfe15fe141dc3232606a47a317fcabab42c7f8aeea9eaaf3dc79f0a78317fca3a95a2717fc09fa2e38daa7c8e3f15f062fe54e773e733f239fed4c64efed416f41c7fea32e64f59851f66cd9f5af387fca932c7e7f8533a2bfe94d4f67d532acd9fcaaf7f3fc6a1a8fb7f843fc53cf1595ed739fc29a6d77993cb9f2af0c5bbeef82660fe14732f48b0e64fedb0e64f31e3dfb43fe64f31b1f45f8ef953ccfded6556fca98d7f993ff533c39f829a67faf337f6a7532e983f2561f9532d88bec7aca8f5e42e0b479697f0cf7064db42a8e47f9949b5fdd9009a3fc27ccd1ef0b22bfb962f95e5a68f2f50d37a3a8f6652312d30a98349c5983d6826d575999afe6efa1d2b26151d76e0bbdecd05fef43eacb31926d59eae4c2ae6edce449a4945a78afab34c2a26572f7730a9e4ccd7837f894925e9c2a462fa0d19cba4a2733af02d0e938a7966fb7098544cbf25c5bfedb14caa6e7fc0a422582695c38b98549b7deecda3f23b98543f6ff5609954d7ff4526d50f7f814935ed392655d47f8249157494786397ebf262afec309a471540f3a8e6d33caa369647e5c8e1513df8a7785413383caa299807c5acc476606ddf9fde9547b59ce151e5ec627854a7052fe251316dfcc48a47757d91358f8a717ffca73caaf57f8d4775ac0b8f6af69ff0a8fefe9fe051e5d03caad9ff091ed5b017f2a878899847b5333ce6d1af3f5af3a878899d3c2a5ee23fc7a38a38f86ff3a8e8bea6def98f785469233a795403d83eb948ed956dea26dc526cbfde8778e3ec518b7de827ff511e159d3b6db77f994745872725ff3c8f6a13e651e5d6f794a8a9d52fe251e9d35fc8a3cabbd2ae4fb7e6516df3b1f0a82efeb8e777795438362b1ed5ea0e1e95eb531e05bd109560e1516dcdf1cee8f8b5d0eb775854cb318b6a8f76bef1b60dc3a16aeb69c5a14a7e4c73a8be28bd6db3c32ccc1ef66327836a0d694aff3306153d53c30c2ae684bbed94731706d5643cd35d38cec2a07af53906151d1e33a898f08510fe050caaeecf31a8ac6788c91b29372e832a8661505576615031e3d7df680615ad0bea5ffe8c43d439e393af855907cda0baf72f30a83ae329caa57a320caa42016650ad717e11836a338f195ff70e548c8095e4d0fba864dd9e2e0caa37ab0bfce8df6d3c5fc411b14a2f8372c70caaf2119841758f615031f3911fff7ae97d522957864175ef5f62505de8f81ab02809ca4f33a8eefd1506153de7f19771195456f1ad84f27530a8f4e8771854c7690695a3207001ac4e6ea91906152ff1abedde8f180655678cc971304fc10caa3e0c836ac7d74c4dd7767b9e41d5194abe0cf4e32f30a8b6a01731a8accaf31ed4cf1f31a898f9a0e8390655f98b19549d31a3484a66c5a0ca5a8719545a5f86415560db8392d9f7c066864175ef9f665075a614fa2ed5836150dd9b7b795d71fa4c0b83eaca6354982df84b0c2aabf69803cf771706d5bd99c582cd3e5bb79842d6dc7a017feafbcddf322d76eab7df7d369819fa4c863f859f8de7f95356e59961cd9f3af44ff0a7acf423f0dfe14fb1fd1d531f017f953ff58a357fca8ffe5df7d68bf85338f61236f6a2d7ff127f8a7e2e4f5f7f9e3f65a56faf71f9535bd05fe74f59b5ffb87f8e3f65d5bea35ec89f62ca39c5b31ceb8d4680b5a6aa40f17921c2bca6922efc29abf61bfe97f9533f75f2a7ca7d9fe34f95cde45715b0ebbcb3983bd5992acd9fa235d7f38c853f55883af9539db9f119fc62fed4ad28963f351ff3a7987577f871863fb505fd2e7faa0af3a7acf45d61b2b7f0a72ceb6e1feac5fc29abf6965bf3a72ce1cade4df8fa42229547a677c97f6f980361e6547edb3d5883ddef644ee9059839f5eb7dcc42c2ec11d1e3c0dbf83bf3e1e9aea72604e8ea0b42e9b700b6ee33e79dc45c8f1dd9bb2fba2f3ef40d668ce85b1e77bf904ef346e69222f7c5e2d0de5bdda753018d6867477ed06b63efcef3157ab68d9e77b293c1329a007fbabd08c7a8c9def4cda76a6ad363ab5045e385373b7923ccd95c9dae3ee6804b6d334f19ad992aec6e62831edbec2e65cac2fe1e7946f4d82bfd707a6bdca69b847f9626b5006a41d688144502fcbd87d8bd8c39010ca7e0468a50fe793df9a83bd554cfb89663d6083e2b59c89edb6ed09ce231ac02b666c67aa53b9de78fd298a564b260f9e63067eabd0a815eb40c9f8ddb7a1a594e5780d51f9ffab502e1932f2ce7bee213263acf02c1bf582826609f429ea96f5d2b3ee302eef9109ad7624cf163d24bfea6c5e8bea8f7f2c056cc08c0cc8019cdc18fe73c7ae7fe823b91b717d51cd43db8c81f2f425e5943d253a61001b96f48a652628988ffca4944519fdaf2315f27919c7cf6a260badd62f7d0e2f4425e6e5e610e09fd8b3b3ab7a1f8643a9f7a720515a6cb50717a7f58cf913ed1157b3433346c79bdbc729de8b7f64fe9d64b0ab2309814472448b14b82544569e36c117f6c3652d9ce36da2d8ecc6042d624315ca126238410d32126ec2204df456e2d4e5fa7520cdd45f89e74b397a042810451719f120372c5a18b32aa2c6b1bcd3cdf3d9b95924d3ec5dabd2aac4bde5bf139f2389c264f71a405e9cc3875c2cfc262b8b56ad2fb3bdfe77d70ebbd498b772ee62dc1ac86019833c5e8a5d62b57d560b7d862f67979a411efe7e811a5bf2ae427c9da42cad3a4df8bf886e63b48d9dc489fdcdd98d796dfb696da043651fbd0d87aa19a9249f9ae4594930956d515a837b6d9b61051eecd88ea750a51599588da20a67d2b47d7a0711ad021f583d2b85017f44a11fe428a5a7387875d898bd259cd3c9340dc8e6d857e948b09cd5f2d397d4cdff023d63c7c12af1ced582885bcb5b9d079ab16f1952b5d08e56f90b74419c1e6ad970b6158f809a272c5229c4a4b48ef7d94b38c30dca940a68de2764a2a166177fd111724a9573eac4014ea26a00ac5885a07799d4b121a757e397336725bc8831b1af5f5522ae80e6a0b696b69349a6e45b553eebf21d3d23dad296ad347a75a6b8d20378b5bef1a4d31bf81dd4da3c9966c097a963239c8f8afe558a7fedfcb71efe5c18f236f5b9eabc0d619cdcc737530e770d66f83b16eb4cdd4ff88b5a33cd9d0f40b4a19fc2047fa63233fb7c22b0befc44a096ac5d2906bfcd502bfbce5091adf0b3d85c21f72bad918b2f722622a1170689fa17e17f24aaf3df169d900963b8a4e139e52d2c9ac1795f1f1fb40fc959494fc8eef96351a15934d3e8675be8421e431ba9ea3ece54b347c70cad690fd379f69ec9e8ff2e3105a2814249516a68f6e35f45c8788290da5867a5fe28713fa0201b13fdb7eaa2ac074826c4e0a51a5291fdf8332482b6da004ca15b5a84eabbff6943ff1b89b5084f36e87cff6d057fdc457deae43cb1384ea409950383b475f30010d5f8f771e7e19fdb0fa9df56dce63fd9593e7127ab113a2c2ab1c64a3f03901fe1159a2831bd64d3ab8213523c5979892f28670ea5823bedb9f2d99ea683444ad23765f1c56d68f2d77f261c2530fe59692506efc857f60134f2afa8e5fa81d858a45553e4ad96364a8fa09e1bc180a5ad1f2443f5229dcebb3bb34928d21f42053f625a56eda51adca75f761a67ab75409e9482e4a6174a2024964af5605ec30e2bd5b093fa17a6229be93a87b97daabed4b85ea1d91de32c2afcd9998ac0af0886c0b4972d6579244c3eae3ce2db995b99ab48f5cda720db54282821e294eee8a5edcb378b2fb1a1bb2a0a5d2b448faae0d4f5f45f20ca55308c3c1df90f2fd7ba825cfa051f30b57778735040f1948334f49fecc3364f8f3a5d784bc920da33653094f616d982af32ec0e1c76dc7312ae3ee21431384ce955ec371f279ca2613e24987e80d9a7a88e11e4f69730d6279c2d3570b7947371c2ea01aeb11de3779dc66fc7bb3f406c96bcc533655a25499be52c03b5ad098230d11f0127294b678df650dcfa0a985780a78fa99b6bc7e05473bf75d5e2fad06ffebe9723db98d941ffc8294da7ac230ba9ef0de365e54e613bb59b9229818dfed3bd58c0d06f3bbc830fa2932c47d8494ab4fa0f602e5387fc2d03dcae77281a1db4355aab372d4056418de44786fb8b6c130fa0641f81a56bfe343ad682294dd2eaaa423fa2025791829337ef6512e8576d794f8188c1791a1a40419b44f7c085feaf14524fdd20995ac371cae44a30a0c4baf104ab242a5975541c86ad528527a6524df501f8598fddca7adbd94775828957d89cee751734891b45a8634d952a7c7fc1ff2cee60993f323db9c4f6fa082bfb3933625a291788fe8685744e5dc15d8aba9f4bb02fccdb6b4a90939fa53820a8154ab86f235c1fceda8d673df9ccc01e997b50bb43a7fcab6ba4fae3f655fdd47e36f92553f2540cb7ed81f9c79ddb83f735529251323a9568b7e309a7a8bdb715ef02ed34921336449b2fcc85539a737ec88906a6bcd544035ca4d933a5de1cfcf95868c405b8b756a2aad8597abd667349aa9ac1684f75f4d0a3a9a218d9e8dbcb49b8a4dbdc4ed84dff95293084becebba51e8ffe93de99344d44feb719c2d8dee2e0f4a937c97d74f4b6d90f0a44f9af07ed2c4619ed45861c6bb49f72b70dc076e2e904fa3d6dc66eca735b9434e83d57ca9bf33126669fc0c19953e52d287a42657dbe9858ff86e5ae829ce55c2fc0609366d3354d623a5d315783eabd1b45c7a1ffd5c65c86da44f4c40bb2b744c2e56b7e0dda7335aa0cf9608f4898d78f7e98c6a01e6ae2a0fed455e05de9a91fbdc84642bfe424019b40ba54ca6320f23bd1889c76beff8185c6e23437d33626227d441465caf7a5283ced2f5aa97c188f01389705ab8fea1256c45c7a5d183d1c42ff4b26abe7dcafc5cfbb4147f13121dd727ba22530e5976dea8acd5a2dee56c0ed35be8bdab5bd07af88fcf0df128daada6dbac7234c23111ea14ff5387c1ce45dc7edeb82312a7d3e6dc72d8ba07293f6c7d8aed8c9adffacb51db0cfd651eb12346fa3d8c817df557457ce90f8d7ce98d277c436310323c0946d299957c65dc6fc46aa1b4ef48b45a240daa8219473391d27fb3ae3cf7ec6a7d9f51885adf4c18eaab884d2669601f1813a42a8f08bc8a958a403bdc870ca3dea9e946ad158b95e0c7f557aae789658687b50495d22d5e5f50890e643c5d4d9d2605e5eacafd98553eccf474db810dcad287c4d30dfa82d388aa2617ef88d248a4e006bae2951414e894e49490abafec83f4ed00e746bee1612561785845e8839da02e3c77510e2778741a79dd165bd2786b9f893cd1ae515f905d5fadc71a73a11edaf8119f3a51cf930a90c0758ba1200329ab1e22c3b6d5e8529ec1fb3b88b39a3054d5a1634618f95aa5a05386ea27089e7671058230e2f1e46d1fe53ae8ffe169b7f84ff14f31e2bc607365e9aa8b540fbe58595b4b383e38ada3f2cf84e29aa2b2c905fa822ac82b7581747635260551bdf6a215db0f6c3078ff4c3cd9f074f5699da391d29e11e0ef6edc32f12fa990e393a484cef1595228055d1c2f14aa0c21dd09e5badd48d9f77fd0fc1ce56b358432e636a1bc2a24566c1fb5d130ea67e2f88669a5d4e633884e378d9c87d33dad9b6d1c2f7ee443d7466e90d14d206ec5dfb628af68607e4a899b11c42f1e2f16aa94eb8510632d618999981c6154dec6e66454592aed26859cd59a9509ed68762d2e25e5c017504838834e4d47be4cb7e5970f09832603e90b60c6f93d39bd2df882739bf383d5296a4d80f4c94768f6434a448ec1bf02a6fc8dea7b82470985b3f4d59e7c4d36fef66f2d496d59889475109f48142cdd5085a8d745a85ced7aca80edf4a211b8757744b7b90695c2cc69fd99f614f5d9524a7081f7749b32bd12190e3f2494ddaf809e98f9fa1b7d106e9b7fe8f4c17d61340e30e69f84fe71c31544b94ad03f745f14419fb9ee0a32b949dadb82dbde29d1ad574bfc31239ed29d9c62ef4fa59c9c426d104c913e69677aaa297a4d208c0295d0660756077c9a7f12fab38db711e52641a00781ebd5d33e93a8a975b791c9958951afab3713ea25466a768d0db55e2cc2cf8489242f60cd773219bafdacc23d9af2b59f0943469d8ad5ff094933472627e4acc86afbcc243c7199d1857a11a30b7faebd4b8c269b131718cdbff44f69b2a6b45393977f4339319a4c3ca0d69f1941b7700a3986d1a7589d53316871efbd4899f75095bbda50026d9e51a5c29a1cabf32c35e9ceb4625d4e1948f7d66f3689a438f7be98cf8904bdb72a679991458f95e1820e7d335437d231e25116b7a421a3da27c1684a3dd38c677ff83ba31f72938c6ee950a64efdcdaca7f5b7986cf451ae87f056fa9ba29e566aa5bf62467f0d89b01eda463a2bef804b2d94ab07df8672108ba89ec20152dd6db374ac2b4af123de342c2d8531b8db20a9735fa40f31f3a5054e48bf6205f22e005d3e0ea362f6e3fef82483c7fd34ea943bfa154f90a39f74d4693355b8a7df5becf908585b53023c0c413fc00c4ba51cf52bcc202a7df2f3a41b609c9827a24bab4c3fcc945678c52756176d54c63421cab17b9fcebc6c2da59f1489b87f972765f3429ee3a9ce6784ea21e6c5ea4c3d841734fe3ba25302898073ce6daee5ea61fbe04959cb3c292642f82d76c56e29816dae52ac73f3489887439f2b823e37edac7b5248a00c9f430a73f3f555f0147923989f475412b9a9d4a6bb282837c55f724ae35fe24cf811013b229242da9ca4c1246168fc0a1d776a585d992b4cfbc8b50566aa9e04731640e799e6bc45f8bd86d206f47ef49b043caf3ebd73e8933e6e90226596a5260209a79c58dd2bf884107a3fc6b256c2d34de467c64fc0f03cea5485088ff7f9db943d4f2243f035149463e8730e51bea324c592d7548519ae88d63675b5006bbed33665df934859790329375c00ed008d1b550612e6734157d0b063ca982c64ead5bd39e0d80c4b7a8d6e308f5f05fda4df3365cf2c9412087d669e2ba373ef42afe88f77f180b8c510b733c45d77a123cefc634c7f67d09df5b9b9da942fd97058b3226f7e31d683f3a5f8e96834621b8f63259a7179ab8a356ae87d7e928eca30e339cef0829b067cf28ce4a73623ee5140cf0e61795a77bd34c5ff7c29731fababc5ae01e761ee21417acd6a74e8b0a9b7a4dd6443ded2d70f44230fa5046efa167aba8dd0d3d94a10f443927af330e8ed4c8557da4d1249bbbe3e043dc9101e02bdd8b8f0a75a83492cdc1ff1a569fbc2cfa67dcd9c7fa1dfe0841c23cbd34ead959275e607b036863917da5d77368f507ff52b7e732025e1c979bb9a379a44c9527593f995ed5f9dd20beb0815f4a98705fa2a19b1e35689ec6cde5958d94c92fd90b73c316580dfc091db9505f56876ae63941bfe855c54ed63a8aea6df826f2a1f4fd6f8ccbf24f4f728c26f2554fe71726734bbd4b213c6d8f3f88b16fdcc463e355388705f804fb4a0cfcea05b2df45a7e64a1b68e3f5ebbd7a710d620301f945d41b08e0a4e72965e1111cbf36ed2dfbae2bc6852f5eb1ff31bf37686137ed773f197afb02253a7f89eed480dd7023e03049f0082cf5891217c1e4efdc7d1393807f9dfe447e9b5649977813ec417c5f684beb3c8c394a28ef8c9929be44b6e90dbafd4d4c57a744caddbee463af1f1ba59d9f336c265af28936cbf0bbdb393d9002b4bc2b7d138f8a410d6b4a3f93757e338bd65fac3cee8873c8fa8b5a2d89e49328f88a4e024277d908888ce9b246bcbfd215798dadeb321f754eea6e37145cec8b2d3022e8b47548a3a4976c8f8db00dc923b16e2771d42be34b3d92cad6ae4b7e5ea0b4622652249e8832af9d7735b5c70e90ccd32226580becf4844658b9d977f24edd6cd67dc367cb60cf56385e4d3e3b9f8ac6d9efd85b61069b79a8f09f5fac93a3f7c46329577d82517fae0c32e9beaf48db042f1a3d276a37c92b8884f6f96ecd3a94d054f5aa3ab52d4d26e8f3e5e3f595aa0c56f4990b01b7d9e10ffa1735bf00d67fc5d3236e7a651ce0f514a051ebd08ffa4106942fbc7c3d26638b5e47de43c3ff7ad5c2a47dc33aec805a52653af97d9eac9b256eacdf66ed8b794ff1d9445c93fa1c2bd849bb01ba2ce4709dcc423117e7b21d96e28e84628ab1fd2f3f61ff20c30cf399f4704367c232d90217d4222ccf2379dd7f951b9876d72fd3493a98cc336509e044b791c49cb793744607e51e3ace2cc7d98c12f305c7582391225fa0db9912305ca8db548b9f02aa11c8360862c26fc8c7a59029da2f4ea05580d92c45a21a4aa4e99ac6f4c44a635c2fb2609f950dae482ce1e33d45712443df6fb7763ee455873c8a07dae7af2f17ba6b5627df505fe5ae1f55c8dfae6a66bb2f379b82e615e510ae38e71e23f3cc85ca366f2d81bb5a5d83e65f2f2632647d19d1de4a163267b515d2dcc93741760a652508724e798f61b5c24519b0aebda975cd3df9985661fb29c4783cf114df1871caaf5e2357c7ca2a8573a354788c60b927d18bd46fb5079d24c37a10059de135b87f94e88c350ef08117e27ed952ebadd193274172a278a88a291cb07d48a1e1c48ef77374bd31912095f949a7c074e8d6614333c899e38e57ba153c2f787dbd3e74fbe8c325ad95f7b9eb68550924634dccf2da8d247a8ab5b864f4f24fc6a4bd9b2b129d5bcb05cc99b714ad627615b8779f4c2303e055dc3148ca6bf9f89dd48e1d05e69de99bd7f61ce6685de1a6209b5c7b1402edd1b115b3efd176afc4e9f39a30f875718f72ee58f11e3f987bf52c8272c3960c24ed29b7a46b4d2fe0c7b174fd2dc3476cd2712bc289f65395df3b9254ce1d088b644281ce17fc0bcf29f02143de16e9ac2a911fd344de10cf7cb1532f8bfcafdeed76113ee6e993fa1f6eb08f7075f2f716ffc3ac1bd2d351912418b279acd9f01ae01867b9bcde9806f017b7ccce6fd80d3800f01f75566f32c90aac5d1514b23c2e511b1b131b11e3668aeafdfa420f57cb9dfd2f88858b9ffe2b0b885f26931e11188bd2ceeb40b7618278f5e1a1d2f4f088b8d873b08149bb02cfe85fe16c7c42c43366c3c094b17862d0d5f0c295b05c25a1a131b210f4f58b26c9cdc33cede06bd1e961017211fbad273e8b0518b57be2cf79bfe7a87099c516c44d45ccfa1c3c3e70ff28c1b2c9f68e5f3f75cece92c44fe9ef320cfc8c12fcbffd019c7e03204d1f5cd9593df7ab1bd457e37fd8fdd77bdf6c7ee455718b98f95475859c6caef587995957758f98895a892916256bab052ceca311cb30fc73c9995d359b98c952b5999c9ca35ac3cc23197b1f20c2bef70cc8f38e6668e195575358b396607d6ecc2ca411cf3508e790cc7ecc3314fe698a773ccb338e6508e7921c7bcacaa6b7daee4989339e64c8ed9e17b363e560ee2988772cc6338661f8e7932c73c9d639ec53187b272212b9339e64c56ae61e5e71cf3115696b1f22ac75cc331dfe1981f71cccd1c3362f55ccc4a39c73c88631eca318fe1987d38e6c91cf3748e7916c71cca312f64e532566672cc6b38e68d1c7364fc503996fed3e5f1114b96c5c486c54647c461fb6172c67d382b95ac1cc1ca91ac1cc5cad18c8ceb882f2e6c0574c7d0f145c7418f1c47d726b8b3f18675f80b8b8d4a5812b1343eeed5d888f884d8a5f215618b13222cfec32cfe873fe7dfda6364189bbf30367f616cfec2d8fc8559f2d711cfdb2fce1f1b4f1c1b4f1c1b4f1c1b4f9c259e31ac1ccbca614359398ca98f3196746676d6abfcf5b0c58b23626977365c3c1b2e9e09f77e446c0c76981c161bfe4a62742ce4105ba1d830b91cdbcf60aa282c3c3c36220ef21cb78cb17f3b3e8c7a4fbe2c861efdc01cc5daab17c72c085bdce910cfdacf5c181b11166e653f94b57f5166e10275a0dd411d681937f4d5c86538dd2e95f86a646cd89208ab6ca038365c577f0885b1e9f9272ca5e2a36396feb116807f369eb0e1bf17ae6b005007c6ff08568e64e528568e66cb31fc45f98b43716cf838367c1c1b3e8e0d1f67093f86956359396c282b8731f5c5c613cfc613cfc613cfc6b36f0c3bceb2b29995f2b1ecf3cacac9ac3c3d8e7d7e5973fba83f960ba099dfa3db83a997c8b084c5f1f2c888786aa19579714c58b8b57b5c3c4c9b687334a840142850f4d2b8f8d804baca69fb25d17161ec54af3332b882e5833c17270c86c9d638b9951f9c00d42e15b32202ab7458bcdc73e898c52b87c817472c1d87e7452f638d1e475bbe0cadc0d88587c5878d63e75f717444e33c8785bf1c09b1c5e33bb7b94397b013404e5abf970fba60ff5e465e947a97f43b2b0ffd777ef5dff955d7f9ce7fe7575dcdffb7cfafa09318af1cb6c4cfaa3b7a33215e1e13295f12b124267695bd0dd38dbc3dfbedd75553a732fe954b42acfcc7ad8a7b376225ac89293c1e87cb17ac92d3ab5acfc5e1f2c4e8f885782d8997a15dfaa317a41bb4342e61190ceef1b88f5a158763c3718c93870d9de88957b861c358391c4b0f4e8cffe225628480632db436f078ff66225617f9cf78e6ff659f2b4733edf9841d57a7b3e6dbe3197994959b2730f229eb6f086b064d41048007e0f785fa78ed732404880024400c90006c00b6003bf0630fe806e80e70406bf88e207b407829c89e209d00ce702f03b8f45d835c01bd006e0077406f401f405f801ce001e8075000fa033c0103000301830083015e8097002f035e010c01bc0a180a1806180e50024600460246014603c600c602c601c60326002602bc01af017c20af2ac8e72490af83f405e907d21fcaaa064c060400a600de004c054c0304829f3701d3016f0166403dbc0d7226b805411cc1801030cf02cc06cc01f35cc03cc07cc03b60f72e201410065800a000e18008708f0444011602a2c16e11e03dc062c012c052400c6019b82f07c402e200f160970058014804ac84165e05781ff001e0434012e023874de86340322005900a4803a443180d2003a085f832013a4016201b9003c805ac06e401f05f3e60edd04d480f5807f7eb011b0005808d804d10d7664021600b602b601b603ba008b003b013fc7d02d805d80dd803d80bf6fb009f02f603fe06f80cf077c001c0ff003e077f5f000e020c802f0187c0fe30c0083802f80a7014500cf81a700c500228059401ca01c70127002701a700a70115803380b38073806f00df02ce032e002e02be035c025c067c0fb8d2174f8dd6c0f4620daa065c05fc003574adef26f423dcff04b80eb8016df033c81af07f13700b6002dc06d402ea00f5803b80bb807b805f00f7010f000f01bf021e011a00ff00fc06780c68043c0134019a012d80a780678056401ba01d60ee4b770033d8aee46d46f49fce9a67e27f57e69bcdb7008f00ed00bb77cce65e8041803180c9805980858095804c4011e0734009e05bc035c01dc01380e85db3d9193000300ae00f08064402560032003e8039805840166023600fe04bc071c077801ac043402bc026d46c76018c02a48799cdeb00fe703f00100c88047c04580dd802d80f3802380db8021801fe6f837c0c10c07d4f802f6026a03f201c100f380eb80ab8076805382f8034001300c1808580f701ab01fb016580ab80fb00310579063c0608c2cde63e20c70166002201a9808d80cf0127018f001700556cb8db009f08b33910f00e6001600d600fe021a05b24e40550c2ba79c37d157b8fdd4bc07c1950071812056503b9089001780ab001bb5e518cdf87567162390fecb30047001bc1ee6064a77b1dd88d8a60b08005b643c883d5a37eac54d012af58de4d8c0e87e981f744f948f98001722bab0913e56318dfb05859b600e6161e13e541aa1933df7d7be69bd3df1dfe3bf6c3de1d69190f3dfa052c85057774b87c59586c74fcaa7eacfd8a776171b5e2dd0509911e1303836042c35eafe2d45f9d1e1bb328828235fef0a1c3c6befa5ec4d2f0d855f111ef26c6c4be17b72c8c8ae8b07a252e3e6c6978d8e298a5701bfedeab8ba317bc1a1e1b0d8bb6b857f14f03432836de4130b3f10c1fccbcdca7f345bf09c1cb3b58a825ca3dfafdc7d28f8c8d88888d8f897b3506e6634be36357e14cf883e58c996fbe6d29e70be65d9d59b49a4fad9c1916f7de7f385ff110651c5b33092b67c62c9b1e1b1d831b07d7937c71745cfcd480b767be1bf0f6bb7ed3a6cf9c3d48be6ca56fc4e2b05511e1383353c17d6ec2cae971b101e1f3e583e58351bf95a0ab803eacf45fd5691ec002db6133cf0a4300a11f30580198c722f0fd4e33be9fc7bacfb1c2ba0fb14ec345f0787cb804ec25e45ca23fb9c87ff312ff2f5f2fa740df9fcbc0dbea1ee36172e7bd2fb8cd63dd83412e60ef3f0379f02fc03a5e2e4ea633d23d15fab174c66c01d76f95555c07b2baba796533725176a7dde7d97f9c3637fd399cf47f4a61ec9c53193fad6cfa8b21ed2f01ed0087d4cef4b1bf6556693e62efb1fdf3b37dcbd5fa5a5733dfa7abb9fdb580407ffa2e7a69242d035581b45c1ac6bc271b3a6cb872c4c851a3c78c0d5b408547445a4276daab26bdeeebe7df61cf4a39e71acab9e481618172ecef9580a591f817d35572265c5723026fb4f4f30ca725d48cb9d5dc6c7e64ae31979993cdc88cda512b6a468f500d2ab3ac55201ff2d68b277628524cafdcd87ee1f219c1f53d576dc253bfb97cef1f577a7806dc7e65d48837df3e70e13dcfd71a373ef9febd59c41eedb1b2906bbb53f7ec3c347c58fd15c13f4cc3bf1fbedcfdb2e2c7e10f03d6cc19ebbd53fcf6b3f620c7fca7635ddfa73c5f1f56f6d98425b76efc38ffbb27860f3f2bbafd75f887fedf5d0ff2967bf55f6050576f54bcb6fbeed8dd03ef7dbccfebb5b9b6ff9892b2fb81cb8da8a3ebc6fafdbdcf1717d7bdb6bcd4f0a96ed5c2922153e7de9c76b264ddfabab3af4d9b38f1c3a3a35eb23fded67a212cdd31f1dbbfdd7e2da87cdfae401f69d889ef5f8a70bd354b66bcd4f09a4df527cb2676f9d7fcdaf96fb9d7334edbb357b299b65f11b176ca94e4d79ca69edd5c20cfe2cd083de999307cd18c0b9b875f18346defedf9134fcd1f9fbd6ded9cc5332e4ccf6e1834d13e426697909291b0e2ece469915b9a674dff7ae6bc886f4fe777db73a0c8d5f4897f1f8df15efb46b735c5d7736fb46c7df6cb47fbdf7a7d246f34f1c5a8c5ca98d33fe7dc4d3eab3eaadfa76a9efeccf3bd8ae5ef954ea8dc73d11cd077e5f1ef3b7452fe68eba1652fedfbfba9add15df554507ad66df5088eee22f9d725ae5c3be4b3c5ee393b7446f8bc5d11ef793babeb75564e7ff3ed8059208774719dfefaea2f60ae738c4191d53dc6742bf31eb82f61cd47409e64efbb1d84f9e35f8075bc5cf43fc4c88fc0df975f32660bb87ec758c5e55cdcd56d2d6bbe6c65eff2f51fa7cd4dff28277d6fd66e259bee3bacbc7214fa43482712107bb0337decefaa55fab3d8f4b13dddd87fd29f747a18842fae77b93cd3a1eb25e8b8580b157d112fb818f749f4c57bc1855de57fa44cff87ae5ddf9acd185f03b6b1083fd769c6f7db58f72d56d87301d6638f3afa4ee66516c1bed32298774c5e42f6fda8a0b38fc5575923fb5ef909fb7eb3a9abfbffd72f8295dd94e7ff36a2c792bafb3784c8f67f3547ffbdfe7bfdf7faeff5dfebff4fd71d765cb5c8668e143777952e1c398823c770e4648e9cc5910b397225476672e4468edcc7914738f20c475ee5c83b1cd9cc91e296aed285230771e4188e9ccc91b338722147aee4c84c8edcc891fb38f208479ee1c8ab1c7987239b3952fcb4ab74e1c8411c3986232773e42c8e5cc8912b393293233772e43e8e3cc2916738f22a47dee1c8668e143feb2a5d387210478ee1c8c91c398b231772e44a8ecce4c88d1cb98f238f70e4198ebcca917738b29923c5ad5da50b470ee2c8311c3999236771e4428e5cc991991cb99123f771e4118e3cc3915739f20e473673a4b8adab74e1c8411c3986232773e42c8e5cc8912b393293233772e43e8e3cc2916738f22a47dee1c8668e14b777952e1c398823c770e4648e9cc5910b397225476672e4468edcc7914738f20c475ee5c83b1cd9cc91627357e9c2918338720c474ee6c8591cb9902357726426476ee4c87d1c798423cf70e4558eb45c66f31fbdeffde7afff747cffa9ebf5ffcbddd77ec9b46b4961d7f675f995d5ab078cacf9e93f23cd5d2efc5e43f5f6eb01017f90c33f73672ecb7ba3ce9899f7463ecb6c3aca95fcc05bf6a711fdc5ebff019e470e55'; + + +class ISPResponse { + static ISPOperation = { + ISP_ECHO: 0xc1, + ISP_NOP: 0xc2, + ISP_MEMORY_WRITE: 0xc3, + ISP_MEMORY_READ: 0xc4, + ISP_MEMORY_BOOT: 0xc5, + ISP_DEBUG_INFO: 0xd1, + ISP_CHANGE_BAUDRATE: 0xc6, + }; + + static ErrorCode = { + ISP_RET_DEFAULT: 0, + ISP_RET_OK: 0xe0, + ISP_RET_BAD_DATA_LEN: 0xe1, + ISP_RET_BAD_DATA_CHECKSUM: 0xe2, + ISP_RET_INVALID_COMMAND: 0xe3, + }; + + static parse(data) { + let op = parseInt(data[1]); + let reason = parseInt(data[2]); + let text = ''; + + try { + for (let code in ISPResponse.ISPOperation) { + if ( + ISPResponse.ISPOperation[code] === op && + ISPResponse.ISPOperation.ISP_DEBUG_INFO + ) { + text = String.fromCharCode(...text.slice(2)); + } + } + } catch (error) { + Debug.error(error); + } + + return [op, reason, text]; + } +} + +class FlashModeResponse { + static Operation = { + ISP_DEBUG_INFO: 0xd1, + ISP_NOP: 0xd2, + ISP_FLASH_ERASE: 0xd3, + ISP_FLASH_WRITE: 0xd4, + ISP_REBOOT: 0xd5, + ISP_UARTHS_BAUDRATE_SET: 0xd6, + FLASHMODE_FLASH_INIT: 0xd7, + }; + + static ErrorCode = { + ISP_RET_DEFAULT: 0x00, + ISP_RET_OK: 0xe0, + ISP_RET_BAD_DATA_LEN: 0xe1, + ISP_RET_BAD_DATA_CHECKSUM: 0xe2, + ISP_RET_INVALID_COMMAND: 0xe3, + ISP_RET_BAD_INITIALIZATION: 0xe4, + }; + + static parse(data) { + let op = parseInt(data[1]); + let reason = parseInt(data[2]); + let text = ''; + + if (op === FlashModeResponse.Operation.ISP_DEBUG_INFO) + text = String.fromCharCode(...text.slice(2)); + return [op, reason, text]; + } +} + +class MAIXLoader { + ISP_RECEIVE_TIMEOUT = 5000; + MAX_RETRY_TIMES = 10; + ISP_FLASH_SECTOR_SIZE = 4096; + DATAFRAME_SIZE = 1024; + ISP_FLASH_DATA_FRAME_SIZE = this.ISP_FLASH_SECTOR_SIZE * 16; + ISP_BYTEARRAY = ISP_PROG.match(/.{1,2}/g).map((e) => parseInt(e, 16)); + ISP_COMPRESSED = pako.inflate(new Uint8Array(this.ISP_BYTEARRAY)); + + #port_ = null; + #readedBuffer_ = []; + #events_ = new Events(['message', 'replaceMessage']); + + constructor(port) { + this.#port_ = port; + this.#port_.bind('onByte', (data) => { + this.#readedBuffer_.push(data); + }); + } + + bind(...args) { + return this.#events_.bind(...args); + } + + message(message) { + this.#events_.run('message', message); + } + + replaceMessage(lineNumber, message) { + this.#events_.run('replaceMessage', lineNumber, message); + } + + async write(packet) { + let handlePacket = []; + + packet.forEach((e) => { + if (e === 0xc0) { + handlePacket.push(0xdb, 0xdc); + } else if (e === 0xdb) { + handlePacket.push(0xdb, 0xdd); + } else { + handlePacket.push(e); + } + }); + + const uint8 = new Uint8Array([0xc0, ...handlePacket, 0xc0]); + await this.#port_.sendBuffer(uint8); + } + + async resetToISP() { + await this.#port_.setDTR(0); + await this.#port_.setRTS(0); + await this.#port_.sleep(100); + + await this.#port_.setDTR(0); + await this.#port_.setRTS(1); + await this.#port_.sleep(100); + + await this.#port_.setDTR(1); + await this.#port_.setRTS(0); + await this.#port_.sleep(100); + } + + async resetToBoot() { + await this.#port_.setDTR(0); + await this.#port_.setRTS(0); + await this.#port_.sleep(100); + + await this.#port_.setDTR(0); + await this.#port_.setRTS(1); + await this.#port_.sleep(100); + + await this.#port_.setRTS(0); + await this.#port_.setDTR(0); + await this.#port_.sleep(100); + } + + async recvOneReturn() { + const startTime = Date.now(); + let output = []; + let times = 0; + while (true) { + if (!this.#port_.isOpened()) { + throw new Error('The port has been closed'); + } + if (Date.now() - startTime > this.ISP_RECEIVE_TIMEOUT) { + throw new Error('Data wait timeout'); + } + if (this.#readedBuffer_.length) { + const byte = this.#readedBuffer_.shift(); + if (byte === 0xc0) { + times += 1; + if (times === 2) { + output.push(byte); + break; + } + } + if (times > 0) { + output.push(byte); + } + } else { + await this.#port_.sleep(10); + } + } + return output; + } + + async recvDebug() { + const resp = await this.recvOneReturn(); + const result = ISPResponse.parse(resp); + const op = result[0]; + const reason = result[1]; + if ( + reason !== ISPResponse.ErrorCode.ISP_RET_DEFAULT && + reason !== ISPResponse.ErrorCode.ISP_RET_OK + ) { + return false; + } + return true; + } + + async greeting() { + await this.#port_.sendBuffer( + new Uint8Array([ + 0xc0, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, + ]) + ); + ISPResponse.parse(await this.recvOneReturn()); + } + + async flashGreeting() { + let retryCount = 0; + while (true) { + await this.#port_.sendBuffer( + new Uint8Array([ + 0xc0, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, + ]) + ); + retryCount++; + + let op = 0; + let reason = 0; + + const result = FlashModeResponse.parse(await this.recvOneReturn()); + op = result[0]; + reason = result[1]; + + if ( + op === FlashModeResponse.Operation.ISP_NOP && + reason === FlashModeResponse.ErrorCode.ISP_RET_OK + ) { + this.message('[INFO] Boot to Flashmode Successfully\n'); + break; + } else { + if (retryCount > this.MAX_RETRY_TIMES) { + throw new Error('Failed to Connect to K210\'s Stub'); + } + await this.#port_.sleep(100); + } + } + } + + getProgressMessage(name, percent) { + const sended = parseInt(percent * 45); + const left = percent === 0 ? '' : Array(sended).fill('=').join(''); + const right = percent === 100 ? '' : Array(45 - sended).fill('-').join(''); + return `${name}: |${left}${right}| ${(percent * 100).toFixed(1)}%`; + } + + async flashDataFrame(data, address = 0x80000000) { + data = Array.from(data); + const dataLength = data.length; + let sendedLength = 0; + const len = Math.ceil(dataLength / this.DATAFRAME_SIZE); + this.message('\n'); + for (let i = 0; i < len; i++) { + let start = i * this.DATAFRAME_SIZE; + let end = Math.min(start + this.DATAFRAME_SIZE, dataLength); + const chunk = data.slice(start, end); + while (true) { + const opP = new Uint8Array( + struct(' 0) { + this.replaceMessage(-1, message); + } else { + this.message(message); + } + address += this.DATAFRAME_SIZE; + break; + } + } + } + this.message('\n\n'); + } + + async installFlashBootloader(data) { + await this.flashDataFrame(data, 0x80000000); + } + + async installDefaultFlashBootloader() { + await this.installFlashBootloader(this.ISP_COMPRESSED); + } + + async changeBaudrate(baudrate = 2000000) { + this.message(`[INFO] Selected Baudrate: ${baudrate}\n`); + const baudrateP = new Uint8Array(struct(' this.MAX_RETRY_TIMES) { + throw new Error('Failed to initialize flash'); + } + await this.#port_.sleep(100); + } + } + } + + async sha256Digest(data) { + const hashBuffer = await crypto.subtle.digest('SHA-256', new Uint8Array(data)); + return new Uint8Array(hashBuffer); + } + + formatHex(num) { + return '0x' + num.toString(16).padStart(8, '0'); + } + + async flashFirmware(firmware, aesKey = null, address = 0, sha256Prefix = true, filename = '') { + this.message(`[INFO] Writing ${filename} into ${this.formatHex(address)}\n`); + let firmwareBin = Array.from(new Uint8Array(firmware)); + if (sha256Prefix) { + const aesCipherFlag = 0x00; + const dataLengthInfo = Array.from(new Uint8Array(struct(' 0) { + this.replaceMessage(-1, message); + } else { + this.message(`\n${message}`); + } + address += this.ISP_FLASH_DATA_FRAME_SIZE; + break; + } + } + } + this.message('\n\n'); + } + + dispose() { + this.#port_ = null; + this.#events_.reset(); + this.#events_ = null; + this.#readedBuffer_ = null; + } +} + +class KFlash { + #port_ = null; + #loader_ = null; + + constructor(port) { + this.#port_ = port; + this.#loader_ = new MAIXLoader(port); + } + + bind(...args) { + return this.#loader_.bind(...args); + } + + async enter() { + await this.#port_.open(115200); + } + + async write(firmware, address = 0x0, sha256Prefix = true, filename = '') { + this.#loader_.message('[INFO] Trying to Enter the ISP Mode...'); + let retryCount = 0; + while (true) { + try { + retryCount += 1; + if (retryCount > 15) { + throw new Error('No valid Kendryte K210 found in Auto Detect, Check Your Connection'); + } + try { + this.#loader_.message('.'); + await this.#loader_.resetToISP(); + await this.#loader_.greeting(); + break; + } catch (error) { + console.log(error); + throw new Error('Timeout error'); + } + } catch { + throw new Error('Greeting fail, check serial port'); + } + } + this.#loader_.message('\n'); + + await this.#loader_.installDefaultFlashBootloader(); + await this.#loader_.boot(); + this.#loader_.message('[INFO] Wait For 0.1 second for ISP to Boot\n'); + await this.#port_.sleep(100); + await this.#loader_.flashGreeting(); + await this.#loader_.changeBaudrate(); + this.#loader_.message('[INFO] Baudrate changed, greeting with ISP again ...\n'); + await this.#loader_.flashGreeting(); + await this.#loader_.initFlash(); + await this.#loader_.flashFirmware(firmware, null, address, sha256Prefix, filename); + await this.#loader_.resetToBoot(); + } + + dispose() { + this.#loader_.dispose(); + this.#loader_ = null; + this.#port_ = null; + } +} + +Web.KFlash = KFlash; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/serial-transport.js b/mixly/common/modules/mixly-modules/web/serial-transport.js new file mode 100644 index 00000000..05c9eacb --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/serial-transport.js @@ -0,0 +1,231 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.SerialTransport'); + +const { Web } = Mixly; + + +class Transport { + slipReaderEnabled = false; + baudrate = 0; + + traceLog = ''; + lastTraceTime = Date.now(); + + buffer = new Uint8Array(0); + serial = null; + tracing = false; + + _DTR_state = false; + + SLIP_END = 0xc0; + SLIP_ESC = 0xdb; + SLIP_ESC_END = 0xdc; + SLIP_ESC_ESC = 0xdd; + + constructor(serial, tracing = false, enableSlipReader = true) { + this.serial = serial; + this.tracing = tracing; + this.slipReaderEnabled = enableSlipReader; + + this.serial.bind('onBuffer', (data) => { + if (!(data instanceof Uint8Array)) { + data = new Uint8Array(data); + } + this.buffer = this.appendArray(this.buffer, data); + + if (this.tracing) { + this.trace(`Read ${data.length} bytes: ${this.hexConvert(data)}`); + } + }); + } + + getInfo() { + const VID = this.serial.getVID?.(); + const PID = this.serial.getPID?.(); + return (VID && PID) + ? `WebDevice VendorID 0x${VID.toString(16)} ProductID 0x${PID.toString(16)}` + : ''; + } + + getPid() { + return this.serial.getPID?.(); + } + + trace(message) { + const delta = Date.now() - this.lastTraceTime; + const traceMessage = `TRACE +${delta}ms ${message}`; + this.lastTraceTime = Date.now(); + + // console.log(traceMessage); + this.traceLog += traceMessage + '\n'; + } + + async returnTrace() { + await navigator.clipboard.writeText(this.traceLog); + } + + hexify(arr) { + return Array.from(arr) + .map(b => b.toString(16).padStart(2, '0')) + .join(' ') + .padEnd(16, ' '); + } + + hexConvert(arr, autoSplit = true) { + if (!autoSplit || arr.length <= 16) { + return this.hexify(arr); + } + + let out = ''; + let s = arr; + while (s.length) { + const line = s.slice(0, 16); + const ascii = String.fromCharCode(...line) + .replace(/[^\x20-\x7E]/g, '.'); + s = s.slice(16); + out += `\n ${this.hexify(line.slice(0,8))} ${this.hexify(line.slice(8))} | ${ascii}`; + } + return out; + } + + appendArray(a, b) { + const out = new Uint8Array(a.length + b.length); + out.set(a); + out.set(b, a.length); + return out; + } + + inWaiting() { + return this.buffer.length; + } + + async flushInput() { + this.buffer = new Uint8Array(0); + } + + slipWriter(data) { + const out = [this.SLIP_END]; + for (const b of data) { + if (b === this.SLIP_END) out.push(this.SLIP_ESC, this.SLIP_ESC_END); + else if (b === this.SLIP_ESC) out.push(this.SLIP_ESC, this.SLIP_ESC_ESC); + else out.push(b); + } + out.push(this.SLIP_END); + return new Uint8Array(out); + } + + async write(data) { + const out = this.slipReaderEnabled ? this.slipWriter(data) : data; + + if (this.tracing) { + this.trace(`Write ${out.length} bytes: ${this.hexConvert(out)}`); + } + await this.serial.sendBuffer(out); + } + + async newRead(numBytes, timeout) { + const start = Date.now(); + + while (this.buffer.length < numBytes) { + if (!this.serial.isOpened()) return null; + if (Date.now() - start > timeout) break; + await this.sleep(5); + } + + const out = this.buffer.slice(0, numBytes); + this.buffer = this.buffer.slice(numBytes); + return out; + } + + async *read(timeout = 1000) { + let partial = null; + let escaping = false; + let successfulSlip = false; + + while (true) { + const chunk = await this.newRead(1, timeout); + if (!chunk || chunk.length === 0) { + const msg = partial + ? 'Packet content transfer stopped' + : successfulSlip + ? 'Serial stream stopped' + : 'No serial data received'; + throw new Error(msg); + } + + const byte = chunk[0]; + + if (partial === null) { + if (byte === this.SLIP_END) { + partial = new Uint8Array(0); + } + continue; + } + + if (escaping) { + escaping = false; + if (byte === this.SLIP_ESC_END) + partial = this.appendArray(partial, new Uint8Array([this.SLIP_END])); + else if (byte === this.SLIP_ESC_ESC) + partial = this.appendArray(partial, new Uint8Array([this.SLIP_ESC])); + else + throw new Error(`Invalid SLIP escape 0xdb 0x${byte.toString(16)}`); + continue; + } + + if (byte === this.SLIP_ESC) { + escaping = true; + } else if (byte === this.SLIP_END) { + if (this.tracing) { + this.trace(`Received packet: ${this.hexConvert(partial)}`); + } + successfulSlip = true; + yield partial; + partial = null; + } else { + partial = this.appendArray(partial, new Uint8Array([byte])); + } + } + } + + detectPanicHandler(input) { + const text = new TextDecoder().decode(input); + const guru = /G?uru Meditation Error/; + const fatal = /F?atal exception \(\d+\)/; + if (guru.test(text) || fatal.test(text)) { + throw new Error('Guru Meditation Error detected'); + } + } + + async setRTS(state) { + await this.serial.setRTS(state); + await this.setDTR(this._DTR_state); + } + + async setDTR(state) { + this._DTR_state = state; + await this.serial.setDTR(state); + } + + async connect(baud = 115200) { + await this.serial.open(baud); + this.baudrate = baud; + if (this.tracing) this.trace(`Serial opened @${baud}`); + } + + async disconnect() { + await this.serial.close(); + this.buffer = new Uint8Array(0); + if (this.tracing) this.trace('Serial closed'); + } + + sleep(ms) { + return new Promise(r => setTimeout(r, ms)); + } +} + +Web.SerialTransport = Transport; + +}); diff --git a/mixly/common/modules/mixly-modules/web/serial.js b/mixly/common/modules/mixly-modules/web/serial.js new file mode 100644 index 00000000..62017376 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/serial.js @@ -0,0 +1,215 @@ +goog.loadJs('web', () => { + +goog.require('path'); +goog.require('Mixly.Config'); +goog.require('Mixly.Env'); +goog.require('Mixly.Msg'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Serial'); +goog.require('Mixly.LayerExt'); +goog.require('Mixly.HTMLTemplate'); +goog.require('Mixly.Web.SerialPort'); +goog.require('Mixly.Web.USB'); +goog.require('Mixly.Web.USBMini'); +goog.require('Mixly.Web.HID'); +goog.provide('Mixly.Web.Serial'); + +const { + Config, + Env, + Msg, + Registry, + Serial, + LayerExt, + HTMLTemplate, + Web +} = Mixly; + +const { + SerialPort, + USB, + USBMini, + HID +} = Web; + +const { BOARD } = Config; + +const platform = goog.platform(); +const fullPlatform = goog.fullPlatform(); + + +class WebSerial extends Serial { + static { + this.devicesRegistry = new Registry(); + this.type = Serial.type; + this.DEVICES_SELECT_LAYER = new HTMLTemplate( + goog.readFileSync(path.join(Env.templatePath, 'html/devices-select-layer.html')) + ); + + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.refreshPorts = function () { + Serial.refreshPorts(); + } + + this.requestPort = function () { + if (this.devicesRegistry.length() < 1) { + throw Error('can not find any device handler'); + } else if (this.devicesRegistry.length() === 1) { + const keys = this.devicesRegistry.keys(); + return this.devicesRegistry.getItem(keys[0]).requestPort(); + } + const msg = { + serialMsg: Msg.Lang['layer.devices.serial'], + serialStatus: this.devicesRegistry.hasKey('serial') ? '' : 'disabled', + hidMsg: Msg.Lang['layer.devices.hid'], + hidStatus: this.devicesRegistry.hasKey('hid') ? '' : 'disabled', + usbMsg: Msg.Lang['layer.devices.usb'], + usbStatus: ( + this.devicesRegistry.hasKey('usb') || this.devicesRegistry.hasKey('usbmini') + ) ? '' : 'disabled' + }; + return new Promise((resolve, reject) => { + let selected = false; + const layerNum = LayerExt.open({ + title: [Msg.Lang['layer.devices.select'], '36px'], + area: ['400px', '150px'], + max: false, + min: false, + content: this.DEVICES_SELECT_LAYER.render(msg), + shade: LayerExt.SHADE_ALL, + resize: false, + success: function (layero, index) { + $(layero).on('click', 'button', (event) => { + selected = true; + layer.close(layerNum); + const $btn = $(event.currentTarget); + let mId = $btn.attr('m-id'); + if (mId === 'usb' && WebSerial.devicesRegistry.hasKey('usbmini')) { + mId = 'usbmini'; + } + const Device = WebSerial.devicesRegistry.getItem(mId); + Device.requestPort().then(resolve).catch(reject); + }); + }, + end: function () { + if (!selected) { + reject('user not select any device'); + } + $(`#layui-layer-shade${layerNum}`).remove(); + } + }); + }); + } + + this.getHandler = function (device) { + if (device.constructor.name === 'SerialPort') { + return SerialPort; + } else if (device.constructor.name === 'HIDDevice') { + return HID; + } else if (device.constructor.name === 'USBDevice') { + if (this.devicesRegistry.hasKey('usbmini')) { + return USBMini; + } else { + return USB; + } + } + return null; + } + + this.getPort = function (name) { + return Serial.nameToPortRegistry.getItem(name); + } + + this.addPort = function (device) { + const handler = this.getHandler(device); + if (!handler) { + return; + } + handler.addPort(device); + } + + this.removePort = function (device) { + const handler = this.getHandler(device); + if (!handler) { + return; + } + handler.removePort(device); + } + + this.addEventsListener = function () {} + + this.init = function () { + if (Env.hasSocketServer) { + return; + } + if (platform === 'win32' && fullPlatform !== 'win10') { + if (BOARD?.web?.devices?.hid) { + this.devicesRegistry.register('hid', HID); + HID.init(); + } + if (BOARD?.web?.devices?.serial) { + this.devicesRegistry.register('serial', SerialPort); + SerialPort.init(); + } + if (BOARD?.web?.devices?.usb) { + if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + this.devicesRegistry.register('usb', USB); + USB.init(); + } + } + } else if (platform === 'mobile') { + if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + this.devicesRegistry.register('usb', USB); + USB.init(); + } else { + this.devicesRegistry.register('usbmini', USBMini); + USBMini.init(); + } + } else { + if (BOARD?.web?.devices?.serial) { + this.devicesRegistry.register('serial', SerialPort); + SerialPort.init(); + } else if (BOARD?.web?.devices?.usb) { + if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) { + this.devicesRegistry.register('usb', USB); + USB.init(); + } else { + this.devicesRegistry.register('usbmini', USBMini); + USBMini.init(); + } + } else if (BOARD?.web?.devices?.hid) { + this.devicesRegistry.register('hid', HID); + HID.init(); + } + } + } + + this.init(); + } + + constructor(port) { + super(port); + const device = WebSerial.getPort(port); + const handler = WebSerial.getHandler(device); + if (!handler) { + return; + } + return new handler(port); + } +} + + +Web.Serial = WebSerial; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/serialport.js b/mixly/common/modules/mixly-modules/web/serialport.js new file mode 100644 index 00000000..ebadf309 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/serialport.js @@ -0,0 +1,279 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Serial'); +goog.require('Mixly.Debug'); +goog.require('Mixly.Config'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.SerialPort'); + +const { + Serial, + Debug, + Config, + Web +} = Mixly; + +const { SELECTED_BOARD } = Config; + +class WebSerialPort extends Serial { + static { + this.type = 'serialport'; + + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.refreshPorts = function () { + Serial.refreshPorts();; + } + + this.requestPort = async function () { + let options = SELECTED_BOARD?.web?.devices?.serial; + if (!options || typeof(options) !== 'object') { + options = { + filters: [] + }; + } + const serialport = await navigator.serial.requestPort(options); + this.addPort(serialport); + this.refreshPorts(); + } + + this.getPort = function (name) { + return Serial.nameToPortRegistry.getItem(name); + } + + this.addPort = function (serialport) { + if (this.portToNameRegistry.hasKey(serialport)) { + return; + } + let name = ''; + for (let i = 1; i <= 20; i++) { + name = `serial${i}`; + if (Serial.nameToPortRegistry.hasKey(name)) { + continue; + } + break; + } + Serial.portToNameRegistry.register(serialport, name); + Serial.nameToPortRegistry.register(name, serialport); + } + + this.removePort = function (serialport) { + if (!Serial.portToNameRegistry.hasKey(serialport)) { + return; + } + const name = Serial.portToNameRegistry.getItem(serialport); + if (!name) { + return; + } + Serial.portToNameRegistry.unregister(serialport); + Serial.nameToPortRegistry.unregister(name); + } + + this.addEventsListener = function () { + navigator?.serial?.addEventListener('connect', (event) => { + this.addPort(event.target); + this.refreshPorts(); + }); + + navigator?.serial?.addEventListener('disconnect', (event) => { + this.removePort(event.target); + this.refreshPorts(); + }); + } + + this.init = function () { + navigator?.serial?.getPorts().then((serialports) => { + for (let serialport of serialports) { + this.addPort(serialport); + } + }); + this.addEventsListener(); + } + } + + #serialport_ = null; + #keepReading_ = null; + #reader_ = null; + #writer_ = null; + #stringTemp_ = ''; + constructor(port) { + super(port); + this.#serialport_ = WebSerialPort.getPort(port); + } + + #addEventsListener_() { + this.#addReadEventListener_(); + } + + async #addReadEventListener_() { + const { readable } = this.#serialport_; + while (readable && this.#keepReading_) { + this.#reader_ = readable.getReader(); + try { + while (true) { + const { value, done } = await this.#reader_.read(); + value !== undefined && this.onBuffer(value); + if (done) { + break; + } + } + } catch (error) { + this.#keepReading_ = false; + Debug.error(error); + } finally { + this.#reader_ && this.#reader_.releaseLock(); + await this.close(); + } + } + } + + async open(baud) { + const portsName = Serial.getCurrentPortsName(); + const currentPortName = this.getPortName(); + if (!portsName.includes(currentPortName)) { + throw Error('no device available'); + return; + } + if (this.isOpened()) { + return; + } + baud = baud ?? this.getBaudRate(); + this.#serialport_ = WebSerialPort.getPort(currentPortName); + await this.#serialport_.open({ baudRate: baud }); + super.open(baud); + super.setBaudRate(baud); + this.#keepReading_ = true; + this.onOpen(); + this.#addEventsListener_(); + } + + async #waitForUnlock_(timeout) { + while ( + (this.#serialport_.readable && this.#serialport_.readable.locked) || + (this.#serialport_.writable && this.#serialport_.writable.locked) + ) { + await this.sleep(timeout); + } + } + + async close() { + if (!this.isOpened()) { + return; + } + super.close(); + if (this.#serialport_.readable?.locked) { + this.#keepReading_ = false; + await this.#reader_?.cancel(); + } + await this.#waitForUnlock_(400); + this.#reader_ = undefined; + await this.#serialport_.close(); + this.#stringTemp_ = ''; + this.onClose(1); + } + + async setBaudRate(baud) { + if (!this.isOpened() + || this.getRawBaudRate() === baud + || !this.baudRateIsLegal(baud)) { + return; + } + await this.close(); + await this.open(baud); + } + + async sendString(str) { + const buffer = this.encode(str); + return this.sendBuffer(buffer); + } + + async sendBuffer(buffer) { + const { writable } = this.#serialport_; + const writer = writable.getWriter(); + if (buffer.constructor.name !== 'Uint8Array') { + buffer = new Uint8Array(buffer); + } + try { + await writer.write(buffer); + writer.releaseLock(); + } catch (error) { + writer.releaseLock(); + throw Error(error); + } + } + + async setDTRAndRTS(dtr, rts) { + if (!this.isOpened()) { + return; + } + await this.#serialport_.setSignals({ + dataTerminalReady: dtr, + requestToSend: rts + }); + super.setDTRAndRTS(dtr, rts); + } + + async setDTR(dtr) { + if (!this.isOpened()) { + return; + } + await this.#serialport_.setSignals({ + dataTerminalReady: dtr + }); + super.setDTR(dtr); + } + + async setRTS(rts) { + if (!this.isOpened()) { + return; + } + await this.#serialport_.setSignals({ + requestToSend: rts + }); + super.setRTS(rts); + } + + getVID() { + const info = this.#serialport_.getInfo(); + return info.usbVendorId; + } + + getPID() { + const info = this.#serialport_.getInfo(); + return info.usbProductId; + } + + onBuffer(buffer) { + super.onBuffer(buffer); + for (let i = 0; i < buffer.length; i++) { + super.onByte(buffer[i]); + } + const string = this.decodeBuffer(buffer); + if (!string) { + return; + } + for (let char of string) { + super.onChar(char); + if (['\r', '\n'].includes(char)) { + super.onString(this.#stringTemp_); + this.#stringTemp_ = ''; + } else { + this.#stringTemp_ += char; + } + } + } +} + +Web.SerialPort = WebSerialPort; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/usb-mini.js b/mixly/common/modules/mixly-modules/web/usb-mini.js new file mode 100644 index 00000000..44daa549 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/usb-mini.js @@ -0,0 +1,350 @@ +goog.loadJs('web', () => { + +goog.require('Mixly.Serial'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Config'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.USBMini'); + +const { + Serial, + Registry, + Config, + Web +} = Mixly; + +const { SELECTED_BOARD } = Config; + +class USBMini extends Serial { + static { + this.type = 'usb'; + this.serialNumberToNameRegistry = new Registry(); + + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.refreshPorts = function () { + Serial.refreshPorts();; + } + + this.requestPort = async function () { + let options = SELECTED_BOARD?.web?.devices?.usb; + if (!options || typeof(options) !== 'object') { + options = { + filters: [] + }; + } + const device = await navigator.usb.requestDevice(options); + this.addPort(device); + this.refreshPorts(); + } + + this.getPort = function (name) { + return Serial.nameToPortRegistry.getItem(name); + } + + this.addPort = function (device) { + if (Serial.portToNameRegistry.hasKey(device)) { + return; + } + const { serialNumber } = device; + let name = this.serialNumberToNameRegistry.getItem(serialNumber); + if (!name) { + for (let i = 1; i <= 20; i++) { + name = `usb${i}`; + if (Serial.nameToPortRegistry.hasKey(name)) { + continue; + } + break; + } + this.serialNumberToNameRegistry.register(serialNumber, name); + } + Serial.portToNameRegistry.register(device, name); + Serial.nameToPortRegistry.register(name, device); + } + + this.removePort = function (device) { + if (!Serial.portToNameRegistry.hasKey(device)) { + return; + } + const name = Serial.portToNameRegistry.getItem(device); + if (!name) { + return; + } + Serial.portToNameRegistry.unregister(device); + Serial.nameToPortRegistry.unregister(name); + } + + this.addEventsListener = function () { + navigator?.usb?.addEventListener('connect', (event) => { + this.addPort(event.device); + this.refreshPorts(); + }); + + navigator?.usb?.addEventListener('disconnect', (event) => { + event.device.onclose && event.device.onclose(); + this.removePort(event.device); + this.refreshPorts(); + }); + } + + this.init = function () { + navigator?.usb?.getDevices().then((devices) => { + for (let device of devices) { + this.addPort(device); + } + }); + this.addEventsListener(); + } + } + + #device_ = null; + #keepReading_ = null; + #reader_ = null; + #serialPolling_ = false; + #stringTemp_ = ''; + #defaultClass_ = 0xFF; + #defaultConfiguration_ = 1; + #endpointIn_ = null; + #endpointOut_ = null; + #ctrlInterfaceNumber_ = -1; + #dataInterfaceNumber_ = -1; + #dataLength_ = 64; + constructor(port) { + super(port); + this.#device_ = USBMini.getPort(port); + } + + #addEventsListener_() { + this.#addReadEventListener_(); + } + + #addReadEventListener_() { + this.#reader_ = this.#startSerialRead_(); + + this.#device_.onclose = () => { + if (!this.isOpened()) { + return; + } + super.close(); + this.#stringTemp_ = ''; + this.onClose(1); + } + } + + async #read_() { + let result; + if (this.#endpointIn_) { + result = await this.#device_.transferIn(this.#endpointIn_, 64); + } else { + result = await this.#device_.controlTransferIn({ + requestType: 'class', + recipient: 'interface', + request: 0x01, + value: 0x100, + index: this.#dataInterfaceNumber_ + }, 64); + } + return result?.data; + } + + async #write_(data) { + if (this.#endpointOut_) { + await this.#device_.transferOut(this.#endpointOut_, data); + } else { + await this.#device_.controlTransferOut({ + requestType: 'class', + recipient: 'interface', + request: 0x09, + value: 0x200, + index: this.#dataInterfaceNumber_ + }, data); + } + } + + async #startSerialRead_(serialDelay = 1) { + this.#serialPolling_ = true; + try { + while (this.#serialPolling_ ) { + const data = await this.#read_(); + if (data !== undefined) { + const numberArray = Array.prototype.slice.call(new Uint8Array(data.buffer)); + this.onBuffer(numberArray); + } + await new Promise(resolve => setTimeout(resolve, serialDelay)); + } + } catch (_) {} + } + + async open(baud) { + const portsName = Serial.getCurrentPortsName(); + const currentPortName = this.getPortName(); + if (!portsName.includes(currentPortName)) { + throw new Error('no device available'); + } + if (this.isOpened()) { + return; + } + baud = baud ?? this.getBaudRate(); + this.#device_ = USBMini.getPort(currentPortName); + await this.#device_.open(); + await this.#device_.selectConfiguration(this.#defaultConfiguration_); + const interfaces = this.#device_.configuration.interfaces.filter(iface => { + return iface.alternates[0].interfaceClass === this.#defaultClass_; + }); + let selectedInterface = interfaces.find(iface => iface.alternates[0].endpoints.length > 0); + if (!selectedInterface) { + selectedInterface = interfaces[0]; + } + this.#dataInterfaceNumber_ = selectedInterface.interfaceNumber; + const { endpoints } = selectedInterface.alternates[0]; + for (const endpoint of endpoints) { + if (endpoint.direction === 'in') { + this.#endpointIn_ = endpoint.endpointNumber; + } else if (endpoint.direction === 'out') { + this.#endpointOut_ = endpoint.endpointNumber; + } + } + try { + await this.#device_.claimInterface(0); + this.#ctrlInterfaceNumber_ = 0; + } catch (_) { + this.#ctrlInterfaceNumber_ = -1; + } + await this.#device_.claimInterface(this.#dataInterfaceNumber_); + super.open(baud); + await this.setBaudRate(baud); + this.onOpen(); + this.#addEventsListener_(); + } + + async close() { + if (!this.isOpened()) { + return; + } + this.#serialPolling_ = false; + super.close(); + await this.#device_.close(); + if (this.#reader_) { + await this.#reader_; + } + this.#device_ = null; + this.onClose(1); + } + + async setBaudRate(baud) { + if (!this.isOpened() || this.getRawBaudRate() === baud) { + return; + } + if (this.#ctrlInterfaceNumber_ !== -1) { + const dwDTERate = new Uint8Array([ + baud & 0xFF, + (baud >> 8) & 0xFF, + (baud >> 16) & 0xFF, + (baud >> 24) & 0xFF + ]); + const bCharFormat = 0x00; + const bParityType = 0x00; + const bDataBits = 0x08; + const lineCoding = new Uint8Array([ + ...dwDTERate, + bCharFormat, + bParityType, + bDataBits + ]); + await this.#device_.controlTransferOut({ + requestType: 'class', + recipient: 'interface', + request: 0x20, + value: 0x0000, + index: this.#ctrlInterfaceNumber_ + }, lineCoding); + } + await super.setBaudRate(baud); + } + + async sendString(str) { + const buffer = this.encode(str); + return this.sendBuffer(buffer); + } + + async sendBuffer(buffer) { + if (buffer.constructor.name !== 'Uint8Array') { + buffer = new Uint8Array(buffer); + } + const len = Math.ceil(buffer.length / this.#dataLength_); + for (let i = 0; i < len; i++) { + const start = i * this.#dataLength_; + const end = Math.min((i + 1) * this.#dataLength_, buffer.length); + const writeBuffer = buffer.slice(start, end); + await this.#write_(writeBuffer) + await this.sleep(5); + } + } + + async setDTRAndRTS(dtr, rts) { + if (!this.isOpened() + || (this.getDTR() === dtr && this.getRTS() === rts)) { + return; + } + if (this.#ctrlInterfaceNumber_ !== -1) { + await this.#device_.controlTransferOut({ + requestType: 'class', + recipient: 'interface', + request: 0x22, + value: dtr | (rts << 1), + index: this.#ctrlInterfaceNumber_ + }); + } + await super.setDTRAndRTS(dtr, rts); + } + + async setDTR(dtr) { + return this.setDTRAndRTS(dtr, this.getRTS()); + } + + async setRTS(rts) { + return this.setDTRAndRTS(this.getDTR(), rts); + } + + getVID() { + return this.#device_.vendorId; + } + + getPID() { + return this.#device_.productId; + } + + onBuffer(buffer) { + super.onBuffer(buffer); + for (let i = 0; i < buffer.length; i++) { + super.onByte(buffer[i]); + } + const string = this.decodeBuffer(buffer); + if (!string) { + return; + } + for (let char of string) { + super.onChar(char); + if (['\r', '\n'].includes(char)) { + super.onString(this.#stringTemp_); + this.#stringTemp_ = ''; + } else { + this.#stringTemp_ += char; + } + } + } +} + +Web.USBMini = USBMini; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/usb.js b/mixly/common/modules/mixly-modules/web/usb.js new file mode 100644 index 00000000..14c489ba --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/usb.js @@ -0,0 +1,258 @@ +goog.loadJs('web', () => { + +goog.require('DAPjs'); +goog.require('Mixly.Serial'); +goog.require('Mixly.Registry'); +goog.require('Mixly.Config'); +goog.require('Mixly.Web'); +goog.provide('Mixly.Web.USB'); + +const { + Serial, + Registry, + Config, + Web +} = Mixly; + +const { SELECTED_BOARD } = Config; + +class USB extends Serial { + static { + this.type = 'usb'; + this.serialNumberToNameRegistry = new Registry(); + + this.getConfig = function () { + return Serial.getConfig(); + } + + this.getSelectedPortName = function () { + return Serial.getSelectedPortName(); + } + + this.getCurrentPortsName = function () { + return Serial.getCurrentPortsName(); + } + + this.refreshPorts = function () { + Serial.refreshPorts();; + } + + this.requestPort = async function () { + let options = SELECTED_BOARD?.web?.devices?.usb; + if (!options || typeof(options) !== 'object') { + options = { + filters: [] + }; + } + const device = await navigator.usb.requestDevice(options); + this.addPort(device); + this.refreshPorts(); + } + + this.getPort = function (name) { + return Serial.nameToPortRegistry.getItem(name); + } + + this.addPort = function (device) { + if (Serial.portToNameRegistry.hasKey(device)) { + return; + } + const { serialNumber } = device; + let name = this.serialNumberToNameRegistry.getItem(serialNumber); + if (!name) { + for (let i = 1; i <= 20; i++) { + name = `usb${i}`; + if (Serial.nameToPortRegistry.hasKey(name)) { + continue; + } + break; + } + this.serialNumberToNameRegistry.register(serialNumber, name); + } + Serial.portToNameRegistry.register(device, name); + Serial.nameToPortRegistry.register(name, device); + } + + this.removePort = function (device) { + if (!Serial.portToNameRegistry.hasKey(device)) { + return; + } + const name = Serial.portToNameRegistry.getItem(device); + if (!name) { + return; + } + Serial.portToNameRegistry.unregister(device); + Serial.nameToPortRegistry.unregister(name); + } + + this.addEventsListener = function () { + navigator?.usb?.addEventListener('connect', (event) => { + this.addPort(event.device); + this.refreshPorts(); + }); + + navigator?.usb?.addEventListener('disconnect', (event) => { + event.device.onclose && event.device.onclose(); + this.removePort(event.device); + this.refreshPorts(); + }); + } + + this.init = function () { + navigator?.usb?.getDevices().then((devices) => { + for (let device of devices) { + this.addPort(device); + } + }); + this.addEventsListener(); + } + } + + #device_ = null; + #webUSB_ = null; + #dapLink_ = null; + #keepReading_ = null; + #reader_ = null; + #writer_ = null; + #stringTemp_ = ''; + constructor(port) { + super(port); + this.#device_ = USB.getPort(port); + } + + #addEventsListener_() { + this.#addReadEventListener_(); + } + + #addReadEventListener_() { + this.#reader_ = this.#startSerialRead_(); + + this.#device_.onclose = () => { + if (!this.isOpened()) { + return; + } + super.close(); + this.#stringTemp_ = ''; + this.onClose(1); + } + } + + async #startSerialRead_(serialDelay = 1, autoConnect = false) { + this.#dapLink_.serialPolling = true; + + while (this.#dapLink_.serialPolling) { + const data = await this.#dapLink_.serialRead(); + if (data !== undefined) { + const numberArray = Array.prototype.slice.call(new Uint8Array(data)); + this.onBuffer(numberArray); + } + await new Promise(resolve => setTimeout(resolve, serialDelay)); + } + } + + async open(baud) { + const portsName = Serial.getCurrentPortsName(); + const currentPortName = this.getPortName(); + if (!portsName.includes(currentPortName)) { + throw new Error('no device available'); + } + if (this.isOpened()) { + return; + } + baud = baud ?? this.getBaudRate(); + this.#device_ = USB.getPort(currentPortName); + this.#webUSB_ = new DAPjs.WebUSB(this.#device_); + this.#dapLink_ = new DAPjs.DAPLink(this.#webUSB_); + await this.#dapLink_.connect(); + super.open(baud); + await this.setBaudRate(baud); + this.onOpen(); + this.#addEventsListener_(); + } + + async close() { + if (!this.isOpened()) { + return; + } + super.close(); + this.#dapLink_.stopSerialRead(); + if (this.#reader_) { + await this.#reader_; + } + await this.#dapLink_.disconnect(); + this.#dapLink_ = null; + await this.#webUSB_.close(); + this.#webUSB_ = null; + await this.#device_.close(); + this.#device_ = null; + this.onClose(1); + } + + async setBaudRate(baud) { + if (!this.isOpened() || this.getRawBaudRate() === baud) { + return; + } + await this.#dapLink_.setSerialBaudrate(baud); + await super.setBaudRate(baud); + } + + async sendString(str) { + return this.#dapLink_.serialWrite(str); + } + + async sendBuffer(buffer) { + if (buffer.constructor.name !== 'Uint8Array') { + buffer.unshift(buffer.length); + buffer = new Uint8Array(buffer); + } + await this.#dapLink_.send(132, buffer); + } + + async setDTRAndRTS(dtr, rts) { + if (!this.isOpened() + || (this.getDTR() === dtr && this.getRTS() === rts)) { + return; + } + await super.setDTRAndRTS(dtr, rts); + } + + async setDTR(dtr) { + return this.setDTRAndRTS(dtr, this.getRTS()); + } + + async setRTS(rts) { + return this.setDTRAndRTS(this.getDTR(), rts); + } + + getVID() { + return this.#device_.vendorId; + } + + getPID() { + return this.#device_.productId; + } + + onBuffer(buffer) { + super.onBuffer(buffer); + for (let i = 0; i < buffer.length; i++) { + super.onByte(buffer[i]); + } + const string = this.decodeBuffer(buffer); + if (!string) { + return; + } + for (let char of string) { + super.onChar(char); + if (['\r', '\n'].includes(char)) { + super.onString(this.#stringTemp_); + this.#stringTemp_ = ''; + } else { + this.#stringTemp_ += char; + } + } + } +} + +Web.USB = USB; + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/web/web.js b/mixly/common/modules/mixly-modules/web/web.js new file mode 100644 index 00000000..eefb7bd6 --- /dev/null +++ b/mixly/common/modules/mixly-modules/web/web.js @@ -0,0 +1,6 @@ +goog.loadJs('web', () => { + +goog.require('Mixly'); +goog.provide('Mixly.Web'); + +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/index.js b/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/index.js new file mode 100644 index 00000000..18250530 --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/index.js @@ -0,0 +1,53 @@ +importScripts('./libastyle.js'); +importScripts('../../../../web-modules/workerpool.min.js'); + + +const ASTYLE_CONFIG = ` +# Braces / 基本风格 +style=google # google 样式 + +# 缩进 +indent=spaces=2 # 使用 2 空格 +indent-switches # switch 里的 case 缩进 +indent-cases # case 对齐 +indent-after-parens # 括号之后新起一行也缩进 +indent-preproc-block # 缩进宏块 +indent-preproc-cond # 缩进条件宏 + +# Padding / 空格 +pad-comma # 参数逗号后加空格 +pad-oper # 运算符周围加空格 +pad-header # 关键字后添加空格 (if ( … )) + +# 对齐 +align-pointer=name # 把指针符号 * 放在类型名边 +align-reference=name # 引用符号 & 同上 + +# Formatting / 格式化行为 +attach-return-type # 合并返回类型和函数名 +attach-return-type-decl # 对声明也合并 +add-braces # 强制加大括号 +keep-one-line-blocks # 保留一行 {} 块 +keep-one-line-statements # if/else 等保留一行语句 +close-templates # 模板 <> 处理 +break-after-logical # long expression 后换行 +break-blocks # 块首尾换行 + +# 其他 +delete-empty-lines # 删除空行 +max-continuation-indent=4 # 设置表达式延续缩进最大值 +`; + +async function init() { + await self.cppFormatter.init(); +} + +async function format(code) { + const result = await self.cppFormatter.format(code, ASTYLE_CONFIG); + return result; +} + +workerpool.worker({ + init, + format +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/libastyle.js b/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/libastyle.js new file mode 100644 index 00000000..02b9bc3d --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/libastyle.js @@ -0,0 +1,5753 @@ +// Copyright 2010 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = function (status, toThrow) { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_HAS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; +ENVIRONMENT_IS_WEB = typeof window === 'object'; +ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +// A web environment like Electron.js can have Node enabled, so we must +// distinguish between Node-enabled environments and Node environments per se. +// This will allow the former to do things like mount NODEFS. +// Extended check using process.versions fixes issue #8816. +// (Also makes redundant the original check that 'require' is a function.) +ENVIRONMENT_HAS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; +ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; +ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)'); +} + + + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +var nodeFS; +var nodePath; + +if (ENVIRONMENT_IS_NODE) { + scriptDirectory = __dirname + '/'; + + + read_ = function shell_read(filename, binary) { + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + return nodeFS['readFileSync'](filename, binary ? null : 'utf8'); + }; + + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + + + + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function (ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + process['on']('unhandledRejection', abort); + + quit_ = function (status) { + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; + + +} else + if (ENVIRONMENT_IS_SHELL) { + + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + var data; + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit === 'function') { + quit_ = function (status) { + quit(status); + }; + } + + if (typeof print !== 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console === 'undefined') console = {}; + console.log = print; + console.warn = console.error = typeof printErr !== 'undefined' ? printErr : print; + } + } else + + // Note that this includes Node.js workers when relevant (pthreads is enabled). + // Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and + // ENVIRONMENT_HAS_NODE. + if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/') + 1); + } else { + scriptDirectory = ''; + } + + + // Differentiate the Web Worker from the Node Worker case, as reading must + // be done differently. + { + + + read_ = function shell_read(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + }; + + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + + + + } + + setWindowTitle = function (title) { document.title = title }; + } else { + throw new Error('environment detection error'); + } + + +// Set up the out() and err() hooks, which are how we can print to stdout or +// stderr, respectively. +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. +if (Module['arguments']) arguments_ = Module['arguments']; if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { configurable: true, get: function () { abort('Module.arguments has been replaced with plain arguments_') } }); +if (Module['thisProgram']) thisProgram = Module['thisProgram']; if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { configurable: true, get: function () { abort('Module.thisProgram has been replaced with plain thisProgram') } }); +if (Module['quit']) quit_ = Module['quit']; if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { configurable: true, get: function () { abort('Module.quit has been replaced with plain quit_') } }); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] === 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] === 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] === 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] === 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] === 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { configurable: true, get: function () { abort('Module.read has been replaced with plain read_') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { configurable: true, get: function () { abort('Module.readAsync has been replaced with plain readAsync') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { configurable: true, get: function () { abort('Module.readBinary has been replaced with plain readBinary') } }); +// TODO: add when SDL2 is fixed if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { configurable: true, get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle') } }); +var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js'; +var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js'; +var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js'; +var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js'; + + +// TODO remove when SDL2 is fixed (also see above) + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = function () { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + abort('staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)'); +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR >> 2]; + var end = (ret + size + 15) & -16; + if (end > _emscripten_get_heap_size()) { + abort('failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly'); + } + HEAP32[DYNAMICTOP_PTR >> 2] = end; + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + return Math.ceil(size / factor) * factor; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length - 1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + +var asm2wasmImports = { // special asm2wasm imports + "f64-rem": function (x, y) { + return x % y; + }, + "debugger": function () { + debugger; + } +}; + + + + +// Wraps a JS function as a wasm function with a given signature. +function convertJsFunctionToWasm(func, sig) { + + // If the type reflection proposal is available, use the new + // "WebAssembly.Function" constructor. + // Otherwise, construct a minimal wasm module importing the JS function and + // re-exporting it. + if (typeof WebAssembly.Function === "function") { + var typeNames = { + 'i': 'i32', + 'j': 'i64', + 'f': 'f32', + 'd': 'f64' + }; + var type = { + parameters: [], + results: sig[0] == 'v' ? [] : [typeNames[sig[0]]] + }; + for (var i = 1; i < sig.length; ++i) { + type.parameters.push(typeNames[sig[i]]); + } + return new WebAssembly.Function(type, func); + } + + // The module is static, with the exception of the type section, which is + // generated based on the signature passed in. + var typeSection = [ + 0x01, // id: section, + 0x00, // length: 0 (placeholder) + 0x01, // count: 1 + 0x60, // form: func + ]; + var sigRet = sig.slice(0, 1); + var sigParam = sig.slice(1); + var typeCodes = { + 'i': 0x7f, // i32 + 'j': 0x7e, // i64 + 'f': 0x7d, // f32 + 'd': 0x7c, // f64 + }; + + // Parameters, length + signatures + typeSection.push(sigParam.length); + for (var i = 0; i < sigParam.length; ++i) { + typeSection.push(typeCodes[sigParam[i]]); + } + + // Return values, length + signatures + // With no multi-return in MVP, either 0 (void) or 1 (anything else) + if (sigRet == 'v') { + typeSection.push(0x00); + } else { + typeSection = typeSection.concat([0x01, typeCodes[sigRet]]); + } + + // Write the overall length of the type section back into the section header + // (excepting the 2 bytes for the section id and length) + typeSection[1] = typeSection.length - 2; + + // Rest of the module is static + var bytes = new Uint8Array([ + 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") + 0x01, 0x00, 0x00, 0x00, // version: 1 + ].concat(typeSection, [ + 0x02, 0x07, // import section + // (import "e" "f" (func 0 (type 0))) + 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, + 0x07, 0x05, // export section + // (export "f" (func 0 (type 0))) + 0x01, 0x01, 0x66, 0x00, 0x00, + ])); + + // We can compile this wasm module synchronously because it is very small. + // This accepts an import (at "e.f"), that it reroutes to an export (at "f") + var module = new WebAssembly.Module(bytes); + var instance = new WebAssembly.Instance(module, { + 'e': { + 'f': func + } + }); + var wrappedFunc = instance.exports['f']; + return wrappedFunc; +} + +// Add a wasm function to the table. +function addFunctionWasm(func, sig) { + var table = wasmTable; + var ret = table.length; + + // Grow the table + try { + table.grow(1); + } catch (err) { + if (!err instanceof RangeError) { + throw err; + } + throw 'Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.'; + } + + // Insert new element + try { + // Attempting to call this with JS function will cause of table.set() to fail + table.set(ret, func); + } catch (err) { + if (!err instanceof TypeError) { + throw err; + } + assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction'); + var wrapped = convertJsFunctionToWasm(func, sig); + table.set(ret, wrapped); + } + + return ret; +} + +function removeFunctionWasm(index) { + // TODO(sbc): Look into implementing this to allow re-using of table slots +} + +// 'sig' parameter is required for the llvm backend but only when func is not +// already a WebAssembly function. +function addFunction(func, sig) { + assert(typeof func !== 'undefined'); + + return addFunctionWasm(func, sig); +} + +function removeFunction(index) { + removeFunctionWasm(index); +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low >>> 0))) + ((+((high >>> 0))) * 4294967296.0)) : ((+((low >>> 0))) + ((+((high | 0))) * 4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length - 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + +var tempRet0 = 0; + +var setTempRet0 = function (value) { + tempRet0 = value; +}; + +var getTempRet0 = function () { + return tempRet0; +}; + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // helpful errors + getTempRet0: function () { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function () { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function () { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 1024; + + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + +var wasmBinary; if (Module['wasmBinary']) wasmBinary = Module['wasmBinary']; if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { configurable: true, get: function () { abort('Module.wasmBinary has been replaced with plain wasmBinary') } }); +var noExitRuntime; if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime']; if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { configurable: true, get: function () { abort('Module.noExitRuntime has been replaced with plain noExitRuntime') } }); + + +if (typeof WebAssembly !== 'object') { + abort('No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.'); +} + + +// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. +// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length - 1) === '*') type = 'i32'; // pointers are 32-bit + switch (type) { + case 'i1': HEAP8[((ptr) >> 0)] = value; break; + case 'i8': HEAP8[((ptr) >> 0)] = value; break; + case 'i16': HEAP16[((ptr) >> 1)] = value; break; + case 'i32': HEAP32[((ptr) >> 2)] = value; break; + case 'i64': (tempI64 = [value >>> 0, (tempDouble = value, (+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble) / 4294967296.0))), 4294967295.0)) | 0) >>> 0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296.0))))) >>> 0) : 0)], HEAP32[((ptr) >> 2)] = tempI64[0], HEAP32[(((ptr) + (4)) >> 2)] = tempI64[1]); break; + case 'float': HEAPF32[((ptr) >> 2)] = value; break; + case 'double': HEAPF64[((ptr) >> 3)] = value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length - 1) === '*') type = 'i32'; // pointers are 32-bit + switch (type) { + case 'i1': return HEAP8[((ptr) >> 0)]; + case 'i8': return HEAP8[((ptr) >> 0)]; + case 'i16': return HEAP16[((ptr) >> 1)]; + case 'i32': return HEAP32[((ptr) >> 2)]; + case 'i64': return HEAP32[((ptr) >> 2)]; + case 'float': return HEAPF32[((ptr) >> 2)]; + case 'double': return HEAPF64[((ptr) >> 3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + + + + + +// Wasm globals + +var wasmMemory; + +// In fastcomp asm.js, we don't need a wasm Table at all. +// In the wasm backend, we polyfill the WebAssembly object, +// so this creates a (non-native-wasm) table for us. +var wasmTable = new WebAssembly.Table({ + 'initial': 479, + 'maximum': 479 + 20, + 'element': 'anyfunc' +}); + + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +// C calling interface. +function ccall(ident, returnType, argTypes, args, opts) { + // For fast lookup of conversion functions + var toC = { + 'string': function (str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + 'array': function (arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + + function convertReturnValue(ret) { + if (returnType === 'string') return UTF8ToString(ret); + if (returnType === 'boolean') return Boolean(ret); + return ret; + } + + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + + ret = convertReturnValue(ret); + if (stack !== 0) stackRestore(stack); + return ret; +} + +function cwrap(ident, returnType, argTypes, opts) { + return function () { + return ccall(ident, returnType, argTypes, arguments, opts); + } +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk +var ALLOC_NONE = 3; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [_malloc, + stackAlloc, + dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr) >> 2)] = 0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++) >> 0)] = 0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */(slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret + i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + + + + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + abort("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAPU8[((ptr++) >> 0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(u8Array, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) + while (u8Array[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var str = ''; + // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = u8Array[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (u8Array[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } + return str; +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a +// copy of that string as a Javascript String object. +// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit +// this parameter to scan the string until the first \0 byte. If maxBytesToRead is +// passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the +// middle, then the string will cut short at that byte index (i.e. maxBytesToRead will +// not produce a string of exact length [ptr, ptr+maxBytesToRead[) +// N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may +// throw JS JIT optimizations off, so it is worth to consider consistently using one +// style or the other. +/** + * @param {number} ptr + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. +// This count should include the null terminator, +// i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).'); + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) ++len; + else if (u <= 0x7FF) len += 2; + else if (u <= 0xFFFF) len += 3; + else len += 4; + } + return len; +} + + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr) + (i * 2)) >> 1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length * 2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr) >> 1)] = codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr) >> 1)] = 0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length * 2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr) + (i * 4)) >> 2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr) >> 2)] = codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr) >> 2)] = 0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i) & 0xff); + HEAP8[((buffer++) >> 0)] = str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer) >> 0)] = 0; +} + + + + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, + /** @type {ArrayBuffer} */ + buffer, + /** @type {Int8Array} */ + HEAP8, + /** @type {Uint8Array} */ + HEAPU8, + /** @type {Int16Array} */ + HEAP16, + /** @type {Uint16Array} */ + HEAPU16, + /** @type {Int32Array} */ + HEAP32, + /** @type {Uint32Array} */ + HEAPU32, + /** @type {Float32Array} */ + HEAPF32, + /** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + +var STATIC_BASE = 1024, + STACK_BASE = 5265728, + STACKTOP = STACK_BASE, + STACK_MAX = 22848, + DYNAMIC_BASE = 5265728, + DYNAMICTOP_PTR = 22688; + +assert(STACK_BASE % 16 === 0, 'stack must start aligned'); +assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned'); + + + +var TOTAL_STACK = 5242880; +if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime') + +var INITIAL_TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; if (!Object.getOwnPropertyDescriptor(Module, 'TOTAL_MEMORY')) Object.defineProperty(Module, 'TOTAL_MEMORY', { configurable: true, get: function () { abort('Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY') } }); + +assert(INITIAL_TOTAL_MEMORY >= TOTAL_STACK, 'TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + + + + +// In standalone mode, the wasm creates the memory, and the user can't provide it. +// In non-standalone/normal mode, we create the memory here. + +// Create the main memory. (Note: this isn't used in STANDALONE_WASM mode since the wasm +// memory is created in the wasm, not in JS.) + +if (Module['wasmMemory']) { + wasmMemory = Module['wasmMemory']; +} else { + wasmMemory = new WebAssembly.Memory({ + 'initial': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + , + 'maximum': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + }); +} + + +if (wasmMemory) { + buffer = wasmMemory.buffer; +} + +// If the user provides an incorrect length, just use that length instead rather than providing the user to +// specifically provide the memory length with Module['TOTAL_MEMORY']. +INITIAL_TOTAL_MEMORY = buffer.byteLength; +assert(INITIAL_TOTAL_MEMORY % WASM_PAGE_SIZE === 0); +updateGlobalBufferAndViews(buffer); + +HEAP32[DYNAMICTOP_PTR >> 2] = DYNAMIC_BASE; + + + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + // The stack grows downwards + HEAPU32[(STACK_MAX >> 2) + 1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2) + 2] = 0x89BACDFE; + // Also test the global address 0 for integrity. + // We don't do this with ASan because ASan does its own checks for this. + HEAP32[0] = 0x63736d65; /* 'emsc' */ +} + +function checkStackCookie() { + var cookie1 = HEAPU32[(STACK_MAX >> 2) + 1]; + var cookie2 = HEAPU32[(STACK_MAX >> 2) + 2]; + if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16)); + } + // Also test the global address 0 for integrity. + // We don't do this with ASan because ASan does its own checks for this. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + + + + +// Endianness check (note: assumes compiler arch was little-endian) +(function () { + var h16 = new Int16Array(1); + var h8 = new Int8Array(h16.buffer); + h16[0] = 0x6373; + if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; +})(); + +function abortFnPtrError(ptr, sig) { + abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info."); +} + + + +function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + checkStackCookie(); + assert(!runtimeInitialized); + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); + TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + FS.ignorePermissions = false; + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2 * Math.abs(1 << (bits - 1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits - 1)) // abs is needed if bits == 32 + : Math.pow(2, bits - 1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2 * half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + + + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function () { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what += ''; + out(what); + err(what); + + ABORT = true; + EXITSTATUS = 1; + + var output = 'abort(' + what + ') at ' + stackTrace(); + what = output; + + // Throw a wasm runtime error, because a JS error might be seen as a foreign + // exception, which means we'd run destructors on it. We need the error to + // simply make the program stop. + throw new WebAssembly.RuntimeError(what); +} + + +var memoryInitializer = null; + + + + + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + +var wasmBinaryFile = 'libastyle.wasm'; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary() { + try { + if (wasmBinary) { + return new Uint8Array(wasmBinary); + } + + if (readBinary) { + return readBinary(wasmBinaryFile); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // if we don't have the binary yet, and have the Fetch api, use that + // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(); + }); + } + // Otherwise, getBinary should be able to get it synchronously + return new Promise(function (resolve, reject) { + resolve(getBinary()); + }); +} + + + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm() { + // prepare imports + var info = { + 'env': asmLibraryArg, + 'wasi_snapshot_preview1': asmLibraryArg + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + function receiveInstance(instance, module) { + var exports = instance.exports; + Module['asm'] = exports; + removeRunDependency('wasm-instantiate'); + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiatedSource(output) { + // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(output['instance']); + } + + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function (binary) { + return WebAssembly.instantiate(binary, info); + }).then(receiver, function (reason) { + err('failed to asynchronously prepare wasm: ' + reason); + abort(reason); + }); + } + + // Prefer streaming instantiation if available. + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming === 'function' && + !isDataURI(wasmBinaryFile) && + typeof fetch === 'function') { + fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiatedSource, function (reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + instantiateArrayBuffer(receiveInstantiatedSource); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiatedSource); + } + } + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch (e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + + +// Globals used by JS i64 conversions +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = { + +}; + + + + +// STATICTOP = STATIC_BASE + 21824; +/* global initializers */ __ATINIT__.push({ func: function () { ___wasm_call_ctors() } }); + + + + +/* no memory initializer */ +// {{PRE_LIBRARY}} + + +function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; +} + +function demangleAll(text) { + var regex = + /\b_Z[\w\d_]+/g; + return text.replace(regex, + function (x) { + var y = demangle(x); + return x === y ? x : (y + ' [' + x + ']'); + }); +} + +function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch (e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); +} + +function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); +} + + +function _atexit(func, arg) { + warnOnce('atexit() called, but EXIT_RUNTIME is not set, so atexits() will not be called. set EXIT_RUNTIME to 1 (see the FAQ)'); + __ATEXIT__.unshift({ func: func, arg: arg }); +} function ___cxa_atexit( +) { + return _atexit.apply(null, arguments) +} + +function ___handle_stack_overflow() { + abort('stack overflow') +} + +function ___lock() { } + + +function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']()) >> 2)] = value; + else err('failed to set errno from JS'); + return value; +} function ___map_file(pathname, size) { + ___setErrNo(63); + return -1; +} + + + + +var PATH = { + splitPath: function (filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + }, normalizeArray: function (parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift('..'); + } + } + return parts; + }, normalize: function (path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function (p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + }, dirname: function (path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + }, basename: function (path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash + 1); + }, extname: function (path) { + return PATH.splitPath(path)[3]; + }, join: function () { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + }, join2: function (l, r) { + return PATH.normalize(l + '/' + r); + } +}; + + +var PATH_FS = { + resolve: function () { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function (p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + }, relative: function (from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + } +}; + +var TTY = { + ttys: [], init: function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // currently, FS.init does not distinguish if process.stdin is a file or TTY + // // device, it always assumes it's a TTY device. because of this, we're forcing + // // process.stdin to UTF8 encoding to at least make stdin reading compatible + // // with text files until FS.init can be refactored. + // process['stdin']['setEncoding']('utf8'); + // } + }, shutdown: function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? + // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation + // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? + // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle + // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call + // process['stdin']['pause'](); + // } + }, register: function (dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops: ops }; + FS.registerDevice(dev, TTY.stream_ops); + }, stream_ops: { + open: function (stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(43); + } + stream.tty = tty; + stream.seekable = false; + }, close: function (stream) { + // flush any pending line data + stream.tty.ops.flush(stream.tty); + }, flush: function (stream) { + stream.tty.ops.flush(stream.tty); + }, read: function (stream, buffer, offset, length, pos /* ignored */) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(60); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, write: function (stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(60); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset + i]); + } + } catch (e) { + throw new FS.ErrnoError(29); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }, default_tty_ops: { + get_char: function (tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); + var bytesRead = 0; + + try { + bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null); + } catch (e) { + // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, + // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. + if (e.toString().indexOf('EOF') != -1) bytesRead = 0; + else throw e; + } + + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; + } + } else + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); // returns null on cancel + if (result !== null) { + result += '\n'; + } + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + if (result !== null) { + result += '\n'; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + }, put_char: function (tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + }, flush: function (tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + } + }, default_tty1_ops: { + put_char: function (tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, flush: function (tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + } + } +}; + +var MEMFS = { + ops_table: null, mount: function (mount) { + return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); + }, createNode: function (parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + // no supported + throw new FS.ErrnoError(63); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. + // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred + // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size + // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + // add the new node to the parent + if (parent) { + parent.contents[name] = node; + } + return node; + }, getFileDataAsRegularArray: function (node) { + if (node.contents && node.contents.subarray) { + var arr = []; + for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); + return arr; // Returns a copy of the original data. + } + return node.contents; // No-op, the file contents are already in a JS array. Return as-is. + }, getFileDataAsTypedArray: function (node) { + if (!node.contents) return new Uint8Array; + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. + return new Uint8Array(node.contents); + }, expandFileStorage: function (node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. + // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. + // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to + // avoid overshooting the allocation cap by a very large margin. + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); // Allocate new storage. + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. + return; + }, resizeFileStorage: function (node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; // Fully decommit when requesting a resize to zero. + node.usedBytes = 0; + return; + } + if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. + var oldContents = node.contents; + node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. + } + node.usedBytes = newSize; + return; + } + // Backing with a JS array. + if (!node.contents) node.contents = []; + if (node.contents.length > newSize) node.contents.length = newSize; + else while (node.contents.length < newSize) node.contents.push(0); + node.usedBytes = newSize; + }, node_ops: { + getattr: function (node) { + var attr = {}; + // device numbers reuse inode numbers. + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), + // but this is not required by the standard. + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + }, setattr: function (node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + }, lookup: function (parent, name) { + throw FS.genericErrors[44]; + }, mknod: function (parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + }, rename: function (old_node, new_dir, new_name) { + // if we're overwriting a directory at new_name, make sure it's empty. + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + } + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(55); + } + } + } + // do the internal rewiring + delete old_node.parent.contents[old_node.name]; + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + old_node.parent = new_dir; + }, unlink: function (parent, name) { + delete parent.contents[name]; + }, rmdir: function (parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(55); + } + delete parent.contents[name]; + }, readdir: function (node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + }, symlink: function (parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); + node.link = oldpath; + return node; + }, readlink: function (node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(28); + } + return node.link; + } + }, stream_ops: { + read: function (stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + assert(size >= 0); + if (size > 8 && contents.subarray) { // non-trivial, and typed array + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + }, write: function (stream, buffer, offset, length, position, canOwn) { + // The data buffer should be a typed array view + assert(!(buffer instanceof ArrayBuffer)); + + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + + if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? + if (canOwn) { + assert(position === 0, 'canOwn must imply no weird position inside the file'); + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. + node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. + MEMFS.expandFileStorage(node, position + length); + if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. + else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. + } + } + node.usedBytes = Math.max(node.usedBytes, position + length); + return length; + }, llseek: function (stream, offset, whence) { + var position = offset; + if (whence === 1) { + position += stream.position; + } else if (whence === 2) { + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(28); + } + return position; + }, allocate: function (stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + }, mmap: function (stream, buffer, offset, length, position, prot, flags) { + // The data buffer should be a typed array view + assert(!(buffer instanceof ArrayBuffer)); + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + var ptr; + var allocated; + var contents = stream.node.contents; + // Only make a new copy when MAP_PRIVATE is specified. + if (!(flags & 2) && + contents.buffer === buffer.buffer) { + // We can't emulate MAP_SHARED when the file is not backed by the buffer + // we're mapping to (e.g. the HEAP buffer). + allocated = false; + ptr = contents.byteOffset; + } else { + // Try to avoid unnecessary slices. + if (position > 0 || position + length < stream.node.usedBytes) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + // malloc() can lead to growing the heap. If targeting the heap, we need to + // re-acquire the heap buffer object in case growth had occurred. + var fromHeap = (buffer.buffer == HEAP8.buffer); + ptr = _malloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + (fromHeap ? HEAP8 : buffer).set(contents, ptr); + } + return { ptr: ptr, allocated: allocated }; + }, msync: function (stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; + } + } +}; + +var ERRNO_MESSAGES = { 0: "Success", 1: "Arg list too long", 2: "Permission denied", 3: "Address already in use", 4: "Address not available", 5: "Address family not supported by protocol family", 6: "No more processes", 7: "Socket already connected", 8: "Bad file number", 9: "Trying to read unreadable message", 10: "Mount device busy", 11: "Operation canceled", 12: "No children", 13: "Connection aborted", 14: "Connection refused", 15: "Connection reset by peer", 16: "File locking deadlock error", 17: "Destination address required", 18: "Math arg out of domain of func", 19: "Quota exceeded", 20: "File exists", 21: "Bad address", 22: "File too large", 23: "Host is unreachable", 24: "Identifier removed", 25: "Illegal byte sequence", 26: "Connection already in progress", 27: "Interrupted system call", 28: "Invalid argument", 29: "I/O error", 30: "Socket is already connected", 31: "Is a directory", 32: "Too many symbolic links", 33: "Too many open files", 34: "Too many links", 35: "Message too long", 36: "Multihop attempted", 37: "File or path name too long", 38: "Network interface is not configured", 39: "Connection reset by network", 40: "Network is unreachable", 41: "Too many open files in system", 42: "No buffer space available", 43: "No such device", 44: "No such file or directory", 45: "Exec format error", 46: "No record locks available", 47: "The link has been severed", 48: "Not enough core", 49: "No message of desired type", 50: "Protocol not available", 51: "No space left on device", 52: "Function not implemented", 53: "Socket is not connected", 54: "Not a directory", 55: "Directory not empty", 56: "State not recoverable", 57: "Socket operation on non-socket", 59: "Not a typewriter", 60: "No such device or address", 61: "Value too large for defined data type", 62: "Previous owner died", 63: "Not super-user", 64: "Broken pipe", 65: "Protocol error", 66: "Unknown protocol", 67: "Protocol wrong type for socket", 68: "Math result not representable", 69: "Read only file system", 70: "Illegal seek", 71: "No such process", 72: "Stale file handle", 73: "Connection timed out", 74: "Text file busy", 75: "Cross-device link", 100: "Device not a stream", 101: "Bad font file fmt", 102: "Invalid slot", 103: "Invalid request code", 104: "No anode", 105: "Block device required", 106: "Channel number out of range", 107: "Level 3 halted", 108: "Level 3 reset", 109: "Link number out of range", 110: "Protocol driver not attached", 111: "No CSI structure available", 112: "Level 2 halted", 113: "Invalid exchange", 114: "Invalid request descriptor", 115: "Exchange full", 116: "No data (for no delay io)", 117: "Timer expired", 118: "Out of streams resources", 119: "Machine is not on the network", 120: "Package not installed", 121: "The object is remote", 122: "Advertise error", 123: "Srmount error", 124: "Communication error on send", 125: "Cross mount point (not really error)", 126: "Given log. name not unique", 127: "f.d. invalid for this operation", 128: "Remote address changed", 129: "Can access a needed shared lib", 130: "Accessing a corrupted shared lib", 131: ".lib section in a.out corrupted", 132: "Attempting to link in too many libs", 133: "Attempting to exec a shared library", 135: "Streams pipe error", 136: "Too many users", 137: "Socket type not supported", 138: "Not supported", 139: "Protocol family not supported", 140: "Can't send after socket shutdown", 141: "Too many references", 142: "Host is down", 148: "No medium (in tape drive)", 156: "Level 2 not synchronized" }; + +var ERRNO_CODES = { EPERM: 63, ENOENT: 44, ESRCH: 71, EINTR: 27, EIO: 29, ENXIO: 60, E2BIG: 1, ENOEXEC: 45, EBADF: 8, ECHILD: 12, EAGAIN: 6, EWOULDBLOCK: 6, ENOMEM: 48, EACCES: 2, EFAULT: 21, ENOTBLK: 105, EBUSY: 10, EEXIST: 20, EXDEV: 75, ENODEV: 43, ENOTDIR: 54, EISDIR: 31, EINVAL: 28, ENFILE: 41, EMFILE: 33, ENOTTY: 59, ETXTBSY: 74, EFBIG: 22, ENOSPC: 51, ESPIPE: 70, EROFS: 69, EMLINK: 34, EPIPE: 64, EDOM: 18, ERANGE: 68, ENOMSG: 49, EIDRM: 24, ECHRNG: 106, EL2NSYNC: 156, EL3HLT: 107, EL3RST: 108, ELNRNG: 109, EUNATCH: 110, ENOCSI: 111, EL2HLT: 112, EDEADLK: 16, ENOLCK: 46, EBADE: 113, EBADR: 114, EXFULL: 115, ENOANO: 104, EBADRQC: 103, EBADSLT: 102, EDEADLOCK: 16, EBFONT: 101, ENOSTR: 100, ENODATA: 116, ETIME: 117, ENOSR: 118, ENONET: 119, ENOPKG: 120, EREMOTE: 121, ENOLINK: 47, EADV: 122, ESRMNT: 123, ECOMM: 124, EPROTO: 65, EMULTIHOP: 36, EDOTDOT: 125, EBADMSG: 9, ENOTUNIQ: 126, EBADFD: 127, EREMCHG: 128, ELIBACC: 129, ELIBBAD: 130, ELIBSCN: 131, ELIBMAX: 132, ELIBEXEC: 133, ENOSYS: 52, ENOTEMPTY: 55, ENAMETOOLONG: 37, ELOOP: 32, EOPNOTSUPP: 138, EPFNOSUPPORT: 139, ECONNRESET: 15, ENOBUFS: 42, EAFNOSUPPORT: 5, EPROTOTYPE: 67, ENOTSOCK: 57, ENOPROTOOPT: 50, ESHUTDOWN: 140, ECONNREFUSED: 14, EADDRINUSE: 3, ECONNABORTED: 13, ENETUNREACH: 40, ENETDOWN: 38, ETIMEDOUT: 73, EHOSTDOWN: 142, EHOSTUNREACH: 23, EINPROGRESS: 26, EALREADY: 7, EDESTADDRREQ: 17, EMSGSIZE: 35, EPROTONOSUPPORT: 66, ESOCKTNOSUPPORT: 137, EADDRNOTAVAIL: 4, ENETRESET: 39, EISCONN: 30, ENOTCONN: 53, ETOOMANYREFS: 141, EUSERS: 136, EDQUOT: 19, ESTALE: 72, ENOTSUP: 138, ENOMEDIUM: 148, EILSEQ: 25, EOVERFLOW: 61, ECANCELED: 11, ENOTRECOVERABLE: 56, EOWNERDEAD: 62, ESTRPIPE: 135 }; var FS = { + root: null, mounts: [], devices: {}, streams: [], nextInode: 1, nameTable: null, currentPath: "/", initialized: false, ignorePermissions: true, trackingDelegate: {}, tracking: { openFlags: { READ: 1, WRITE: 2 } }, ErrnoError: null, genericErrors: {}, filesystems: null, syncFSRequests: 0, handleFSError: function (e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + }, lookupPath: function (path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(32); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function (p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length - 1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + + // jump to the mount's root node if this is a mountpoint + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + + // by default, lookupPath will not follow a symlink if it is the final path component. + // setting opts.follow = true will override this behavior. + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); + current = lookup.node; + + if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). + throw new FS.ErrnoError(32); + } + } + } + } + + return { path: current_path, node: current }; + }, getPath: function (node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length - 1] !== '/' ? mount + '/' + path : mount + path; + } + path = path ? node.name + '/' + path : node.name; + node = node.parent; + } + }, hashName: function (parentid, name) { + var hash = 0; + + + for (var i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + }, hashAddNode: function (node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + }, hashRemoveNode: function (node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + }, lookupNode: function (parent, name) { + var err = FS.mayLookup(parent); + if (err) { + throw new FS.ErrnoError(err, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + // if we failed to find it in the cache, call into the VFS + return FS.lookup(parent, name); + }, createNode: function (parent, name, mode, rdev) { + if (!FS.FSNode) { + FS.FSNode = function (parent, name, mode, rdev) { + if (!parent) { + parent = this; // root node sets parent to itself + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + + FS.FSNode.prototype = {}; + + // compatibility + var readMode = 292 | 73; + var writeMode = 146; + + // NOTE we must use Object.defineProperties instead of individual calls to + // Object.defineProperty in order to make closure compiler happy + Object.defineProperties(FS.FSNode.prototype, { + read: { + get: function () { return (this.mode & readMode) === readMode; }, + set: function (val) { val ? this.mode |= readMode : this.mode &= ~readMode; } + }, + write: { + get: function () { return (this.mode & writeMode) === writeMode; }, + set: function (val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } + }, + isFolder: { + get: function () { return FS.isDir(this.mode); } + }, + isDevice: { + get: function () { return FS.isChrdev(this.mode); } + } + }); + } + + var node = new FS.FSNode(parent, name, mode, rdev); + + FS.hashAddNode(node); + + return node; + }, destroyNode: function (node) { + FS.hashRemoveNode(node); + }, isRoot: function (node) { + return node === node.parent; + }, isMountpoint: function (node) { + return !!node.mounted; + }, isFile: function (mode) { + return (mode & 61440) === 32768; + }, isDir: function (mode) { + return (mode & 61440) === 16384; + }, isLink: function (mode) { + return (mode & 61440) === 40960; + }, isChrdev: function (mode) { + return (mode & 61440) === 8192; + }, isBlkdev: function (mode) { + return (mode & 61440) === 24576; + }, isFIFO: function (mode) { + return (mode & 61440) === 4096; + }, isSocket: function (mode) { + return (mode & 49152) === 49152; + }, flagModes: { "r": 0, "rs": 1052672, "r+": 2, "w": 577, "wx": 705, "xw": 705, "w+": 578, "wx+": 706, "xw+": 706, "a": 1089, "ax": 1217, "xa": 1217, "a+": 1090, "ax+": 1218, "xa+": 1218 }, modeStringToFlags: function (str) { + var flags = FS.flagModes[str]; + if (typeof flags === 'undefined') { + throw new Error('Unknown file open mode: ' + str); + } + return flags; + }, flagsToPermissionString: function (flag) { + var perms = ['r', 'w', 'rw'][flag & 3]; + if ((flag & 512)) { + perms += 'w'; + } + return perms; + }, nodePermissions: function (node, perms) { + if (FS.ignorePermissions) { + return 0; + } + // return 0 if any user, group or owner bits are set. + if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { + return 2; + } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { + return 2; + } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { + return 2; + } + return 0; + }, mayLookup: function (dir) { + var err = FS.nodePermissions(dir, 'x'); + if (err) return err; + if (!dir.node_ops.lookup) return 2; + return 0; + }, mayCreate: function (dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 20; + } catch (e) { + } + return FS.nodePermissions(dir, 'wx'); + }, mayDelete: function (dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var err = FS.nodePermissions(dir, 'wx'); + if (err) { + return err; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 54; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 10; + } + } else { + if (FS.isDir(node.mode)) { + return 31; + } + } + return 0; + }, mayOpen: function (node, flags) { + if (!node) { + return 44; + } + if (FS.isLink(node.mode)) { + return 32; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write + (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) + return 31; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + }, MAX_OPEN_FDS: 4096, nextfd: function (fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(33); + }, getStream: function (fd) { + return FS.streams[fd]; + }, createStream: function (stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = function () { }; + FS.FSStream.prototype = {}; + // compatibility + Object.defineProperties(FS.FSStream.prototype, { + object: { + get: function () { return this.node; }, + set: function (val) { this.node = val; } + }, + isRead: { + get: function () { return (this.flags & 2097155) !== 1; } + }, + isWrite: { + get: function () { return (this.flags & 2097155) !== 0; } + }, + isAppend: { + get: function () { return (this.flags & 1024); } + } + }); + } + // clone it, so we can return an instance of FSStream + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + }, closeStream: function (fd) { + FS.streams[fd] = null; + }, chrdev_stream_ops: { + open: function (stream) { + var device = FS.getDevice(stream.node.rdev); + // override node's stream ops with the device's + stream.stream_ops = device.stream_ops; + // forward the open call + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + }, llseek: function () { + throw new FS.ErrnoError(70); + } + }, major: function (dev) { + return ((dev) >> 8); + }, minor: function (dev) { + return ((dev) & 0xff); + }, makedev: function (ma, mi) { + return ((ma) << 8 | (mi)); + }, registerDevice: function (dev, ops) { + FS.devices[dev] = { stream_ops: ops }; + }, getDevice: function (dev) { + return FS.devices[dev]; + }, getMounts: function (mount) { + var mounts = []; + var check = [mount]; + + while (check.length) { + var m = check.pop(); + + mounts.push(m); + + check.push.apply(check, m.mounts); + } + + return mounts; + }, syncfs: function (populate, callback) { + if (typeof (populate) === 'function') { + callback = populate; + populate = false; + } + + FS.syncFSRequests++; + + if (FS.syncFSRequests > 1) { + console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); + } + + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + + function doCallback(err) { + assert(FS.syncFSRequests > 0); + FS.syncFSRequests--; + return callback(err); + } + + function done(err) { + if (err) { + if (!done.errored) { + done.errored = true; + return doCallback(err); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + }; + + // sync all mounts + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + }, mount: function (type, opts, mountpoint) { + if (typeof type === 'string') { + // The filesystem was not included, and instead we have an error + // message stored in the variable. + throw type; + } + var root = mountpoint === '/'; + var pseudo = !mountpoint; + var node; + + if (root && FS.root) { + throw new FS.ErrnoError(10); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + mountpoint = lookup.path; // use the absolute path + node = lookup.node; + + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + } + + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + + // create a root node for the fs + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + + if (root) { + FS.root = mountRoot; + } else if (node) { + // set as a mountpoint + node.mounted = mount; + + // add the new mount to the current mount's children + if (node.mount) { + node.mount.mounts.push(mount); + } + } + + return mountRoot; + }, unmount: function (mountpoint) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(28); + } + + // destroy the nodes for this mount, and all its child mounts + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + + while (current) { + var next = current.name_next; + + if (mounts.indexOf(current.mount) !== -1) { + FS.destroyNode(current); + } + + current = next; + } + }); + + // no longer a mountpoint + node.mounted = null; + + // remove this mount from the child mounts + var idx = node.mount.mounts.indexOf(mount); + assert(idx !== -1); + node.mount.mounts.splice(idx, 1); + }, lookup: function (parent, name) { + return parent.node_ops.lookup(parent, name); + }, mknod: function (path, mode, dev) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === '.' || name === '..') { + throw new FS.ErrnoError(28); + } + var err = FS.mayCreate(parent, name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.mknod(parent, name, mode, dev); + }, create: function (path, mode) { + mode = mode !== undefined ? mode : 438 /* 0666 */; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + }, mkdir: function (path, mode) { + mode = mode !== undefined ? mode : 511 /* 0777 */; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + }, mkdirTree: function (path, mode) { + var dirs = path.split('/'); + var d = ''; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += '/' + dirs[i]; + try { + FS.mkdir(d, mode); + } catch (e) { + if (e.errno != 20) throw e; + } + } + }, mkdev: function (path, mode, dev) { + if (typeof (dev) === 'undefined') { + dev = mode; + mode = 438 /* 0666 */; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + }, symlink: function (oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(44); + } + var lookup = FS.lookupPath(newpath, { parent: true }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + var newname = PATH.basename(newpath); + var err = FS.mayCreate(parent, newname); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.symlink(parent, newname, oldpath); + }, rename: function (old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + // parents must exist + var lookup, old_dir, new_dir; + try { + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + } catch (e) { + throw new FS.ErrnoError(10); + } + if (!old_dir || !new_dir) throw new FS.ErrnoError(44); + // need to be part of the same mount + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(75); + } + // source must exist + var old_node = FS.lookupNode(old_dir, old_name); + // old path should not be an ancestor of the new path + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(28); + } + // new path should not be an ancestor of the old path + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(55); + } + // see if the new path already exists + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + // not fatal + } + // early out if nothing needs to change + if (old_node === new_node) { + return; + } + // we'll need to delete the old entry + var isdir = FS.isDir(old_node.mode); + var err = FS.mayDelete(old_dir, old_name, isdir); + if (err) { + throw new FS.ErrnoError(err); + } + // need delete permissions if we'll be overwriting. + // need create permissions if new doesn't already exist. + err = new_node ? + FS.mayDelete(new_dir, new_name, isdir) : + FS.mayCreate(new_dir, new_name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(10); + } + // if we are going to change the parent, check write permissions + if (new_dir !== old_dir) { + err = FS.nodePermissions(old_dir, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + } + try { + if (FS.trackingDelegate['willMovePath']) { + FS.trackingDelegate['willMovePath'](old_path, new_path); + } + } catch (e) { + console.log("FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message); + } + // remove the node from the lookup hash + FS.hashRemoveNode(old_node); + // do the underlying fs rename + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + // add the node back to the hash (in case node_ops.rename + // changed its name) + FS.hashAddNode(old_node); + } + try { + if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); + } catch (e) { + console.log("FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message); + } + }, rmdir: function (path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, true); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch (e) { + console.log("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch (e) { + console.log("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message); + } + }, readdir: function (path) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(54); + } + return node.node_ops.readdir(node); + }, unlink: function (path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, false); + if (err) { + // According to POSIX, we should map EISDIR to EPERM, but + // we instead do what Linux does (and we must, as we use + // the musl linux libc). + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch (e) { + console.log("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch (e) { + console.log("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message); + } + }, readlink: function (path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(44); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(28); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + }, stat: function (path, dontFollow) { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(44); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(63); + } + return node.node_ops.getattr(node); + }, lstat: function (path) { + return FS.stat(path, true); + }, chmod: function (path, mode, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now() + }); + }, lchmod: function (path, mode) { + FS.chmod(path, mode, true); + }, fchmod: function (fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chmod(stream.node, mode); + }, chown: function (path, uid, gid, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + // we ignore the uid / gid for now + }); + }, lchown: function (path, uid, gid) { + FS.chown(path, uid, gid, true); + }, fchown: function (fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chown(stream.node, uid, gid); + }, truncate: function (path, len) { + if (len < 0) { + throw new FS.ErrnoError(28); + } + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(31); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(28); + } + var err = FS.nodePermissions(node, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + }, ftruncate: function (fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(28); + } + FS.truncate(stream.node, len); + }, utime: function (path, atime, mtime) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + }, open: function (path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(44); + } + flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; + if ((flags & 64)) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === 'object') { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) { + // ignore + } + } + // perhaps we need to create the node + var created = false; + if ((flags & 64)) { + if (node) { + // if O_CREAT and O_EXCL are set, error out if the node already exists + if ((flags & 128)) { + throw new FS.ErrnoError(20); + } + } else { + // node doesn't exist, try to create it + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(44); + } + // can't truncate a device + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + // check permissions, if this is not a file we just created now (it is ok to + // create and write to a file with read-only permissions; it is read-only + // for later use) + if (!created) { + var err = FS.mayOpen(node, flags); + if (err) { + throw new FS.ErrnoError(err); + } + } + // do truncation if necessary + if ((flags & 512)) { + FS.truncate(node, 0); + } + // we've already handled these, don't pass down to the underlying vfs + flags &= ~(128 | 512); + + // register the stream with the filesystem + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), // we want the absolute path to the node + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + // used by the file family libc calls (fopen, fwrite, ferror, etc.) + ungotten: [], + error: false + }, fd_start, fd_end); + // call the new stream's open function + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module['logReadFiles'] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + console.log("FS.trackingDelegate error on read file: " + path); + } + } + try { + if (FS.trackingDelegate['onOpenFile']) { + var trackingFlags = 0; + if ((flags & 2097155) !== 1) { + trackingFlags |= FS.tracking.openFlags.READ; + } + if ((flags & 2097155) !== 0) { + trackingFlags |= FS.tracking.openFlags.WRITE; + } + FS.trackingDelegate['onOpenFile'](path, trackingFlags); + } + } catch (e) { + console.log("FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message); + } + return stream; + }, close: function (stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (stream.getdents) stream.getdents = null; // free readdir state + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + }, isClosed: function (stream) { + return stream.fd === null; + }, llseek: function (stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(70); + } + if (whence != 0 && whence != 1 && whence != 2) { + throw new FS.ErrnoError(28); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + }, read: function (stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(28); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + }, write: function (stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(28); + } + if (stream.flags & 1024) { + // seek to the end before writing in append mode + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + try { + if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); + } catch (e) { + console.log("FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message); + } + return bytesWritten; + }, allocate: function (stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(28); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(138); + } + stream.stream_ops.allocate(stream, offset, length); + }, mmap: function (stream, buffer, offset, length, position, prot, flags) { + // User requests writing to file (prot & PROT_WRITE != 0). + // Checking if we have permissions to write to the file unless + // MAP_PRIVATE flag is set. According to POSIX spec it is possible + // to write to file opened in read-only mode with MAP_PRIVATE flag, + // as all modifications will be visible only in the memory of + // the current process. + if ((prot & 2) !== 0 + && (flags & 2) === 0 + && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(2); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(2); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(43); + } + return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + }, msync: function (stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + }, munmap: function (stream) { + return 0; + }, ioctl: function (stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(59); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + }, readFile: function (path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'r'; + opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === 'utf8') { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === 'binary') { + ret = buf; + } + FS.close(stream); + return ret; + }, writeFile: function (path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'w'; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === 'string') { + var buf = new Uint8Array(lengthBytesUTF8(data) + 1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error('Unsupported data type'); + } + FS.close(stream); + }, cwd: function () { + return FS.currentPath; + }, chdir: function (path) { + var lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(44); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(54); + } + var err = FS.nodePermissions(lookup.node, 'x'); + if (err) { + throw new FS.ErrnoError(err); + } + FS.currentPath = lookup.path; + }, createDefaultDirectories: function () { + FS.mkdir('/tmp'); + FS.mkdir('/home'); + FS.mkdir('/home/web_user'); + }, createDefaultDevices: function () { + // create /dev + FS.mkdir('/dev'); + // setup /dev/null + FS.registerDevice(FS.makedev(1, 3), { + read: function () { return 0; }, + write: function (stream, buffer, offset, length, pos) { return length; } + }); + FS.mkdev('/dev/null', FS.makedev(1, 3)); + // setup /dev/tty and /dev/tty1 + // stderr needs to print output using Module['printErr'] + // so we register a second tty just for it. + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev('/dev/tty', FS.makedev(5, 0)); + FS.mkdev('/dev/tty1', FS.makedev(6, 0)); + // setup /dev/[u]random + var random_device; + if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { + // for modern web browsers + var randomBuffer = new Uint8Array(1); + random_device = function () { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; + } else + if (ENVIRONMENT_IS_NODE) { + // for nodejs with or without crypto support included + try { + var crypto_module = require('crypto'); + // nodejs has crypto support + random_device = function () { return crypto_module['randomBytes'](1)[0]; }; + } catch (e) { + // nodejs doesn't have crypto support + } + } else { } + if (!random_device) { + // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 + random_device = function () { abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };"); }; + } + FS.createDevice('/dev', 'random', random_device); + FS.createDevice('/dev', 'urandom', random_device); + // we're not going to emulate the actual shm device, + // just create the tmp dirs that reside in it commonly + FS.mkdir('/dev/shm'); + FS.mkdir('/dev/shm/tmp'); + }, createSpecialDirectories: function () { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function () { + var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); + node.node_ops = { + lookup: function (parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function () { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); + }, createStandardStreams: function () { + // TODO deprecate the old functionality of a single + // input / output callback and that utilizes FS.createDevice + // and instead require a unique set of stream ops + + // by default, we symlink the standard streams to the + // default tty devices. however, if the standard streams + // have been overwritten we create a unique device for + // them instead. + if (Module['stdin']) { + FS.createDevice('/dev', 'stdin', Module['stdin']); + } else { + FS.symlink('/dev/tty', '/dev/stdin'); + } + if (Module['stdout']) { + FS.createDevice('/dev', 'stdout', null, Module['stdout']); + } else { + FS.symlink('/dev/tty', '/dev/stdout'); + } + if (Module['stderr']) { + FS.createDevice('/dev', 'stderr', null, Module['stderr']); + } else { + FS.symlink('/dev/tty1', '/dev/stderr'); + } + + // open default streams for the stdin, stdout and stderr devices + var stdin = FS.open('/dev/stdin', 'r'); + var stdout = FS.open('/dev/stdout', 'w'); + var stderr = FS.open('/dev/stderr', 'w'); + assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); + assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); + assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); + }, ensureErrnoError: function () { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function (errno) { + this.errno = errno; + for (var key in ERRNO_CODES) { + if (ERRNO_CODES[key] === errno) { + this.code = key; + break; + } + } + }; + this.setErrno(errno); + this.message = ERRNO_MESSAGES[errno]; + + // Try to get a maximally helpful stack trace. On Node.js, getting Error.stack + // now ensures it shows what we want. + if (this.stack) { + // Define the stack property for Node.js 4, which otherwise errors on the next line. + Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); + this.stack = demangleAll(this.stack); + } + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) + [44].forEach(function (code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ''; + }); + }, staticInit: function () { + FS.ensureErrnoError(); + + FS.nameTable = new Array(4096); + + FS.mount(MEMFS, {}, '/'); + + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + }; + }, init: function (input, output, error) { + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); + FS.init.initialized = true; + + FS.ensureErrnoError(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + Module['stdin'] = input || Module['stdin']; + Module['stdout'] = output || Module['stdout']; + Module['stderr'] = error || Module['stderr']; + + FS.createStandardStreams(); + }, quit: function () { + FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + }, getMode: function (canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + }, joinPath: function (parts, forceRelative) { + var path = PATH.join.apply(null, parts); + if (forceRelative && path[0] == '/') path = path.substr(1); + return path; + }, absolutePath: function (relative, base) { + return PATH_FS.resolve(base, relative); + }, standardizePath: function (path) { + return PATH.normalize(path); + }, findObject: function (path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + ___setErrNo(ret.error); + return null; + } + }, analyzePath: function (path, dontResolveLastLink) { + // operate from within the context of the symlink's target + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) { + } + var ret = { + isRoot: false, exists: false, error: 0, name: null, path: null, object: null, + parentExists: false, parentPath: null, parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === '/'; + } catch (e) { + ret.error = e.errno; + }; + return ret; + }, createFolder: function (parent, name, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.mkdir(path, mode); + }, createPath: function (parent, path, canRead, canWrite) { + parent = typeof parent === 'string' ? parent : FS.getPath(parent); + var parts = path.split('/').reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) { + // ignore EEXIST + } + parent = current; + } + return current; + }, createFile: function (parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + }, createDataFile: function (parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === 'string') { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + // make sure we can write to the file + FS.chmod(node, mode | 146); + var stream = FS.open(node, 'w'); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + }, createDevice: function (parent, name, input, output) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + // Create a fake device that a set of stream ops to emulate + // the old behavior. + FS.registerDevice(dev, { + open: function (stream) { + stream.seekable = false; + }, + close: function (stream) { + // flush any pending line data + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function (stream, buffer, offset, length, pos /* ignored */) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function (stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset + i]); + } catch (e) { + throw new FS.ErrnoError(29); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + }, createLink: function (parent, name, target, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + return FS.symlink(target, path); + }, forceLoadFile: function (obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) ___setErrNo(29); + return success; + }, createLazyFile: function (parent, name, url, canRead, canWrite) { + // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; // Loaded chunks. Index is the chunk number + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length - 1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = (idx / this.chunkSize) | 0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + // Find length + var xhr = new XMLHttpRequest(); + xhr.open('HEAD', url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + + var chunkSize = 1024 * 1024; // Chunk size in bytes + + if (!hasByteServing) chunkSize = datalength; + + // Function to get a range from the remote URL. + var doXHR = (function (from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength - 1) throw new Error("only " + datalength + " bytes available! programmer error!"); + + // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + + // Some hints to the browser that we want binary data. + if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + } + + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } else { + return intArrayFromString(xhr.responseText || '', true); + } + }); + var lazyArray = this; + lazyArray.setDataGetter(function (chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum + 1) * chunkSize - 1; // including this byte + end = Math.min(end, datalength - 1); // if datalength-1 is selected, this is the last block + if (typeof (lazyArray.chunks[chunkNum]) === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof (lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + + if (usesGzip || !datalength) { + // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length + chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file + datalength = this.getter(0).length; + chunkSize = datalength; + console.log("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== 'undefined') { + if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: function () { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: function () { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url: url }; + } + + var node = FS.createFile(parent, name, properties, canRead, canWrite); + // This is a total hack, but I want to get this lazy file code out of the + // core of MEMFS. If we want to keep this lazy file concept I feel it should + // be its own thin LAZYFS proxying calls to MEMFS. + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + // Add a function that defers querying the file size until it is asked the first time. + Object.defineProperties(node, { + usedBytes: { + get: function () { return this.contents.length; } + } + }); + // override each stream op with one that tries to force load the lazy file first + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function (key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(29); + } + return fn.apply(null, arguments); + }; + }); + // use a custom read function + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(29); + } + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + assert(size >= 0); + if (contents.slice) { // normal array + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + }, createPreloadedFile: function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); // XXX perhaps this method should move onto Browser? + // TODO we should allow people to just pass in a complete filename instead + // of parent and name being that we just join them anyways + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module['preloadPlugins'].forEach(function (plugin) { + if (handled) return; + if (plugin['canHandle'](fullname)) { + plugin['handle'](byteArray, fullname, finish, function () { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == 'string') { + Browser.asyncLoad(url, function (byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + }, indexedDB: function () { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + }, DB_NAME: function () { + return 'EM_FS_' + window.location.pathname; + }, DB_VERSION: 20, DB_STORE_NAME: "FILE_DATA", saveFilesToDB: function (paths, onload, onerror) { + onload = onload || function () { }; + onerror = onerror || function () { }; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + console.log('creating db'); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function (path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; + putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }, loadFilesFromDB: function (paths, onload, onerror) { + onload = onload || function () { }; + onerror = onerror || function () { }; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; // no database to load from + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); + } catch (e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function (path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + } +}; var SYSCALLS = { + DEFAULT_POLLMASK: 5, mappings: {}, umask: 511, calculateAt: function (dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(8); + dir = dirstream.path; + } + path = PATH.join2(dir, path); + } + return path; + }, doStat: function (func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -54; + } + throw e; + } + HEAP32[((buf) >> 2)] = stat.dev; + HEAP32[(((buf) + (4)) >> 2)] = 0; + HEAP32[(((buf) + (8)) >> 2)] = stat.ino; + HEAP32[(((buf) + (12)) >> 2)] = stat.mode; + HEAP32[(((buf) + (16)) >> 2)] = stat.nlink; + HEAP32[(((buf) + (20)) >> 2)] = stat.uid; + HEAP32[(((buf) + (24)) >> 2)] = stat.gid; + HEAP32[(((buf) + (28)) >> 2)] = stat.rdev; + HEAP32[(((buf) + (32)) >> 2)] = 0; + (tempI64 = [stat.size >>> 0, (tempDouble = stat.size, (+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble) / 4294967296.0))), 4294967295.0)) | 0) >>> 0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296.0))))) >>> 0) : 0)], HEAP32[(((buf) + (40)) >> 2)] = tempI64[0], HEAP32[(((buf) + (44)) >> 2)] = tempI64[1]); + HEAP32[(((buf) + (48)) >> 2)] = 4096; + HEAP32[(((buf) + (52)) >> 2)] = stat.blocks; + HEAP32[(((buf) + (56)) >> 2)] = (stat.atime.getTime() / 1000) | 0; + HEAP32[(((buf) + (60)) >> 2)] = 0; + HEAP32[(((buf) + (64)) >> 2)] = (stat.mtime.getTime() / 1000) | 0; + HEAP32[(((buf) + (68)) >> 2)] = 0; + HEAP32[(((buf) + (72)) >> 2)] = (stat.ctime.getTime() / 1000) | 0; + HEAP32[(((buf) + (76)) >> 2)] = 0; + (tempI64 = [stat.ino >>> 0, (tempDouble = stat.ino, (+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble) / 4294967296.0))), 4294967295.0)) | 0) >>> 0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296.0))))) >>> 0) : 0)], HEAP32[(((buf) + (80)) >> 2)] = tempI64[0], HEAP32[(((buf) + (84)) >> 2)] = tempI64[1]); + return 0; + }, doMsync: function (addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + }, doMkdir: function (path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length - 1] === '/') path = path.substr(0, path.length - 1); + FS.mkdir(path, mode, 0); + return 0; + }, doMknod: function (path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -28; + } + FS.mknod(path, mode, dev); + return 0; + }, doReadlink: function (path, buf, bufsize) { + if (bufsize <= 0) return -28; + var ret = FS.readlink(path); + + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf + len]; + stringToUTF8(ret, buf, bufsize + 1); + // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) + // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. + HEAP8[buf + len] = endChar; + + return len; + }, doAccess: function (path, amode) { + if (amode & ~7) { + // need a valid mode + return -28; + } + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + if (!node) { + return -44; + } + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -2; + } + return 0; + }, doDup: function (path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + }, doReadv: function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov) + (i * 8)) >> 2)]; + var len = HEAP32[(((iov) + (i * 8 + 4)) >> 2)]; + var curr = FS.read(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read + } + return ret; + }, doWritev: function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov) + (i * 8)) >> 2)]; + var len = HEAP32[(((iov) + (i * 8 + 4)) >> 2)]; + var curr = FS.write(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + }, varargs: 0, get: function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs) - (4)) >> 2)]; + return ret; + }, getStr: function () { + var ret = UTF8ToString(SYSCALLS.get()); + return ret; + }, getStreamFromFD: function (fd) { + // TODO: when all syscalls use wasi, can remove the next line + if (fd === undefined) fd = SYSCALLS.get(); + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + return stream; + }, get64: function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + }, getZero: function () { + assert(SYSCALLS.get() === 0); + } +}; function __emscripten_syscall_munmap(addr, len) { + if (addr === -1 || len === 0) { + return -28; + } + // TODO: support unmmap'ing parts of allocations + var info = SYSCALLS.mappings[addr]; + if (!info) return 0; + if (len === info.len) { + var stream = FS.getStream(info.fd); + SYSCALLS.doMsync(addr, stream, len, info.flags); + FS.munmap(stream); + SYSCALLS.mappings[addr] = null; + if (info.allocated) { + _free(info.malloc); + } + } + return 0; +} function ___syscall91(which, varargs) { + SYSCALLS.varargs = varargs; + try { + // munmap + var addr = SYSCALLS.get(), len = SYSCALLS.get(); + return __emscripten_syscall_munmap(addr, len); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } +} + +function ___unlock() { } + +function _abort() { + abort(); +} + +function _emscripten_get_heap_size() { + return HEAP8.length; +} + +function _emscripten_get_sbrk_ptr() { + return 22688; +} + +function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src + num), dest); +} + + +function abortOnCannotGrowMemory(requestedSize) { + abort('Cannot enlarge memory arrays to size ' + requestedSize + ' bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + HEAP8.length + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} function _emscripten_resize_heap(requestedSize) { + abortOnCannotGrowMemory(requestedSize); +} + + + +var ENV = {}; function _emscripten_get_environ() { + if (!_emscripten_get_environ.strings) { + // Default values. + var env = { + 'USER': 'web_user', + 'LOGNAME': 'web_user', + 'PATH': '/', + 'PWD': '/', + 'HOME': '/home/web_user', + // Browser language detection #8751 + 'LANG': ((typeof navigator === 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8', + '_': thisProgram + }; + // Apply the user-provided values, if any. + for (var x in ENV) { + env[x] = ENV[x]; + } + var strings = []; + for (var x in env) { + strings.push(x + '=' + env[x]); + } + _emscripten_get_environ.strings = strings; + } + return _emscripten_get_environ.strings; +} function _environ_get(__environ, environ_buf) { + var strings = _emscripten_get_environ(); + var bufSize = 0; + strings.forEach(function (string, i) { + var ptr = environ_buf + bufSize; + HEAP32[(((__environ) + (i * 4)) >> 2)] = ptr; + writeAsciiToMemory(string, ptr); + bufSize += string.length + 1; + }); + return 0; +} + +function _environ_sizes_get(penviron_count, penviron_buf_size) { + var strings = _emscripten_get_environ(); + HEAP32[((penviron_count) >> 2)] = strings.length; + var bufSize = 0; + strings.forEach(function (string) { + bufSize += string.length + 1; + }); + HEAP32[((penviron_buf_size) >> 2)] = bufSize; + return 0; +} + +function _fd_close(fd) { + try { + + var stream = SYSCALLS.getStreamFromFD(fd); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } +} + +function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + try { + + var stream = SYSCALLS.getStreamFromFD(fd); + var HIGH_OFFSET = 0x100000000; // 2^32 + // use an unsigned operator on low and shift high by 32-bits + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + + var DOUBLE_LIMIT = 0x20000000000000; // 2^53 + // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -61; + } + + FS.llseek(stream, offset, whence); + (tempI64 = [stream.position >>> 0, (tempDouble = stream.position, (+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble) / 4294967296.0))), 4294967295.0)) | 0) >>> 0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296.0))))) >>> 0) : 0)], HEAP32[((newOffset) >> 2)] = tempI64[0], HEAP32[(((newOffset) + (4)) >> 2)] = tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } +} + +function _fd_write(fd, iov, iovcnt, pnum) { + try { + + var stream = SYSCALLS.getStreamFromFD(fd); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + HEAP32[((pnum) >> 2)] = num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } +} + + +function _memcpy(dest, src, num) { + dest = dest | 0; src = src | 0; num = num | 0; + var ret = 0; + var aligned_dest_end = 0; + var block_aligned_dest_end = 0; + var dest_end = 0; + // Test against a benchmarked cutoff limit for when HEAPU8.set() becomes faster to use. + if ((num | 0) >= 8192) { + _emscripten_memcpy_big(dest | 0, src | 0, num | 0) | 0; + return dest | 0; + } + + ret = dest | 0; + dest_end = (dest + num) | 0; + if ((dest & 3) == (src & 3)) { + // The initial unaligned < 4-byte front. + while (dest & 3) { + if ((num | 0) == 0) return ret | 0; + HEAP8[((dest) >> 0)] = ((HEAP8[((src) >> 0)]) | 0); + dest = (dest + 1) | 0; + src = (src + 1) | 0; + num = (num - 1) | 0; + } + aligned_dest_end = (dest_end & -4) | 0; + block_aligned_dest_end = (aligned_dest_end - 64) | 0; + while ((dest | 0) <= (block_aligned_dest_end | 0)) { + HEAP32[((dest) >> 2)] = ((HEAP32[((src) >> 2)]) | 0); + HEAP32[(((dest) + (4)) >> 2)] = ((HEAP32[(((src) + (4)) >> 2)]) | 0); + HEAP32[(((dest) + (8)) >> 2)] = ((HEAP32[(((src) + (8)) >> 2)]) | 0); + HEAP32[(((dest) + (12)) >> 2)] = ((HEAP32[(((src) + (12)) >> 2)]) | 0); + HEAP32[(((dest) + (16)) >> 2)] = ((HEAP32[(((src) + (16)) >> 2)]) | 0); + HEAP32[(((dest) + (20)) >> 2)] = ((HEAP32[(((src) + (20)) >> 2)]) | 0); + HEAP32[(((dest) + (24)) >> 2)] = ((HEAP32[(((src) + (24)) >> 2)]) | 0); + HEAP32[(((dest) + (28)) >> 2)] = ((HEAP32[(((src) + (28)) >> 2)]) | 0); + HEAP32[(((dest) + (32)) >> 2)] = ((HEAP32[(((src) + (32)) >> 2)]) | 0); + HEAP32[(((dest) + (36)) >> 2)] = ((HEAP32[(((src) + (36)) >> 2)]) | 0); + HEAP32[(((dest) + (40)) >> 2)] = ((HEAP32[(((src) + (40)) >> 2)]) | 0); + HEAP32[(((dest) + (44)) >> 2)] = ((HEAP32[(((src) + (44)) >> 2)]) | 0); + HEAP32[(((dest) + (48)) >> 2)] = ((HEAP32[(((src) + (48)) >> 2)]) | 0); + HEAP32[(((dest) + (52)) >> 2)] = ((HEAP32[(((src) + (52)) >> 2)]) | 0); + HEAP32[(((dest) + (56)) >> 2)] = ((HEAP32[(((src) + (56)) >> 2)]) | 0); + HEAP32[(((dest) + (60)) >> 2)] = ((HEAP32[(((src) + (60)) >> 2)]) | 0); + dest = (dest + 64) | 0; + src = (src + 64) | 0; + } + while ((dest | 0) < (aligned_dest_end | 0)) { + HEAP32[((dest) >> 2)] = ((HEAP32[((src) >> 2)]) | 0); + dest = (dest + 4) | 0; + src = (src + 4) | 0; + } + } else { + // In the unaligned copy case, unroll a bit as well. + aligned_dest_end = (dest_end - 4) | 0; + while ((dest | 0) < (aligned_dest_end | 0)) { + HEAP8[((dest) >> 0)] = ((HEAP8[((src) >> 0)]) | 0); + HEAP8[(((dest) + (1)) >> 0)] = ((HEAP8[(((src) + (1)) >> 0)]) | 0); + HEAP8[(((dest) + (2)) >> 0)] = ((HEAP8[(((src) + (2)) >> 0)]) | 0); + HEAP8[(((dest) + (3)) >> 0)] = ((HEAP8[(((src) + (3)) >> 0)]) | 0); + dest = (dest + 4) | 0; + src = (src + 4) | 0; + } + } + // The remaining unaligned < 4 byte tail. + while ((dest | 0) < (dest_end | 0)) { + HEAP8[((dest) >> 0)] = ((HEAP8[((src) >> 0)]) | 0); + dest = (dest + 1) | 0; + src = (src + 1) | 0; + } + return ret | 0; +} + +function _memset(ptr, value, num) { + ptr = ptr | 0; value = value | 0; num = num | 0; + var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; + end = (ptr + num) | 0; + + value = value & 0xff; + if ((num | 0) >= 67 /* 64 bytes for an unrolled loop + 3 bytes for unaligned head*/) { + while ((ptr & 3) != 0) { + HEAP8[((ptr) >> 0)] = value; + ptr = (ptr + 1) | 0; + } + + aligned_end = (end & -4) | 0; + value4 = value | (value << 8) | (value << 16) | (value << 24); + + block_aligned_end = (aligned_end - 64) | 0; + + while ((ptr | 0) <= (block_aligned_end | 0)) { + HEAP32[((ptr) >> 2)] = value4; + HEAP32[(((ptr) + (4)) >> 2)] = value4; + HEAP32[(((ptr) + (8)) >> 2)] = value4; + HEAP32[(((ptr) + (12)) >> 2)] = value4; + HEAP32[(((ptr) + (16)) >> 2)] = value4; + HEAP32[(((ptr) + (20)) >> 2)] = value4; + HEAP32[(((ptr) + (24)) >> 2)] = value4; + HEAP32[(((ptr) + (28)) >> 2)] = value4; + HEAP32[(((ptr) + (32)) >> 2)] = value4; + HEAP32[(((ptr) + (36)) >> 2)] = value4; + HEAP32[(((ptr) + (40)) >> 2)] = value4; + HEAP32[(((ptr) + (44)) >> 2)] = value4; + HEAP32[(((ptr) + (48)) >> 2)] = value4; + HEAP32[(((ptr) + (52)) >> 2)] = value4; + HEAP32[(((ptr) + (56)) >> 2)] = value4; + HEAP32[(((ptr) + (60)) >> 2)] = value4; + ptr = (ptr + 64) | 0; + } + + while ((ptr | 0) < (aligned_end | 0)) { + HEAP32[((ptr) >> 2)] = value4; + ptr = (ptr + 4) | 0; + } + } + // The remaining bytes. + while ((ptr | 0) < (end | 0)) { + HEAP8[((ptr) >> 0)] = value; + ptr = (ptr + 1) | 0; + } + return (end - num) | 0; +} + +function _setTempRet0($i) { + setTempRet0(($i) | 0); +} + + + +function __isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + +function __arraySum(array, index) { + var sum = 0; + for (var i = 0; i <= index; sum += array[i++]); + return sum; +} + + +var __MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + +var __MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; function __addDays(date, days) { + var newDate = new Date(date.getTime()); + while (days > 0) { + var leap = __isLeapYear(newDate.getFullYear()); + var currentMonth = newDate.getMonth(); + var daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth]; + + if (days > daysInCurrentMonth - newDate.getDate()) { + // we spill over to next month + days -= (daysInCurrentMonth - newDate.getDate() + 1); + newDate.setDate(1); + if (currentMonth < 11) { + newDate.setMonth(currentMonth + 1) + } else { + newDate.setMonth(0); + newDate.setFullYear(newDate.getFullYear() + 1); + } + } else { + // we stay in current month + newDate.setDate(newDate.getDate() + days); + return newDate; + } + } + + return newDate; +} function _strftime(s, maxsize, format, tm) { + // size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr); + // http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html + + var tm_zone = HEAP32[(((tm) + (40)) >> 2)]; + + var date = { + tm_sec: HEAP32[((tm) >> 2)], + tm_min: HEAP32[(((tm) + (4)) >> 2)], + tm_hour: HEAP32[(((tm) + (8)) >> 2)], + tm_mday: HEAP32[(((tm) + (12)) >> 2)], + tm_mon: HEAP32[(((tm) + (16)) >> 2)], + tm_year: HEAP32[(((tm) + (20)) >> 2)], + tm_wday: HEAP32[(((tm) + (24)) >> 2)], + tm_yday: HEAP32[(((tm) + (28)) >> 2)], + tm_isdst: HEAP32[(((tm) + (32)) >> 2)], + tm_gmtoff: HEAP32[(((tm) + (36)) >> 2)], + tm_zone: tm_zone ? UTF8ToString(tm_zone) : '' + }; + + var pattern = UTF8ToString(format); + + // expand format + var EXPANSION_RULES_1 = { + '%c': '%a %b %d %H:%M:%S %Y', // Replaced by the locale's appropriate date and time representation - e.g., Mon Aug 3 14:02:01 2013 + '%D': '%m/%d/%y', // Equivalent to %m / %d / %y + '%F': '%Y-%m-%d', // Equivalent to %Y - %m - %d + '%h': '%b', // Equivalent to %b + '%r': '%I:%M:%S %p', // Replaced by the time in a.m. and p.m. notation + '%R': '%H:%M', // Replaced by the time in 24-hour notation + '%T': '%H:%M:%S', // Replaced by the time + '%x': '%m/%d/%y', // Replaced by the locale's appropriate date representation + '%X': '%H:%M:%S', // Replaced by the locale's appropriate time representation + // Modified Conversion Specifiers + '%Ec': '%c', // Replaced by the locale's alternative appropriate date and time representation. + '%EC': '%C', // Replaced by the name of the base year (period) in the locale's alternative representation. + '%Ex': '%m/%d/%y', // Replaced by the locale's alternative date representation. + '%EX': '%H:%M:%S', // Replaced by the locale's alternative time representation. + '%Ey': '%y', // Replaced by the offset from %EC (year only) in the locale's alternative representation. + '%EY': '%Y', // Replaced by the full alternative year representation. + '%Od': '%d', // Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading zeros if there is any alternative symbol for zero; otherwise, with leading characters. + '%Oe': '%e', // Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading characters. + '%OH': '%H', // Replaced by the hour (24-hour clock) using the locale's alternative numeric symbols. + '%OI': '%I', // Replaced by the hour (12-hour clock) using the locale's alternative numeric symbols. + '%Om': '%m', // Replaced by the month using the locale's alternative numeric symbols. + '%OM': '%M', // Replaced by the minutes using the locale's alternative numeric symbols. + '%OS': '%S', // Replaced by the seconds using the locale's alternative numeric symbols. + '%Ou': '%u', // Replaced by the weekday as a number in the locale's alternative representation (Monday=1). + '%OU': '%U', // Replaced by the week number of the year (Sunday as the first day of the week, rules corresponding to %U ) using the locale's alternative numeric symbols. + '%OV': '%V', // Replaced by the week number of the year (Monday as the first day of the week, rules corresponding to %V ) using the locale's alternative numeric symbols. + '%Ow': '%w', // Replaced by the number of the weekday (Sunday=0) using the locale's alternative numeric symbols. + '%OW': '%W', // Replaced by the week number of the year (Monday as the first day of the week) using the locale's alternative numeric symbols. + '%Oy': '%y', // Replaced by the year (offset from %C ) using the locale's alternative numeric symbols. + }; + for (var rule in EXPANSION_RULES_1) { + pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_1[rule]); + } + + var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + + function leadingSomething(value, digits, character) { + var str = typeof value === 'number' ? value.toString() : (value || ''); + while (str.length < digits) { + str = character[0] + str; + } + return str; + } + + function leadingNulls(value, digits) { + return leadingSomething(value, digits, '0'); + } + + function compareByDay(date1, date2) { + function sgn(value) { + return value < 0 ? -1 : (value > 0 ? 1 : 0); + } + + var compare; + if ((compare = sgn(date1.getFullYear() - date2.getFullYear())) === 0) { + if ((compare = sgn(date1.getMonth() - date2.getMonth())) === 0) { + compare = sgn(date1.getDate() - date2.getDate()); + } + } + return compare; + } + + function getFirstWeekStartDate(janFourth) { + switch (janFourth.getDay()) { + case 0: // Sunday + return new Date(janFourth.getFullYear() - 1, 11, 29); + case 1: // Monday + return janFourth; + case 2: // Tuesday + return new Date(janFourth.getFullYear(), 0, 3); + case 3: // Wednesday + return new Date(janFourth.getFullYear(), 0, 2); + case 4: // Thursday + return new Date(janFourth.getFullYear(), 0, 1); + case 5: // Friday + return new Date(janFourth.getFullYear() - 1, 11, 31); + case 6: // Saturday + return new Date(janFourth.getFullYear() - 1, 11, 30); + } + } + + function getWeekBasedYear(date) { + var thisDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday); + + var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4); + var janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4); + + var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear); + var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear); + + if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) { + // this date is after the start of the first week of this year + if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) { + return thisDate.getFullYear() + 1; + } else { + return thisDate.getFullYear(); + } + } else { + return thisDate.getFullYear() - 1; + } + } + + var EXPANSION_RULES_2 = { + '%a': function (date) { + return WEEKDAYS[date.tm_wday].substring(0, 3); + }, + '%A': function (date) { + return WEEKDAYS[date.tm_wday]; + }, + '%b': function (date) { + return MONTHS[date.tm_mon].substring(0, 3); + }, + '%B': function (date) { + return MONTHS[date.tm_mon]; + }, + '%C': function (date) { + var year = date.tm_year + 1900; + return leadingNulls((year / 100) | 0, 2); + }, + '%d': function (date) { + return leadingNulls(date.tm_mday, 2); + }, + '%e': function (date) { + return leadingSomething(date.tm_mday, 2, ' '); + }, + '%g': function (date) { + // %g, %G, and %V give values according to the ISO 8601:2000 standard week-based year. + // In this system, weeks begin on a Monday and week 1 of the year is the week that includes + // January 4th, which is also the week that includes the first Thursday of the year, and + // is also the first week that contains at least four days in the year. + // If the first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of + // the last week of the preceding year; thus, for Saturday 2nd January 1999, + // %G is replaced by 1998 and %V is replaced by 53. If December 29th, 30th, + // or 31st is a Monday, it and any following days are part of week 1 of the following year. + // Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and %V is replaced by 01. + + return getWeekBasedYear(date).toString().substring(2); + }, + '%G': function (date) { + return getWeekBasedYear(date); + }, + '%H': function (date) { + return leadingNulls(date.tm_hour, 2); + }, + '%I': function (date) { + var twelveHour = date.tm_hour; + if (twelveHour == 0) twelveHour = 12; + else if (twelveHour > 12) twelveHour -= 12; + return leadingNulls(twelveHour, 2); + }, + '%j': function (date) { + // Day of the year (001-366) + return leadingNulls(date.tm_mday + __arraySum(__isLeapYear(date.tm_year + 1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, date.tm_mon - 1), 3); + }, + '%m': function (date) { + return leadingNulls(date.tm_mon + 1, 2); + }, + '%M': function (date) { + return leadingNulls(date.tm_min, 2); + }, + '%n': function () { + return '\n'; + }, + '%p': function (date) { + if (date.tm_hour >= 0 && date.tm_hour < 12) { + return 'AM'; + } else { + return 'PM'; + } + }, + '%S': function (date) { + return leadingNulls(date.tm_sec, 2); + }, + '%t': function () { + return '\t'; + }, + '%u': function (date) { + return date.tm_wday || 7; + }, + '%U': function (date) { + // Replaced by the week number of the year as a decimal number [00,53]. + // The first Sunday of January is the first day of week 1; + // days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday] + var janFirst = new Date(date.tm_year + 1900, 0, 1); + var firstSunday = janFirst.getDay() === 0 ? janFirst : __addDays(janFirst, 7 - janFirst.getDay()); + var endDate = new Date(date.tm_year + 1900, date.tm_mon, date.tm_mday); + + // is target date after the first Sunday? + if (compareByDay(firstSunday, endDate) < 0) { + // calculate difference in days between first Sunday and endDate + var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth() - 1) - 31; + var firstSundayUntilEndJanuary = 31 - firstSunday.getDate(); + var days = firstSundayUntilEndJanuary + februaryFirstUntilEndMonth + endDate.getDate(); + return leadingNulls(Math.ceil(days / 7), 2); + } + + return compareByDay(firstSunday, janFirst) === 0 ? '01' : '00'; + }, + '%V': function (date) { + // Replaced by the week number of the year (Monday as the first day of the week) + // as a decimal number [01,53]. If the week containing 1 January has four + // or more days in the new year, then it is considered week 1. + // Otherwise, it is the last week of the previous year, and the next week is week 1. + // Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday] + var janFourthThisYear = new Date(date.tm_year + 1900, 0, 4); + var janFourthNextYear = new Date(date.tm_year + 1901, 0, 4); + + var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear); + var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear); + + var endDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday); + + if (compareByDay(endDate, firstWeekStartThisYear) < 0) { + // if given date is before this years first week, then it belongs to the 53rd week of last year + return '53'; + } + + if (compareByDay(firstWeekStartNextYear, endDate) <= 0) { + // if given date is after next years first week, then it belongs to the 01th week of next year + return '01'; + } + + // given date is in between CW 01..53 of this calendar year + var daysDifference; + if (firstWeekStartThisYear.getFullYear() < date.tm_year + 1900) { + // first CW of this year starts last year + daysDifference = date.tm_yday + 32 - firstWeekStartThisYear.getDate() + } else { + // first CW of this year starts this year + daysDifference = date.tm_yday + 1 - firstWeekStartThisYear.getDate(); + } + return leadingNulls(Math.ceil(daysDifference / 7), 2); + }, + '%w': function (date) { + return date.tm_wday; + }, + '%W': function (date) { + // Replaced by the week number of the year as a decimal number [00,53]. + // The first Monday of January is the first day of week 1; + // days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday] + var janFirst = new Date(date.tm_year, 0, 1); + var firstMonday = janFirst.getDay() === 1 ? janFirst : __addDays(janFirst, janFirst.getDay() === 0 ? 1 : 7 - janFirst.getDay() + 1); + var endDate = new Date(date.tm_year + 1900, date.tm_mon, date.tm_mday); + + // is target date after the first Monday? + if (compareByDay(firstMonday, endDate) < 0) { + var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth() - 1) - 31; + var firstMondayUntilEndJanuary = 31 - firstMonday.getDate(); + var days = firstMondayUntilEndJanuary + februaryFirstUntilEndMonth + endDate.getDate(); + return leadingNulls(Math.ceil(days / 7), 2); + } + return compareByDay(firstMonday, janFirst) === 0 ? '01' : '00'; + }, + '%y': function (date) { + // Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year] + return (date.tm_year + 1900).toString().substring(2); + }, + '%Y': function (date) { + // Replaced by the year as a decimal number (for example, 1997). [ tm_year] + return date.tm_year + 1900; + }, + '%z': function (date) { + // Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ). + // For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich). + var off = date.tm_gmtoff; + var ahead = off >= 0; + off = Math.abs(off) / 60; + // convert from minutes into hhmm format (which means 60 minutes = 100 units) + off = (off / 60) * 100 + (off % 60); + return (ahead ? '+' : '-') + String("0000" + off).slice(-4); + }, + '%Z': function (date) { + return date.tm_zone; + }, + '%%': function () { + return '%'; + } + }; + for (var rule in EXPANSION_RULES_2) { + if (pattern.indexOf(rule) >= 0) { + pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_2[rule](date)); + } + } + + var bytes = intArrayFromString(pattern, false); + if (bytes.length > maxsize) { + return 0; + } + + writeArrayToMemory(bytes, s); + return bytes.length - 1; +} function _strftime_l(s, maxsize, format, tm) { + return _strftime(s, maxsize, format, tm); // no locale support yet +} +FS.staticInit();; +var ASSERTIONS = true; + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// ASM_LIBRARY EXTERN PRIMITIVES: Int8Array,Int32Array + +var asmGlobalArg = {}; +var asmLibraryArg = { "__cxa_atexit": ___cxa_atexit, "__handle_stack_overflow": ___handle_stack_overflow, "__lock": ___lock, "__map_file": ___map_file, "__syscall91": ___syscall91, "__unlock": ___unlock, "abort": _abort, "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "environ_get": _environ_get, "environ_sizes_get": _environ_sizes_get, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "memory": wasmMemory, "setTempRet0": _setTempRet0, "strftime_l": _strftime_l, "table": wasmTable }; +var asm = createWasm(); +var real____wasm_call_ctors = asm["__wasm_call_ctors"]; +asm["__wasm_call_ctors"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____wasm_call_ctors.apply(null, arguments); +}; + +var real__AStyleMain = asm["AStyleMain"]; +asm["AStyleMain"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__AStyleMain.apply(null, arguments); +}; + +var real__AStyleMainUtf16 = asm["AStyleMainUtf16"]; +asm["AStyleMainUtf16"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__AStyleMainUtf16.apply(null, arguments); +}; + +var real__AStyleGetVersion = asm["AStyleGetVersion"]; +asm["AStyleGetVersion"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__AStyleGetVersion.apply(null, arguments); +}; + +var real__fflush = asm["fflush"]; +asm["fflush"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__fflush.apply(null, arguments); +}; + +var real____errno_location = asm["__errno_location"]; +asm["__errno_location"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____errno_location.apply(null, arguments); +}; + +var real__setThrew = asm["setThrew"]; +asm["setThrew"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__setThrew.apply(null, arguments); +}; + +var real__malloc = asm["malloc"]; +asm["malloc"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__malloc.apply(null, arguments); +}; + +var real__free = asm["free"]; +asm["free"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__free.apply(null, arguments); +}; + +var real____set_stack_limit = asm["__set_stack_limit"]; +asm["__set_stack_limit"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____set_stack_limit.apply(null, arguments); +}; + +var real_stackSave = asm["stackSave"]; +asm["stackSave"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackSave.apply(null, arguments); +}; + +var real_stackAlloc = asm["stackAlloc"]; +asm["stackAlloc"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackAlloc.apply(null, arguments); +}; + +var real_stackRestore = asm["stackRestore"]; +asm["stackRestore"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackRestore.apply(null, arguments); +}; + +var real___growWasmMemory = asm["__growWasmMemory"]; +asm["__growWasmMemory"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real___growWasmMemory.apply(null, arguments); +}; + +var real_dynCall_ii = asm["dynCall_ii"]; +asm["dynCall_ii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_ii.apply(null, arguments); +}; + +var real_dynCall_iiii = asm["dynCall_iiii"]; +asm["dynCall_iiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiii.apply(null, arguments); +}; + +var real_dynCall_jiji = asm["dynCall_jiji"]; +asm["dynCall_jiji"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_jiji.apply(null, arguments); +}; + +var real_dynCall_iidiiii = asm["dynCall_iidiiii"]; +asm["dynCall_iidiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iidiiii.apply(null, arguments); +}; + +var real_dynCall_vii = asm["dynCall_vii"]; +asm["dynCall_vii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_vii.apply(null, arguments); +}; + +var real_dynCall_vi = asm["dynCall_vi"]; +asm["dynCall_vi"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_vi.apply(null, arguments); +}; + +var real_dynCall_viiiiii = asm["dynCall_viiiiii"]; +asm["dynCall_viiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_viiiiii.apply(null, arguments); +}; + +var real_dynCall_viiiii = asm["dynCall_viiiii"]; +asm["dynCall_viiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_viiiii.apply(null, arguments); +}; + +var real_dynCall_viiii = asm["dynCall_viiii"]; +asm["dynCall_viiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_viiii.apply(null, arguments); +}; + +var real_dynCall_iii = asm["dynCall_iii"]; +asm["dynCall_iii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iii.apply(null, arguments); +}; + +var real_dynCall_viii = asm["dynCall_viii"]; +asm["dynCall_viii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_viii.apply(null, arguments); +}; + +var real_dynCall_v = asm["dynCall_v"]; +asm["dynCall_v"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_v.apply(null, arguments); +}; + +var real_dynCall_iiiii = asm["dynCall_iiiii"]; +asm["dynCall_iiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiii.apply(null, arguments); +}; + +var real_dynCall_iiiiii = asm["dynCall_iiiiii"]; +asm["dynCall_iiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiii.apply(null, arguments); +}; + +var real_dynCall_iiiiiiiii = asm["dynCall_iiiiiiiii"]; +asm["dynCall_iiiiiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiiiiii.apply(null, arguments); +}; + +var real_dynCall_iiiiiii = asm["dynCall_iiiiiii"]; +asm["dynCall_iiiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiiii.apply(null, arguments); +}; + +var real_dynCall_iiiiij = asm["dynCall_iiiiij"]; +asm["dynCall_iiiiij"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiij.apply(null, arguments); +}; + +var real_dynCall_iiiiid = asm["dynCall_iiiiid"]; +asm["dynCall_iiiiid"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiid.apply(null, arguments); +}; + +var real_dynCall_iiiiijj = asm["dynCall_iiiiijj"]; +asm["dynCall_iiiiijj"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiijj.apply(null, arguments); +}; + +var real_dynCall_iiiiiiii = asm["dynCall_iiiiiiii"]; +asm["dynCall_iiiiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiiiii.apply(null, arguments); +}; + +var real_dynCall_iiiiiijj = asm["dynCall_iiiiiijj"]; +asm["dynCall_iiiiiijj"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_iiiiiijj.apply(null, arguments); +}; + +var real_dynCall_viijii = asm["dynCall_viijii"]; +asm["dynCall_viijii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_viijii.apply(null, arguments); +}; + +var real_dynCall_ji = asm["dynCall_ji"]; +asm["dynCall_ji"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_dynCall_ji.apply(null, arguments); +}; + +Module["asm"] = asm; +var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__wasm_call_ctors"].apply(null, arguments) +}; + +var _AStyleMain = Module["_AStyleMain"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["AStyleMain"].apply(null, arguments) +}; + +var _AStyleMainUtf16 = Module["_AStyleMainUtf16"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["AStyleMainUtf16"].apply(null, arguments) +}; + +var _AStyleGetVersion = Module["_AStyleGetVersion"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["AStyleGetVersion"].apply(null, arguments) +}; + +var _fflush = Module["_fflush"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["fflush"].apply(null, arguments) +}; + +var ___errno_location = Module["___errno_location"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__errno_location"].apply(null, arguments) +}; + +var _setThrew = Module["_setThrew"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["setThrew"].apply(null, arguments) +}; + +var _malloc = Module["_malloc"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["malloc"].apply(null, arguments) +}; + +var _free = Module["_free"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["free"].apply(null, arguments) +}; + +var ___set_stack_limit = Module["___set_stack_limit"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__set_stack_limit"].apply(null, arguments) +}; + +var stackSave = Module["stackSave"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackSave"].apply(null, arguments) +}; + +var stackAlloc = Module["stackAlloc"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackAlloc"].apply(null, arguments) +}; + +var stackRestore = Module["stackRestore"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackRestore"].apply(null, arguments) +}; + +var __growWasmMemory = Module["__growWasmMemory"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__growWasmMemory"].apply(null, arguments) +}; + +var dynCall_ii = Module["dynCall_ii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ii"].apply(null, arguments) +}; + +var dynCall_iiii = Module["dynCall_iiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiii"].apply(null, arguments) +}; + +var dynCall_jiji = Module["dynCall_jiji"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_jiji"].apply(null, arguments) +}; + +var dynCall_iidiiii = Module["dynCall_iidiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iidiiii"].apply(null, arguments) +}; + +var dynCall_vii = Module["dynCall_vii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vii"].apply(null, arguments) +}; + +var dynCall_vi = Module["dynCall_vi"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vi"].apply(null, arguments) +}; + +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiii"].apply(null, arguments) +}; + +var dynCall_viiiii = Module["dynCall_viiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiii"].apply(null, arguments) +}; + +var dynCall_viiii = Module["dynCall_viiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiii"].apply(null, arguments) +}; + +var dynCall_iii = Module["dynCall_iii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iii"].apply(null, arguments) +}; + +var dynCall_viii = Module["dynCall_viii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viii"].apply(null, arguments) +}; + +var dynCall_v = Module["dynCall_v"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_v"].apply(null, arguments) +}; + +var dynCall_iiiii = Module["dynCall_iiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiii"].apply(null, arguments) +}; + +var dynCall_iiiiii = Module["dynCall_iiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiiiii = Module["dynCall_iiiiiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiij = Module["dynCall_iiiiij"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiij"].apply(null, arguments) +}; + +var dynCall_iiiiid = Module["dynCall_iiiiid"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiid"].apply(null, arguments) +}; + +var dynCall_iiiiijj = Module["dynCall_iiiiijj"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiijj"].apply(null, arguments) +}; + +var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiijj"].apply(null, arguments) +}; + +var dynCall_viijii = Module["dynCall_viijii"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viijii"].apply(null, arguments) +}; + +var dynCall_ji = Module["dynCall_ji"] = function () { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ji"].apply(null, arguments) +}; + + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function () { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function () { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["ccall"] = ccall; +Module["cwrap"] = cwrap; +if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function () { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function () { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function () { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getMemory")) Module["getMemory"] = function () { abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function () { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function () { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function () { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["UTF8ToString"] = UTF8ToString; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function () { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function () { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function () { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function () { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function () { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function () { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function () { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function () { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function () { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function () { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function () { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function () { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function () { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function () { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function () { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function () { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function () { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function () { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function () { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addRunDependency")) Module["addRunDependency"] = function () { abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "removeRunDependency")) Module["removeRunDependency"] = function () { abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function () { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function () { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createFolder")) Module["FS_createFolder"] = function () { abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createPath")) Module["FS_createPath"] = function () { abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createDataFile")) Module["FS_createDataFile"] = function () { abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createPreloadedFile")) Module["FS_createPreloadedFile"] = function () { abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createLazyFile")) Module["FS_createLazyFile"] = function () { abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createLink")) Module["FS_createLink"] = function () { abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createDevice")) Module["FS_createDevice"] = function () { abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_unlink")) Module["FS_unlink"] = function () { abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function () { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynamicAlloc")) Module["dynamicAlloc"] = function () { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function () { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function () { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function () { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function () { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function () { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function () { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["addFunction"] = addFunction; +if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function () { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function () { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function () { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function () { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function () { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function () { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function () { abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function () { abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function () { abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function () { abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function () { abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "abort")) Module["abort"] = function () { abort("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "Pointer_stringify")) Module["Pointer_stringify"] = function () { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function () { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function () { abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function () { abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function () { abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "establishStackSpace")) Module["establishStackSpace"] = function () { abort("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["writeStackCookie"] = writeStackCookie; +Module["checkStackCookie"] = checkStackCookie; +Module["abortStackOverflow"] = abortStackOverflow; if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { configurable: true, get: function () { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { configurable: true, get: function () { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", { configurable: true, get: function () { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", { configurable: true, get: function () { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "calledRun")) Object.defineProperty(Module, "calledRun", { configurable: true, get: function () { abort("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") } }); + + + +var calledRun; + + +/** + * @constructor + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function () { + setTimeout(function () { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var print = out; + var printErr = err; + var has = false; + out = err = function (x) { + has = true; + } + try { // it doesn't matter if it fails + var flush = Module['_fflush']; + if (flush) flush(0); + // also flush in the JS FS layer + ['stdout', 'stderr'].forEach(function (name) { + var info = FS.analyzePath('/dev/' + name); + if (!info) return; + var stream = info.object; + var rdev = stream.rdev; + var tty = TTY.ttys[rdev]; + if (tty && tty.output && tty.output.length) { + has = true; + } + }); + } catch (e) { } + out = print; + err = printErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + } +} + +function exit(status, implicit) { + checkUnflushedContent(); + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && noExitRuntime && status === 0) { + return; + } + + if (noExitRuntime) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + err('program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + quit_(status, new ExitStatus(status)); +} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + + +noExitRuntime = true; + + +const AStyleMain = cwrap('AStyleMain', 'string', [ + 'string', + 'string', + 'number', + 'number' +]); + +let mallocList = []; +const malloc = addFunction((numBytes) => { + const result = _malloc(numBytes); + mallocList.push(result); + return result; +}, 'ii'); + +// This has to be a global function since emscripten doesn't support removeFunction() +// with WASM, and we have a limited number of entries in the callback table, so we +// can't create a new function for every function call +let activeOutputCallback = null; +const outputHandler = addFunction((code, msg) => { + if (activeOutputCallback) { + activeOutputCallback(code, UTF8ToString(msg)); + } +}, 'vii'); + +let libReadyCallback; + +const ready = new Promise((resolve) => { + libReadyCallback = resolve; +}); + +async function format_code(code, options = '', outputCallback) { + await ready; + activeOutputCallback = outputCallback; + try { + return AStyleMain(code, options, outputHandler, malloc); + } finally { + activeOutputCallback = null; + // Free all memory allocation by AStyle + for (const item of mallocList) { + _free(item); + } + mallocList = []; + } +} + +Module.onRuntimeInitialized = libReadyCallback; + + +self.cppFormatter = {}; +self.cppFormatter.format = format_code; +self.cppFormatter.init = async function () { + await ready; +} + +run(); + +// {{MODULE_ADDITIONS}} + + + diff --git a/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/libastyle.wasm b/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/libastyle.wasm new file mode 100644 index 00000000..60cd3a42 Binary files /dev/null and b/mixly/common/modules/mixly-modules/workers/common/cpp-formatter/libastyle.wasm differ diff --git a/mixly/common/modules/mixly-modules/workers/common/python-formatter/index.js b/mixly/common/modules/mixly-modules/workers/common/python-formatter/index.js new file mode 100644 index 00000000..7b2b1a8c --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/python-formatter/index.js @@ -0,0 +1,17 @@ +importScripts('./ruff_fmt.js'); +importScripts('../../../../web-modules/workerpool.min.js'); + + +async function init() { + await self.pythonFormatter.init(); +} + +async function format(code) { + const result = await self.pythonFormatter.format(code); + return result; +} + +workerpool.worker({ + init, + format +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/common/python-formatter/ruff_fmt.js b/mixly/common/modules/mixly-modules/workers/common/python-formatter/ruff_fmt.js new file mode 100644 index 00000000..bbcc059c --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/python-formatter/ruff_fmt.js @@ -0,0 +1,572 @@ +let wasm; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function debugString(val) { + // primitive types + const type = typeof val; + if (type == 'number' || type == 'boolean' || val == null) { + return `${val}`; + } + if (type == 'string') { + return `"${val}"`; + } + if (type == 'symbol') { + const description = val.description; + if (description == null) { + return 'Symbol'; + } else { + return `Symbol(${description})`; + } + } + if (type == 'function') { + const name = val.name; + if (typeof name == 'string' && name.length > 0) { + return `Function(${name})`; + } else { + return 'Function'; + } + } + // objects + if (Array.isArray(val)) { + const length = val.length; + let debug = '['; + if (length > 0) { + debug += debugString(val[0]); + } + for(let i = 1; i < length; i++) { + debug += ', ' + debugString(val[i]); + } + debug += ']'; + return debug; + } + // Test for built-in + const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); + let className; + if (builtInMatches && builtInMatches.length > 1) { + className = builtInMatches[1]; + } else { + // Failed to match the standard '[object ClassName]' + return toString.call(val); + } + if (className == 'Object') { + // we're a user defined class or Object + // JSON.stringify avoids problems with cycles, and is generally much + // easier than looping through ownProperties of `val`. + try { + return 'Object(' + JSON.stringify(val) + ')'; + } catch (_) { + return 'Object'; + } + } + // errors + if (val instanceof Error) { + return `${val.name}: ${val.message}\n${val.stack}`; + } + // TODO we could test for more things here, like `Set`s and `Map`s. + return className; +} + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} + +let cachedDataViewMemory0 = null; +function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return decodeText(ptr, len); +} + +let cachedUint8ArrayMemory0 = null; +function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +function getObject(idx) { return heap[idx]; } + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + wasm.__wbindgen_export3(addHeapObject(e)); + } +} + +let heap = new Array(128).fill(undefined); +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function isLikeNone(x) { + return x === undefined || x === null; +} + +function passStringToWasm0(arg, malloc, realloc) { + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8ArrayMemory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = cachedTextEncoder.encodeInto(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); +cachedTextDecoder.decode(); +const MAX_SAFARI_DECODE_BYTES = 2146435072; +let numBytesDecoded = 0; +function decodeText(ptr, len) { + numBytesDecoded += len; + if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { + cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + cachedTextDecoder.decode(); + numBytesDecoded = len; + } + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} + +const cachedTextEncoder = new TextEncoder(); + +if (!('encodeInto' in cachedTextEncoder)) { + cachedTextEncoder.encodeInto = function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; + } +} + +let WASM_VECTOR_LEN = 0; + +/** + * Format the entire Python source code string. + * @param {string} input + * @param {string | null} [path] + * @param {Config | null} [config] + * @returns {string} + */ +function format_code(input, path, config) { + let deferred4_0; + let deferred4_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export, wasm.__wbindgen_export2); + const len0 = WASM_VECTOR_LEN; + var ptr1 = isLikeNone(path) ? 0 : passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2); + var len1 = WASM_VECTOR_LEN; + wasm.format(retptr, ptr0, len0, ptr1, len1, isLikeNone(config) ? 0 : addHeapObject(config)); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); + var ptr3 = r0; + var len3 = r1; + if (r3) { + ptr3 = 0; len3 = 0; + throw takeObject(r2); + } + deferred4_0 = ptr3; + deferred4_1 = len3; + return getStringFromWasm0(ptr3, len3); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1); + } +} + +/** + * Format a specific range of the Python source code string. + * @param {string} input + * @param {TextRange} range + * @param {string | null} [path] + * @param {Config | null} [config] + * @returns {PrintedRange} + */ +function format_range(input, range, path, config) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export, wasm.__wbindgen_export2); + const len0 = WASM_VECTOR_LEN; + var ptr1 = isLikeNone(path) ? 0 : passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2); + var len1 = WASM_VECTOR_LEN; + wasm.format_range(retptr, ptr0, len0, addHeapObject(range), ptr1, len1, isLikeNone(config) ? 0 : addHeapObject(config)); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']); + +async function __wbg_load(module, imports) { + if (typeof Response === 'function' && module instanceof Response) { + if (typeof WebAssembly.instantiateStreaming === 'function') { + try { + return await WebAssembly.instantiateStreaming(module, imports); + } catch (e) { + const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type); + + if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') { + console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); + + } else { + throw e; + } + } + } + + const bytes = await module.arrayBuffer(); + return await WebAssembly.instantiate(bytes, imports); + } else { + const instance = await WebAssembly.instantiate(module, imports); + + if (instance instanceof WebAssembly.Instance) { + return { instance, module }; + } else { + return instance; + } + } +} + +function __wbg_get_imports() { + const imports = {}; + imports.wbg = {}; + imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) { + const ret = Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) { + const ret = Number(getObject(arg0)); + return ret; + }; + imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) { + const ret = String(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) { + const v = getObject(arg1); + const ret = typeof(v) === 'bigint' ? v : undefined; + getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); + }; + imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) { + const v = getObject(arg0); + const ret = typeof(v) === 'boolean' ? v : undefined; + return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0; + }; + imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) { + const ret = debugString(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) { + const ret = getObject(arg0) in getObject(arg1); + return ret; + }; + imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) { + const ret = typeof(getObject(arg0)) === 'bigint'; + return ret; + }; + imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) { + const ret = typeof(getObject(arg0)) === 'function'; + return ret; + }; + imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) { + const val = getObject(arg0); + const ret = typeof(val) === 'object' && val !== null; + return ret; + }; + imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) { + const ret = getObject(arg0) === undefined; + return ret; + }; + imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) { + const ret = getObject(arg0) === getObject(arg1); + return ret; + }; + imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) { + const ret = getObject(arg0) == getObject(arg1); + return ret; + }; + imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'number' ? obj : undefined; + getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); + }; + imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'string' ? obj : undefined; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).call(getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) { + const ret = getObject(arg0).done; + return ret; + }; + imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) { + const ret = Object.entries(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; + return addHeapObject(ret); + }; + imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) { + const ret = Reflect.get(getObject(arg0), getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) { + const ret = getObject(arg0)[getObject(arg1)]; + return addHeapObject(ret); + }; + imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof ArrayBuffer; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Map; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Uint8Array; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) { + const ret = Array.isArray(getObject(arg0)); + return ret; + }; + imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) { + const ret = Number.isSafeInteger(getObject(arg0)); + return ret; + }; + imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() { + const ret = Symbol.iterator; + return addHeapObject(ret); + }; + imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) { + const ret = getObject(arg0).length; + return ret; + }; + imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) { + const ret = getObject(arg0).length; + return ret; + }; + imports.wbg.__wbg_new_1ba21ce319a06297 = function() { + const ret = new Object(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) { + const ret = new Uint8Array(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) { + const ret = getObject(arg0).next; + return addHeapObject(ret); + }; + imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).next(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) { + Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2)); + }; + imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) { + getObject(arg0)[takeObject(arg1)] = takeObject(arg2); + }; + imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) { + const ret = getObject(arg0).value; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) { + // Cast intrinsic for `Ref(String) -> Externref`. + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) { + // Cast intrinsic for `U64 -> Externref`. + const ret = BigInt.asUintN(64, arg0); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) { + // Cast intrinsic for `I64 -> Externref`. + const ret = arg0; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) { + // Cast intrinsic for `F64 -> Externref`. + const ret = arg0; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_object_clone_ref = function(arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); + }; + + return imports; +} + +function __wbg_finalize_init(instance, module) { + wasm = instance.exports; + __wbg_init.__wbindgen_wasm_module = module; + cachedDataViewMemory0 = null; + cachedUint8ArrayMemory0 = null; + + + + return wasm; +} + +function initSync(module) { + if (wasm !== undefined) return wasm; + + + if (typeof module !== 'undefined') { + if (Object.getPrototypeOf(module) === Object.prototype) { + ({module} = module) + } else { + console.warn('using deprecated parameters for `initSync()`; pass a single object instead') + } + } + + const imports = __wbg_get_imports(); + if (!(module instanceof WebAssembly.Module)) { + module = new WebAssembly.Module(module); + } + const instance = new WebAssembly.Instance(module, imports); + return __wbg_finalize_init(instance, module); +} + +async function __wbg_init(module_or_path) { + if (wasm !== undefined) return wasm; + + + if (typeof module_or_path !== 'undefined') { + if (Object.getPrototypeOf(module_or_path) === Object.prototype) { + ({module_or_path} = module_or_path) + } else { + console.warn('using deprecated parameters for the initialization function; pass a single object instead') + } + } + + if (typeof module_or_path === 'undefined') { + module_or_path = new URL('ruff_fmt_bg.wasm', self.location.origin + self.location.pathname); + } + const imports = __wbg_get_imports(); + + if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { + module_or_path = fetch(module_or_path); + } + + const { instance, module } = await __wbg_load(await module_or_path, imports); + + return __wbg_finalize_init(instance, module); +} + +// export { initSync }; +// export default __wbg_init; + +self.pythonFormatter = {}; +self.pythonFormatter.format = format_code; +self.pythonFormatter.formatRange = format_range; +self.pythonFormatter.init = __wbg_init; \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/common/python-formatter/ruff_fmt_bg.wasm b/mixly/common/modules/mixly-modules/workers/common/python-formatter/ruff_fmt_bg.wasm new file mode 100644 index 00000000..d50b7d14 Binary files /dev/null and b/mixly/common/modules/mixly-modules/workers/common/python-formatter/ruff_fmt_bg.wasm differ diff --git a/mixly/common/modules/mixly-modules/workers/common/serial-worker.js b/mixly/common/modules/mixly-modules/workers/common/serial-worker.js new file mode 100644 index 00000000..f6dcb196 --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/serial-worker.js @@ -0,0 +1,188 @@ +class SerialWorker { + #receiveBuffer_ = []; + #bufferLength_ = 0; + #encoder_ = new TextEncoder(); + #decoder_ = new TextDecoder('utf-8'); + #baud_ = 115200; + #dtr_ = false; + #rts_ = false; + #isOpened_ = false; + #port_ = ''; + constructor(port) { + this.#port_ = port; + this.resetBuffer(); + } + + decodeBuffer(buffer) { + let output = ''; + for (let i in buffer) { + output += this.decodeByte(); + } + return output; + } + + /* UTF-8编码方式 + * ------------------------------------------------------------ + * |1字节 0xxxxxxx | + * |2字节 110xxxxx 10xxxxxx | + * |3字节 1110xxxx 10xxxxxx 10xxxxxx | + * |4字节 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx | + * |5字节 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx | + * |6字节 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx| + * ------------------------------------------------------------ + **/ + decodeByte(byte) { + let output = ''; + if ((byte & 0x80) === 0x00) { + // 1字节 + this.#receiveBuffer_ = []; + this.#bufferLength_ = 0; + output += String.fromCharCode(byte); + } else if ((byte & 0xc0) === 0x80) { + /* + * 2字节以上的中间字节,10xxxxxx + * 如果没有起始头,则丢弃这个字节 + * 如果不是2字节及以上的起始头,则丢弃这个字节 + **/ + if (!this.#receiveBuffer_.length || this.#bufferLength_ < 2) { + return output; + } + this.#receiveBuffer_.push(byte); + if (this.#bufferLength_ === this.#receiveBuffer_.length) { + output += this.#decoder_.decode(new Uint8Array(this.#receiveBuffer_)); + this.#receiveBuffer_ = []; + } + } else { + // 2字节以上的起始头 + if (this.#receiveBuffer_) { + this.#receiveBuffer_ = []; + } + this.#bufferLength_ = this.#getBufferLength_(byte); + this.#receiveBuffer_.push(byte); + } + return output; + } + + #getBufferLength_(data) { + let len = 2; + if ((data & 0xFC) === 0xFC) { + len = 6; + } else if ((data & 0xF8) === 0xF8) { + len = 5; + } else if ((data & 0xF0) === 0xF0) { + len = 4; + } else if ((data & 0xE0) === 0xE0) { + len = 3; + } else if ((data & 0xC0) === 0xC0) { + len = 2; + } + return len; + } + + resetBuffer() { + this.#receiveBuffer_ = []; + this.#bufferLength_ = 0; + } + + open() {} + + close() {} + + toggle() { + if (this.isOpened()) { + this.close(); + } else { + this.open(); + } + } + + setBaudRate(baud) { + this.#baud_ = baud; + } + + setDTR(dtr) { + this.#dtr_ = dtr; + } + + setRTS(rts) { + this.#rts_ = rts; + } + + setDTRAndRTS(dtr, rts) { + this.#dtr_ = dtr; + this.#rts_ = rts; + } + + getPortName() { + return this.#port_; + } + + getBaudRate() { + return this.#baud_; + } + + getDTR() { + return this.#dtr_; + } + + getRTS() { + return this.#rts_; + } + + sendString(str) {} + + sendBuffer(buffer) {} + + onBuffer(buffer) { + const data = this.decodeBuffer(buffer); + if (!data) { + return; + } + self.postMessage({ + port: this.getPortName(), + event: 'onBuffer', + message: data + }); + } + + onOpen() { + this.#isOpened_ = true; + self.postMessage({ + port: this.getPortName(), + event: 'onOpen' + }); + } + + onClose(code) { + this.#isOpened_ = false; + self.postMessage({ + port: this.getPortName(), + event: 'onClose', + message: code + }); + } + + onError(error) { + self.postMessage({ + port: this.getPortName(), + event: 'onError', + message: error + }); + } + + isOpened() { + return this.#isOpened_; + } + + config(info) { + if (typeof info !== Object) { + return; + } + this.#baud_ = info.baud; + this.setBaudRate(this.#baud_); + this.#dtr_ = info.dtr; + this.setDTR(this.#dtr_); + this.#rts_ = info.rts; + this.setDTR(this.#rts_); + } +} \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/common/tree-sitter/index.js b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/index.js new file mode 100644 index 00000000..51ac969a --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/index.js @@ -0,0 +1,141 @@ +importScripts('./tree-sitter.js'); +importScripts('../../../../web-modules/workerpool.min.js'); + + +const terms = [ + 'type', + 'scope', + 'function', + 'variable', + 'number', + 'string', + 'comment', + 'constant', + 'directive', + 'control', + 'operator', + 'modifier', + 'punctuation' +]; + +let parser; +let tree = null; +let language = null; + + +class Language { + constructor(grammarJson) { + this.simpleTerms = {}; + this.complexTerms = []; + this.complexScopes = {}; + for (const t in grammarJson.simpleTerms) + this.simpleTerms[t] = grammarJson.simpleTerms[t]; + for (const t in grammarJson.complexTerms) + this.complexTerms[t] = grammarJson.complexTerms[t]; + for (const t in grammarJson.complexScopes) + this.complexScopes[t] = grammarJson.complexScopes[t]; + this.complexDepth = 0; + this.complexOrder = false; + for (const s in this.complexScopes) { + const depth = s.split('>').length; + if (depth > this.complexDepth) + this.complexDepth = depth; + if (s.indexOf('[') >= 0) + this.complexOrder = true; + } + this.complexDepth--; + } +} + +async function init(languageWasmPath, grammarJson) { + await TreeSitter.init(); + + parser = new TreeSitter(); + const lang = await TreeSitter.Language.load(languageWasmPath); + console.log(lang.version) + parser.setLanguage(lang); + language = new Language(grammarJson); + + tree = null; +} + +function buildDecorations(tree) { + const result = []; + const stack = []; + let node = tree.rootNode.firstChild; + while (stack.length > 0 || node) { + if (node) { + stack.push(node); + node = node.firstChild; + } + else { + node = stack.pop(); + let type = node.type; + if (!node.isNamed()) + type = '"' + type + '"'; + let term = null; + if (!language.complexTerms.includes(type)) { + term = language.simpleTerms[type]; + } + else { + let desc = type; + let scopes = [desc]; + let parent = node.parent; + for (let i = 0; i < language.complexDepth && parent; i++) { + let parentType = parent.type; + if (!parent.isNamed()) + parentType = '"' + parentType + '"'; + desc = parentType + ' > ' + desc; + scopes.push(desc); + parent = parent.parent; + } + if (language.complexOrder) { + let index = 0; + let sibling = node.previousSibling; + while (sibling) { + if (sibling.type === node.type) + index++; + sibling = sibling.previousSibling; + } + let rindex = -1; + sibling = node.nextSibling; + while (sibling) { + if (sibling.type === node.type) + rindex--; + sibling = sibling.nextSibling; + } + const orderScopes = []; + for (let i = 0; i < scopes.length; i++) + orderScopes.push(scopes[i], scopes[i] + '[' + index + ']', scopes[i] + '[' + rindex + ']'); + scopes = orderScopes; + } + for (const d of scopes) + if (d in language.complexScopes) + term = language.complexScopes[d]; + } + if (terms.includes(term)) { + if (!result[term]) { + result[term] = []; + } + result[term].push({ + startLineNumber: node.startPosition.row + 1, + startColumn: node.startPosition.column + 1, + endLineNumber: node.endPosition.row + 1, + endColumn: node.endPosition.column + 1 + }); + } + node = node.nextSibling; + } + } + return result; +} + +function update(text) { + const tree = parser.parse(text); + return buildDecorations(tree); +} + +workerpool.worker({ + init, + update +}); diff --git a/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter-cpp.wasm b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter-cpp.wasm new file mode 100644 index 00000000..6ada0a40 Binary files /dev/null and b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter-cpp.wasm differ diff --git a/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter-python.wasm b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter-python.wasm new file mode 100644 index 00000000..05fdeb2d Binary files /dev/null and b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter-python.wasm differ diff --git a/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter.js b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter.js new file mode 100644 index 00000000..f6ee3112 --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/tree-sitter.js @@ -0,0 +1 @@ +var Module=void 0!==Module?Module:{};!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():self.TreeSitter=t()}(0,function(){var e,t={};for(e in Module)Module.hasOwnProperty(e)&&(t[e]=Module[e]);var r,n,o=[],s=function(e,t){throw t},_=!1,a=!1;_="object"==typeof window,a="function"==typeof importScripts,r="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,n=!_&&!r&&!a;var u,i,l,d,c="";r?(c=a?require("path").dirname(c)+"/":__dirname+"/",u=function(e,t){return l||(l=require("fs")),d||(d=require("path")),e=d.normalize(e),l.readFileSync(e,t?null:"utf8")},i=function(e){var t=u(e,!0);return t.buffer||(t=new Uint8Array(t)),q(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),o=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof Ze))throw e}),process.on("unhandledRejection",de),s=function(e){process.exit(e)},Module.inspect=function(){return"[Emscripten Module object]"}):n?("undefined"!=typeof read&&(u=function(e){return read(e)}),i=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(q("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"function"==typeof quit&&(s=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(_||a)&&(a?c=self.location.href:document.currentScript&&(c=document.currentScript.src),c=0!==c.indexOf("blob:")?c.substr(0,c.lastIndexOf("/")+1):"",u=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a&&(i=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var m=Module.print||console.log.bind(console),f=Module.printErr||console.warn.bind(console);for(e in t)t.hasOwnProperty(e)&&(Module[e]=t[e]);t=null,Module.arguments&&(o=Module.arguments),Module.thisProgram&&Module.thisProgram,Module.quit&&(s=Module.quit);var p=16;function h(e){var t=D[K>>2],r=t+e+15&-16;return r>Ee()&&de(),D[K>>2]=r,t}function w(e,t){return t||(t=p),Math.ceil(e/t)*t}function g(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===e[e.length-1])return 4;if("i"===e[0]){var t=parseInt(e.substr(1));return q(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}var M={nextHandle:1,loadedLibs:{"-1":{refcount:1/0,name:"__self__",module:Module,global:!0}},loadedLibNames:{__self__:-1}};function y(e,t){t=t||{global:!0,nodelete:!0};var r,n=M.loadedLibNames[e];if(n)return r=M.loadedLibs[n],t.global&&!r.global&&(r.global=!0,"loading"!==r.module&&a(r.module)),t.nodelete&&r.refcount!==1/0&&(r.refcount=1/0),r.refcount++,t.loadAsync?Promise.resolve(n):n;function o(){if(t.fs){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(lib_data)),t.loadAsync?Promise.resolve(r):r}return t.loadAsync?(n=e,fetch(n,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load binary file at '"+n+"'";return e.arrayBuffer()}).then(function(e){return new Uint8Array(e)})):i(e);var n}function s(e){return E(e,t)}function _(){if(void 0!==Module.preloadedWasm&&void 0!==Module.preloadedWasm[e]){var r=Module.preloadedWasm[e];return t.loadAsync?Promise.resolve(r):r}return t.loadAsync?o().then(function(e){return s(e)}):s(o())}function a(e){for(var t in e)if(e.hasOwnProperty(t)){var r;r="_"+t,Module.hasOwnProperty(r)||(Module[r]=e[t])}}function u(e){r.global&&a(e),r.module=e}return n=M.nextHandle++,r={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},M.loadedLibNames[e]=n,M.loadedLibs[n]=r,t.loadAsync?_().then(function(e){return u(e),n}):(u(_()),n)}function b(e,t,r,n){var o={};for(var s in e){var _=e[s];"object"==typeof _&&(_=_.value),"number"==typeof _&&(_+=t),o[s]=_,n&&(n["_"+s]=_)}return o}function E(e,t){q(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0],"need to see wasm magic number"),q(0===e[8],"need the dylink section to be first");var r=9;function n(){for(var t=0,n=1;;){var o=e[r++];if(t+=(127&o)*n,n*=128,!(128&o))break}return t}n();q(6===e[r]),q(e[++r]==="d".charCodeAt(0)),q(e[++r]==="y".charCodeAt(0)),q(e[++r]==="l".charCodeAt(0)),q(e[++r]==="i".charCodeAt(0)),q(e[++r]==="n".charCodeAt(0)),q(e[++r]==="k".charCodeAt(0)),r++;for(var o=n(),s=n(),_=n(),a=n(),u=n(),i=[],l=0;l=0,a=0;return e[t]=function(){if(!a){var e=m(n,0,_);a=I(e,s)}return a}}return t.startsWith("invoke_")?e[t]=We:e[t]=function(){return m(t).apply(null,arguments)}}}),g={global:{NaN:NaN,Infinity:1/0},"global.Math":Math,env:h,wasi_snapshot_preview1:h};function M(e,t){var n=b(e.exports,r,0,t),o=n.__post_instantiate;return o&&(ee?o():Q.push(o)),n}return t.loadAsync?WebAssembly.instantiate(e,g).then(function(e){return M(e.instance,c)}):M(new WebAssembly.Instance(new WebAssembly.Module(e),g),c)}return t.loadAsync?Promise.all(i.map(function(e){return y(e,t)})).then(function(){return f()}):(i.forEach(function(e){y(e,t)}),f())}function v(e,t){var r=R,n=r.length;try{r.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."}try{r.set(n,e)}catch(s){if(!(s instanceof TypeError))throw s;q(void 0!==t,"Missing signature argument to addFunction");var o=function(e,t){if("function"==typeof WebAssembly.Function){for(var r={i:"i32",j:"i64",f:"f32",d:"f64"},n={parameters:[],results:"v"==t[0]?[]:[r[t[0]]]},o=1;o>0]=t;break;case"i16":j[e>>1]=t;break;case"i32":D[e>>2]=t;break;case"i64":he=[t>>>0,(pe=t,+re(pe)>=1?pe>0?(0|se(+oe(pe/4294967296),4294967295))>>>0:~~+ne((pe-+(~~pe>>>0))/4294967296)>>>0:0)],D[e>>2]=he[0],D[e+4>>2]=he[1];break;case"float":B[e>>2]=t;break;case"double":H[e>>3]=t;break;default:de("invalid type for setValue: "+r)}}function P(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return O[e>>0];case"i16":return j[e>>1];case"i32":case"i64":return D[e>>2];case"float":return B[e>>2];case"double":return H[e>>3];default:de("invalid type for getValue: "+t)}return null}A=w(A,1),Module.wasmBinary&&(S=Module.wasmBinary),Module.noExitRuntime&&(N=Module.noExitRuntime),"object"!=typeof WebAssembly&&f("no native wasm support detected");var R=new WebAssembly.Table({initial:12,element:"anyfunc"}),C=!1;function q(e,t){e||de("Assertion failed: "+t)}var T=3;function F(e){return ee?Pe(e):h(e)}var L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function $(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&L)return L.decode(e.subarray(t,o));for(var s="";t>10,56320|1023&i)}}else s+=String.fromCharCode((31&_)<<6|a)}else s+=String.fromCharCode(_)}return s}function W(e,t){return e?$(U,e,t):""}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var Z,O,U,j,D,B,H;function z(e){Z=e,Module.HEAP8=O=new Int8Array(e),Module.HEAP16=j=new Int16Array(e),Module.HEAP32=D=new Int32Array(e),Module.HEAPU8=U=new Uint8Array(e),Module.HEAPU16=new Uint16Array(e),Module.HEAPU32=new Uint32Array(e),Module.HEAPF32=B=new Float32Array(e),Module.HEAPF64=H=new Float64Array(e)}var K=7984,G=Module.TOTAL_MEMORY||33554432;function V(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?Module.dynCall_v(r):Module.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(x=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:G/65536}))&&(Z=x.buffer),G=Z.byteLength,z(Z),D[K>>2]=5251024;var X=[],Q=[],Y=[],J=[],ee=!1;function te(e){X.unshift(e)}var re=Math.abs,ne=Math.ceil,oe=Math.floor,se=Math.min,_e=0,ae=null,ue=null;function ie(e){_e++,Module.monitorRunDependencies&&Module.monitorRunDependencies(_e)}function le(e){if(_e--,Module.monitorRunDependencies&&Module.monitorRunDependencies(_e),0==_e&&(null!==ae&&(clearInterval(ae),ae=null),ue)){var t=ue;ue=null,t()}}function de(e){throw Module.onAbort&&Module.onAbort(e),m(e+=""),f(e),C=!0,1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}Module.preloadedImages={},Module.preloadedAudios={},Module.preloadedWasm={},te(function(){if(Module.dynamicLibraries&&Module.dynamicLibraries.length>0&&!i)return ie(),void Promise.all(Module.dynamicLibraries.map(function(e){return y(e,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){le()});var e;(e=Module.dynamicLibraries)&&e.forEach(function(e){y(e,{global:!0,nodelete:!0})})});var ce="data:application/octet-stream;base64,";function me(e){return String.prototype.startsWith?e.startsWith(ce):0===e.indexOf(ce)}var fe,pe,he,we="tree-sitter.wasm";function ge(){try{if(S)return new Uint8Array(S);if(i)return i(we);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}}function Me(){de()}function ye(){de()}me(we)||(fe=we,we=Module.locateFile?Module.locateFile(fe,c):c+fe),Q.push({func:function(){Fe()}},{func:function(){ke()}}),Module._abort=Me;var be=r||"undefined"!=typeof dateNow||1;function Ee(){return U.length}function ve(e){try{return x.grow(e-Z.byteLength+65535>>16),z(x.buffer),1}catch(e){}}function Ie(e,t,r){if(ot){const e=W(r);ot(e,0!==t)}}ye=r?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:function(){return performance.now()};var Se=A,Ne={__memory_base:1024,__stack_pointer:5251024,__table_base:1,abort:Me,clock_gettime:function(e,t){var r,n;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!be)return n=28,Module.___errno_location&&(D[Module.___errno_location()>>2]=n),-1;r=ye()}return D[t>>2]=r/1e3|0,D[t+4>>2]=r%1e3*1e3*1e3|0,0},emscripten_memcpy_big:function(e,t,r){U.set(U.subarray(t,t+r),e)},emscripten_resize_heap:function(e){var t=Ee();if(e>2147418112)return!1;for(var r,n,o=1;o<=4;o*=2){var s=t*(1+.2/o);if(s=Math.min(s,e+100663296),ve(Math.min(2147418112,((r=Math.max(16777216,e,s))%(n=65536)>0&&(r+=n-r%n),r))))return!0}return!1},exit:function(e){Ue(e)},fp$tree_sitter_log_callback$viii:function(){return Module._fp$tree_sitter_log_callback$viii.apply(null,arguments)},g$TRANSFER_BUFFER:function(){return Module._TRANSFER_BUFFER},g$__THREW__:function(){return Module.___THREW__},g$__cxa_new_handler:function(){return Module.___cxa_new_handler},g$__threwValue:function(){return Module.___threwValue},memory:x,table:R,tree_sitter_parse_callback:function(e,t,r,n,o){var s=nt(t,{row:r,column:n});"string"==typeof s?(k(o,s.length,"i32"),function(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=(r-=2)<2*e.length?r/2:e.length,o=0;o>1]=s,t+=2}j[t>>1]=0}(s,e,10240)):k(o,0,"i32")}},xe=function(){var e={env:Ne,wasi_snapshot_preview1:Ne};function t(e,t){var r=e.exports;r=b(r,A),Module.asm=r,le()}function r(e){t(e.instance)}function n(t){return(S||!_&&!a||"function"!=typeof fetch?new Promise(function(e,t){e(ge())}):fetch(we,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+we+"'";return e.arrayBuffer()}).catch(function(){return ge()})).then(function(t){return WebAssembly.instantiate(t,e)}).then(t,function(e){f("failed to asynchronously prepare wasm: "+e),de(e)})}if(ie(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return f("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(S||"function"!=typeof WebAssembly.instantiateStreaming||me(we)||"function"!=typeof fetch)return n(r);fetch(we,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(r,function(e){f("wasm streaming compile failed: "+e),f("falling back to ArrayBuffer instantiation"),n(r)})})}(),{}}();Module.asm=xe;var Ae,ke=Module.___wasm_call_ctors=function(){return(ke=Module.___wasm_call_ctors=Module.asm.__wasm_call_ctors).apply(null,arguments)},Pe=(Module._calloc=function(){return(Module._calloc=Module.asm.calloc).apply(null,arguments)},Module._ts_language_symbol_count=function(){return(Module._ts_language_symbol_count=Module.asm.ts_language_symbol_count).apply(null,arguments)},Module._ts_language_version=function(){return(Module._ts_language_version=Module.asm.ts_language_version).apply(null,arguments)},Module._ts_language_field_count=function(){return(Module._ts_language_field_count=Module.asm.ts_language_field_count).apply(null,arguments)},Module._ts_language_symbol_name=function(){return(Module._ts_language_symbol_name=Module.asm.ts_language_symbol_name).apply(null,arguments)},Module._ts_language_symbol_type=function(){return(Module._ts_language_symbol_type=Module.asm.ts_language_symbol_type).apply(null,arguments)},Module._ts_language_field_name_for_id=function(){return(Module._ts_language_field_name_for_id=Module.asm.ts_language_field_name_for_id).apply(null,arguments)},Module._memcpy=function(){return(Module._memcpy=Module.asm.memcpy).apply(null,arguments)},Module._free=function(){return(Module._free=Module.asm.free).apply(null,arguments)},Module._malloc=function(){return(Pe=Module._malloc=Module.asm.malloc).apply(null,arguments)}),Re=(Module._ts_parser_delete=function(){return(Module._ts_parser_delete=Module.asm.ts_parser_delete).apply(null,arguments)},Module._ts_parser_set_language=function(){return(Module._ts_parser_set_language=Module.asm.ts_parser_set_language).apply(null,arguments)},Module._memcmp=function(){return(Module._memcmp=Module.asm.memcmp).apply(null,arguments)},Module._ts_query_new=function(){return(Module._ts_query_new=Module.asm.ts_query_new).apply(null,arguments)},Module._iswspace=function(){return(Module._iswspace=Module.asm.iswspace).apply(null,arguments)},Module._ts_query_delete=function(){return(Module._ts_query_delete=Module.asm.ts_query_delete).apply(null,arguments)},Module._iswalnum=function(){return(Module._iswalnum=Module.asm.iswalnum).apply(null,arguments)},Module._ts_query_pattern_count=function(){return(Module._ts_query_pattern_count=Module.asm.ts_query_pattern_count).apply(null,arguments)},Module._ts_query_capture_count=function(){return(Module._ts_query_capture_count=Module.asm.ts_query_capture_count).apply(null,arguments)},Module._ts_query_string_count=function(){return(Module._ts_query_string_count=Module.asm.ts_query_string_count).apply(null,arguments)},Module._ts_query_capture_name_for_id=function(){return(Module._ts_query_capture_name_for_id=Module.asm.ts_query_capture_name_for_id).apply(null,arguments)},Module._ts_query_string_value_for_id=function(){return(Module._ts_query_string_value_for_id=Module.asm.ts_query_string_value_for_id).apply(null,arguments)},Module._ts_query_predicates_for_pattern=function(){return(Module._ts_query_predicates_for_pattern=Module.asm.ts_query_predicates_for_pattern).apply(null,arguments)},Module._ts_tree_delete=function(){return(Module._ts_tree_delete=Module.asm.ts_tree_delete).apply(null,arguments)},Module._ts_init=function(){return(Module._ts_init=Module.asm.ts_init).apply(null,arguments)},Module._ts_parser_new_wasm=function(){return(Module._ts_parser_new_wasm=Module.asm.ts_parser_new_wasm).apply(null,arguments)},Module._ts_parser_enable_logger_wasm=function(){return(Module._ts_parser_enable_logger_wasm=Module.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},Module._ts_parser_parse_wasm=function(){return(Module._ts_parser_parse_wasm=Module.asm.ts_parser_parse_wasm).apply(null,arguments)},Module._ts_tree_root_node_wasm=function(){return(Module._ts_tree_root_node_wasm=Module.asm.ts_tree_root_node_wasm).apply(null,arguments)},Module._ts_tree_edit_wasm=function(){return(Module._ts_tree_edit_wasm=Module.asm.ts_tree_edit_wasm).apply(null,arguments)},Module._ts_tree_get_changed_ranges_wasm=function(){return(Module._ts_tree_get_changed_ranges_wasm=Module.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},Module._ts_tree_cursor_new_wasm=function(){return(Module._ts_tree_cursor_new_wasm=Module.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},Module._ts_tree_cursor_delete_wasm=function(){return(Module._ts_tree_cursor_delete_wasm=Module.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},Module._ts_tree_cursor_reset_wasm=function(){return(Module._ts_tree_cursor_reset_wasm=Module.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_first_child_wasm=function(){return(Module._ts_tree_cursor_goto_first_child_wasm=Module.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return(Module._ts_tree_cursor_goto_next_sibling_wasm=Module.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_parent_wasm=function(){return(Module._ts_tree_cursor_goto_parent_wasm=Module.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_type_id_wasm=function(){return(Module._ts_tree_cursor_current_node_type_id_wasm=Module.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_named_wasm=function(){return(Module._ts_tree_cursor_current_node_is_named_wasm=Module.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return(Module._ts_tree_cursor_current_node_is_missing_wasm=Module.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_id_wasm=function(){return(Module._ts_tree_cursor_current_node_id_wasm=Module.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_position_wasm=function(){return(Module._ts_tree_cursor_start_position_wasm=Module.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_position_wasm=function(){return(Module._ts_tree_cursor_end_position_wasm=Module.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_index_wasm=function(){return(Module._ts_tree_cursor_start_index_wasm=Module.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_index_wasm=function(){return(Module._ts_tree_cursor_end_index_wasm=Module.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_field_id_wasm=function(){return(Module._ts_tree_cursor_current_field_id_wasm=Module.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_wasm=function(){return(Module._ts_tree_cursor_current_node_wasm=Module.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},Module._ts_node_symbol_wasm=function(){return(Module._ts_node_symbol_wasm=Module.asm.ts_node_symbol_wasm).apply(null,arguments)},Module._ts_node_child_count_wasm=function(){return(Module._ts_node_child_count_wasm=Module.asm.ts_node_child_count_wasm).apply(null,arguments)},Module._ts_node_named_child_count_wasm=function(){return(Module._ts_node_named_child_count_wasm=Module.asm.ts_node_named_child_count_wasm).apply(null,arguments)},Module._ts_node_child_wasm=function(){return(Module._ts_node_child_wasm=Module.asm.ts_node_child_wasm).apply(null,arguments)},Module._ts_node_named_child_wasm=function(){return(Module._ts_node_named_child_wasm=Module.asm.ts_node_named_child_wasm).apply(null,arguments)},Module._ts_node_child_by_field_id_wasm=function(){return(Module._ts_node_child_by_field_id_wasm=Module.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},Module._ts_node_next_sibling_wasm=function(){return(Module._ts_node_next_sibling_wasm=Module.asm.ts_node_next_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_sibling_wasm=function(){return(Module._ts_node_prev_sibling_wasm=Module.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},Module._ts_node_next_named_sibling_wasm=function(){return(Module._ts_node_next_named_sibling_wasm=Module.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_named_sibling_wasm=function(){return(Module._ts_node_prev_named_sibling_wasm=Module.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},Module._ts_node_parent_wasm=function(){return(Module._ts_node_parent_wasm=Module.asm.ts_node_parent_wasm).apply(null,arguments)},Module._ts_node_descendant_for_index_wasm=function(){return(Module._ts_node_descendant_for_index_wasm=Module.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_index_wasm=function(){return(Module._ts_node_named_descendant_for_index_wasm=Module.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_descendant_for_position_wasm=function(){return(Module._ts_node_descendant_for_position_wasm=Module.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_position_wasm=function(){return(Module._ts_node_named_descendant_for_position_wasm=Module.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_start_point_wasm=function(){return(Module._ts_node_start_point_wasm=Module.asm.ts_node_start_point_wasm).apply(null,arguments)},Module._ts_node_end_point_wasm=function(){return(Module._ts_node_end_point_wasm=Module.asm.ts_node_end_point_wasm).apply(null,arguments)},Module._ts_node_start_index_wasm=function(){return(Module._ts_node_start_index_wasm=Module.asm.ts_node_start_index_wasm).apply(null,arguments)},Module._ts_node_end_index_wasm=function(){return(Module._ts_node_end_index_wasm=Module.asm.ts_node_end_index_wasm).apply(null,arguments)},Module._ts_node_to_string_wasm=function(){return(Module._ts_node_to_string_wasm=Module.asm.ts_node_to_string_wasm).apply(null,arguments)},Module._ts_node_children_wasm=function(){return(Module._ts_node_children_wasm=Module.asm.ts_node_children_wasm).apply(null,arguments)},Module._ts_node_named_children_wasm=function(){return(Module._ts_node_named_children_wasm=Module.asm.ts_node_named_children_wasm).apply(null,arguments)},Module._ts_node_descendants_of_type_wasm=function(){return(Module._ts_node_descendants_of_type_wasm=Module.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},Module._ts_node_is_named_wasm=function(){return(Module._ts_node_is_named_wasm=Module.asm.ts_node_is_named_wasm).apply(null,arguments)},Module._ts_node_has_changes_wasm=function(){return(Module._ts_node_has_changes_wasm=Module.asm.ts_node_has_changes_wasm).apply(null,arguments)},Module._ts_node_has_error_wasm=function(){return(Module._ts_node_has_error_wasm=Module.asm.ts_node_has_error_wasm).apply(null,arguments)},Module._ts_node_is_missing_wasm=function(){return(Module._ts_node_is_missing_wasm=Module.asm.ts_node_is_missing_wasm).apply(null,arguments)},Module._ts_query_matches_wasm=function(){return(Module._ts_query_matches_wasm=Module.asm.ts_query_matches_wasm).apply(null,arguments)},Module._ts_query_captures_wasm=function(){return(Module._ts_query_captures_wasm=Module.asm.ts_query_captures_wasm).apply(null,arguments)},Module._iswdigit=function(){return(Module._iswdigit=Module.asm.iswdigit).apply(null,arguments)},Module._iswalpha=function(){return(Module._iswalpha=Module.asm.iswalpha).apply(null,arguments)},Module._iswlower=function(){return(Module._iswlower=Module.asm.iswlower).apply(null,arguments)},Module._towupper=function(){return(Module._towupper=Module.asm.towupper).apply(null,arguments)},Module._memchr=function(){return(Module._memchr=Module.asm.memchr).apply(null,arguments)},Module._strlen=function(){return(Module._strlen=Module.asm.strlen).apply(null,arguments)},Module._setThrew=function(){return(Re=Module._setThrew=Module.asm.setThrew).apply(null,arguments)}),Ce=(Module.__Znwm=function(){return(Module.__Znwm=Module.asm._Znwm).apply(null,arguments)},Module.__ZdlPv=function(){return(Module.__ZdlPv=Module.asm._ZdlPv).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_).apply(null,arguments)},Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=function(){return(Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=Module.asm._ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv).apply(null,arguments)},Module.stackSave=function(){return(Ce=Module.stackSave=Module.asm.stackSave).apply(null,arguments)}),qe=Module.stackAlloc=function(){return(qe=Module.stackAlloc=Module.asm.stackAlloc).apply(null,arguments)},Te=Module.stackRestore=function(){return(Te=Module.stackRestore=Module.asm.stackRestore).apply(null,arguments)},Fe=Module.___assign_got_enties=function(){return(Fe=Module.___assign_got_enties=Module.asm.__assign_got_enties).apply(null,arguments)},Le=(Module.dynCall_vi=function(){return(Module.dynCall_vi=Module.asm.dynCall_vi).apply(null,arguments)},{__cxa_new_handler:6112,__data_end:6960,__THREW__:6952,TRANSFER_BUFFER:1472,__threwValue:6956});for(var $e in Le)Module["_"+$e]=Se+Le[$e];for(var $e in Module.NAMED_GLOBALS=Le,Le)!function(e){var t=Module["_"+e];Module["g$_"+e]=function(){return t}}($e);function We(){var e=Ce();try{var t=Array.prototype.slice.call(arguments);return R.get(t[0]).apply(null,t.slice(1))}catch(t){if(Te(e),t!==t+0&&"longjmp"!==t)throw t;Re(1,0)}}function Ze(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Module._fp$tree_sitter_log_callback$viii=function(){q(Module._tree_sitter_log_callback||!0,"external function `tree_sitter_log_callback` is missing.perhaps a side module was not linked in? if this symbol was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=XX in the environment");var e=Module.asm.tree_sitter_log_callback;e||(e=Module._tree_sitter_log_callback),e||(e=Module._tree_sitter_log_callback),e||(e=Ie);var t=I(e,"viii");return Module._fp$tree_sitter_log_callback$viii=function(){return t},t},Module.asm=xe,Module.allocate=function(e,t,r,n){var o,s;"number"==typeof e?(o=!0,s=e):(o=!1,s=e.length);var _,a="string"==typeof t?t:null;if(_=r==T?n:[Pe,qe,h][r](Math.max(s,a?1:t.length)),o){var u;for(n=_,q(0==(3&_)),u=_+(-4&s);n>2]=0;for(u=_+s;n>0]=0;return _}if("i8"===a)return e.subarray||e.slice?U.set(e,_):U.set(new Uint8Array(e),_),_;for(var i,l,d,c=0;c0||(!function(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)te(Module.preRun.shift());V(X)}(),_e>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()))}function Ue(e,t){t&&N&&0===e||(N||(C=!0,e,!0,Module.onExit&&Module.onExit(e)),s(e,new Ze(e)))}if(ue=function e(){Ae||Oe(),Ae||(ue=e)},Module.run=Oe,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var je=!0;Module.noInitialRun&&(je=!1),N=!0,Oe();const De=Module,Be={},He=4,ze=5*He,Ke=2*He,Ge=2*He+2*Ke,Ve={row:0,column:0},Xe=/[\w-.]*/g,Qe=1,Ye=2,Je=/^_?tree_sitter_\w+/;var et,tt,rt,nt,ot,st=new Promise(e=>{Module.onRuntimeInitialized=e}).then(()=>{rt=De._ts_init(),et=P(rt,"i32"),tt=P(rt+He,"i32")});class Parser{static init(){return st}constructor(){if(null==rt)throw new Error("You must first call Parser.init() and wait for it to resolve.");De._ts_parser_new_wasm(),this[0]=P(rt,"i32"),this[1]=P(rt+He,"i32")}delete(){De._ts_parser_delete(this[0]),De._free(this[1])}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const r=De._ts_language_version(t);if(re.slice(t,n));else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");nt=e}this.logCallback?(ot=this.logCallback,De._ts_parser_enable_logger_wasm(this[0],1)):(ot=null,De._ts_parser_enable_logger_wasm(this[0],0));let n=0,o=0;if(r&&r.includedRanges){n=r.includedRanges.length;let e=o=De._calloc(n,Ge);for(let t=0;t0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=a;for(let t=0;t<_;t++)u[t]=dt(this.tree,e),e+=ze}return De._free(a),De._free(s),u}get nextSibling(){return lt(this),De._ts_node_next_sibling_wasm(this.tree[0]),dt(this.tree)}get previousSibling(){return lt(this),De._ts_node_prev_sibling_wasm(this.tree[0]),dt(this.tree)}get nextNamedSibling(){return lt(this),De._ts_node_next_named_sibling_wasm(this.tree[0]),dt(this.tree)}get previousNamedSibling(){return lt(this),De._ts_node_prev_named_sibling_wasm(this.tree[0]),dt(this.tree)}get parent(){return lt(this),De._ts_node_parent_wasm(this.tree[0]),dt(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");lt(this);let r=rt+ze;return k(r,e,"i32"),k(r+He,t,"i32"),De._ts_node_descendant_for_index_wasm(this.tree[0]),dt(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");lt(this);let r=rt+ze;return k(r,e,"i32"),k(r+He,t,"i32"),De._ts_node_named_descendant_for_index_wasm(this.tree[0]),dt(this.tree)}descendantForPosition(e,t=e){if(!it(e)||!it(t))throw new Error("Arguments must be {row, column} objects");lt(this);let r=rt+ze;return ft(r,e),ft(r+Ke,t),De._ts_node_descendant_for_position_wasm(this.tree[0]),dt(this.tree)}namedDescendantForPosition(e,t=e){if(!it(e)||!it(t))throw new Error("Arguments must be {row, column} objects");lt(this);let r=rt+ze;return ft(r,e),ft(r+Ke,t),De._ts_node_named_descendant_for_position_wasm(this.tree[0]),dt(this.tree)}walk(){return lt(this),De._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(Be,this.tree)}toString(){lt(this);const e=De._ts_node_to_string_wasm(this.tree[0]),t=function(e){for(var t="";;){var r=U[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}}(e);return De._free(e),t}}class TreeCursor{constructor(e,t){ut(e),this.tree=t,mt(this)}delete(){ct(this),De._ts_tree_cursor_delete_wasm(this.tree[0])}reset(e){lt(e),ct(this,rt+ze),De._ts_tree_cursor_reset_wasm(this.tree[0]),mt(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return ct(this),De._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return ct(this),De._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return ct(this),1===De._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return ct(this),1===De._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){ct(this);const e=De._ts_tree_cursor_start_index_wasm(this.tree[0]),t=De._ts_tree_cursor_end_index_wasm(this.tree[0]);return _t(this.tree,e,t)}get startPosition(){return ct(this),De._ts_tree_cursor_start_position_wasm(this.tree[0]),pt(rt)}get endPosition(){return ct(this),De._ts_tree_cursor_end_position_wasm(this.tree[0]),pt(rt)}get startIndex(){return ct(this),De._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return ct(this),De._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return ct(this),De._ts_tree_cursor_current_node_wasm(this.tree[0]),dt(this.tree)}currentFieldId(){return ct(this),De._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){ct(this);const e=De._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return mt(this),1===e}gotoNextSibling(){ct(this);const e=De._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return mt(this),1===e}gotoParent(){ct(this);const e=De._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return mt(this),1===e}}class Language{constructor(e,t){ut(e),this[0]=t,this.types=new Array(De._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}(e),r=De._malloc(t+1);(function(e,t,r,n){if(!(n>0))return 0;for(var o=r,s=r+n-1,_=0;_=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++_)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}t[r]=0})(e,U,r,t+1);const n=De._ts_query_new(this[0],r,t,rt,rt+He);if(!n){const t=P(rt+He,"i32"),n=W(r,P(rt,"i32")).length,o=e.substr(n,100),s=o.match(Xe)[0];let _;switch(t){case 2:_=new RangeError(`Bad node name '${s}'`);break;case 3:_=new RangeError(`Bad field name '${s}'`);break;case 4:_=new RangeError(`Bad capture name @${s}`);break;default:_=new SyntaxError(`Bad syntax at offset ${n}: '${o}'...`)}throw _.index=n,_.length=s.length,De._free(r),_}const o=De._ts_query_string_count(n),s=De._ts_query_capture_count(n),_=De._ts_query_pattern_count(n),a=new Array(s),u=new Array(o);for(let e=0;e0){if("string"!==o[0].type)throw new Error("Predicates must begin with a literal value");const t=o[0].value;let r=!0;switch(t){case"not-eq?":r=!1;case"eq?":if(3!==o.length)throw new Error(`Wrong number of arguments to \`eq?\` predicate. Expected 2, got ${o.length-1}`);if("capture"!==o[1].type)throw new Error(`First argument of \`eq?\` predicate must be a capture. Got "${o[1].value}"`);if("capture"===o[2].type){const t=o[1].name,n=o[2].name;c[e].push(function(e){let o,s;for(const r of e)r.name===t&&(o=r.node),r.name===n&&(s=r.node);return o.text===s.text===r})}else{const t=o[1].name,n=o[2].value;c[e].push(function(e){for(const o of e)if(o.name===t)return o.node.text===n===r;return!1})}break;case"match?":if(3!==o.length)throw new Error(`Wrong number of arguments to \`match?\` predicate. Expected 2, got ${o.length-1}.`);if("capture"!==o[1].type)throw new Error(`First argument of \`match?\` predicate must be a capture. Got "${o[1].value}".`);if("string"!==o[2].type)throw new Error(`Second argument of \`match?\` predicate must be a string. Got @${o[2].value}.`);const n=o[1].name,s=new RegExp(o[2].value);c[e].push(function(e){for(const t of e)if(t.name===n)return s.test(t.node.text);return!1});break;case"set!":if(o.length<2||o.length>3)throw new Error(`Wrong number of arguments to \`set!\` predicate. Expected 1 or 2. Got ${o.length-1}.`);if(o.some(e=>"string"!==e.type))throw new Error('Arguments to `set!` predicate must be a strings.".');i[e]||(i[e]={}),i[e][o[1].value]=o[2]?o[2].value:null;break;case"is?":case"is-not?":if(o.length<2||o.length>3)throw new Error(`Wrong number of arguments to \`${t}\` predicate. Expected 1 or 2. Got ${o.length-1}.`);if(o.some(e=>"string"!==e.type))throw new Error(`Arguments to \`${t}\` predicate must be a strings.".`);const _="is?"===t?l:d;_[e]||(_[e]={}),_[e][o[1].value]=o[2]?o[2].value:null;break;default:throw new Error(`Unknown query predicate \`${o[0].value}\``)}o.length=0}}Object.freeze(i[e]),Object.freeze(l[e]),Object.freeze(d[e])}return De._free(r),new Query(Be,n,a,c,Object.freeze(i),Object.freeze(l),Object.freeze(d))}static load(e){let t;if("undefined"!=typeof process&&process.versions&&process.versions.node){const r=require("fs");t=Promise.resolve(r.readFileSync(e))}else t=fetch(e).then(e=>e.arrayBuffer().then(t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}));return t.then(e=>E(e,{loadAsync:!0})).then(e=>{const t=e[Object.keys(e).find(e=>Je.test(e)&&!e.includes("external_scanner_"))]();return new Language(Be,t)})}}class Query{constructor(e,t,r,n,o,s,_){ut(e),this[0]=t,this.captureNames=r,this.predicates=n,this.setProperties=o,this.assertedProperties=s,this.refutedProperties=_}delete(){De._ts_query_delete(this[0])}matches(e,t,r){t||(t=Ve),r||(r=Ve),lt(e),De._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column);const n=P(rt,"i32"),o=P(rt+He,"i32"),s=new Array(n);let _=o;for(let t=0;te(o))){s[t]={pattern:r,captures:o};const e=this.setProperties[r];e&&(s[t].setProperties=e);const n=this.assertedProperties[r];n&&(s[t].assertedProperties=n);const _=this.refutedProperties[r];_&&(s[t].refutedProperties=_)}}return De._free(o),s}captures(e,t,r){t||(t=Ve),r||(r=Ve),lt(e),De._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column);const n=P(rt,"i32"),o=P(rt+He,"i32"),s=[],_=[];let a=o;for(let t=0;te(_))){const e=_[n],r=this.setProperties[t];r&&(e.setProperties=r);const o=this.assertedProperties[t];o&&(e.assertedProperties=o);const a=this.refutedProperties[t];a&&(e.refutedProperties=a),s.push(e)}}return De._free(o),s}}function _t(e,t,r){const n=r-t;let o=e.textCallback(t,null,r);for(t+=o.length;t0))break;t+=n.length,o+=n}return t>r&&(o=o.slice(0,n)),o}function at(e,t,r,n){for(let o=0,s=n.length;o __defProp(target, "name", { value, configurable: true }); + +// src/edit.ts +var Edit = class { + static { + __name(this, "Edit"); + } + /** The start position of the change. */ + startPosition; + /** The end position of the change before the edit. */ + oldEndPosition; + /** The end position of the change after the edit. */ + newEndPosition; + /** The start index of the change. */ + startIndex; + /** The end index of the change before the edit. */ + oldEndIndex; + /** The end index of the change after the edit. */ + newEndIndex; + constructor({ + startIndex, + oldEndIndex, + newEndIndex, + startPosition, + oldEndPosition, + newEndPosition + }) { + this.startIndex = startIndex >>> 0; + this.oldEndIndex = oldEndIndex >>> 0; + this.newEndIndex = newEndIndex >>> 0; + this.startPosition = startPosition; + this.oldEndPosition = oldEndPosition; + this.newEndPosition = newEndPosition; + } + /** + * Edit a point and index to keep it in-sync with source code that has been edited. + * + * This function updates a single point's byte offset and row/column position + * based on an edit operation. This is useful for editing points without + * requiring a tree or node instance. + */ + editPoint(point, index) { + let newIndex = index; + const newPoint = { ...point }; + if (index >= this.oldEndIndex) { + newIndex = this.newEndIndex + (index - this.oldEndIndex); + const originalRow = point.row; + newPoint.row = this.newEndPosition.row + (point.row - this.oldEndPosition.row); + newPoint.column = originalRow === this.oldEndPosition.row ? this.newEndPosition.column + (point.column - this.oldEndPosition.column) : point.column; + } else if (index > this.startIndex) { + newIndex = this.newEndIndex; + newPoint.row = this.newEndPosition.row; + newPoint.column = this.newEndPosition.column; + } + return { point: newPoint, index: newIndex }; + } + /** + * Edit a range to keep it in-sync with source code that has been edited. + * + * This function updates a range's start and end positions based on an edit + * operation. This is useful for editing ranges without requiring a tree + * or node instance. + */ + editRange(range) { + const newRange = { + startIndex: range.startIndex, + startPosition: { ...range.startPosition }, + endIndex: range.endIndex, + endPosition: { ...range.endPosition } + }; + if (range.endIndex >= this.oldEndIndex) { + if (range.endIndex !== Number.MAX_SAFE_INTEGER) { + newRange.endIndex = this.newEndIndex + (range.endIndex - this.oldEndIndex); + newRange.endPosition = { + row: this.newEndPosition.row + (range.endPosition.row - this.oldEndPosition.row), + column: range.endPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.endPosition.column - this.oldEndPosition.column) : range.endPosition.column + }; + if (newRange.endIndex < this.newEndIndex) { + newRange.endIndex = Number.MAX_SAFE_INTEGER; + newRange.endPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER }; + } + } + } else if (range.endIndex > this.startIndex) { + newRange.endIndex = this.startIndex; + newRange.endPosition = { ...this.startPosition }; + } + if (range.startIndex >= this.oldEndIndex) { + newRange.startIndex = this.newEndIndex + (range.startIndex - this.oldEndIndex); + newRange.startPosition = { + row: this.newEndPosition.row + (range.startPosition.row - this.oldEndPosition.row), + column: range.startPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.startPosition.column - this.oldEndPosition.column) : range.startPosition.column + }; + if (newRange.startIndex < this.newEndIndex) { + newRange.startIndex = Number.MAX_SAFE_INTEGER; + newRange.startPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER }; + } + } else if (range.startIndex > this.startIndex) { + newRange.startIndex = this.startIndex; + newRange.startPosition = { ...this.startPosition }; + } + return newRange; + } +}; + +// src/constants.ts +var SIZE_OF_SHORT = 2; +var SIZE_OF_INT = 4; +var SIZE_OF_CURSOR = 4 * SIZE_OF_INT; +var SIZE_OF_NODE = 5 * SIZE_OF_INT; +var SIZE_OF_POINT = 2 * SIZE_OF_INT; +var SIZE_OF_RANGE = 2 * SIZE_OF_INT + 2 * SIZE_OF_POINT; +var ZERO_POINT = { row: 0, column: 0 }; +var INTERNAL = /* @__PURE__ */ Symbol("INTERNAL"); +function assertInternal(x) { + if (x !== INTERNAL) throw new Error("Illegal constructor"); +} +__name(assertInternal, "assertInternal"); +function isPoint(point) { + return !!point && typeof point.row === "number" && typeof point.column === "number"; +} +__name(isPoint, "isPoint"); +function setModule(module2) { + C = module2; +} +__name(setModule, "setModule"); +var C; + +// src/lookahead_iterator.ts +var LookaheadIterator = class { + static { + __name(this, "LookaheadIterator"); + } + /** @internal */ + [0] = 0; + // Internal handle for Wasm + /** @internal */ + language; + /** @internal */ + constructor(internal, address, language) { + assertInternal(internal); + this[0] = address; + this.language = language; + } + /** Get the current symbol of the lookahead iterator. */ + get currentTypeId() { + return C._ts_lookahead_iterator_current_symbol(this[0]); + } + /** Get the current symbol name of the lookahead iterator. */ + get currentType() { + return this.language.types[this.currentTypeId] || "ERROR"; + } + /** Delete the lookahead iterator, freeing its resources. */ + delete() { + C._ts_lookahead_iterator_delete(this[0]); + this[0] = 0; + } + /** + * Reset the lookahead iterator. + * + * This returns `true` if the language was set successfully and `false` + * otherwise. + */ + reset(language, stateId) { + if (C._ts_lookahead_iterator_reset(this[0], language[0], stateId)) { + this.language = language; + return true; + } + return false; + } + /** + * Reset the lookahead iterator to another state. + * + * This returns `true` if the iterator was reset to the given state and + * `false` otherwise. + */ + resetState(stateId) { + return Boolean(C._ts_lookahead_iterator_reset_state(this[0], stateId)); + } + /** + * Returns an iterator that iterates over the symbols of the lookahead iterator. + * + * The iterator will yield the current symbol name as a string for each step + * until there are no more symbols to iterate over. + */ + [Symbol.iterator]() { + return { + next: /* @__PURE__ */ __name(() => { + if (C._ts_lookahead_iterator_next(this[0])) { + return { done: false, value: this.currentType }; + } + return { done: true, value: "" }; + }, "next") + }; + } +}; + +// src/tree.ts +function getText(tree, startIndex, endIndex, startPosition) { + const length = endIndex - startIndex; + let result = tree.textCallback(startIndex, startPosition); + if (result) { + startIndex += result.length; + while (startIndex < endIndex) { + const string = tree.textCallback(startIndex, startPosition); + if (string && string.length > 0) { + startIndex += string.length; + result += string; + } else { + break; + } + } + if (startIndex > endIndex) { + result = result.slice(0, length); + } + } + return result ?? ""; +} +__name(getText, "getText"); +var Tree = class _Tree { + static { + __name(this, "Tree"); + } + /** @internal */ + [0] = 0; + // Internal handle for Wasm + /** @internal */ + textCallback; + /** The language that was used to parse the syntax tree. */ + language; + /** @internal */ + constructor(internal, address, language, textCallback) { + assertInternal(internal); + this[0] = address; + this.language = language; + this.textCallback = textCallback; + } + /** Create a shallow copy of the syntax tree. This is very fast. */ + copy() { + const address = C._ts_tree_copy(this[0]); + return new _Tree(INTERNAL, address, this.language, this.textCallback); + } + /** Delete the syntax tree, freeing its resources. */ + delete() { + C._ts_tree_delete(this[0]); + this[0] = 0; + } + /** Get the root node of the syntax tree. */ + get rootNode() { + C._ts_tree_root_node_wasm(this[0]); + return unmarshalNode(this); + } + /** + * Get the root node of the syntax tree, but with its position shifted + * forward by the given offset. + */ + rootNodeWithOffset(offsetBytes, offsetExtent) { + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + C.setValue(address, offsetBytes, "i32"); + marshalPoint(address + SIZE_OF_INT, offsetExtent); + C._ts_tree_root_node_with_offset_wasm(this[0]); + return unmarshalNode(this); + } + /** + * Edit the syntax tree to keep it in sync with source code that has been + * edited. + * + * You must describe the edit both in terms of byte offsets and in terms of + * row/column coordinates. + */ + edit(edit) { + marshalEdit(edit); + C._ts_tree_edit_wasm(this[0]); + } + /** Create a new {@link TreeCursor} starting from the root of the tree. */ + walk() { + return this.rootNode.walk(); + } + /** + * Compare this old edited syntax tree to a new syntax tree representing + * the same document, returning a sequence of ranges whose syntactic + * structure has changed. + * + * For this to work correctly, this syntax tree must have been edited such + * that its ranges match up to the new tree. Generally, you'll want to + * call this method right after calling one of the [`Parser::parse`] + * functions. Call it on the old tree that was passed to parse, and + * pass the new tree that was returned from `parse`. + */ + getChangedRanges(other) { + if (!(other instanceof _Tree)) { + throw new TypeError("Argument must be a Tree"); + } + C._ts_tree_get_changed_ranges_wasm(this[0], other[0]); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + result[i2] = unmarshalRange(address); + address += SIZE_OF_RANGE; + } + C._free(buffer); + } + return result; + } + /** Get the included ranges that were used to parse the syntax tree. */ + getIncludedRanges() { + C._ts_tree_included_ranges_wasm(this[0]); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + result[i2] = unmarshalRange(address); + address += SIZE_OF_RANGE; + } + C._free(buffer); + } + return result; + } +}; + +// src/tree_cursor.ts +var TreeCursor = class _TreeCursor { + static { + __name(this, "TreeCursor"); + } + /** @internal */ + // @ts-expect-error: never read + [0] = 0; + // Internal handle for Wasm + /** @internal */ + // @ts-expect-error: never read + [1] = 0; + // Internal handle for Wasm + /** @internal */ + // @ts-expect-error: never read + [2] = 0; + // Internal handle for Wasm + /** @internal */ + // @ts-expect-error: never read + [3] = 0; + // Internal handle for Wasm + /** @internal */ + tree; + /** @internal */ + constructor(internal, tree) { + assertInternal(internal); + this.tree = tree; + unmarshalTreeCursor(this); + } + /** Creates a deep copy of the tree cursor. This allocates new memory. */ + copy() { + const copy = new _TreeCursor(INTERNAL, this.tree); + C._ts_tree_cursor_copy_wasm(this.tree[0]); + unmarshalTreeCursor(copy); + return copy; + } + /** Delete the tree cursor, freeing its resources. */ + delete() { + marshalTreeCursor(this); + C._ts_tree_cursor_delete_wasm(this.tree[0]); + this[0] = this[1] = this[2] = 0; + } + /** Get the tree cursor's current {@link Node}. */ + get currentNode() { + marshalTreeCursor(this); + C._ts_tree_cursor_current_node_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** + * Get the numerical field id of this tree cursor's current node. + * + * See also {@link TreeCursor#currentFieldName}. + */ + get currentFieldId() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_field_id_wasm(this.tree[0]); + } + /** Get the field name of this tree cursor's current node. */ + get currentFieldName() { + return this.tree.language.fields[this.currentFieldId]; + } + /** + * Get the depth of the cursor's current node relative to the original + * node that the cursor was constructed with. + */ + get currentDepth() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_depth_wasm(this.tree[0]); + } + /** + * Get the index of the cursor's current node out of all of the + * descendants of the original node that the cursor was constructed with. + */ + get currentDescendantIndex() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0]); + } + /** Get the type of the cursor's current node. */ + get nodeType() { + return this.tree.language.types[this.nodeTypeId] || "ERROR"; + } + /** Get the type id of the cursor's current node. */ + get nodeTypeId() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0]); + } + /** Get the state id of the cursor's current node. */ + get nodeStateId() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0]); + } + /** Get the id of the cursor's current node. */ + get nodeId() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_node_id_wasm(this.tree[0]); + } + /** + * Check if the cursor's current node is *named*. + * + * Named nodes correspond to named rules in the grammar, whereas + * *anonymous* nodes correspond to string literals in the grammar. + */ + get nodeIsNamed() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0]) === 1; + } + /** + * Check if the cursor's current node is *missing*. + * + * Missing nodes are inserted by the parser in order to recover from + * certain kinds of syntax errors. + */ + get nodeIsMissing() { + marshalTreeCursor(this); + return C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0]) === 1; + } + /** Get the string content of the cursor's current node. */ + get nodeText() { + marshalTreeCursor(this); + const startIndex = C._ts_tree_cursor_start_index_wasm(this.tree[0]); + const endIndex = C._ts_tree_cursor_end_index_wasm(this.tree[0]); + C._ts_tree_cursor_start_position_wasm(this.tree[0]); + const startPosition = unmarshalPoint(TRANSFER_BUFFER); + return getText(this.tree, startIndex, endIndex, startPosition); + } + /** Get the start position of the cursor's current node. */ + get startPosition() { + marshalTreeCursor(this); + C._ts_tree_cursor_start_position_wasm(this.tree[0]); + return unmarshalPoint(TRANSFER_BUFFER); + } + /** Get the end position of the cursor's current node. */ + get endPosition() { + marshalTreeCursor(this); + C._ts_tree_cursor_end_position_wasm(this.tree[0]); + return unmarshalPoint(TRANSFER_BUFFER); + } + /** Get the start index of the cursor's current node. */ + get startIndex() { + marshalTreeCursor(this); + return C._ts_tree_cursor_start_index_wasm(this.tree[0]); + } + /** Get the end index of the cursor's current node. */ + get endIndex() { + marshalTreeCursor(this); + return C._ts_tree_cursor_end_index_wasm(this.tree[0]); + } + /** + * Move this cursor to the first child of its current node. + * + * This returns `true` if the cursor successfully moved, and returns + * `false` if there were no children. + */ + gotoFirstChild() { + marshalTreeCursor(this); + const result = C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Move this cursor to the last child of its current node. + * + * This returns `true` if the cursor successfully moved, and returns + * `false` if there were no children. + * + * Note that this function may be slower than + * {@link TreeCursor#gotoFirstChild} because it needs to + * iterate through all the children to compute the child's position. + */ + gotoLastChild() { + marshalTreeCursor(this); + const result = C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Move this cursor to the parent of its current node. + * + * This returns `true` if the cursor successfully moved, and returns + * `false` if there was no parent node (the cursor was already on the + * root node). + * + * Note that the node the cursor was constructed with is considered the root + * of the cursor, and the cursor cannot walk outside this node. + */ + gotoParent() { + marshalTreeCursor(this); + const result = C._ts_tree_cursor_goto_parent_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Move this cursor to the next sibling of its current node. + * + * This returns `true` if the cursor successfully moved, and returns + * `false` if there was no next sibling node. + * + * Note that the node the cursor was constructed with is considered the root + * of the cursor, and the cursor cannot walk outside this node. + */ + gotoNextSibling() { + marshalTreeCursor(this); + const result = C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Move this cursor to the previous sibling of its current node. + * + * This returns `true` if the cursor successfully moved, and returns + * `false` if there was no previous sibling node. + * + * Note that this function may be slower than + * {@link TreeCursor#gotoNextSibling} due to how node + * positions are stored. In the worst case, this will need to iterate + * through all the children up to the previous sibling node to recalculate + * its position. Also note that the node the cursor was constructed with is + * considered the root of the cursor, and the cursor cannot walk outside this node. + */ + gotoPreviousSibling() { + marshalTreeCursor(this); + const result = C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Move the cursor to the node that is the nth descendant of + * the original node that the cursor was constructed with, where + * zero represents the original node itself. + */ + gotoDescendant(goalDescendantIndex) { + marshalTreeCursor(this); + C._ts_tree_cursor_goto_descendant_wasm(this.tree[0], goalDescendantIndex); + unmarshalTreeCursor(this); + } + /** + * Move this cursor to the first child of its current node that contains or + * starts after the given byte offset. + * + * This returns `true` if the cursor successfully moved to a child node, and returns + * `false` if no such child was found. + */ + gotoFirstChildForIndex(goalIndex) { + marshalTreeCursor(this); + C.setValue(TRANSFER_BUFFER + SIZE_OF_CURSOR, goalIndex, "i32"); + const result = C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Move this cursor to the first child of its current node that contains or + * starts after the given byte offset. + * + * This returns the index of the child node if one was found, and returns + * `null` if no such child was found. + */ + gotoFirstChildForPosition(goalPosition) { + marshalTreeCursor(this); + marshalPoint(TRANSFER_BUFFER + SIZE_OF_CURSOR, goalPosition); + const result = C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]); + unmarshalTreeCursor(this); + return result === 1; + } + /** + * Re-initialize this tree cursor to start at the original node that the + * cursor was constructed with. + */ + reset(node) { + marshalNode(node); + marshalTreeCursor(this, TRANSFER_BUFFER + SIZE_OF_NODE); + C._ts_tree_cursor_reset_wasm(this.tree[0]); + unmarshalTreeCursor(this); + } + /** + * Re-initialize a tree cursor to the same position as another cursor. + * + * Unlike {@link TreeCursor#reset}, this will not lose parent + * information and allows reusing already created cursors. + */ + resetTo(cursor) { + marshalTreeCursor(this, TRANSFER_BUFFER); + marshalTreeCursor(cursor, TRANSFER_BUFFER + SIZE_OF_CURSOR); + C._ts_tree_cursor_reset_to_wasm(this.tree[0], cursor.tree[0]); + unmarshalTreeCursor(this); + } +}; + +// src/node.ts +var Node = class { + static { + __name(this, "Node"); + } + /** @internal */ + // @ts-expect-error: never read + [0] = 0; + // Internal handle for Wasm + /** @internal */ + _children; + /** @internal */ + _namedChildren; + /** @internal */ + constructor(internal, { + id, + tree, + startIndex, + startPosition, + other + }) { + assertInternal(internal); + this[0] = other; + this.id = id; + this.tree = tree; + this.startIndex = startIndex; + this.startPosition = startPosition; + } + /** + * The numeric id for this node that is unique. + * + * Within a given syntax tree, no two nodes have the same id. However: + * + * * If a new tree is created based on an older tree, and a node from the old tree is reused in + * the process, then that node will have the same id in both trees. + * + * * A node not marked as having changes does not guarantee it was reused. + * + * * If a node is marked as having changed in the old tree, it will not be reused. + */ + id; + /** The byte index where this node starts. */ + startIndex; + /** The position where this node starts. */ + startPosition; + /** The tree that this node belongs to. */ + tree; + /** Get this node's type as a numerical id. */ + get typeId() { + marshalNode(this); + return C._ts_node_symbol_wasm(this.tree[0]); + } + /** + * Get the node's type as a numerical id as it appears in the grammar, + * ignoring aliases. + */ + get grammarId() { + marshalNode(this); + return C._ts_node_grammar_symbol_wasm(this.tree[0]); + } + /** Get this node's type as a string. */ + get type() { + return this.tree.language.types[this.typeId] || "ERROR"; + } + /** + * Get this node's symbol name as it appears in the grammar, ignoring + * aliases as a string. + */ + get grammarType() { + return this.tree.language.types[this.grammarId] || "ERROR"; + } + /** + * Check if this node is *named*. + * + * Named nodes correspond to named rules in the grammar, whereas + * *anonymous* nodes correspond to string literals in the grammar. + */ + get isNamed() { + marshalNode(this); + return C._ts_node_is_named_wasm(this.tree[0]) === 1; + } + /** + * Check if this node is *extra*. + * + * Extra nodes represent things like comments, which are not required + * by the grammar, but can appear anywhere. + */ + get isExtra() { + marshalNode(this); + return C._ts_node_is_extra_wasm(this.tree[0]) === 1; + } + /** + * Check if this node represents a syntax error. + * + * Syntax errors represent parts of the code that could not be incorporated + * into a valid syntax tree. + */ + get isError() { + marshalNode(this); + return C._ts_node_is_error_wasm(this.tree[0]) === 1; + } + /** + * Check if this node is *missing*. + * + * Missing nodes are inserted by the parser in order to recover from + * certain kinds of syntax errors. + */ + get isMissing() { + marshalNode(this); + return C._ts_node_is_missing_wasm(this.tree[0]) === 1; + } + /** Check if this node has been edited. */ + get hasChanges() { + marshalNode(this); + return C._ts_node_has_changes_wasm(this.tree[0]) === 1; + } + /** + * Check if this node represents a syntax error or contains any syntax + * errors anywhere within it. + */ + get hasError() { + marshalNode(this); + return C._ts_node_has_error_wasm(this.tree[0]) === 1; + } + /** Get the byte index where this node ends. */ + get endIndex() { + marshalNode(this); + return C._ts_node_end_index_wasm(this.tree[0]); + } + /** Get the position where this node ends. */ + get endPosition() { + marshalNode(this); + C._ts_node_end_point_wasm(this.tree[0]); + return unmarshalPoint(TRANSFER_BUFFER); + } + /** Get the string content of this node. */ + get text() { + return getText(this.tree, this.startIndex, this.endIndex, this.startPosition); + } + /** Get this node's parse state. */ + get parseState() { + marshalNode(this); + return C._ts_node_parse_state_wasm(this.tree[0]); + } + /** Get the parse state after this node. */ + get nextParseState() { + marshalNode(this); + return C._ts_node_next_parse_state_wasm(this.tree[0]); + } + /** Check if this node is equal to another node. */ + equals(other) { + return this.tree === other.tree && this.id === other.id; + } + /** + * Get the node's child at the given index, where zero represents the first child. + * + * This method is fairly fast, but its cost is technically log(n), so if + * you might be iterating over a long list of children, you should use + * {@link Node#children} instead. + */ + child(index) { + marshalNode(this); + C._ts_node_child_wasm(this.tree[0], index); + return unmarshalNode(this.tree); + } + /** + * Get this node's *named* child at the given index. + * + * See also {@link Node#isNamed}. + * This method is fairly fast, but its cost is technically log(n), so if + * you might be iterating over a long list of children, you should use + * {@link Node#namedChildren} instead. + */ + namedChild(index) { + marshalNode(this); + C._ts_node_named_child_wasm(this.tree[0], index); + return unmarshalNode(this.tree); + } + /** + * Get this node's child with the given numerical field id. + * + * See also {@link Node#childForFieldName}. You can + * convert a field name to an id using {@link Language#fieldIdForName}. + */ + childForFieldId(fieldId) { + marshalNode(this); + C._ts_node_child_by_field_id_wasm(this.tree[0], fieldId); + return unmarshalNode(this.tree); + } + /** + * Get the first child with the given field name. + * + * If multiple children may have the same field name, access them using + * {@link Node#childrenForFieldName}. + */ + childForFieldName(fieldName) { + const fieldId = this.tree.language.fields.indexOf(fieldName); + if (fieldId !== -1) return this.childForFieldId(fieldId); + return null; + } + /** Get the field name of this node's child at the given index. */ + fieldNameForChild(index) { + marshalNode(this); + const address = C._ts_node_field_name_for_child_wasm(this.tree[0], index); + if (!address) return null; + return C.AsciiToString(address); + } + /** Get the field name of this node's named child at the given index. */ + fieldNameForNamedChild(index) { + marshalNode(this); + const address = C._ts_node_field_name_for_named_child_wasm(this.tree[0], index); + if (!address) return null; + return C.AsciiToString(address); + } + /** + * Get an array of this node's children with a given field name. + * + * See also {@link Node#children}. + */ + childrenForFieldName(fieldName) { + const fieldId = this.tree.language.fields.indexOf(fieldName); + if (fieldId !== -1 && fieldId !== 0) return this.childrenForFieldId(fieldId); + return []; + } + /** + * Get an array of this node's children with a given field id. + * + * See also {@link Node#childrenForFieldName}. + */ + childrenForFieldId(fieldId) { + marshalNode(this); + C._ts_node_children_by_field_id_wasm(this.tree[0], fieldId); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + result[i2] = unmarshalNode(this.tree, address); + address += SIZE_OF_NODE; + } + C._free(buffer); + } + return result; + } + /** Get the node's first child that contains or starts after the given byte offset. */ + firstChildForIndex(index) { + marshalNode(this); + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + C.setValue(address, index, "i32"); + C._ts_node_first_child_for_byte_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get the node's first named child that contains or starts after the given byte offset. */ + firstNamedChildForIndex(index) { + marshalNode(this); + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + C.setValue(address, index, "i32"); + C._ts_node_first_named_child_for_byte_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get this node's number of children. */ + get childCount() { + marshalNode(this); + return C._ts_node_child_count_wasm(this.tree[0]); + } + /** + * Get this node's number of *named* children. + * + * See also {@link Node#isNamed}. + */ + get namedChildCount() { + marshalNode(this); + return C._ts_node_named_child_count_wasm(this.tree[0]); + } + /** Get this node's first child. */ + get firstChild() { + return this.child(0); + } + /** + * Get this node's first named child. + * + * See also {@link Node#isNamed}. + */ + get firstNamedChild() { + return this.namedChild(0); + } + /** Get this node's last child. */ + get lastChild() { + return this.child(this.childCount - 1); + } + /** + * Get this node's last named child. + * + * See also {@link Node#isNamed}. + */ + get lastNamedChild() { + return this.namedChild(this.namedChildCount - 1); + } + /** + * Iterate over this node's children. + * + * If you're walking the tree recursively, you may want to use the + * {@link TreeCursor} APIs directly instead. + */ + get children() { + if (!this._children) { + marshalNode(this); + C._ts_node_children_wasm(this.tree[0]); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + this._children = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + this._children[i2] = unmarshalNode(this.tree, address); + address += SIZE_OF_NODE; + } + C._free(buffer); + } + } + return this._children; + } + /** + * Iterate over this node's named children. + * + * See also {@link Node#children}. + */ + get namedChildren() { + if (!this._namedChildren) { + marshalNode(this); + C._ts_node_named_children_wasm(this.tree[0]); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + this._namedChildren = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + this._namedChildren[i2] = unmarshalNode(this.tree, address); + address += SIZE_OF_NODE; + } + C._free(buffer); + } + } + return this._namedChildren; + } + /** + * Get the descendants of this node that are the given type, or in the given types array. + * + * The types array should contain node type strings, which can be retrieved from {@link Language#types}. + * + * Additionally, a `startPosition` and `endPosition` can be passed in to restrict the search to a byte range. + */ + descendantsOfType(types, startPosition = ZERO_POINT, endPosition = ZERO_POINT) { + if (!Array.isArray(types)) types = [types]; + const symbols = []; + const typesBySymbol = this.tree.language.types; + for (const node_type of types) { + if (node_type == "ERROR") { + symbols.push(65535); + } + } + for (let i2 = 0, n = typesBySymbol.length; i2 < n; i2++) { + if (types.includes(typesBySymbol[i2])) { + symbols.push(i2); + } + } + const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length); + for (let i2 = 0, n = symbols.length; i2 < n; i2++) { + C.setValue(symbolsAddress + i2 * SIZE_OF_INT, symbols[i2], "i32"); + } + marshalNode(this); + C._ts_node_descendants_of_type_wasm( + this.tree[0], + symbolsAddress, + symbols.length, + startPosition.row, + startPosition.column, + endPosition.row, + endPosition.column + ); + const descendantCount = C.getValue(TRANSFER_BUFFER, "i32"); + const descendantAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(descendantCount); + if (descendantCount > 0) { + let address = descendantAddress; + for (let i2 = 0; i2 < descendantCount; i2++) { + result[i2] = unmarshalNode(this.tree, address); + address += SIZE_OF_NODE; + } + } + C._free(descendantAddress); + C._free(symbolsAddress); + return result; + } + /** Get this node's next sibling. */ + get nextSibling() { + marshalNode(this); + C._ts_node_next_sibling_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get this node's previous sibling. */ + get previousSibling() { + marshalNode(this); + C._ts_node_prev_sibling_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** + * Get this node's next *named* sibling. + * + * See also {@link Node#isNamed}. + */ + get nextNamedSibling() { + marshalNode(this); + C._ts_node_next_named_sibling_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** + * Get this node's previous *named* sibling. + * + * See also {@link Node#isNamed}. + */ + get previousNamedSibling() { + marshalNode(this); + C._ts_node_prev_named_sibling_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get the node's number of descendants, including one for the node itself. */ + get descendantCount() { + marshalNode(this); + return C._ts_node_descendant_count_wasm(this.tree[0]); + } + /** + * Get this node's immediate parent. + * Prefer {@link Node#childWithDescendant} for iterating over this node's ancestors. + */ + get parent() { + marshalNode(this); + C._ts_node_parent_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** + * Get the node that contains `descendant`. + * + * Note that this can return `descendant` itself. + */ + childWithDescendant(descendant) { + marshalNode(this); + marshalNode(descendant, 1); + C._ts_node_child_with_descendant_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get the smallest node within this node that spans the given byte range. */ + descendantForIndex(start2, end = start2) { + if (typeof start2 !== "number" || typeof end !== "number") { + throw new Error("Arguments must be numbers"); + } + marshalNode(this); + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + C.setValue(address, start2, "i32"); + C.setValue(address + SIZE_OF_INT, end, "i32"); + C._ts_node_descendant_for_index_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get the smallest named node within this node that spans the given byte range. */ + namedDescendantForIndex(start2, end = start2) { + if (typeof start2 !== "number" || typeof end !== "number") { + throw new Error("Arguments must be numbers"); + } + marshalNode(this); + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + C.setValue(address, start2, "i32"); + C.setValue(address + SIZE_OF_INT, end, "i32"); + C._ts_node_named_descendant_for_index_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get the smallest node within this node that spans the given point range. */ + descendantForPosition(start2, end = start2) { + if (!isPoint(start2) || !isPoint(end)) { + throw new Error("Arguments must be {row, column} objects"); + } + marshalNode(this); + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + marshalPoint(address, start2); + marshalPoint(address + SIZE_OF_POINT, end); + C._ts_node_descendant_for_position_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** Get the smallest named node within this node that spans the given point range. */ + namedDescendantForPosition(start2, end = start2) { + if (!isPoint(start2) || !isPoint(end)) { + throw new Error("Arguments must be {row, column} objects"); + } + marshalNode(this); + const address = TRANSFER_BUFFER + SIZE_OF_NODE; + marshalPoint(address, start2); + marshalPoint(address + SIZE_OF_POINT, end); + C._ts_node_named_descendant_for_position_wasm(this.tree[0]); + return unmarshalNode(this.tree); + } + /** + * Create a new {@link TreeCursor} starting from this node. + * + * Note that the given node is considered the root of the cursor, + * and the cursor cannot walk outside this node. + */ + walk() { + marshalNode(this); + C._ts_tree_cursor_new_wasm(this.tree[0]); + return new TreeCursor(INTERNAL, this.tree); + } + /** + * Edit this node to keep it in-sync with source code that has been edited. + * + * This function is only rarely needed. When you edit a syntax tree with + * the {@link Tree#edit} method, all of the nodes that you retrieve from + * the tree afterward will already reflect the edit. You only need to + * use {@link Node#edit} when you have a specific {@link Node} instance that + * you want to keep and continue to use after an edit. + */ + edit(edit) { + if (this.startIndex >= edit.oldEndIndex) { + this.startIndex = edit.newEndIndex + (this.startIndex - edit.oldEndIndex); + let subbedPointRow; + let subbedPointColumn; + if (this.startPosition.row > edit.oldEndPosition.row) { + subbedPointRow = this.startPosition.row - edit.oldEndPosition.row; + subbedPointColumn = this.startPosition.column; + } else { + subbedPointRow = 0; + subbedPointColumn = this.startPosition.column; + if (this.startPosition.column >= edit.oldEndPosition.column) { + subbedPointColumn = this.startPosition.column - edit.oldEndPosition.column; + } + } + if (subbedPointRow > 0) { + this.startPosition.row += subbedPointRow; + this.startPosition.column = subbedPointColumn; + } else { + this.startPosition.column += subbedPointColumn; + } + } else if (this.startIndex > edit.startIndex) { + this.startIndex = edit.newEndIndex; + this.startPosition.row = edit.newEndPosition.row; + this.startPosition.column = edit.newEndPosition.column; + } + } + /** Get the S-expression representation of this node. */ + toString() { + marshalNode(this); + const address = C._ts_node_to_string_wasm(this.tree[0]); + const result = C.AsciiToString(address); + C._free(address); + return result; + } +}; + +// src/marshal.ts +function unmarshalCaptures(query, tree, address, patternIndex, result) { + for (let i2 = 0, n = result.length; i2 < n; i2++) { + const captureIndex = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const node = unmarshalNode(tree, address); + address += SIZE_OF_NODE; + result[i2] = { patternIndex, name: query.captureNames[captureIndex], node }; + } + return address; +} +__name(unmarshalCaptures, "unmarshalCaptures"); +function marshalNode(node, index = 0) { + let address = TRANSFER_BUFFER + index * SIZE_OF_NODE; + C.setValue(address, node.id, "i32"); + address += SIZE_OF_INT; + C.setValue(address, node.startIndex, "i32"); + address += SIZE_OF_INT; + C.setValue(address, node.startPosition.row, "i32"); + address += SIZE_OF_INT; + C.setValue(address, node.startPosition.column, "i32"); + address += SIZE_OF_INT; + C.setValue(address, node[0], "i32"); +} +__name(marshalNode, "marshalNode"); +function unmarshalNode(tree, address = TRANSFER_BUFFER) { + const id = C.getValue(address, "i32"); + address += SIZE_OF_INT; + if (id === 0) return null; + const index = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const row = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const column = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const other = C.getValue(address, "i32"); + const result = new Node(INTERNAL, { + id, + tree, + startIndex: index, + startPosition: { row, column }, + other + }); + return result; +} +__name(unmarshalNode, "unmarshalNode"); +function marshalTreeCursor(cursor, address = TRANSFER_BUFFER) { + C.setValue(address + 0 * SIZE_OF_INT, cursor[0], "i32"); + C.setValue(address + 1 * SIZE_OF_INT, cursor[1], "i32"); + C.setValue(address + 2 * SIZE_OF_INT, cursor[2], "i32"); + C.setValue(address + 3 * SIZE_OF_INT, cursor[3], "i32"); +} +__name(marshalTreeCursor, "marshalTreeCursor"); +function unmarshalTreeCursor(cursor) { + cursor[0] = C.getValue(TRANSFER_BUFFER + 0 * SIZE_OF_INT, "i32"); + cursor[1] = C.getValue(TRANSFER_BUFFER + 1 * SIZE_OF_INT, "i32"); + cursor[2] = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, "i32"); + cursor[3] = C.getValue(TRANSFER_BUFFER + 3 * SIZE_OF_INT, "i32"); +} +__name(unmarshalTreeCursor, "unmarshalTreeCursor"); +function marshalPoint(address, point) { + C.setValue(address, point.row, "i32"); + C.setValue(address + SIZE_OF_INT, point.column, "i32"); +} +__name(marshalPoint, "marshalPoint"); +function unmarshalPoint(address) { + const result = { + row: C.getValue(address, "i32") >>> 0, + column: C.getValue(address + SIZE_OF_INT, "i32") >>> 0 + }; + return result; +} +__name(unmarshalPoint, "unmarshalPoint"); +function marshalRange(address, range) { + marshalPoint(address, range.startPosition); + address += SIZE_OF_POINT; + marshalPoint(address, range.endPosition); + address += SIZE_OF_POINT; + C.setValue(address, range.startIndex, "i32"); + address += SIZE_OF_INT; + C.setValue(address, range.endIndex, "i32"); + address += SIZE_OF_INT; +} +__name(marshalRange, "marshalRange"); +function unmarshalRange(address) { + const result = {}; + result.startPosition = unmarshalPoint(address); + address += SIZE_OF_POINT; + result.endPosition = unmarshalPoint(address); + address += SIZE_OF_POINT; + result.startIndex = C.getValue(address, "i32") >>> 0; + address += SIZE_OF_INT; + result.endIndex = C.getValue(address, "i32") >>> 0; + return result; +} +__name(unmarshalRange, "unmarshalRange"); +function marshalEdit(edit, address = TRANSFER_BUFFER) { + marshalPoint(address, edit.startPosition); + address += SIZE_OF_POINT; + marshalPoint(address, edit.oldEndPosition); + address += SIZE_OF_POINT; + marshalPoint(address, edit.newEndPosition); + address += SIZE_OF_POINT; + C.setValue(address, edit.startIndex, "i32"); + address += SIZE_OF_INT; + C.setValue(address, edit.oldEndIndex, "i32"); + address += SIZE_OF_INT; + C.setValue(address, edit.newEndIndex, "i32"); + address += SIZE_OF_INT; +} +__name(marshalEdit, "marshalEdit"); +function unmarshalLanguageMetadata(address) { + const major_version = C.getValue(address, "i32"); + const minor_version = C.getValue(address += SIZE_OF_INT, "i32"); + const patch_version = C.getValue(address += SIZE_OF_INT, "i32"); + return { major_version, minor_version, patch_version }; +} +__name(unmarshalLanguageMetadata, "unmarshalLanguageMetadata"); + +// src/language.ts +var LANGUAGE_FUNCTION_REGEX = /^tree_sitter_\w+$/; +var Language = class _Language { + static { + __name(this, "Language"); + } + /** @internal */ + [0] = 0; + // Internal handle for Wasm + /** + * A list of all node types in the language. The index of each type in this + * array is its node type id. + */ + types; + /** + * A list of all field names in the language. The index of each field name in + * this array is its field id. + */ + fields; + /** @internal */ + constructor(internal, address) { + assertInternal(internal); + this[0] = address; + this.types = new Array(C._ts_language_symbol_count(this[0])); + for (let i2 = 0, n = this.types.length; i2 < n; i2++) { + if (C._ts_language_symbol_type(this[0], i2) < 2) { + this.types[i2] = C.UTF8ToString(C._ts_language_symbol_name(this[0], i2)); + } + } + this.fields = new Array(C._ts_language_field_count(this[0]) + 1); + for (let i2 = 0, n = this.fields.length; i2 < n; i2++) { + const fieldName = C._ts_language_field_name_for_id(this[0], i2); + if (fieldName !== 0) { + this.fields[i2] = C.UTF8ToString(fieldName); + } else { + this.fields[i2] = null; + } + } + } + /** + * Gets the name of the language. + */ + get name() { + const ptr = C._ts_language_name(this[0]); + if (ptr === 0) return null; + return C.UTF8ToString(ptr); + } + /** + * Gets the ABI version of the language. + */ + get abiVersion() { + return C._ts_language_abi_version(this[0]); + } + /** + * Get the metadata for this language. This information is generated by the + * CLI, and relies on the language author providing the correct metadata in + * the language's `tree-sitter.json` file. + */ + get metadata() { + C._ts_language_metadata_wasm(this[0]); + const length = C.getValue(TRANSFER_BUFFER, "i32"); + if (length === 0) return null; + return unmarshalLanguageMetadata(TRANSFER_BUFFER + SIZE_OF_INT); + } + /** + * Gets the number of fields in the language. + */ + get fieldCount() { + return this.fields.length - 1; + } + /** + * Gets the number of states in the language. + */ + get stateCount() { + return C._ts_language_state_count(this[0]); + } + /** + * Get the field id for a field name. + */ + fieldIdForName(fieldName) { + const result = this.fields.indexOf(fieldName); + return result !== -1 ? result : null; + } + /** + * Get the field name for a field id. + */ + fieldNameForId(fieldId) { + return this.fields[fieldId] ?? null; + } + /** + * Get the node type id for a node type name. + */ + idForNodeType(type, named) { + const typeLength = C.lengthBytesUTF8(type); + const typeAddress = C._malloc(typeLength + 1); + C.stringToUTF8(type, typeAddress, typeLength + 1); + const result = C._ts_language_symbol_for_name(this[0], typeAddress, typeLength, named ? 1 : 0); + C._free(typeAddress); + return result || null; + } + /** + * Gets the number of node types in the language. + */ + get nodeTypeCount() { + return C._ts_language_symbol_count(this[0]); + } + /** + * Get the node type name for a node type id. + */ + nodeTypeForId(typeId) { + const name2 = C._ts_language_symbol_name(this[0], typeId); + return name2 ? C.UTF8ToString(name2) : null; + } + /** + * Check if a node type is named. + * + * @see {@link https://tree-sitter.github.io/tree-sitter/using-parsers/2-basic-parsing.html#named-vs-anonymous-nodes} + */ + nodeTypeIsNamed(typeId) { + return C._ts_language_type_is_named_wasm(this[0], typeId) ? true : false; + } + /** + * Check if a node type is visible. + */ + nodeTypeIsVisible(typeId) { + return C._ts_language_type_is_visible_wasm(this[0], typeId) ? true : false; + } + /** + * Get the supertypes ids of this language. + * + * @see {@link https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types.html?highlight=supertype#supertype-nodes} + */ + get supertypes() { + C._ts_language_supertypes_wasm(this[0]); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + result[i2] = C.getValue(address, "i16"); + address += SIZE_OF_SHORT; + } + } + return result; + } + /** + * Get the subtype ids for a given supertype node id. + */ + subtypes(supertype) { + C._ts_language_subtypes_wasm(this[0], supertype); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + result[i2] = C.getValue(address, "i16"); + address += SIZE_OF_SHORT; + } + } + return result; + } + /** + * Get the next state id for a given state id and node type id. + */ + nextState(stateId, typeId) { + return C._ts_language_next_state(this[0], stateId, typeId); + } + /** + * Create a new lookahead iterator for this language and parse state. + * + * This returns `null` if state is invalid for this language. + * + * Iterating {@link LookaheadIterator} will yield valid symbols in the given + * parse state. Newly created lookahead iterators will return the `ERROR` + * symbol from {@link LookaheadIterator#currentType}. + * + * Lookahead iterators can be useful for generating suggestions and improving + * syntax error diagnostics. To get symbols valid in an `ERROR` node, use the + * lookahead iterator on its first leaf node state. For `MISSING` nodes, a + * lookahead iterator created on the previous non-extra leaf node may be + * appropriate. + */ + lookaheadIterator(stateId) { + const address = C._ts_lookahead_iterator_new(this[0], stateId); + if (address) return new LookaheadIterator(INTERNAL, address, this); + return null; + } + /** + * Load a language from a WebAssembly module. + * The module can be provided as a path to a file or as a buffer. + */ + static async load(input) { + let binary2; + if (input instanceof Uint8Array) { + binary2 = input; + } else if (globalThis.process?.versions.node) { + const fs2 = await import("fs/promises"); + binary2 = await fs2.readFile(input); + } else { + const response = await fetch(input); + if (!response.ok) { + const body2 = await response.text(); + throw new Error(`Language.load failed with status ${response.status}. + +${body2}`); + } + const retryResp = response.clone(); + try { + binary2 = await WebAssembly.compileStreaming(response); + } catch (reason) { + console.error("wasm streaming compile failed:", reason); + console.error("falling back to ArrayBuffer instantiation"); + binary2 = new Uint8Array(await retryResp.arrayBuffer()); + } + } + const mod = await C.loadWebAssemblyModule(binary2, { loadAsync: true }); + const symbolNames = Object.keys(mod); + const functionName = symbolNames.find((key) => LANGUAGE_FUNCTION_REGEX.test(key) && !key.includes("external_scanner_")); + if (!functionName) { + console.log(`Couldn't find language function in Wasm file. Symbols: +${JSON.stringify(symbolNames, null, 2)}`); + throw new Error("Language.load failed: no language function found in Wasm file"); + } + const languageAddress = mod[functionName](); + return new _Language(INTERNAL, languageAddress); + } +}; + +// lib/web-tree-sitter.mjs +async function Module2(moduleArg = {}) { + var moduleRtn; + var Module = moduleArg; + // var ENVIRONMENT_IS_WEB = typeof window == "object"; + // var ENVIRONMENT_IS_WORKER = typeof WorkerGlobalScope != "undefined"; + // var ENVIRONMENT_IS_NODE = typeof process == "object" && process.versions?.node && process.type != "renderer"; + var ENVIRONMENT_IS_WEB = false; + var ENVIRONMENT_IS_WORKER = true; + var ENVIRONMENT_IS_NODE = false; + // if (ENVIRONMENT_IS_NODE) { + // const { createRequire } = await import("module"); + // var require = createRequire(import.meta.url); + // } + Module.currentQueryProgressCallback = null; + Module.currentProgressCallback = null; + Module.currentLogCallback = null; + Module.currentParseCallback = null; + var arguments_ = []; + var thisProgram = "./this.program"; + var quit_ = /* @__PURE__ */ __name((status, toThrow) => { + throw toThrow; + }, "quit_"); + var _scriptName = self.location.origin + self.location.pathname; + var scriptDirectory = ""; + function locateFile(path) { + if (Module["locateFile"]) { + return Module["locateFile"](path, scriptDirectory); + } + return scriptDirectory + path; + } + __name(locateFile, "locateFile"); + var readAsync, readBinary; + if (ENVIRONMENT_IS_NODE) { + var fs = require("fs"); + if (_scriptName.startsWith("file:")) { + scriptDirectory = require("path").dirname(require("url").fileURLToPath(_scriptName)) + "/"; + } + readBinary = /* @__PURE__ */ __name((filename) => { + filename = isFileURI(filename) ? new URL(filename) : filename; + var ret = fs.readFileSync(filename); + return ret; + }, "readBinary"); + readAsync = /* @__PURE__ */ __name(async (filename, binary2 = true) => { + filename = isFileURI(filename) ? new URL(filename) : filename; + var ret = fs.readFileSync(filename, binary2 ? void 0 : "utf8"); + return ret; + }, "readAsync"); + if (process.argv.length > 1) { + thisProgram = process.argv[1].replace(/\\/g, "/"); + } + arguments_ = process.argv.slice(2); + quit_ = /* @__PURE__ */ __name((status, toThrow) => { + process.exitCode = status; + throw toThrow; + }, "quit_"); + } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + try { + scriptDirectory = new URL(".", _scriptName).href; + } catch { + } + { + if (ENVIRONMENT_IS_WORKER) { + readBinary = /* @__PURE__ */ __name((url) => { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.responseType = "arraybuffer"; + xhr.send(null); + return new Uint8Array( + /** @type{!ArrayBuffer} */ + xhr.response + ); + }, "readBinary"); + } + readAsync = /* @__PURE__ */ __name(async (url) => { + if (isFileURI(url)) { + return new Promise((resolve, reject) => { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + xhr.responseType = "arraybuffer"; + xhr.onload = () => { + if (xhr.status == 200 || xhr.status == 0 && xhr.response) { + resolve(xhr.response); + return; + } + reject(xhr.status); + }; + xhr.onerror = reject; + xhr.send(null); + }); + } + var response = await fetch(url, { + credentials: "same-origin" + }); + if (response.ok) { + return response.arrayBuffer(); + } + throw new Error(response.status + " : " + response.url); + }, "readAsync"); + } + } else { + } + var out = console.log.bind(console); + var err = console.error.bind(console); + var dynamicLibraries = []; + var wasmBinary; + var ABORT = false; + var EXITSTATUS; + var isFileURI = /* @__PURE__ */ __name((filename) => filename.startsWith("file://"), "isFileURI"); + var readyPromiseResolve, readyPromiseReject; + var wasmMemory; + var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; + var HEAP64, HEAPU64; + var HEAP_DATA_VIEW; + var runtimeInitialized = false; + function updateMemoryViews() { + var b = wasmMemory.buffer; + Module["HEAP8"] = HEAP8 = new Int8Array(b); + Module["HEAP16"] = HEAP16 = new Int16Array(b); + Module["HEAPU8"] = HEAPU8 = new Uint8Array(b); + Module["HEAPU16"] = HEAPU16 = new Uint16Array(b); + Module["HEAP32"] = HEAP32 = new Int32Array(b); + Module["HEAPU32"] = HEAPU32 = new Uint32Array(b); + Module["HEAPF32"] = HEAPF32 = new Float32Array(b); + Module["HEAPF64"] = HEAPF64 = new Float64Array(b); + Module["HEAP64"] = HEAP64 = new BigInt64Array(b); + Module["HEAPU64"] = HEAPU64 = new BigUint64Array(b); + Module["HEAP_DATA_VIEW"] = HEAP_DATA_VIEW = new DataView(b); + LE_HEAP_UPDATE(); + } + __name(updateMemoryViews, "updateMemoryViews"); + function initMemory() { + if (Module["wasmMemory"]) { + wasmMemory = Module["wasmMemory"]; + } else { + var INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 33554432; + wasmMemory = new WebAssembly.Memory({ + "initial": INITIAL_MEMORY / 65536, + // In theory we should not need to emit the maximum if we want "unlimited" + // or 4GB of memory, but VMs error on that atm, see + // https://github.com/emscripten-core/emscripten/issues/14130 + // And in the pthreads case we definitely need to emit a maximum. So + // always emit one. + "maximum": 32768 + }); + } + updateMemoryViews(); + } + __name(initMemory, "initMemory"); + var __RELOC_FUNCS__ = []; + function preRun() { + if (Module["preRun"]) { + if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; + while (Module["preRun"].length) { + addOnPreRun(Module["preRun"].shift()); + } + } + callRuntimeCallbacks(onPreRuns); + } + __name(preRun, "preRun"); + function initRuntime() { + runtimeInitialized = true; + callRuntimeCallbacks(__RELOC_FUNCS__); + wasmExports["__wasm_call_ctors"](); + callRuntimeCallbacks(onPostCtors); + } + __name(initRuntime, "initRuntime"); + function preMain() { + } + __name(preMain, "preMain"); + function postRun() { + if (Module["postRun"]) { + if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; + while (Module["postRun"].length) { + addOnPostRun(Module["postRun"].shift()); + } + } + callRuntimeCallbacks(onPostRuns); + } + __name(postRun, "postRun"); + function abort(what) { + Module["onAbort"]?.(what); + what = "Aborted(" + what + ")"; + err(what); + ABORT = true; + what += ". Build with -sASSERTIONS for more info."; + var e = new WebAssembly.RuntimeError(what); + readyPromiseReject?.(e); + throw e; + } + __name(abort, "abort"); + var wasmBinaryFile; + function findWasmBinary() { + if (Module["locateFile"]) { + return locateFile("web-tree-sitter.wasm"); + } + return new URL("web-tree-sitter.wasm", self.location.origin + self.location.pathname).href; + } + __name(findWasmBinary, "findWasmBinary"); + function getBinarySync(file) { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary); + } + if (readBinary) { + return readBinary(file); + } + throw "both async and sync fetching of the wasm failed"; + } + __name(getBinarySync, "getBinarySync"); + async function getWasmBinary(binaryFile) { + if (!wasmBinary) { + try { + var response = await readAsync(binaryFile); + return new Uint8Array(response); + } catch { + } + } + return getBinarySync(binaryFile); + } + __name(getWasmBinary, "getWasmBinary"); + async function instantiateArrayBuffer(binaryFile, imports) { + try { + var binary2 = await getWasmBinary(binaryFile); + var instance2 = await WebAssembly.instantiate(binary2, imports); + return instance2; + } catch (reason) { + err(`failed to asynchronously prepare wasm: ${reason}`); + abort(reason); + } + } + __name(instantiateArrayBuffer, "instantiateArrayBuffer"); + async function instantiateAsync(binary2, binaryFile, imports) { + if (!binary2 && !isFileURI(binaryFile) && !ENVIRONMENT_IS_NODE) { + try { + var response = fetch(binaryFile, { + credentials: "same-origin" + }); + var instantiationResult = await WebAssembly.instantiateStreaming(response, imports); + return instantiationResult; + } catch (reason) { + err(`wasm streaming compile failed: ${reason}`); + err("falling back to ArrayBuffer instantiation"); + } + } + return instantiateArrayBuffer(binaryFile, imports); + } + __name(instantiateAsync, "instantiateAsync"); + function getWasmImports() { + return { + "env": wasmImports, + "wasi_snapshot_preview1": wasmImports, + "GOT.mem": new Proxy(wasmImports, GOTHandler), + "GOT.func": new Proxy(wasmImports, GOTHandler) + }; + } + __name(getWasmImports, "getWasmImports"); + async function createWasm() { + function receiveInstance(instance2, module2) { + wasmExports = instance2.exports; + wasmExports = relocateExports(wasmExports, 1024); + var metadata2 = getDylinkMetadata(module2); + if (metadata2.neededDynlibs) { + dynamicLibraries = metadata2.neededDynlibs.concat(dynamicLibraries); + } + mergeLibSymbols(wasmExports, "main"); + LDSO.init(); + loadDylibs(); + __RELOC_FUNCS__.push(wasmExports["__wasm_apply_data_relocs"]); + assignWasmExports(wasmExports); + return wasmExports; + } + __name(receiveInstance, "receiveInstance"); + function receiveInstantiationResult(result2) { + return receiveInstance(result2["instance"], result2["module"]); + } + __name(receiveInstantiationResult, "receiveInstantiationResult"); + var info2 = getWasmImports(); + if (Module["instantiateWasm"]) { + return new Promise((resolve, reject) => { + Module["instantiateWasm"](info2, (mod, inst) => { + resolve(receiveInstance(mod, inst)); + }); + }); + } + wasmBinaryFile ??= findWasmBinary(); + var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info2); + var exports = receiveInstantiationResult(result); + return exports; + } + __name(createWasm, "createWasm"); + class ExitStatus { + static { + __name(this, "ExitStatus"); + } + name = "ExitStatus"; + constructor(status) { + this.message = `Program terminated with exit(${status})`; + this.status = status; + } + } + var GOT = {}; + var currentModuleWeakSymbols = /* @__PURE__ */ new Set([]); + var GOTHandler = { + get(obj, symName) { + var rtn = GOT[symName]; + if (!rtn) { + rtn = GOT[symName] = new WebAssembly.Global({ + "value": "i32", + "mutable": true + }); + } + if (!currentModuleWeakSymbols.has(symName)) { + rtn.required = true; + } + return rtn; + } + }; + var LE_ATOMICS_NATIVE_BYTE_ORDER = []; + var LE_HEAP_LOAD_F32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getFloat32(byteOffset, true), "LE_HEAP_LOAD_F32"); + var LE_HEAP_LOAD_F64 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getFloat64(byteOffset, true), "LE_HEAP_LOAD_F64"); + var LE_HEAP_LOAD_I16 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getInt16(byteOffset, true), "LE_HEAP_LOAD_I16"); + var LE_HEAP_LOAD_I32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getInt32(byteOffset, true), "LE_HEAP_LOAD_I32"); + var LE_HEAP_LOAD_I64 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getBigInt64(byteOffset, true), "LE_HEAP_LOAD_I64"); + var LE_HEAP_LOAD_U32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getUint32(byteOffset, true), "LE_HEAP_LOAD_U32"); + var LE_HEAP_STORE_F32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setFloat32(byteOffset, value, true), "LE_HEAP_STORE_F32"); + var LE_HEAP_STORE_F64 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setFloat64(byteOffset, value, true), "LE_HEAP_STORE_F64"); + var LE_HEAP_STORE_I16 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setInt16(byteOffset, value, true), "LE_HEAP_STORE_I16"); + var LE_HEAP_STORE_I32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setInt32(byteOffset, value, true), "LE_HEAP_STORE_I32"); + var LE_HEAP_STORE_I64 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setBigInt64(byteOffset, value, true), "LE_HEAP_STORE_I64"); + var LE_HEAP_STORE_U32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setUint32(byteOffset, value, true), "LE_HEAP_STORE_U32"); + var callRuntimeCallbacks = /* @__PURE__ */ __name((callbacks) => { + while (callbacks.length > 0) { + callbacks.shift()(Module); + } + }, "callRuntimeCallbacks"); + var onPostRuns = []; + var addOnPostRun = /* @__PURE__ */ __name((cb) => onPostRuns.push(cb), "addOnPostRun"); + var onPreRuns = []; + var addOnPreRun = /* @__PURE__ */ __name((cb) => onPreRuns.push(cb), "addOnPreRun"); + var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder() : void 0; + var findStringEnd = /* @__PURE__ */ __name((heapOrArray, idx, maxBytesToRead, ignoreNul) => { + var maxIdx = idx + maxBytesToRead; + if (ignoreNul) return maxIdx; + while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx; + return idx; + }, "findStringEnd"); + var UTF8ArrayToString = /* @__PURE__ */ __name((heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => { + var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul); + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); + } + } + return str; + }, "UTF8ArrayToString"); + var getDylinkMetadata = /* @__PURE__ */ __name((binary2) => { + var offset = 0; + var end = 0; + function getU8() { + return binary2[offset++]; + } + __name(getU8, "getU8"); + function getLEB() { + var ret = 0; + var mul = 1; + while (1) { + var byte = binary2[offset++]; + ret += (byte & 127) * mul; + mul *= 128; + if (!(byte & 128)) break; + } + return ret; + } + __name(getLEB, "getLEB"); + function getString() { + var len = getLEB(); + offset += len; + return UTF8ArrayToString(binary2, offset - len, len); + } + __name(getString, "getString"); + function getStringList() { + var count2 = getLEB(); + var rtn = []; + while (count2--) rtn.push(getString()); + return rtn; + } + __name(getStringList, "getStringList"); + function failIf(condition, message) { + if (condition) throw new Error(message); + } + __name(failIf, "failIf"); + if (binary2 instanceof WebAssembly.Module) { + var dylinkSection = WebAssembly.Module.customSections(binary2, "dylink.0"); + failIf(dylinkSection.length === 0, "need dylink section"); + binary2 = new Uint8Array(dylinkSection[0]); + end = binary2.length; + } else { + var int32View = new Uint32Array(new Uint8Array(binary2.subarray(0, 24)).buffer); + var magicNumberFound = int32View[0] == 1836278016 || int32View[0] == 6386541; + failIf(!magicNumberFound, "need to see wasm magic number"); + failIf(binary2[8] !== 0, "need the dylink section to be first"); + offset = 9; + var section_size = getLEB(); + end = offset + section_size; + var name2 = getString(); + failIf(name2 !== "dylink.0"); + } + var customSection = { + neededDynlibs: [], + tlsExports: /* @__PURE__ */ new Set(), + weakImports: /* @__PURE__ */ new Set(), + runtimePaths: [] + }; + var WASM_DYLINK_MEM_INFO = 1; + var WASM_DYLINK_NEEDED = 2; + var WASM_DYLINK_EXPORT_INFO = 3; + var WASM_DYLINK_IMPORT_INFO = 4; + var WASM_DYLINK_RUNTIME_PATH = 5; + var WASM_SYMBOL_TLS = 256; + var WASM_SYMBOL_BINDING_MASK = 3; + var WASM_SYMBOL_BINDING_WEAK = 1; + while (offset < end) { + var subsectionType = getU8(); + var subsectionSize = getLEB(); + if (subsectionType === WASM_DYLINK_MEM_INFO) { + customSection.memorySize = getLEB(); + customSection.memoryAlign = getLEB(); + customSection.tableSize = getLEB(); + customSection.tableAlign = getLEB(); + } else if (subsectionType === WASM_DYLINK_NEEDED) { + customSection.neededDynlibs = getStringList(); + } else if (subsectionType === WASM_DYLINK_EXPORT_INFO) { + var count = getLEB(); + while (count--) { + var symname = getString(); + var flags2 = getLEB(); + if (flags2 & WASM_SYMBOL_TLS) { + customSection.tlsExports.add(symname); + } + } + } else if (subsectionType === WASM_DYLINK_IMPORT_INFO) { + var count = getLEB(); + while (count--) { + var modname = getString(); + var symname = getString(); + var flags2 = getLEB(); + if ((flags2 & WASM_SYMBOL_BINDING_MASK) == WASM_SYMBOL_BINDING_WEAK) { + customSection.weakImports.add(symname); + } + } + } else if (subsectionType === WASM_DYLINK_RUNTIME_PATH) { + customSection.runtimePaths = getStringList(); + } else { + offset += subsectionSize; + } + } + return customSection; + }, "getDylinkMetadata"); + function getValue(ptr, type = "i8") { + if (type.endsWith("*")) type = "*"; + switch (type) { + case "i1": + return HEAP8[ptr]; + case "i8": + return HEAP8[ptr]; + case "i16": + return LE_HEAP_LOAD_I16((ptr >> 1) * 2); + case "i32": + return LE_HEAP_LOAD_I32((ptr >> 2) * 4); + case "i64": + return LE_HEAP_LOAD_I64((ptr >> 3) * 8); + case "float": + return LE_HEAP_LOAD_F32((ptr >> 2) * 4); + case "double": + return LE_HEAP_LOAD_F64((ptr >> 3) * 8); + case "*": + return LE_HEAP_LOAD_U32((ptr >> 2) * 4); + default: + abort(`invalid type for getValue: ${type}`); + } + } + __name(getValue, "getValue"); + var newDSO = /* @__PURE__ */ __name((name2, handle2, syms) => { + var dso = { + refcount: Infinity, + name: name2, + exports: syms, + global: true + }; + LDSO.loadedLibsByName[name2] = dso; + if (handle2 != void 0) { + LDSO.loadedLibsByHandle[handle2] = dso; + } + return dso; + }, "newDSO"); + var LDSO = { + loadedLibsByName: {}, + loadedLibsByHandle: {}, + init() { + newDSO("__main__", 0, wasmImports); + } + }; + var ___heap_base = 78240; + var alignMemory = /* @__PURE__ */ __name((size, alignment) => Math.ceil(size / alignment) * alignment, "alignMemory"); + var getMemory = /* @__PURE__ */ __name((size) => { + if (runtimeInitialized) { + return _calloc(size, 1); + } + var ret = ___heap_base; + var end = ret + alignMemory(size, 16); + ___heap_base = end; + GOT["__heap_base"].value = end; + return ret; + }, "getMemory"); + var isInternalSym = /* @__PURE__ */ __name((symName) => ["__cpp_exception", "__c_longjmp", "__wasm_apply_data_relocs", "__dso_handle", "__tls_size", "__tls_align", "__set_stack_limits", "_emscripten_tls_init", "__wasm_init_tls", "__wasm_call_ctors", "__start_em_asm", "__stop_em_asm", "__start_em_js", "__stop_em_js"].includes(symName) || symName.startsWith("__em_js__"), "isInternalSym"); + var uleb128EncodeWithLen = /* @__PURE__ */ __name((arr) => { + const n = arr.length; + return [n % 128 | 128, n >> 7, ...arr]; + }, "uleb128EncodeWithLen"); + var wasmTypeCodes = { + "i": 127, + // i32 + "p": 127, + // i32 + "j": 126, + // i64 + "f": 125, + // f32 + "d": 124, + // f64 + "e": 111 + }; + var generateTypePack = /* @__PURE__ */ __name((types) => uleb128EncodeWithLen(Array.from(types, (type) => { + var code = wasmTypeCodes[type]; + return code; + })), "generateTypePack"); + var convertJsFunctionToWasm = /* @__PURE__ */ __name((func2, sig) => { + var bytes = Uint8Array.of( + 0, + 97, + 115, + 109, + // magic ("\0asm") + 1, + 0, + 0, + 0, + // version: 1 + 1, + ...uleb128EncodeWithLen([ + 1, + // count: 1 + 96, + // param types + ...generateTypePack(sig.slice(1)), + // return types (for now only supporting [] if `void` and single [T] otherwise) + ...generateTypePack(sig[0] === "v" ? "" : sig[0]) + ]), + // The rest of the module is static + 2, + 7, + // import section + // (import "e" "f" (func 0 (type 0))) + 1, + 1, + 101, + 1, + 102, + 0, + 0, + 7, + 5, + // export section + // (export "f" (func 0 (type 0))) + 1, + 1, + 102, + 0, + 0 + ); + var module2 = new WebAssembly.Module(bytes); + var instance2 = new WebAssembly.Instance(module2, { + "e": { + "f": func2 + } + }); + var wrappedFunc = instance2.exports["f"]; + return wrappedFunc; + }, "convertJsFunctionToWasm"); + var wasmTableMirror = []; + var wasmTable = new WebAssembly.Table({ + "initial": 31, + "element": "anyfunc" + }); + var getWasmTableEntry = /* @__PURE__ */ __name((funcPtr) => { + var func2 = wasmTableMirror[funcPtr]; + if (!func2) { + wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr); + } + return func2; + }, "getWasmTableEntry"); + var updateTableMap = /* @__PURE__ */ __name((offset, count) => { + if (functionsInTableMap) { + for (var i2 = offset; i2 < offset + count; i2++) { + var item = getWasmTableEntry(i2); + if (item) { + functionsInTableMap.set(item, i2); + } + } + } + }, "updateTableMap"); + var functionsInTableMap; + var getFunctionAddress = /* @__PURE__ */ __name((func2) => { + if (!functionsInTableMap) { + functionsInTableMap = /* @__PURE__ */ new WeakMap(); + updateTableMap(0, wasmTable.length); + } + return functionsInTableMap.get(func2) || 0; + }, "getFunctionAddress"); + var freeTableIndexes = []; + var getEmptyTableSlot = /* @__PURE__ */ __name(() => { + if (freeTableIndexes.length) { + return freeTableIndexes.pop(); + } + return wasmTable["grow"](1); + }, "getEmptyTableSlot"); + var setWasmTableEntry = /* @__PURE__ */ __name((idx, func2) => { + wasmTable.set(idx, func2); + wasmTableMirror[idx] = wasmTable.get(idx); + }, "setWasmTableEntry"); + var addFunction = /* @__PURE__ */ __name((func2, sig) => { + var rtn = getFunctionAddress(func2); + if (rtn) { + return rtn; + } + var ret = getEmptyTableSlot(); + try { + setWasmTableEntry(ret, func2); + } catch (err2) { + if (!(err2 instanceof TypeError)) { + throw err2; + } + var wrapped = convertJsFunctionToWasm(func2, sig); + setWasmTableEntry(ret, wrapped); + } + functionsInTableMap.set(func2, ret); + return ret; + }, "addFunction"); + var updateGOT = /* @__PURE__ */ __name((exports, replace) => { + for (var symName in exports) { + if (isInternalSym(symName)) { + continue; + } + var value = exports[symName]; + GOT[symName] ||= new WebAssembly.Global({ + "value": "i32", + "mutable": true + }); + if (replace || GOT[symName].value == 0) { + if (typeof value == "function") { + GOT[symName].value = addFunction(value); + } else if (typeof value == "number") { + GOT[symName].value = value; + } else { + err(`unhandled export type for '${symName}': ${typeof value}`); + } + } + } + }, "updateGOT"); + var relocateExports = /* @__PURE__ */ __name((exports, memoryBase2, replace) => { + var relocated = {}; + for (var e in exports) { + var value = exports[e]; + if (typeof value == "object") { + value = value.value; + } + if (typeof value == "number") { + value += memoryBase2; + } + relocated[e] = value; + } + updateGOT(relocated, replace); + return relocated; + }, "relocateExports"); + var isSymbolDefined = /* @__PURE__ */ __name((symName) => { + var existing = wasmImports[symName]; + if (!existing || existing.stub) { + return false; + } + return true; + }, "isSymbolDefined"); + var dynCall = /* @__PURE__ */ __name((sig, ptr, args2 = [], promising = false) => { + var func2 = getWasmTableEntry(ptr); + var rtn = func2(...args2); + function convert(rtn2) { + return rtn2; + } + __name(convert, "convert"); + return convert(rtn); + }, "dynCall"); + var stackSave = /* @__PURE__ */ __name(() => _emscripten_stack_get_current(), "stackSave"); + var stackRestore = /* @__PURE__ */ __name((val) => __emscripten_stack_restore(val), "stackRestore"); + var createInvokeFunction = /* @__PURE__ */ __name((sig) => (ptr, ...args2) => { + var sp = stackSave(); + try { + return dynCall(sig, ptr, args2); + } catch (e) { + stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew(1, 0); + if (sig[0] == "j") return 0n; + } + }, "createInvokeFunction"); + var resolveGlobalSymbol = /* @__PURE__ */ __name((symName, direct = false) => { + var sym; + if (isSymbolDefined(symName)) { + sym = wasmImports[symName]; + } else if (symName.startsWith("invoke_")) { + sym = wasmImports[symName] = createInvokeFunction(symName.split("_")[1]); + } + return { + sym, + name: symName + }; + }, "resolveGlobalSymbol"); + var onPostCtors = []; + var addOnPostCtor = /* @__PURE__ */ __name((cb) => onPostCtors.push(cb), "addOnPostCtor"); + var UTF8ToString = /* @__PURE__ */ __name((ptr, maxBytesToRead, ignoreNul) => ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : "", "UTF8ToString"); + var loadWebAssemblyModule = /* @__PURE__ */ __name((binary, flags, libName, localScope, handle) => { + var metadata = getDylinkMetadata(binary); + function loadModule() { + var memAlign = Math.pow(2, metadata.memoryAlign); + var memoryBase = metadata.memorySize ? alignMemory(getMemory(metadata.memorySize + memAlign), memAlign) : 0; + var tableBase = metadata.tableSize ? wasmTable.length : 0; + if (handle) { + HEAP8[handle + 8] = 1; + LE_HEAP_STORE_U32((handle + 12 >> 2) * 4, memoryBase); + LE_HEAP_STORE_I32((handle + 16 >> 2) * 4, metadata.memorySize); + LE_HEAP_STORE_U32((handle + 20 >> 2) * 4, tableBase); + LE_HEAP_STORE_I32((handle + 24 >> 2) * 4, metadata.tableSize); + } + if (metadata.tableSize) { + wasmTable.grow(metadata.tableSize); + } + var moduleExports; + function resolveSymbol(sym) { + var resolved = resolveGlobalSymbol(sym).sym; + if (!resolved && localScope) { + resolved = localScope[sym]; + } + if (!resolved) { + resolved = moduleExports[sym]; + } + return resolved; + } + __name(resolveSymbol, "resolveSymbol"); + var proxyHandler = { + get(stubs, prop) { + switch (prop) { + case "__memory_base": + return memoryBase; + case "__table_base": + return tableBase; + } + if (prop in wasmImports && !wasmImports[prop].stub) { + var res = wasmImports[prop]; + return res; + } + if (!(prop in stubs)) { + var resolved; + stubs[prop] = (...args2) => { + resolved ||= resolveSymbol(prop); + return resolved(...args2); + }; + } + return stubs[prop]; + } + }; + var proxy = new Proxy({}, proxyHandler); + currentModuleWeakSymbols = metadata.weakImports; + var info = { + "GOT.mem": new Proxy({}, GOTHandler), + "GOT.func": new Proxy({}, GOTHandler), + "env": proxy, + "wasi_snapshot_preview1": proxy + }; + function postInstantiation(module, instance) { + updateTableMap(tableBase, metadata.tableSize); + moduleExports = relocateExports(instance.exports, memoryBase); + if (!flags.allowUndefined) { + reportUndefinedSymbols(); + } + function addEmAsm(addr, body) { + var args = []; + var arity = 0; + for (; arity < 16; arity++) { + if (body.indexOf("$" + arity) != -1) { + args.push("$" + arity); + } else { + break; + } + } + args = args.join(","); + var func = `(${args}) => { ${body} };`; + ASM_CONSTS[start] = eval(func); + } + __name(addEmAsm, "addEmAsm"); + if ("__start_em_asm" in moduleExports) { + var start = moduleExports["__start_em_asm"]; + var stop = moduleExports["__stop_em_asm"]; + while (start < stop) { + var jsString = UTF8ToString(start); + addEmAsm(start, jsString); + start = HEAPU8.indexOf(0, start) + 1; + } + } + function addEmJs(name, cSig, body) { + var jsArgs = []; + cSig = cSig.slice(1, -1); + if (cSig != "void") { + cSig = cSig.split(","); + for (var i in cSig) { + var jsArg = cSig[i].split(" ").pop(); + jsArgs.push(jsArg.replace("*", "")); + } + } + var func = `(${jsArgs}) => ${body};`; + moduleExports[name] = eval(func); + } + __name(addEmJs, "addEmJs"); + for (var name in moduleExports) { + if (name.startsWith("__em_js__")) { + var start = moduleExports[name]; + var jsString = UTF8ToString(start); + var parts = jsString.split("<::>"); + addEmJs(name.replace("__em_js__", ""), parts[0], parts[1]); + delete moduleExports[name]; + } + } + var applyRelocs = moduleExports["__wasm_apply_data_relocs"]; + if (applyRelocs) { + if (runtimeInitialized) { + applyRelocs(); + } else { + __RELOC_FUNCS__.push(applyRelocs); + } + } + var init = moduleExports["__wasm_call_ctors"]; + if (init) { + if (runtimeInitialized) { + init(); + } else { + addOnPostCtor(init); + } + } + return moduleExports; + } + __name(postInstantiation, "postInstantiation"); + if (flags.loadAsync) { + return (async () => { + var instance2; + if (binary instanceof WebAssembly.Module) { + instance2 = new WebAssembly.Instance(binary, info); + } else { + ({ module: binary, instance: instance2 } = await WebAssembly.instantiate(binary, info)); + } + return postInstantiation(binary, instance2); + })(); + } + var module = binary instanceof WebAssembly.Module ? binary : new WebAssembly.Module(binary); + var instance = new WebAssembly.Instance(module, info); + return postInstantiation(module, instance); + } + __name(loadModule, "loadModule"); + flags = { + ...flags, + rpath: { + parentLibPath: libName, + paths: metadata.runtimePaths + } + }; + if (flags.loadAsync) { + return metadata.neededDynlibs.reduce((chain, dynNeeded) => chain.then(() => loadDynamicLibrary(dynNeeded, flags, localScope)), Promise.resolve()).then(loadModule); + } + metadata.neededDynlibs.forEach((needed) => loadDynamicLibrary(needed, flags, localScope)); + return loadModule(); + }, "loadWebAssemblyModule"); + var mergeLibSymbols = /* @__PURE__ */ __name((exports, libName2) => { + for (var [sym, exp] of Object.entries(exports)) { + const setImport = /* @__PURE__ */ __name((target) => { + if (!isSymbolDefined(target)) { + wasmImports[target] = exp; + } + }, "setImport"); + setImport(sym); + const main_alias = "__main_argc_argv"; + if (sym == "main") { + setImport(main_alias); + } + if (sym == main_alias) { + setImport("main"); + } + } + }, "mergeLibSymbols"); + var asyncLoad = /* @__PURE__ */ __name(async (url) => { + var arrayBuffer = await readAsync(url); + return new Uint8Array(arrayBuffer); + }, "asyncLoad"); + function loadDynamicLibrary(libName2, flags2 = { + global: true, + nodelete: true + }, localScope2, handle2) { + var dso = LDSO.loadedLibsByName[libName2]; + if (dso) { + if (!flags2.global) { + if (localScope2) { + Object.assign(localScope2, dso.exports); + } + } else if (!dso.global) { + dso.global = true; + mergeLibSymbols(dso.exports, libName2); + } + if (flags2.nodelete && dso.refcount !== Infinity) { + dso.refcount = Infinity; + } + dso.refcount++; + if (handle2) { + LDSO.loadedLibsByHandle[handle2] = dso; + } + return flags2.loadAsync ? Promise.resolve(true) : true; + } + dso = newDSO(libName2, handle2, "loading"); + dso.refcount = flags2.nodelete ? Infinity : 1; + dso.global = flags2.global; + function loadLibData() { + if (handle2) { + var data = LE_HEAP_LOAD_U32((handle2 + 28 >> 2) * 4); + var dataSize = LE_HEAP_LOAD_U32((handle2 + 32 >> 2) * 4); + if (data && dataSize) { + var libData = HEAP8.slice(data, data + dataSize); + return flags2.loadAsync ? Promise.resolve(libData) : libData; + } + } + var libFile = locateFile(libName2); + if (flags2.loadAsync) { + return asyncLoad(libFile); + } + if (!readBinary) { + throw new Error(`${libFile}: file not found, and synchronous loading of external files is not available`); + } + return readBinary(libFile); + } + __name(loadLibData, "loadLibData"); + function getExports() { + if (flags2.loadAsync) { + return loadLibData().then((libData) => loadWebAssemblyModule(libData, flags2, libName2, localScope2, handle2)); + } + return loadWebAssemblyModule(loadLibData(), flags2, libName2, localScope2, handle2); + } + __name(getExports, "getExports"); + function moduleLoaded(exports) { + if (dso.global) { + mergeLibSymbols(exports, libName2); + } else if (localScope2) { + Object.assign(localScope2, exports); + } + dso.exports = exports; + } + __name(moduleLoaded, "moduleLoaded"); + if (flags2.loadAsync) { + return getExports().then((exports) => { + moduleLoaded(exports); + return true; + }); + } + moduleLoaded(getExports()); + return true; + } + __name(loadDynamicLibrary, "loadDynamicLibrary"); + var reportUndefinedSymbols = /* @__PURE__ */ __name(() => { + for (var [symName, entry] of Object.entries(GOT)) { + if (entry.value == 0) { + var value = resolveGlobalSymbol(symName, true).sym; + if (!value && !entry.required) { + continue; + } + if (typeof value == "function") { + entry.value = addFunction(value, value.sig); + } else if (typeof value == "number") { + entry.value = value; + } else { + throw new Error(`bad export type for '${symName}': ${typeof value}`); + } + } + } + }, "reportUndefinedSymbols"); + var runDependencies = 0; + var dependenciesFulfilled = null; + var removeRunDependency = /* @__PURE__ */ __name((id) => { + runDependencies--; + Module["monitorRunDependencies"]?.(runDependencies); + if (runDependencies == 0) { + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); + } + } + }, "removeRunDependency"); + var addRunDependency = /* @__PURE__ */ __name((id) => { + runDependencies++; + Module["monitorRunDependencies"]?.(runDependencies); + }, "addRunDependency"); + var loadDylibs = /* @__PURE__ */ __name(async () => { + if (!dynamicLibraries.length) { + reportUndefinedSymbols(); + return; + } + addRunDependency("loadDylibs"); + for (var lib of dynamicLibraries) { + await loadDynamicLibrary(lib, { + loadAsync: true, + global: true, + nodelete: true, + allowUndefined: true + }); + } + reportUndefinedSymbols(); + removeRunDependency("loadDylibs"); + }, "loadDylibs"); + var noExitRuntime = true; + function setValue(ptr, value, type = "i8") { + if (type.endsWith("*")) type = "*"; + switch (type) { + case "i1": + HEAP8[ptr] = value; + break; + case "i8": + HEAP8[ptr] = value; + break; + case "i16": + LE_HEAP_STORE_I16((ptr >> 1) * 2, value); + break; + case "i32": + LE_HEAP_STORE_I32((ptr >> 2) * 4, value); + break; + case "i64": + LE_HEAP_STORE_I64((ptr >> 3) * 8, BigInt(value)); + break; + case "float": + LE_HEAP_STORE_F32((ptr >> 2) * 4, value); + break; + case "double": + LE_HEAP_STORE_F64((ptr >> 3) * 8, value); + break; + case "*": + LE_HEAP_STORE_U32((ptr >> 2) * 4, value); + break; + default: + abort(`invalid type for setValue: ${type}`); + } + } + __name(setValue, "setValue"); + var ___memory_base = new WebAssembly.Global({ + "value": "i32", + "mutable": false + }, 1024); + var ___stack_high = 78240; + var ___stack_low = 12704; + var ___stack_pointer = new WebAssembly.Global({ + "value": "i32", + "mutable": true + }, 78240); + var ___table_base = new WebAssembly.Global({ + "value": "i32", + "mutable": false + }, 1); + var __abort_js = /* @__PURE__ */ __name(() => abort(""), "__abort_js"); + __abort_js.sig = "v"; + var getHeapMax = /* @__PURE__ */ __name(() => ( + // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate + // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side + // for any code that deals with heap sizes, which would require special + // casing all heap size related code to treat 0 specially. + 2147483648 + ), "getHeapMax"); + var growMemory = /* @__PURE__ */ __name((size) => { + var oldHeapSize = wasmMemory.buffer.byteLength; + var pages = (size - oldHeapSize + 65535) / 65536 | 0; + try { + wasmMemory.grow(pages); + updateMemoryViews(); + return 1; + } catch (e) { + } + }, "growMemory"); + var _emscripten_resize_heap = /* @__PURE__ */ __name((requestedSize) => { + var oldSize = HEAPU8.length; + requestedSize >>>= 0; + var maxHeapSize = getHeapMax(); + if (requestedSize > maxHeapSize) { + return false; + } + for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { + var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); + var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536)); + var replacement = growMemory(newSize); + if (replacement) { + return true; + } + } + return false; + }, "_emscripten_resize_heap"); + _emscripten_resize_heap.sig = "ip"; + var _fd_close = /* @__PURE__ */ __name((fd) => 52, "_fd_close"); + _fd_close.sig = "ii"; + var INT53_MAX = 9007199254740992; + var INT53_MIN = -9007199254740992; + var bigintToI53Checked = /* @__PURE__ */ __name((num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num), "bigintToI53Checked"); + function _fd_seek(fd, offset, whence, newOffset) { + offset = bigintToI53Checked(offset); + return 70; + } + __name(_fd_seek, "_fd_seek"); + _fd_seek.sig = "iijip"; + var printCharBuffers = [null, [], []]; + var printChar = /* @__PURE__ */ __name((stream, curr) => { + var buffer = printCharBuffers[stream]; + if (curr === 0 || curr === 10) { + (stream === 1 ? out : err)(UTF8ArrayToString(buffer)); + buffer.length = 0; + } else { + buffer.push(curr); + } + }, "printChar"); + var _fd_write = /* @__PURE__ */ __name((fd, iov, iovcnt, pnum) => { + var num = 0; + for (var i2 = 0; i2 < iovcnt; i2++) { + var ptr = LE_HEAP_LOAD_U32((iov >> 2) * 4); + var len = LE_HEAP_LOAD_U32((iov + 4 >> 2) * 4); + iov += 8; + for (var j = 0; j < len; j++) { + printChar(fd, HEAPU8[ptr + j]); + } + num += len; + } + LE_HEAP_STORE_U32((pnum >> 2) * 4, num); + return 0; + }, "_fd_write"); + _fd_write.sig = "iippp"; + function _tree_sitter_log_callback(isLexMessage, messageAddress) { + if (Module.currentLogCallback) { + const message = UTF8ToString(messageAddress); + Module.currentLogCallback(message, isLexMessage !== 0); + } + } + __name(_tree_sitter_log_callback, "_tree_sitter_log_callback"); + function _tree_sitter_parse_callback(inputBufferAddress, index, row, column, lengthAddress) { + const INPUT_BUFFER_SIZE = 10 * 1024; + const string = Module.currentParseCallback(index, { + row, + column + }); + if (typeof string === "string") { + setValue(lengthAddress, string.length, "i32"); + stringToUTF16(string, inputBufferAddress, INPUT_BUFFER_SIZE); + } else { + setValue(lengthAddress, 0, "i32"); + } + } + __name(_tree_sitter_parse_callback, "_tree_sitter_parse_callback"); + function _tree_sitter_progress_callback(currentOffset, hasError) { + if (Module.currentProgressCallback) { + return Module.currentProgressCallback({ + currentOffset, + hasError + }); + } + return false; + } + __name(_tree_sitter_progress_callback, "_tree_sitter_progress_callback"); + function _tree_sitter_query_progress_callback(currentOffset) { + if (Module.currentQueryProgressCallback) { + return Module.currentQueryProgressCallback({ + currentOffset + }); + } + return false; + } + __name(_tree_sitter_query_progress_callback, "_tree_sitter_query_progress_callback"); + var runtimeKeepaliveCounter = 0; + var keepRuntimeAlive = /* @__PURE__ */ __name(() => noExitRuntime || runtimeKeepaliveCounter > 0, "keepRuntimeAlive"); + var _proc_exit = /* @__PURE__ */ __name((code) => { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + Module["onExit"]?.(code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); + }, "_proc_exit"); + _proc_exit.sig = "vi"; + var exitJS = /* @__PURE__ */ __name((status, implicit) => { + EXITSTATUS = status; + _proc_exit(status); + }, "exitJS"); + var handleException = /* @__PURE__ */ __name((e) => { + if (e instanceof ExitStatus || e == "unwind") { + return EXITSTATUS; + } + quit_(1, e); + }, "handleException"); + var lengthBytesUTF8 = /* @__PURE__ */ __name((str) => { + var len = 0; + for (var i2 = 0; i2 < str.length; ++i2) { + var c = str.charCodeAt(i2); + if (c <= 127) { + len++; + } else if (c <= 2047) { + len += 2; + } else if (c >= 55296 && c <= 57343) { + len += 4; + ++i2; + } else { + len += 3; + } + } + return len; + }, "lengthBytesUTF8"); + var stringToUTF8Array = /* @__PURE__ */ __name((str, heap, outIdx, maxBytesToWrite) => { + if (!(maxBytesToWrite > 0)) return 0; + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; + for (var i2 = 0; i2 < str.length; ++i2) { + var u = str.codePointAt(i2); + if (u <= 127) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 2047) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 192 | u >> 6; + heap[outIdx++] = 128 | u & 63; + } else if (u <= 65535) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 224 | u >> 12; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63; + } else { + if (outIdx + 3 >= endIdx) break; + heap[outIdx++] = 240 | u >> 18; + heap[outIdx++] = 128 | u >> 12 & 63; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63; + i2++; + } + } + heap[outIdx] = 0; + return outIdx - startIdx; + }, "stringToUTF8Array"); + var stringToUTF8 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite), "stringToUTF8"); + var stackAlloc = /* @__PURE__ */ __name((sz) => __emscripten_stack_alloc(sz), "stackAlloc"); + var stringToUTF8OnStack = /* @__PURE__ */ __name((str) => { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8(str, ret, size); + return ret; + }, "stringToUTF8OnStack"); + var AsciiToString = /* @__PURE__ */ __name((ptr) => { + var str = ""; + while (1) { + var ch = HEAPU8[ptr++]; + if (!ch) return str; + str += String.fromCharCode(ch); + } + }, "AsciiToString"); + var stringToUTF16 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => { + maxBytesToWrite ??= 2147483647; + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; + var startPtr = outPtr; + var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length; + for (var i2 = 0; i2 < numCharsToWrite; ++i2) { + var codeUnit = str.charCodeAt(i2); + LE_HEAP_STORE_I16((outPtr >> 1) * 2, codeUnit); + outPtr += 2; + } + LE_HEAP_STORE_I16((outPtr >> 1) * 2, 0); + return outPtr - startPtr; + }, "stringToUTF16"); + LE_ATOMICS_NATIVE_BYTE_ORDER = new Int8Array(new Int16Array([1]).buffer)[0] === 1 ? [ + /* little endian */ + ((x) => x), + ((x) => x), + void 0, + ((x) => x) + ] : [ + /* big endian */ + ((x) => x), + ((x) => ((x & 65280) << 8 | (x & 255) << 24) >> 16), + void 0, + ((x) => x >> 24 & 255 | x >> 8 & 65280 | (x & 65280) << 8 | (x & 255) << 24) + ]; + function LE_HEAP_UPDATE() { + HEAPU16.unsigned = ((x) => x & 65535); + HEAPU32.unsigned = ((x) => x >>> 0); + } + __name(LE_HEAP_UPDATE, "LE_HEAP_UPDATE"); + { + initMemory(); + if (Module["noExitRuntime"]) noExitRuntime = Module["noExitRuntime"]; + if (Module["print"]) out = Module["print"]; + if (Module["printErr"]) err = Module["printErr"]; + if (Module["dynamicLibraries"]) dynamicLibraries = Module["dynamicLibraries"]; + if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; + if (Module["arguments"]) arguments_ = Module["arguments"]; + if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; + if (Module["preInit"]) { + if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; + while (Module["preInit"].length > 0) { + Module["preInit"].shift()(); + } + } + } + Module["setValue"] = setValue; + Module["getValue"] = getValue; + Module["UTF8ToString"] = UTF8ToString; + Module["stringToUTF8"] = stringToUTF8; + Module["lengthBytesUTF8"] = lengthBytesUTF8; + Module["AsciiToString"] = AsciiToString; + Module["stringToUTF16"] = stringToUTF16; + Module["loadWebAssemblyModule"] = loadWebAssemblyModule; + Module["LE_HEAP_STORE_I64"] = LE_HEAP_STORE_I64; + var ASM_CONSTS = {}; + var _malloc, _calloc, _realloc, _free, _ts_range_edit, _memcmp, _ts_language_symbol_count, _ts_language_state_count, _ts_language_abi_version, _ts_language_name, _ts_language_field_count, _ts_language_next_state, _ts_language_symbol_name, _ts_language_symbol_for_name, _strncmp, _ts_language_symbol_type, _ts_language_field_name_for_id, _ts_lookahead_iterator_new, _ts_lookahead_iterator_delete, _ts_lookahead_iterator_reset_state, _ts_lookahead_iterator_reset, _ts_lookahead_iterator_next, _ts_lookahead_iterator_current_symbol, _ts_point_edit, _ts_parser_delete, _ts_parser_reset, _ts_parser_set_language, _ts_parser_set_included_ranges, _ts_query_new, _ts_query_delete, _iswspace, _iswalnum, _ts_query_pattern_count, _ts_query_capture_count, _ts_query_string_count, _ts_query_capture_name_for_id, _ts_query_capture_quantifier_for_id, _ts_query_string_value_for_id, _ts_query_predicates_for_pattern, _ts_query_start_byte_for_pattern, _ts_query_end_byte_for_pattern, _ts_query_is_pattern_rooted, _ts_query_is_pattern_non_local, _ts_query_is_pattern_guaranteed_at_step, _ts_query_disable_capture, _ts_query_disable_pattern, _ts_tree_copy, _ts_tree_delete, _ts_init, _ts_parser_new_wasm, _ts_parser_enable_logger_wasm, _ts_parser_parse_wasm, _ts_parser_included_ranges_wasm, _ts_language_type_is_named_wasm, _ts_language_type_is_visible_wasm, _ts_language_metadata_wasm, _ts_language_supertypes_wasm, _ts_language_subtypes_wasm, _ts_tree_root_node_wasm, _ts_tree_root_node_with_offset_wasm, _ts_tree_edit_wasm, _ts_tree_included_ranges_wasm, _ts_tree_get_changed_ranges_wasm, _ts_tree_cursor_new_wasm, _ts_tree_cursor_copy_wasm, _ts_tree_cursor_delete_wasm, _ts_tree_cursor_reset_wasm, _ts_tree_cursor_reset_to_wasm, _ts_tree_cursor_goto_first_child_wasm, _ts_tree_cursor_goto_last_child_wasm, _ts_tree_cursor_goto_first_child_for_index_wasm, _ts_tree_cursor_goto_first_child_for_position_wasm, _ts_tree_cursor_goto_next_sibling_wasm, _ts_tree_cursor_goto_previous_sibling_wasm, _ts_tree_cursor_goto_descendant_wasm, _ts_tree_cursor_goto_parent_wasm, _ts_tree_cursor_current_node_type_id_wasm, _ts_tree_cursor_current_node_state_id_wasm, _ts_tree_cursor_current_node_is_named_wasm, _ts_tree_cursor_current_node_is_missing_wasm, _ts_tree_cursor_current_node_id_wasm, _ts_tree_cursor_start_position_wasm, _ts_tree_cursor_end_position_wasm, _ts_tree_cursor_start_index_wasm, _ts_tree_cursor_end_index_wasm, _ts_tree_cursor_current_field_id_wasm, _ts_tree_cursor_current_depth_wasm, _ts_tree_cursor_current_descendant_index_wasm, _ts_tree_cursor_current_node_wasm, _ts_node_symbol_wasm, _ts_node_field_name_for_child_wasm, _ts_node_field_name_for_named_child_wasm, _ts_node_children_by_field_id_wasm, _ts_node_first_child_for_byte_wasm, _ts_node_first_named_child_for_byte_wasm, _ts_node_grammar_symbol_wasm, _ts_node_child_count_wasm, _ts_node_named_child_count_wasm, _ts_node_child_wasm, _ts_node_named_child_wasm, _ts_node_child_by_field_id_wasm, _ts_node_next_sibling_wasm, _ts_node_prev_sibling_wasm, _ts_node_next_named_sibling_wasm, _ts_node_prev_named_sibling_wasm, _ts_node_descendant_count_wasm, _ts_node_parent_wasm, _ts_node_child_with_descendant_wasm, _ts_node_descendant_for_index_wasm, _ts_node_named_descendant_for_index_wasm, _ts_node_descendant_for_position_wasm, _ts_node_named_descendant_for_position_wasm, _ts_node_start_point_wasm, _ts_node_end_point_wasm, _ts_node_start_index_wasm, _ts_node_end_index_wasm, _ts_node_to_string_wasm, _ts_node_children_wasm, _ts_node_named_children_wasm, _ts_node_descendants_of_type_wasm, _ts_node_is_named_wasm, _ts_node_has_changes_wasm, _ts_node_has_error_wasm, _ts_node_is_error_wasm, _ts_node_is_missing_wasm, _ts_node_is_extra_wasm, _ts_node_parse_state_wasm, _ts_node_next_parse_state_wasm, _ts_query_matches_wasm, _ts_query_captures_wasm, _memset, _memcpy, _memmove, _iswalpha, _iswblank, _iswdigit, _iswlower, _iswupper, _iswxdigit, _memchr, _strlen, _strcmp, _strncat, _strncpy, _towlower, _towupper, _setThrew, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, ___wasm_apply_data_relocs; + function assignWasmExports(wasmExports2) { + Module["_malloc"] = _malloc = wasmExports2["malloc"]; + Module["_calloc"] = _calloc = wasmExports2["calloc"]; + Module["_realloc"] = _realloc = wasmExports2["realloc"]; + Module["_free"] = _free = wasmExports2["free"]; + Module["_ts_range_edit"] = _ts_range_edit = wasmExports2["ts_range_edit"]; + Module["_memcmp"] = _memcmp = wasmExports2["memcmp"]; + Module["_ts_language_symbol_count"] = _ts_language_symbol_count = wasmExports2["ts_language_symbol_count"]; + Module["_ts_language_state_count"] = _ts_language_state_count = wasmExports2["ts_language_state_count"]; + Module["_ts_language_abi_version"] = _ts_language_abi_version = wasmExports2["ts_language_abi_version"]; + Module["_ts_language_name"] = _ts_language_name = wasmExports2["ts_language_name"]; + Module["_ts_language_field_count"] = _ts_language_field_count = wasmExports2["ts_language_field_count"]; + Module["_ts_language_next_state"] = _ts_language_next_state = wasmExports2["ts_language_next_state"]; + Module["_ts_language_symbol_name"] = _ts_language_symbol_name = wasmExports2["ts_language_symbol_name"]; + Module["_ts_language_symbol_for_name"] = _ts_language_symbol_for_name = wasmExports2["ts_language_symbol_for_name"]; + Module["_strncmp"] = _strncmp = wasmExports2["strncmp"]; + Module["_ts_language_symbol_type"] = _ts_language_symbol_type = wasmExports2["ts_language_symbol_type"]; + Module["_ts_language_field_name_for_id"] = _ts_language_field_name_for_id = wasmExports2["ts_language_field_name_for_id"]; + Module["_ts_lookahead_iterator_new"] = _ts_lookahead_iterator_new = wasmExports2["ts_lookahead_iterator_new"]; + Module["_ts_lookahead_iterator_delete"] = _ts_lookahead_iterator_delete = wasmExports2["ts_lookahead_iterator_delete"]; + Module["_ts_lookahead_iterator_reset_state"] = _ts_lookahead_iterator_reset_state = wasmExports2["ts_lookahead_iterator_reset_state"]; + Module["_ts_lookahead_iterator_reset"] = _ts_lookahead_iterator_reset = wasmExports2["ts_lookahead_iterator_reset"]; + Module["_ts_lookahead_iterator_next"] = _ts_lookahead_iterator_next = wasmExports2["ts_lookahead_iterator_next"]; + Module["_ts_lookahead_iterator_current_symbol"] = _ts_lookahead_iterator_current_symbol = wasmExports2["ts_lookahead_iterator_current_symbol"]; + Module["_ts_point_edit"] = _ts_point_edit = wasmExports2["ts_point_edit"]; + Module["_ts_parser_delete"] = _ts_parser_delete = wasmExports2["ts_parser_delete"]; + Module["_ts_parser_reset"] = _ts_parser_reset = wasmExports2["ts_parser_reset"]; + Module["_ts_parser_set_language"] = _ts_parser_set_language = wasmExports2["ts_parser_set_language"]; + Module["_ts_parser_set_included_ranges"] = _ts_parser_set_included_ranges = wasmExports2["ts_parser_set_included_ranges"]; + Module["_ts_query_new"] = _ts_query_new = wasmExports2["ts_query_new"]; + Module["_ts_query_delete"] = _ts_query_delete = wasmExports2["ts_query_delete"]; + Module["_iswspace"] = _iswspace = wasmExports2["iswspace"]; + Module["_iswalnum"] = _iswalnum = wasmExports2["iswalnum"]; + Module["_ts_query_pattern_count"] = _ts_query_pattern_count = wasmExports2["ts_query_pattern_count"]; + Module["_ts_query_capture_count"] = _ts_query_capture_count = wasmExports2["ts_query_capture_count"]; + Module["_ts_query_string_count"] = _ts_query_string_count = wasmExports2["ts_query_string_count"]; + Module["_ts_query_capture_name_for_id"] = _ts_query_capture_name_for_id = wasmExports2["ts_query_capture_name_for_id"]; + Module["_ts_query_capture_quantifier_for_id"] = _ts_query_capture_quantifier_for_id = wasmExports2["ts_query_capture_quantifier_for_id"]; + Module["_ts_query_string_value_for_id"] = _ts_query_string_value_for_id = wasmExports2["ts_query_string_value_for_id"]; + Module["_ts_query_predicates_for_pattern"] = _ts_query_predicates_for_pattern = wasmExports2["ts_query_predicates_for_pattern"]; + Module["_ts_query_start_byte_for_pattern"] = _ts_query_start_byte_for_pattern = wasmExports2["ts_query_start_byte_for_pattern"]; + Module["_ts_query_end_byte_for_pattern"] = _ts_query_end_byte_for_pattern = wasmExports2["ts_query_end_byte_for_pattern"]; + Module["_ts_query_is_pattern_rooted"] = _ts_query_is_pattern_rooted = wasmExports2["ts_query_is_pattern_rooted"]; + Module["_ts_query_is_pattern_non_local"] = _ts_query_is_pattern_non_local = wasmExports2["ts_query_is_pattern_non_local"]; + Module["_ts_query_is_pattern_guaranteed_at_step"] = _ts_query_is_pattern_guaranteed_at_step = wasmExports2["ts_query_is_pattern_guaranteed_at_step"]; + Module["_ts_query_disable_capture"] = _ts_query_disable_capture = wasmExports2["ts_query_disable_capture"]; + Module["_ts_query_disable_pattern"] = _ts_query_disable_pattern = wasmExports2["ts_query_disable_pattern"]; + Module["_ts_tree_copy"] = _ts_tree_copy = wasmExports2["ts_tree_copy"]; + Module["_ts_tree_delete"] = _ts_tree_delete = wasmExports2["ts_tree_delete"]; + Module["_ts_init"] = _ts_init = wasmExports2["ts_init"]; + Module["_ts_parser_new_wasm"] = _ts_parser_new_wasm = wasmExports2["ts_parser_new_wasm"]; + Module["_ts_parser_enable_logger_wasm"] = _ts_parser_enable_logger_wasm = wasmExports2["ts_parser_enable_logger_wasm"]; + Module["_ts_parser_parse_wasm"] = _ts_parser_parse_wasm = wasmExports2["ts_parser_parse_wasm"]; + Module["_ts_parser_included_ranges_wasm"] = _ts_parser_included_ranges_wasm = wasmExports2["ts_parser_included_ranges_wasm"]; + Module["_ts_language_type_is_named_wasm"] = _ts_language_type_is_named_wasm = wasmExports2["ts_language_type_is_named_wasm"]; + Module["_ts_language_type_is_visible_wasm"] = _ts_language_type_is_visible_wasm = wasmExports2["ts_language_type_is_visible_wasm"]; + Module["_ts_language_metadata_wasm"] = _ts_language_metadata_wasm = wasmExports2["ts_language_metadata_wasm"]; + Module["_ts_language_supertypes_wasm"] = _ts_language_supertypes_wasm = wasmExports2["ts_language_supertypes_wasm"]; + Module["_ts_language_subtypes_wasm"] = _ts_language_subtypes_wasm = wasmExports2["ts_language_subtypes_wasm"]; + Module["_ts_tree_root_node_wasm"] = _ts_tree_root_node_wasm = wasmExports2["ts_tree_root_node_wasm"]; + Module["_ts_tree_root_node_with_offset_wasm"] = _ts_tree_root_node_with_offset_wasm = wasmExports2["ts_tree_root_node_with_offset_wasm"]; + Module["_ts_tree_edit_wasm"] = _ts_tree_edit_wasm = wasmExports2["ts_tree_edit_wasm"]; + Module["_ts_tree_included_ranges_wasm"] = _ts_tree_included_ranges_wasm = wasmExports2["ts_tree_included_ranges_wasm"]; + Module["_ts_tree_get_changed_ranges_wasm"] = _ts_tree_get_changed_ranges_wasm = wasmExports2["ts_tree_get_changed_ranges_wasm"]; + Module["_ts_tree_cursor_new_wasm"] = _ts_tree_cursor_new_wasm = wasmExports2["ts_tree_cursor_new_wasm"]; + Module["_ts_tree_cursor_copy_wasm"] = _ts_tree_cursor_copy_wasm = wasmExports2["ts_tree_cursor_copy_wasm"]; + Module["_ts_tree_cursor_delete_wasm"] = _ts_tree_cursor_delete_wasm = wasmExports2["ts_tree_cursor_delete_wasm"]; + Module["_ts_tree_cursor_reset_wasm"] = _ts_tree_cursor_reset_wasm = wasmExports2["ts_tree_cursor_reset_wasm"]; + Module["_ts_tree_cursor_reset_to_wasm"] = _ts_tree_cursor_reset_to_wasm = wasmExports2["ts_tree_cursor_reset_to_wasm"]; + Module["_ts_tree_cursor_goto_first_child_wasm"] = _ts_tree_cursor_goto_first_child_wasm = wasmExports2["ts_tree_cursor_goto_first_child_wasm"]; + Module["_ts_tree_cursor_goto_last_child_wasm"] = _ts_tree_cursor_goto_last_child_wasm = wasmExports2["ts_tree_cursor_goto_last_child_wasm"]; + Module["_ts_tree_cursor_goto_first_child_for_index_wasm"] = _ts_tree_cursor_goto_first_child_for_index_wasm = wasmExports2["ts_tree_cursor_goto_first_child_for_index_wasm"]; + Module["_ts_tree_cursor_goto_first_child_for_position_wasm"] = _ts_tree_cursor_goto_first_child_for_position_wasm = wasmExports2["ts_tree_cursor_goto_first_child_for_position_wasm"]; + Module["_ts_tree_cursor_goto_next_sibling_wasm"] = _ts_tree_cursor_goto_next_sibling_wasm = wasmExports2["ts_tree_cursor_goto_next_sibling_wasm"]; + Module["_ts_tree_cursor_goto_previous_sibling_wasm"] = _ts_tree_cursor_goto_previous_sibling_wasm = wasmExports2["ts_tree_cursor_goto_previous_sibling_wasm"]; + Module["_ts_tree_cursor_goto_descendant_wasm"] = _ts_tree_cursor_goto_descendant_wasm = wasmExports2["ts_tree_cursor_goto_descendant_wasm"]; + Module["_ts_tree_cursor_goto_parent_wasm"] = _ts_tree_cursor_goto_parent_wasm = wasmExports2["ts_tree_cursor_goto_parent_wasm"]; + Module["_ts_tree_cursor_current_node_type_id_wasm"] = _ts_tree_cursor_current_node_type_id_wasm = wasmExports2["ts_tree_cursor_current_node_type_id_wasm"]; + Module["_ts_tree_cursor_current_node_state_id_wasm"] = _ts_tree_cursor_current_node_state_id_wasm = wasmExports2["ts_tree_cursor_current_node_state_id_wasm"]; + Module["_ts_tree_cursor_current_node_is_named_wasm"] = _ts_tree_cursor_current_node_is_named_wasm = wasmExports2["ts_tree_cursor_current_node_is_named_wasm"]; + Module["_ts_tree_cursor_current_node_is_missing_wasm"] = _ts_tree_cursor_current_node_is_missing_wasm = wasmExports2["ts_tree_cursor_current_node_is_missing_wasm"]; + Module["_ts_tree_cursor_current_node_id_wasm"] = _ts_tree_cursor_current_node_id_wasm = wasmExports2["ts_tree_cursor_current_node_id_wasm"]; + Module["_ts_tree_cursor_start_position_wasm"] = _ts_tree_cursor_start_position_wasm = wasmExports2["ts_tree_cursor_start_position_wasm"]; + Module["_ts_tree_cursor_end_position_wasm"] = _ts_tree_cursor_end_position_wasm = wasmExports2["ts_tree_cursor_end_position_wasm"]; + Module["_ts_tree_cursor_start_index_wasm"] = _ts_tree_cursor_start_index_wasm = wasmExports2["ts_tree_cursor_start_index_wasm"]; + Module["_ts_tree_cursor_end_index_wasm"] = _ts_tree_cursor_end_index_wasm = wasmExports2["ts_tree_cursor_end_index_wasm"]; + Module["_ts_tree_cursor_current_field_id_wasm"] = _ts_tree_cursor_current_field_id_wasm = wasmExports2["ts_tree_cursor_current_field_id_wasm"]; + Module["_ts_tree_cursor_current_depth_wasm"] = _ts_tree_cursor_current_depth_wasm = wasmExports2["ts_tree_cursor_current_depth_wasm"]; + Module["_ts_tree_cursor_current_descendant_index_wasm"] = _ts_tree_cursor_current_descendant_index_wasm = wasmExports2["ts_tree_cursor_current_descendant_index_wasm"]; + Module["_ts_tree_cursor_current_node_wasm"] = _ts_tree_cursor_current_node_wasm = wasmExports2["ts_tree_cursor_current_node_wasm"]; + Module["_ts_node_symbol_wasm"] = _ts_node_symbol_wasm = wasmExports2["ts_node_symbol_wasm"]; + Module["_ts_node_field_name_for_child_wasm"] = _ts_node_field_name_for_child_wasm = wasmExports2["ts_node_field_name_for_child_wasm"]; + Module["_ts_node_field_name_for_named_child_wasm"] = _ts_node_field_name_for_named_child_wasm = wasmExports2["ts_node_field_name_for_named_child_wasm"]; + Module["_ts_node_children_by_field_id_wasm"] = _ts_node_children_by_field_id_wasm = wasmExports2["ts_node_children_by_field_id_wasm"]; + Module["_ts_node_first_child_for_byte_wasm"] = _ts_node_first_child_for_byte_wasm = wasmExports2["ts_node_first_child_for_byte_wasm"]; + Module["_ts_node_first_named_child_for_byte_wasm"] = _ts_node_first_named_child_for_byte_wasm = wasmExports2["ts_node_first_named_child_for_byte_wasm"]; + Module["_ts_node_grammar_symbol_wasm"] = _ts_node_grammar_symbol_wasm = wasmExports2["ts_node_grammar_symbol_wasm"]; + Module["_ts_node_child_count_wasm"] = _ts_node_child_count_wasm = wasmExports2["ts_node_child_count_wasm"]; + Module["_ts_node_named_child_count_wasm"] = _ts_node_named_child_count_wasm = wasmExports2["ts_node_named_child_count_wasm"]; + Module["_ts_node_child_wasm"] = _ts_node_child_wasm = wasmExports2["ts_node_child_wasm"]; + Module["_ts_node_named_child_wasm"] = _ts_node_named_child_wasm = wasmExports2["ts_node_named_child_wasm"]; + Module["_ts_node_child_by_field_id_wasm"] = _ts_node_child_by_field_id_wasm = wasmExports2["ts_node_child_by_field_id_wasm"]; + Module["_ts_node_next_sibling_wasm"] = _ts_node_next_sibling_wasm = wasmExports2["ts_node_next_sibling_wasm"]; + Module["_ts_node_prev_sibling_wasm"] = _ts_node_prev_sibling_wasm = wasmExports2["ts_node_prev_sibling_wasm"]; + Module["_ts_node_next_named_sibling_wasm"] = _ts_node_next_named_sibling_wasm = wasmExports2["ts_node_next_named_sibling_wasm"]; + Module["_ts_node_prev_named_sibling_wasm"] = _ts_node_prev_named_sibling_wasm = wasmExports2["ts_node_prev_named_sibling_wasm"]; + Module["_ts_node_descendant_count_wasm"] = _ts_node_descendant_count_wasm = wasmExports2["ts_node_descendant_count_wasm"]; + Module["_ts_node_parent_wasm"] = _ts_node_parent_wasm = wasmExports2["ts_node_parent_wasm"]; + Module["_ts_node_child_with_descendant_wasm"] = _ts_node_child_with_descendant_wasm = wasmExports2["ts_node_child_with_descendant_wasm"]; + Module["_ts_node_descendant_for_index_wasm"] = _ts_node_descendant_for_index_wasm = wasmExports2["ts_node_descendant_for_index_wasm"]; + Module["_ts_node_named_descendant_for_index_wasm"] = _ts_node_named_descendant_for_index_wasm = wasmExports2["ts_node_named_descendant_for_index_wasm"]; + Module["_ts_node_descendant_for_position_wasm"] = _ts_node_descendant_for_position_wasm = wasmExports2["ts_node_descendant_for_position_wasm"]; + Module["_ts_node_named_descendant_for_position_wasm"] = _ts_node_named_descendant_for_position_wasm = wasmExports2["ts_node_named_descendant_for_position_wasm"]; + Module["_ts_node_start_point_wasm"] = _ts_node_start_point_wasm = wasmExports2["ts_node_start_point_wasm"]; + Module["_ts_node_end_point_wasm"] = _ts_node_end_point_wasm = wasmExports2["ts_node_end_point_wasm"]; + Module["_ts_node_start_index_wasm"] = _ts_node_start_index_wasm = wasmExports2["ts_node_start_index_wasm"]; + Module["_ts_node_end_index_wasm"] = _ts_node_end_index_wasm = wasmExports2["ts_node_end_index_wasm"]; + Module["_ts_node_to_string_wasm"] = _ts_node_to_string_wasm = wasmExports2["ts_node_to_string_wasm"]; + Module["_ts_node_children_wasm"] = _ts_node_children_wasm = wasmExports2["ts_node_children_wasm"]; + Module["_ts_node_named_children_wasm"] = _ts_node_named_children_wasm = wasmExports2["ts_node_named_children_wasm"]; + Module["_ts_node_descendants_of_type_wasm"] = _ts_node_descendants_of_type_wasm = wasmExports2["ts_node_descendants_of_type_wasm"]; + Module["_ts_node_is_named_wasm"] = _ts_node_is_named_wasm = wasmExports2["ts_node_is_named_wasm"]; + Module["_ts_node_has_changes_wasm"] = _ts_node_has_changes_wasm = wasmExports2["ts_node_has_changes_wasm"]; + Module["_ts_node_has_error_wasm"] = _ts_node_has_error_wasm = wasmExports2["ts_node_has_error_wasm"]; + Module["_ts_node_is_error_wasm"] = _ts_node_is_error_wasm = wasmExports2["ts_node_is_error_wasm"]; + Module["_ts_node_is_missing_wasm"] = _ts_node_is_missing_wasm = wasmExports2["ts_node_is_missing_wasm"]; + Module["_ts_node_is_extra_wasm"] = _ts_node_is_extra_wasm = wasmExports2["ts_node_is_extra_wasm"]; + Module["_ts_node_parse_state_wasm"] = _ts_node_parse_state_wasm = wasmExports2["ts_node_parse_state_wasm"]; + Module["_ts_node_next_parse_state_wasm"] = _ts_node_next_parse_state_wasm = wasmExports2["ts_node_next_parse_state_wasm"]; + Module["_ts_query_matches_wasm"] = _ts_query_matches_wasm = wasmExports2["ts_query_matches_wasm"]; + Module["_ts_query_captures_wasm"] = _ts_query_captures_wasm = wasmExports2["ts_query_captures_wasm"]; + Module["_memset"] = _memset = wasmExports2["memset"]; + Module["_memcpy"] = _memcpy = wasmExports2["memcpy"]; + Module["_memmove"] = _memmove = wasmExports2["memmove"]; + Module["_iswalpha"] = _iswalpha = wasmExports2["iswalpha"]; + Module["_iswblank"] = _iswblank = wasmExports2["iswblank"]; + Module["_iswdigit"] = _iswdigit = wasmExports2["iswdigit"]; + Module["_iswlower"] = _iswlower = wasmExports2["iswlower"]; + Module["_iswupper"] = _iswupper = wasmExports2["iswupper"]; + Module["_iswxdigit"] = _iswxdigit = wasmExports2["iswxdigit"]; + Module["_memchr"] = _memchr = wasmExports2["memchr"]; + Module["_strlen"] = _strlen = wasmExports2["strlen"]; + Module["_strcmp"] = _strcmp = wasmExports2["strcmp"]; + Module["_strncat"] = _strncat = wasmExports2["strncat"]; + Module["_strncpy"] = _strncpy = wasmExports2["strncpy"]; + Module["_towlower"] = _towlower = wasmExports2["towlower"]; + Module["_towupper"] = _towupper = wasmExports2["towupper"]; + _setThrew = wasmExports2["setThrew"]; + __emscripten_stack_restore = wasmExports2["_emscripten_stack_restore"]; + __emscripten_stack_alloc = wasmExports2["_emscripten_stack_alloc"]; + _emscripten_stack_get_current = wasmExports2["emscripten_stack_get_current"]; + ___wasm_apply_data_relocs = wasmExports2["__wasm_apply_data_relocs"]; + } + __name(assignWasmExports, "assignWasmExports"); + var wasmImports = { + /** @export */ + __heap_base: ___heap_base, + /** @export */ + __indirect_function_table: wasmTable, + /** @export */ + __memory_base: ___memory_base, + /** @export */ + __stack_high: ___stack_high, + /** @export */ + __stack_low: ___stack_low, + /** @export */ + __stack_pointer: ___stack_pointer, + /** @export */ + __table_base: ___table_base, + /** @export */ + _abort_js: __abort_js, + /** @export */ + emscripten_resize_heap: _emscripten_resize_heap, + /** @export */ + fd_close: _fd_close, + /** @export */ + fd_seek: _fd_seek, + /** @export */ + fd_write: _fd_write, + /** @export */ + memory: wasmMemory, + /** @export */ + tree_sitter_log_callback: _tree_sitter_log_callback, + /** @export */ + tree_sitter_parse_callback: _tree_sitter_parse_callback, + /** @export */ + tree_sitter_progress_callback: _tree_sitter_progress_callback, + /** @export */ + tree_sitter_query_progress_callback: _tree_sitter_query_progress_callback + }; + function callMain(args2 = []) { + var entryFunction = resolveGlobalSymbol("main").sym; + if (!entryFunction) return; + args2.unshift(thisProgram); + var argc = args2.length; + var argv = stackAlloc((argc + 1) * 4); + var argv_ptr = argv; + args2.forEach((arg) => { + LE_HEAP_STORE_U32((argv_ptr >> 2) * 4, stringToUTF8OnStack(arg)); + argv_ptr += 4; + }); + LE_HEAP_STORE_U32((argv_ptr >> 2) * 4, 0); + try { + var ret = entryFunction(argc, argv); + exitJS( + ret, + /* implicit = */ + true + ); + return ret; + } catch (e) { + return handleException(e); + } + } + __name(callMain, "callMain"); + function run(args2 = arguments_) { + if (runDependencies > 0) { + dependenciesFulfilled = run; + return; + } + preRun(); + if (runDependencies > 0) { + dependenciesFulfilled = run; + return; + } + function doRun() { + Module["calledRun"] = true; + if (ABORT) return; + initRuntime(); + preMain(); + readyPromiseResolve?.(Module); + Module["onRuntimeInitialized"]?.(); + var noInitialRun = Module["noInitialRun"] || false; + if (!noInitialRun) callMain(args2); + postRun(); + } + __name(doRun, "doRun"); + if (Module["setStatus"]) { + Module["setStatus"]("Running..."); + setTimeout(() => { + setTimeout(() => Module["setStatus"](""), 1); + doRun(); + }, 1); + } else { + doRun(); + } + } + __name(run, "run"); + var wasmExports; + wasmExports = await createWasm(); + run(); + if (runtimeInitialized) { + moduleRtn = Module; + } else { + moduleRtn = new Promise((resolve, reject) => { + readyPromiseResolve = resolve; + readyPromiseReject = reject; + }); + } + return moduleRtn; +} +__name(Module2, "Module"); +var web_tree_sitter_default = Module2; + +// src/bindings.ts +var Module3 = null; +async function initializeBinding(moduleOptions) { + return Module3 ??= await web_tree_sitter_default(moduleOptions); +} +__name(initializeBinding, "initializeBinding"); +function checkModule() { + return !!Module3; +} +__name(checkModule, "checkModule"); + +// src/parser.ts +var TRANSFER_BUFFER; +var LANGUAGE_VERSION; +var MIN_COMPATIBLE_VERSION; +var Parser = class { + static { + __name(this, "Parser"); + } + /** @internal */ + [0] = 0; + // Internal handle for Wasm + /** @internal */ + [1] = 0; + // Internal handle for Wasm + /** @internal */ + logCallback = null; + /** The parser's current language. */ + language = null; + /** + * This must always be called before creating a Parser. + * + * You can optionally pass in options to configure the Wasm module, the most common + * one being `locateFile` to help the module find the `.wasm` file. + */ + static async init(moduleOptions) { + setModule(await initializeBinding(moduleOptions)); + TRANSFER_BUFFER = C._ts_init(); + LANGUAGE_VERSION = C.getValue(TRANSFER_BUFFER, "i32"); + MIN_COMPATIBLE_VERSION = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + } + /** + * Create a new parser. + */ + constructor() { + this.initialize(); + } + /** @internal */ + initialize() { + if (!checkModule()) { + throw new Error("cannot construct a Parser before calling `init()`"); + } + C._ts_parser_new_wasm(); + this[0] = C.getValue(TRANSFER_BUFFER, "i32"); + this[1] = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + } + /** Delete the parser, freeing its resources. */ + delete() { + C._ts_parser_delete(this[0]); + C._free(this[1]); + this[0] = 0; + this[1] = 0; + } + /** + * Set the language that the parser should use for parsing. + * + * If the language was not successfully assigned, an error will be thrown. + * This happens if the language was generated with an incompatible + * version of the Tree-sitter CLI. Check the language's version using + * {@link Language#version} and compare it to this library's + * {@link LANGUAGE_VERSION} and {@link MIN_COMPATIBLE_VERSION} constants. + */ + setLanguage(language) { + let address; + if (!language) { + address = 0; + this.language = null; + } else if (language.constructor === Language) { + address = language[0]; + const version = C._ts_language_abi_version(address); + if (version < MIN_COMPATIBLE_VERSION || LANGUAGE_VERSION < version) { + throw new Error( + `Incompatible language version ${version}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${LANGUAGE_VERSION}.` + ); + } + this.language = language; + } else { + throw new Error("Argument must be a Language"); + } + C._ts_parser_set_language(this[0], address); + return this; + } + /** + * Parse a slice of UTF8 text. + * + * @param {string | ParseCallback} callback - The UTF8-encoded text to parse or a callback function. + * + * @param {Tree | null} [oldTree] - A previous syntax tree parsed from the same document. If the text of the + * document has changed since `oldTree` was created, then you must edit `oldTree` to match + * the new text using {@link Tree#edit}. + * + * @param {ParseOptions} [options] - Options for parsing the text. + * This can be used to set the included ranges, or a progress callback. + * + * @returns {Tree | null} A {@link Tree} if parsing succeeded, or `null` if: + * - The parser has not yet had a language assigned with {@link Parser#setLanguage}. + * - The progress callback returned true. + */ + parse(callback, oldTree, options) { + if (typeof callback === "string") { + C.currentParseCallback = (index) => callback.slice(index); + } else if (typeof callback === "function") { + C.currentParseCallback = callback; + } else { + throw new Error("Argument must be a string or a function"); + } + if (options?.progressCallback) { + C.currentProgressCallback = options.progressCallback; + } else { + C.currentProgressCallback = null; + } + if (this.logCallback) { + C.currentLogCallback = this.logCallback; + C._ts_parser_enable_logger_wasm(this[0], 1); + } else { + C.currentLogCallback = null; + C._ts_parser_enable_logger_wasm(this[0], 0); + } + let rangeCount = 0; + let rangeAddress = 0; + if (options?.includedRanges) { + rangeCount = options.includedRanges.length; + rangeAddress = C._calloc(rangeCount, SIZE_OF_RANGE); + let address = rangeAddress; + for (let i2 = 0; i2 < rangeCount; i2++) { + marshalRange(address, options.includedRanges[i2]); + address += SIZE_OF_RANGE; + } + } + const treeAddress = C._ts_parser_parse_wasm( + this[0], + this[1], + oldTree ? oldTree[0] : 0, + rangeAddress, + rangeCount + ); + if (!treeAddress) { + C.currentParseCallback = null; + C.currentLogCallback = null; + C.currentProgressCallback = null; + return null; + } + if (!this.language) { + throw new Error("Parser must have a language to parse"); + } + const result = new Tree(INTERNAL, treeAddress, this.language, C.currentParseCallback); + C.currentParseCallback = null; + C.currentLogCallback = null; + C.currentProgressCallback = null; + return result; + } + /** + * Instruct the parser to start the next parse from the beginning. + * + * If the parser previously failed because of a callback, + * then by default, it will resume where it left off on the + * next call to {@link Parser#parse} or other parsing functions. + * If you don't want to resume, and instead intend to use this parser to + * parse some other document, you must call `reset` first. + */ + reset() { + C._ts_parser_reset(this[0]); + } + /** Get the ranges of text that the parser will include when parsing. */ + getIncludedRanges() { + C._ts_parser_included_ranges_wasm(this[0]); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const result = new Array(count); + if (count > 0) { + let address = buffer; + for (let i2 = 0; i2 < count; i2++) { + result[i2] = unmarshalRange(address); + address += SIZE_OF_RANGE; + } + C._free(buffer); + } + return result; + } + /** Set the logging callback that a parser should use during parsing. */ + setLogger(callback) { + if (!callback) { + this.logCallback = null; + } else if (typeof callback !== "function") { + throw new Error("Logger callback must be a function"); + } else { + this.logCallback = callback; + } + return this; + } + /** Get the parser's current logger. */ + getLogger() { + return this.logCallback; + } +}; + +// src/query.ts +var PREDICATE_STEP_TYPE_CAPTURE = 1; +var PREDICATE_STEP_TYPE_STRING = 2; +var QUERY_WORD_REGEX = /[\w-]+/g; +var CaptureQuantifier = { + Zero: 0, + ZeroOrOne: 1, + ZeroOrMore: 2, + One: 3, + OneOrMore: 4 +}; +var isCaptureStep = /* @__PURE__ */ __name((step) => step.type === "capture", "isCaptureStep"); +var isStringStep = /* @__PURE__ */ __name((step) => step.type === "string", "isStringStep"); +var QueryErrorKind = { + Syntax: 1, + NodeName: 2, + FieldName: 3, + CaptureName: 4, + PatternStructure: 5 +}; +var QueryError = class _QueryError extends Error { + constructor(kind, info2, index, length) { + super(_QueryError.formatMessage(kind, info2)); + this.kind = kind; + this.info = info2; + this.index = index; + this.length = length; + this.name = "QueryError"; + } + static { + __name(this, "QueryError"); + } + /** Formats an error message based on the error kind and info */ + static formatMessage(kind, info2) { + switch (kind) { + case QueryErrorKind.NodeName: + return `Bad node name '${info2.word}'`; + case QueryErrorKind.FieldName: + return `Bad field name '${info2.word}'`; + case QueryErrorKind.CaptureName: + return `Bad capture name @${info2.word}`; + case QueryErrorKind.PatternStructure: + return `Bad pattern structure at offset ${info2.suffix}`; + case QueryErrorKind.Syntax: + return `Bad syntax at offset ${info2.suffix}`; + } + } +}; +function parseAnyPredicate(steps, index, operator, textPredicates) { + if (steps.length !== 3) { + throw new Error( + `Wrong number of arguments to \`#${operator}\` predicate. Expected 2, got ${steps.length - 1}` + ); + } + if (!isCaptureStep(steps[1])) { + throw new Error( + `First argument of \`#${operator}\` predicate must be a capture. Got "${steps[1].value}"` + ); + } + const isPositive = operator === "eq?" || operator === "any-eq?"; + const matchAll = !operator.startsWith("any-"); + if (isCaptureStep(steps[2])) { + const captureName1 = steps[1].name; + const captureName2 = steps[2].name; + textPredicates[index].push((captures) => { + const nodes1 = []; + const nodes2 = []; + for (const c of captures) { + if (c.name === captureName1) nodes1.push(c.node); + if (c.name === captureName2) nodes2.push(c.node); + } + const compare = /* @__PURE__ */ __name((n1, n2, positive) => { + return positive ? n1.text === n2.text : n1.text !== n2.text; + }, "compare"); + return matchAll ? nodes1.every((n1) => nodes2.some((n2) => compare(n1, n2, isPositive))) : nodes1.some((n1) => nodes2.some((n2) => compare(n1, n2, isPositive))); + }); + } else { + const captureName = steps[1].name; + const stringValue = steps[2].value; + const matches = /* @__PURE__ */ __name((n) => n.text === stringValue, "matches"); + const doesNotMatch = /* @__PURE__ */ __name((n) => n.text !== stringValue, "doesNotMatch"); + textPredicates[index].push((captures) => { + const nodes = []; + for (const c of captures) { + if (c.name === captureName) nodes.push(c.node); + } + const test = isPositive ? matches : doesNotMatch; + return matchAll ? nodes.every(test) : nodes.some(test); + }); + } +} +__name(parseAnyPredicate, "parseAnyPredicate"); +function parseMatchPredicate(steps, index, operator, textPredicates) { + if (steps.length !== 3) { + throw new Error( + `Wrong number of arguments to \`#${operator}\` predicate. Expected 2, got ${steps.length - 1}.` + ); + } + if (steps[1].type !== "capture") { + throw new Error( + `First argument of \`#${operator}\` predicate must be a capture. Got "${steps[1].value}".` + ); + } + if (steps[2].type !== "string") { + throw new Error( + `Second argument of \`#${operator}\` predicate must be a string. Got @${steps[2].name}.` + ); + } + const isPositive = operator === "match?" || operator === "any-match?"; + const matchAll = !operator.startsWith("any-"); + const captureName = steps[1].name; + const regex = new RegExp(steps[2].value); + textPredicates[index].push((captures) => { + const nodes = []; + for (const c of captures) { + if (c.name === captureName) nodes.push(c.node.text); + } + const test = /* @__PURE__ */ __name((text, positive) => { + return positive ? regex.test(text) : !regex.test(text); + }, "test"); + if (nodes.length === 0) return !isPositive; + return matchAll ? nodes.every((text) => test(text, isPositive)) : nodes.some((text) => test(text, isPositive)); + }); +} +__name(parseMatchPredicate, "parseMatchPredicate"); +function parseAnyOfPredicate(steps, index, operator, textPredicates) { + if (steps.length < 2) { + throw new Error( + `Wrong number of arguments to \`#${operator}\` predicate. Expected at least 1. Got ${steps.length - 1}.` + ); + } + if (steps[1].type !== "capture") { + throw new Error( + `First argument of \`#${operator}\` predicate must be a capture. Got "${steps[1].value}".` + ); + } + const isPositive = operator === "any-of?"; + const captureName = steps[1].name; + const stringSteps = steps.slice(2); + if (!stringSteps.every(isStringStep)) { + throw new Error( + `Arguments to \`#${operator}\` predicate must be strings.".` + ); + } + const values = stringSteps.map((s) => s.value); + textPredicates[index].push((captures) => { + const nodes = []; + for (const c of captures) { + if (c.name === captureName) nodes.push(c.node.text); + } + if (nodes.length === 0) return !isPositive; + return nodes.every((text) => values.includes(text)) === isPositive; + }); +} +__name(parseAnyOfPredicate, "parseAnyOfPredicate"); +function parseIsPredicate(steps, index, operator, assertedProperties, refutedProperties) { + if (steps.length < 2 || steps.length > 3) { + throw new Error( + `Wrong number of arguments to \`#${operator}\` predicate. Expected 1 or 2. Got ${steps.length - 1}.` + ); + } + if (!steps.every(isStringStep)) { + throw new Error( + `Arguments to \`#${operator}\` predicate must be strings.".` + ); + } + const properties = operator === "is?" ? assertedProperties : refutedProperties; + if (!properties[index]) properties[index] = {}; + properties[index][steps[1].value] = steps[2]?.value ?? null; +} +__name(parseIsPredicate, "parseIsPredicate"); +function parseSetDirective(steps, index, setProperties) { + if (steps.length < 2 || steps.length > 3) { + throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`); + } + if (!steps.every(isStringStep)) { + throw new Error(`Arguments to \`#set!\` predicate must be strings.".`); + } + if (!setProperties[index]) setProperties[index] = {}; + setProperties[index][steps[1].value] = steps[2]?.value ?? null; +} +__name(parseSetDirective, "parseSetDirective"); +function parsePattern(index, stepType, stepValueId, captureNames, stringValues, steps, textPredicates, predicates, setProperties, assertedProperties, refutedProperties) { + if (stepType === PREDICATE_STEP_TYPE_CAPTURE) { + const name2 = captureNames[stepValueId]; + steps.push({ type: "capture", name: name2 }); + } else if (stepType === PREDICATE_STEP_TYPE_STRING) { + steps.push({ type: "string", value: stringValues[stepValueId] }); + } else if (steps.length > 0) { + if (steps[0].type !== "string") { + throw new Error("Predicates must begin with a literal value"); + } + const operator = steps[0].value; + switch (operator) { + case "any-not-eq?": + case "not-eq?": + case "any-eq?": + case "eq?": + parseAnyPredicate(steps, index, operator, textPredicates); + break; + case "any-not-match?": + case "not-match?": + case "any-match?": + case "match?": + parseMatchPredicate(steps, index, operator, textPredicates); + break; + case "not-any-of?": + case "any-of?": + parseAnyOfPredicate(steps, index, operator, textPredicates); + break; + case "is?": + case "is-not?": + parseIsPredicate(steps, index, operator, assertedProperties, refutedProperties); + break; + case "set!": + parseSetDirective(steps, index, setProperties); + break; + default: + predicates[index].push({ operator, operands: steps.slice(1) }); + } + steps.length = 0; + } +} +__name(parsePattern, "parsePattern"); +var Query = class { + static { + __name(this, "Query"); + } + /** @internal */ + [0] = 0; + // Internal handle for Wasm + /** @internal */ + exceededMatchLimit; + /** @internal */ + textPredicates; + /** The names of the captures used in the query. */ + captureNames; + /** The quantifiers of the captures used in the query. */ + captureQuantifiers; + /** + * The other user-defined predicates associated with the given index. + * + * This includes predicates with operators other than: + * - `match?` + * - `eq?` and `not-eq?` + * - `any-of?` and `not-any-of?` + * - `is?` and `is-not?` + * - `set!` + */ + predicates; + /** The properties for predicates with the operator `set!`. */ + setProperties; + /** The properties for predicates with the operator `is?`. */ + assertedProperties; + /** The properties for predicates with the operator `is-not?`. */ + refutedProperties; + /** The maximum number of in-progress matches for this cursor. */ + matchLimit; + /** + * Create a new query from a string containing one or more S-expression + * patterns. + * + * The query is associated with a particular language, and can only be run + * on syntax nodes parsed with that language. References to Queries can be + * shared between multiple threads. + * + * @link {@see https://tree-sitter.github.io/tree-sitter/using-parsers/queries} + */ + constructor(language, source) { + const sourceLength = C.lengthBytesUTF8(source); + const sourceAddress = C._malloc(sourceLength + 1); + C.stringToUTF8(source, sourceAddress, sourceLength + 1); + const address = C._ts_query_new( + language[0], + sourceAddress, + sourceLength, + TRANSFER_BUFFER, + TRANSFER_BUFFER + SIZE_OF_INT + ); + if (!address) { + const errorId = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const errorByte = C.getValue(TRANSFER_BUFFER, "i32"); + const errorIndex = C.UTF8ToString(sourceAddress, errorByte).length; + const suffix = source.slice(errorIndex, errorIndex + 100).split("\n")[0]; + const word = suffix.match(QUERY_WORD_REGEX)?.[0] ?? ""; + C._free(sourceAddress); + switch (errorId) { + case QueryErrorKind.Syntax: + throw new QueryError(QueryErrorKind.Syntax, { suffix: `${errorIndex}: '${suffix}'...` }, errorIndex, 0); + case QueryErrorKind.NodeName: + throw new QueryError(errorId, { word }, errorIndex, word.length); + case QueryErrorKind.FieldName: + throw new QueryError(errorId, { word }, errorIndex, word.length); + case QueryErrorKind.CaptureName: + throw new QueryError(errorId, { word }, errorIndex, word.length); + case QueryErrorKind.PatternStructure: + throw new QueryError(errorId, { suffix: `${errorIndex}: '${suffix}'...` }, errorIndex, 0); + } + } + const stringCount = C._ts_query_string_count(address); + const captureCount = C._ts_query_capture_count(address); + const patternCount = C._ts_query_pattern_count(address); + const captureNames = new Array(captureCount); + const captureQuantifiers = new Array(patternCount); + const stringValues = new Array(stringCount); + for (let i2 = 0; i2 < captureCount; i2++) { + const nameAddress = C._ts_query_capture_name_for_id( + address, + i2, + TRANSFER_BUFFER + ); + const nameLength = C.getValue(TRANSFER_BUFFER, "i32"); + captureNames[i2] = C.UTF8ToString(nameAddress, nameLength); + } + for (let i2 = 0; i2 < patternCount; i2++) { + const captureQuantifiersArray = new Array(captureCount); + for (let j = 0; j < captureCount; j++) { + const quantifier = C._ts_query_capture_quantifier_for_id(address, i2, j); + captureQuantifiersArray[j] = quantifier; + } + captureQuantifiers[i2] = captureQuantifiersArray; + } + for (let i2 = 0; i2 < stringCount; i2++) { + const valueAddress = C._ts_query_string_value_for_id( + address, + i2, + TRANSFER_BUFFER + ); + const nameLength = C.getValue(TRANSFER_BUFFER, "i32"); + stringValues[i2] = C.UTF8ToString(valueAddress, nameLength); + } + const setProperties = new Array(patternCount); + const assertedProperties = new Array(patternCount); + const refutedProperties = new Array(patternCount); + const predicates = new Array(patternCount); + const textPredicates = new Array(patternCount); + for (let i2 = 0; i2 < patternCount; i2++) { + const predicatesAddress = C._ts_query_predicates_for_pattern(address, i2, TRANSFER_BUFFER); + const stepCount = C.getValue(TRANSFER_BUFFER, "i32"); + predicates[i2] = []; + textPredicates[i2] = []; + const steps = new Array(); + let stepAddress = predicatesAddress; + for (let j = 0; j < stepCount; j++) { + const stepType = C.getValue(stepAddress, "i32"); + stepAddress += SIZE_OF_INT; + const stepValueId = C.getValue(stepAddress, "i32"); + stepAddress += SIZE_OF_INT; + parsePattern( + i2, + stepType, + stepValueId, + captureNames, + stringValues, + steps, + textPredicates, + predicates, + setProperties, + assertedProperties, + refutedProperties + ); + } + Object.freeze(textPredicates[i2]); + Object.freeze(predicates[i2]); + Object.freeze(setProperties[i2]); + Object.freeze(assertedProperties[i2]); + Object.freeze(refutedProperties[i2]); + } + C._free(sourceAddress); + this[0] = address; + this.captureNames = captureNames; + this.captureQuantifiers = captureQuantifiers; + this.textPredicates = textPredicates; + this.predicates = predicates; + this.setProperties = setProperties; + this.assertedProperties = assertedProperties; + this.refutedProperties = refutedProperties; + this.exceededMatchLimit = false; + } + /** Delete the query, freeing its resources. */ + delete() { + C._ts_query_delete(this[0]); + this[0] = 0; + } + /** + * Iterate over all of the matches in the order that they were found. + * + * Each match contains the index of the pattern that matched, and a list of + * captures. Because multiple patterns can match the same set of nodes, + * one match may contain captures that appear *before* some of the + * captures from a previous match. + * + * @param {Node} node - The node to execute the query on. + * + * @param {QueryOptions} options - Options for query execution. + */ + matches(node, options = {}) { + const startPosition = options.startPosition ?? ZERO_POINT; + const endPosition = options.endPosition ?? ZERO_POINT; + const startIndex = options.startIndex ?? 0; + const endIndex = options.endIndex ?? 0; + const startContainingPosition = options.startContainingPosition ?? ZERO_POINT; + const endContainingPosition = options.endContainingPosition ?? ZERO_POINT; + const startContainingIndex = options.startContainingIndex ?? 0; + const endContainingIndex = options.endContainingIndex ?? 0; + const matchLimit = options.matchLimit ?? 4294967295; + const maxStartDepth = options.maxStartDepth ?? 4294967295; + const progressCallback = options.progressCallback; + if (typeof matchLimit !== "number") { + throw new Error("Arguments must be numbers"); + } + this.matchLimit = matchLimit; + if (endIndex !== 0 && startIndex > endIndex) { + throw new Error("`startIndex` cannot be greater than `endIndex`"); + } + if (endPosition !== ZERO_POINT && (startPosition.row > endPosition.row || startPosition.row === endPosition.row && startPosition.column > endPosition.column)) { + throw new Error("`startPosition` cannot be greater than `endPosition`"); + } + if (endContainingIndex !== 0 && startContainingIndex > endContainingIndex) { + throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`"); + } + if (endContainingPosition !== ZERO_POINT && (startContainingPosition.row > endContainingPosition.row || startContainingPosition.row === endContainingPosition.row && startContainingPosition.column > endContainingPosition.column)) { + throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`"); + } + if (progressCallback) { + C.currentQueryProgressCallback = progressCallback; + } + marshalNode(node); + C._ts_query_matches_wasm( + this[0], + node.tree[0], + startPosition.row, + startPosition.column, + endPosition.row, + endPosition.column, + startIndex, + endIndex, + startContainingPosition.row, + startContainingPosition.column, + endContainingPosition.row, + endContainingPosition.column, + startContainingIndex, + endContainingIndex, + matchLimit, + maxStartDepth + ); + const rawCount = C.getValue(TRANSFER_BUFFER, "i32"); + const startAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const didExceedMatchLimit = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, "i32"); + const result = new Array(rawCount); + this.exceededMatchLimit = Boolean(didExceedMatchLimit); + let filteredCount = 0; + let address = startAddress; + for (let i2 = 0; i2 < rawCount; i2++) { + const patternIndex = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const captureCount = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const captures = new Array(captureCount); + address = unmarshalCaptures(this, node.tree, address, patternIndex, captures); + if (this.textPredicates[patternIndex].every((p) => p(captures))) { + result[filteredCount] = { patternIndex, captures }; + const setProperties = this.setProperties[patternIndex]; + result[filteredCount].setProperties = setProperties; + const assertedProperties = this.assertedProperties[patternIndex]; + result[filteredCount].assertedProperties = assertedProperties; + const refutedProperties = this.refutedProperties[patternIndex]; + result[filteredCount].refutedProperties = refutedProperties; + filteredCount++; + } + } + result.length = filteredCount; + C._free(startAddress); + C.currentQueryProgressCallback = null; + return result; + } + /** + * Iterate over all of the individual captures in the order that they + * appear. + * + * This is useful if you don't care about which pattern matched, and just + * want a single, ordered sequence of captures. + * + * @param {Node} node - The node to execute the query on. + * + * @param {QueryOptions} options - Options for query execution. + */ + captures(node, options = {}) { + const startPosition = options.startPosition ?? ZERO_POINT; + const endPosition = options.endPosition ?? ZERO_POINT; + const startIndex = options.startIndex ?? 0; + const endIndex = options.endIndex ?? 0; + const startContainingPosition = options.startContainingPosition ?? ZERO_POINT; + const endContainingPosition = options.endContainingPosition ?? ZERO_POINT; + const startContainingIndex = options.startContainingIndex ?? 0; + const endContainingIndex = options.endContainingIndex ?? 0; + const matchLimit = options.matchLimit ?? 4294967295; + const maxStartDepth = options.maxStartDepth ?? 4294967295; + const progressCallback = options.progressCallback; + if (typeof matchLimit !== "number") { + throw new Error("Arguments must be numbers"); + } + this.matchLimit = matchLimit; + if (endIndex !== 0 && startIndex > endIndex) { + throw new Error("`startIndex` cannot be greater than `endIndex`"); + } + if (endPosition !== ZERO_POINT && (startPosition.row > endPosition.row || startPosition.row === endPosition.row && startPosition.column > endPosition.column)) { + throw new Error("`startPosition` cannot be greater than `endPosition`"); + } + if (endContainingIndex !== 0 && startContainingIndex > endContainingIndex) { + throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`"); + } + if (endContainingPosition !== ZERO_POINT && (startContainingPosition.row > endContainingPosition.row || startContainingPosition.row === endContainingPosition.row && startContainingPosition.column > endContainingPosition.column)) { + throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`"); + } + if (progressCallback) { + C.currentQueryProgressCallback = progressCallback; + } + marshalNode(node); + C._ts_query_captures_wasm( + this[0], + node.tree[0], + startPosition.row, + startPosition.column, + endPosition.row, + endPosition.column, + startIndex, + endIndex, + startContainingPosition.row, + startContainingPosition.column, + endContainingPosition.row, + endContainingPosition.column, + startContainingIndex, + endContainingIndex, + matchLimit, + maxStartDepth + ); + const count = C.getValue(TRANSFER_BUFFER, "i32"); + const startAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); + const didExceedMatchLimit = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, "i32"); + const result = new Array(); + this.exceededMatchLimit = Boolean(didExceedMatchLimit); + const captures = new Array(); + let address = startAddress; + for (let i2 = 0; i2 < count; i2++) { + const patternIndex = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const captureCount = C.getValue(address, "i32"); + address += SIZE_OF_INT; + const captureIndex = C.getValue(address, "i32"); + address += SIZE_OF_INT; + captures.length = captureCount; + address = unmarshalCaptures(this, node.tree, address, patternIndex, captures); + if (this.textPredicates[patternIndex].every((p) => p(captures))) { + const capture = captures[captureIndex]; + const setProperties = this.setProperties[patternIndex]; + capture.setProperties = setProperties; + const assertedProperties = this.assertedProperties[patternIndex]; + capture.assertedProperties = assertedProperties; + const refutedProperties = this.refutedProperties[patternIndex]; + capture.refutedProperties = refutedProperties; + result.push(capture); + } + } + C._free(startAddress); + C.currentQueryProgressCallback = null; + return result; + } + /** Get the predicates for a given pattern. */ + predicatesForPattern(patternIndex) { + return this.predicates[patternIndex]; + } + /** + * Disable a certain capture within a query. + * + * This prevents the capture from being returned in matches, and also + * avoids any resource usage associated with recording the capture. + */ + disableCapture(captureName) { + const captureNameLength = C.lengthBytesUTF8(captureName); + const captureNameAddress = C._malloc(captureNameLength + 1); + C.stringToUTF8(captureName, captureNameAddress, captureNameLength + 1); + C._ts_query_disable_capture(this[0], captureNameAddress, captureNameLength); + C._free(captureNameAddress); + } + /** + * Disable a certain pattern within a query. + * + * This prevents the pattern from matching, and also avoids any resource + * usage associated with the pattern. This throws an error if the pattern + * index is out of bounds. + */ + disablePattern(patternIndex) { + if (patternIndex >= this.predicates.length) { + throw new Error( + `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}` + ); + } + C._ts_query_disable_pattern(this[0], patternIndex); + } + /** + * Check if, on its last execution, this cursor exceeded its maximum number + * of in-progress matches. + */ + didExceedMatchLimit() { + return this.exceededMatchLimit; + } + /** Get the byte offset where the given pattern starts in the query's source. */ + startIndexForPattern(patternIndex) { + if (patternIndex >= this.predicates.length) { + throw new Error( + `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}` + ); + } + return C._ts_query_start_byte_for_pattern(this[0], patternIndex); + } + /** Get the byte offset where the given pattern ends in the query's source. */ + endIndexForPattern(patternIndex) { + if (patternIndex >= this.predicates.length) { + throw new Error( + `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}` + ); + } + return C._ts_query_end_byte_for_pattern(this[0], patternIndex); + } + /** Get the number of patterns in the query. */ + patternCount() { + return C._ts_query_pattern_count(this[0]); + } + /** Get the index for a given capture name. */ + captureIndexForName(captureName) { + return this.captureNames.indexOf(captureName); + } + /** Check if a given pattern within a query has a single root node. */ + isPatternRooted(patternIndex) { + return C._ts_query_is_pattern_rooted(this[0], patternIndex) === 1; + } + /** Check if a given pattern within a query has a single root node. */ + isPatternNonLocal(patternIndex) { + return C._ts_query_is_pattern_non_local(this[0], patternIndex) === 1; + } + /** + * Check if a given step in a query is 'definite'. + * + * A query step is 'definite' if its parent pattern will be guaranteed to + * match successfully once it reaches the step. + */ + isPatternGuaranteedAtStep(byteIndex) { + return C._ts_query_is_pattern_guaranteed_at_step(this[0], byteIndex) === 1; + } +}; + +// export { +// CaptureQuantifier, +// Edit, +// LANGUAGE_VERSION, +// Language, +// LookaheadIterator, +// MIN_COMPATIBLE_VERSION, +// Node, +// Parser, +// Query, +// Tree, +// TreeCursor +// }; diff --git a/mixly/common/modules/mixly-modules/workers/common/tree-sitter/web-tree-sitter.wasm b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/web-tree-sitter.wasm new file mode 100644 index 00000000..30ec4312 Binary files /dev/null and b/mixly/common/modules/mixly-modules/workers/common/tree-sitter/web-tree-sitter.wasm differ diff --git a/mixly/common/modules/mixly-modules/workers/nodejs/node-file-watcher.js b/mixly/common/modules/mixly-modules/workers/nodejs/node-file-watcher.js new file mode 100644 index 00000000..fdeafe49 --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/nodejs/node-file-watcher.js @@ -0,0 +1,66 @@ +const chokidar = require('chokidar'); + +let watchedPath = {}; + +const watch = function(inPath) { + if (watchedPath[watchedPath]) { + return; + } + watchedPath[inPath] = chokidar.watch(inPath, { + persistent: true, + depth: 0, + ignoreInitial: true + }); + + watchedPath[inPath].on('add', (actionPath, stats) => { + self.postMessage({ + watcher: inPath, + event: 'add', + path: actionPath, + stats + }); + }); + + watchedPath[inPath].on('addDir', (actionPath, stats) => { + self.postMessage({ + watcher: inPath, + event: 'addDir', + path: actionPath, + stats + }); + }); + + watchedPath[inPath].on('unlink', (actionPath, stats) => { + self.postMessage({ + watcher: inPath, + event: 'unlink', + path: actionPath, + stats + }); + }); + + watchedPath[inPath].on('unlinkDir', (actionPath, stats) => { + self.postMessage({ + watcher: inPath, + event: 'unlinkDir', + path: actionPath, + stats + }); + }); +} + +const unwatch = function(inPath) { + if (!watchedPath[inPath]) { + return; + } + watchedPath[inPath].close(); + delete watchedPath[inPath]; +} + +self.addEventListener('message', function(event) { + if (event.data.func === 'watch') { + watch(...event.data.args); + } else if (event.data.func === 'unwatch') { + unwatch(...event.data.args); + } +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/nodejs/node-serial-worker.js b/mixly/common/modules/mixly-modules/workers/nodejs/node-serial-worker.js new file mode 100644 index 00000000..1b377e8a --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/nodejs/node-serial-worker.js @@ -0,0 +1,91 @@ +importScripts('../common/serial-worker.js'); +const child_process = require('node:child_process'); +const serialport = require('serialport'); + +const { + SerialPort, + ReadlineParser, + ByteLengthParser +} = serialport; + +const portsOperator = {}; + +class NodeSerialWorker extends SerialWorker { + #serialport_ = null; + #parserBytes_ = null; + constructor(port) { + super(port); + } + + #addEventsListener_() { + this.#parserBytes_.on('data', (buffer) => { + this.onBuffer(buffer); + }); + + this.#serialport_.on('error', (error) => { + this.onError(error); + this.onClose(1); + }); + + this.#serialport_.on('open', () => { + this.onOpen(); + }); + + this.#serialport_.on('close', () => { + this.onClose(1); + }); + } + + open() { + super.open(); + this.#serialport_ = new SerialPort({ + path: this.getPortName(), + baudRate: this.getBaudRate() - 0, // 波特率 + dataBits: 8, // 数据位 + parity: 'none', // 奇偶校验 + stopBits: 1, // 停止位 + flowControl: false, + autoOpen: false // 不自动打开 + }, false); + this.#parserBytes_ = this.#serialport_.pipe(new ByteLengthParser({ length: 1 })); + this.#serialport_.open((error) => { + if (error) { + this.onError(error); + // this.onClose(1); + } + }); + this.#addEventsListener_(); + } + + close() { + super.close(); + if (this.isOpened()) { + try { + this.#serialport_.close(); + } catch (error) { + console.log(error); + } + } + } + + onBuffer(buffer) { + super.onBuffer(buffer); + } +} + +const create = (port) => { + if (!portsOperator[port]) { + portsOperator[port] = new NodeSerialWorker(port); + } + portsOperator[port].open(); +} + +self.addEventListener('message', function(event) { + console.log(event.data); + const { port, type } = event.data; + if (type === 'open') { + create(port); + } else if (type === 'close') { + portsOperator[port] && portsOperator[port].close(); + } +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/web/file-system-access.js b/mixly/common/modules/mixly-modules/workers/web/file-system-access.js new file mode 100644 index 00000000..b3641c0a --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/web/file-system-access.js @@ -0,0 +1,132 @@ +importScripts('../../../web-modules/workerpool.min.js'); +importScripts('../../../web-modules/browserfs.min.js'); + +let fs = BrowserFS.fs; + +const createPromise = function(func, ...args) { + return new Promise((resolve, reject) => { + func(...args, function() { + resolve([...arguments]); + }); + }); +} + +const addFileSystemHandler = function(filesystem) { + return new Promise((resolve, reject) => { + BrowserFS.configure({ + fs: "FileSystemAccess", + options: { handle: filesystem } + }, function (error) { + if (error) { + reject(error); + return; + } + fs = BrowserFS.fs; + resolve(); + }); + }); +} + +const rename = function(oldPath, newPath) { + return createPromise(fs.rename, oldPath, newPath); +} + +const stat = function(p) { + return createPromise(fs.stat, p); +} + +const open = function(p, flag, mode) { + return createPromise(fs.open, p, flag, mode); +} + +const unlink = function(p) { + return createPromise(fs.unlink, p); +} + +const rmdir = function(p) { + return createPromise(fs.rmdir, p); +} + +const mkdir = function(p, mode) { + return createPromise(fs.mkdir, p, mode); +} + +const readdir = function(p) { + return createPromise(fs.readdir, p); +} + +const exists = function(p) { + return createPromise(fs.exists, p); +} + +const realpath = function(p) { + return createPromise(fs.realpath, p); +} + +const truncate = function(p, len) { + return createPromise(fs.truncate, p, len); +} + +const readFile = function(fname, encoding, flag) { + return createPromise(fs.readFile, fname, encoding); +} + +const writeFile = function(fname, data, encoding) { + return createPromise(fs.writeFile, fname, data, encoding); +} + +const appendFile = function(fname, data, encoding) { + return createPromise(fs.appendFile, fname, data, encoding); +} + +const chmod = function(p, mode) { + return createPromise(fs.chmod, p, mode); +} + +const chown = function(p, new_uid, new_gid) { + return createPromise(fs.chown, p, new_uid, new_gid); +} + +const utimes = function(p, atime, mtime) { + return createPromise(fs.utimes, p, atime, mtime); +} + +const link = function(srcpath, dstpath) { + return createPromise(fs.link, srcpath, dstpath); +} + +const symlink = function(srcpath, dstpath, type) { + return createPromise(fs.symlink, srcpath, dstpath, type); +} + +const readlink = function(p) { + return createPromise(fs.readlink, p); +} + +const syncClose = function(method, fd) { + return fs.syncClose(method, fd); +} + +workerpool.worker({ + addFileSystemHandler, + rename, + stat, + open, + unlink, + rmdir, + mkdir, + readdir, + exists, + realpath, + truncate, + readFile, + writeFile, + appendFile, + chmod, + chown, + utimes, + link, + symlink, + readlink, + syncClose +}); \ No newline at end of file diff --git a/mixly/common/modules/mixly-modules/workers/web/serial-worker.js b/mixly/common/modules/mixly-modules/workers/web/serial-worker.js new file mode 100644 index 00000000..a9680b66 --- /dev/null +++ b/mixly/common/modules/mixly-modules/workers/web/serial-worker.js @@ -0,0 +1,123 @@ +// importScripts('../../web-modules/workerpool.min.js'); +const workerpool = require('../../web-modules/workerpool.min.js'); + +const encoder = new TextEncoder(); +const decoder = new TextDecoder('utf-8'); + +class SerialWorker { + constructor(serial) { + this.serial = serial; + this.receiveBuffer = []; + this.receiveStr = ''; + this.bufferLength = 0; + const test = setInterval(() => { + const message = generateRandomString(5); + this.onData(encoder.encode(message)); + }, 1000); + setTimeout(() => { + clearInterval(test); + }, 120 * 1000); + } + + onOpen() { + + } + + onData(data) { + /* UTF-8编码方式 + * ------------------------------------------------------------ + * |1字节 0xxxxxxx | + * |2字节 110xxxxx 10xxxxxx | + * |3字节 1110xxxx 10xxxxxx 10xxxxxx | + * |4字节 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx | + * |5字节 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx | + * |6字节 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx| + * ------------------------------------------------------------ + */ + for (let i in data) { + if ((data[i] & 0x80) === 0x00) { + // 1字节 + this.receiveBuffer = []; + this.bufferLength = 0; + this.receiveStr += String.fromCharCode(data[i]); + } else if ((data[i] & 0xc0) === 0x80) { + // 2字节以上的中间字节,10xxxxxx + // 如果没有起始头,则丢弃这个字节 + if (!this.receiveBuffer.length) { + return; + } + // 如果不是2字节及以上的起始头,则丢弃这个字节 + if (this.bufferLength < 2) { + return; + } + this.receiveBuffer.push(data[i]); + if (this.bufferLength === this.receiveBuffer.length) { + this.receiveStr += decoder.decode(new Uint8Array(this.receiveBuffer)); + this.receiveBuffer = []; + } + } else { + // 2字节以上的起始头 + if (this.receiveBuffer) { + this.receiveBuffer = []; + } + this.bufferLength = this.#getBufferLength(data[i]); + this.receiveBuffer.push(data[i]); + } + } + } + + onError() { + + } + + onClose() { + + } + + #getBufferLength(data) { + let len = 2; + if ((data & 0xFC) === 0xFC) { + len = 6; + } else if ((data & 0xF8) === 0xF8) { + len = 5; + } else if ((data & 0xF0) === 0xF0) { + len = 4; + } else if ((data & 0xE0) === 0xE0) { + len = 3; + } else if ((data & 0xC0) === 0xC0) { + len = 2; + } + return len; + } +} + +const createSerialWork = function(serial) { + return new Promise((resolve, reject) => { + console.log(serial) + const serialWork = new SerialWorker(serial); + const test = setInterval(() => { + const data = serialWork.receiveStr; + serialWork.receiveStr = ''; + workerpool.workerEmit({ + status: 'data', + data: data + }); + }, 5000); + setTimeout(() => { + workerpool.workerEmit({ + status: 'close' + }); + resolve(); + }, 120 * 1000); + }); +} + +function generateRandomString() { + return '1234'; +} + + +workerpool.worker({ + createSerialWork, + generateRandomString +}); \ No newline at end of file diff --git a/mixly/common/modules/web-modules/Blob.js b/mixly/common/modules/web-modules/Blob.js new file mode 100644 index 00000000..030264a8 --- /dev/null +++ b/mixly/common/modules/web-modules/Blob.js @@ -0,0 +1,177 @@ +/* js/Blob.js + * A Blob implementation. + * 2013-01-23 + * + * By Eli Grey, http://eligrey.com + * By Devin Samarin, https://github.com/eboyjr + * License: X11/MIT + * See LICENSE.md + */ + +/*global self, unescape */ +/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, + plusplus: true */ + +/*! @source http://purl.eligrey.com/github/js/Blob.js/blob/master/js/Blob.js */ + +if (typeof Blob !== "function") +var Blob = (function (view) { + "use strict"; + + var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) { + var + get_class = function(object) { + return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; + } + , FakeBlobBuilder = function BlobBuilder() { + this.data = []; + } + , FakeBlob = function Blob(data, type, encoding) { + this.data = data; + this.size = data.length; + this.type = type; + this.encoding = encoding; + } + , FBB_proto = FakeBlobBuilder.prototype + , FB_proto = FakeBlob.prototype + , FileReaderSync = view.FileReaderSync + , FileException = function(type) { + this.code = this[this.name = type]; + } + , file_ex_codes = ( + "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " + + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" + ).split(" ") + , file_ex_code = file_ex_codes.length + , real_URL = view.URL || view.webkitURL || view + , real_create_object_URL = real_URL.createObjectURL + , real_revoke_object_URL = real_URL.revokeObjectURL + , URL = real_URL + , btoa = view.btoa + , atob = view.atob + , can_apply_typed_arrays = false + , can_apply_typed_arrays_test = function(pass) { + can_apply_typed_arrays = !pass; + } + + , ArrayBuffer = view.ArrayBuffer + , Uint8Array = view.Uint8Array + ; + FakeBlob.fake = FB_proto.fake = true; + while (file_ex_code--) { + FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; + } + try { + if (Uint8Array) { + can_apply_typed_arrays_test.apply(0, new Uint8Array(1)); + } + } catch (ex) {} + if (!real_URL.createObjectURL) { + URL = view.URL = {}; + } + URL.createObjectURL = function(blob) { + var + type = blob.type + , data_URI_header + ; + if (type === null) { + type = "application/octet-stream"; + } + if (blob instanceof FakeBlob) { + data_URI_header = "data:" + type; + if (blob.encoding === "base64") { + return data_URI_header + ";base64," + blob.data; + } else if (blob.encoding === "URI") { + return data_URI_header + "," + decodeURIComponent(blob.data); + } if (btoa) { + return data_URI_header + ";base64," + btoa(blob.data); + } else { + return data_URI_header + "," + encodeURIComponent(blob.data); + } + } else if (real_create_object_URL) { + return real_create_object_URL.call(real_URL, blob); + } + }; + URL.revokeObjectURL = function(object_URL) { + if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { + real_revoke_object_URL.call(real_URL, object_URL); + } + }; + FBB_proto.append = function(data/*, endings*/) { + var bb = this.data; + // decode data to a binary string + if (Uint8Array && data instanceof ArrayBuffer) { + if (can_apply_typed_arrays) { + bb.push(String.fromCharCode.apply(String, new Uint8Array(data))); + } else { + var + str = "" + , buf = new Uint8Array(data) + , i = 0 + , buf_len = buf.length + ; + for (; i < buf_len; i++) { + str += String.fromCharCode(buf[i]); + } + } + } else if (get_class(data) === "Blob" || get_class(data) === "File") { + if (FileReaderSync) { + var fr = new FileReaderSync; + bb.push(fr.readAsBinaryString(data)); + } else { + // async FileReader won't work as BlobBuilder is sync + throw new FileException("NOT_READABLE_ERR"); + } + } else if (data instanceof FakeBlob) { + if (data.encoding === "base64" && atob) { + bb.push(atob(data.data)); + } else if (data.encoding === "URI") { + bb.push(decodeURIComponent(data.data)); + } else if (data.encoding === "raw") { + bb.push(data.data); + } + } else { + if (typeof data !== "string") { + data += ""; // convert unsupported types to strings + } + // decode UTF-16 to binary string + bb.push(unescape(encodeURIComponent(data))); + } + }; + FBB_proto.getBlob = function(type) { + if (!arguments.length) { + type = null; + } + return new FakeBlob(this.data.join(""), type, "raw"); + }; + FBB_proto.toString = function() { + return "[object BlobBuilder]"; + }; + FB_proto.slice = function(start, end, type) { + var args = arguments.length; + if (args < 3) { + type = null; + } + return new FakeBlob( + this.data.slice(start, args > 1 ? end : this.data.length) + , type + , this.encoding + ); + }; + FB_proto.toString = function() { + return "[object Blob]"; + }; + return FakeBlobBuilder; + }(view)); + + return function Blob(blobParts, options) { + var type = options ? (options.type || "") : ""; + var builder = new BlobBuilder(); + if (blobParts) { + for (var i = 0, len = blobParts.length; i < len; i++) { + builder.append(blobParts[i]); + } + } + return builder.getBlob(type); + }; +}(self)); diff --git a/mixly/common/modules/web-modules/FileSaver.min.js b/mixly/common/modules/web-modules/FileSaver.min.js new file mode 100644 index 00000000..b9f98def --- /dev/null +++ b/mixly/common/modules/web-modules/FileSaver.min.js @@ -0,0 +1,2 @@ +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ +var saveAs=saveAs||(function(h){"use strict";var r=h.document,l=function(){return h.URL||h.webkitURL||h},e=h.URL||h.webkitURL||h,n=r.createElementNS("http://www.w3.org/1999/xhtml","a"),g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}w.location.href=x;v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;h.addEventListener("unload",i,false);return a}(self)); \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ace.js b/mixly/common/modules/web-modules/ace/ace.js new file mode 100644 index 00000000..e30815c4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ace.js @@ -0,0 +1,23 @@ +(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMESPACE = "ace",e=function(){return this}();!e&&typeof window!="undefined"&&(e=window);if(!ACE_NAMESPACE&&typeof requirejs!="undefined")return;var t=function(e,n,r){if(typeof e!="string"){t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if(typeof t=="string"){var i=s(e,t);if(i!=undefined)return n&&n(),i}else if(Object.prototype.toString.call(t)==="[object Array]"){var o=[];for(var u=0,a=t.length;un.length)t=n.length;t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,"repeat",function(e){var t="",n=this;while(e>0){e&1&&(t+=n);if(e>>=1)n+=n}return t}),String.prototype.includes||r(String.prototype,"includes",function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e===undefined||e===null)throw new TypeError("Cannot convert undefined or null to object");var t=Object(e);for(var n=1;n>>0,r=arguments[1],i=r>>0,s=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],u=o===undefined?n:o>>0,a=u<0?Math.max(n+u,0):Math.min(u,n);while(s0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator=="object"?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||["other"])[0].toLowerCase(),s=r.userAgent||"",o=r.appName||"";t.isWin=i=="win",t.isMac=i=="mac",t.isLinux=i=="linux",t.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window["opera"])=="[object Opera]",t.isWebKit=parseFloat(s.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(s.split(" Chrome/")[1])||undefined,t.isSafari=parseFloat(s.split(" Safari/")[1])&&!t.isChrome||undefined,t.isEdge=parseFloat(s.split(" Edge/")[1])||undefined,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";function u(){var e=o;o=null,e&&e.forEach(function(e){a(e[0],e[1])})}function a(e,n,r){if(typeof document=="undefined")return;if(o)if(r)u();else if(r===!1)return o.push([e,n]);if(s)return;var i=r;if(!r||!r.getRootNode)i=document;else{i=r.getRootNode();if(!i||i==r)i=document}var a=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var f=t.createElement("style");f.appendChild(a.createTextNode(e)),n&&(f.id=n),i==a&&(i=t.getDocumentHead(a)),i.insertBefore(f,i.firstChild)}var r=e("./useragent"),i="http://www.w3.org/1999/xhtml";t.buildDom=function l(e,t,n){if(typeof e=="string"&&e){var r=document.createTextNode(e);return t&&t.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&t&&t.appendChild(e),e;if(typeof e[0]!="string"||!e[0]){var i=[];for(var s=0;s=1.5:!0,r.isChromeOS&&(t.HI_DPI=!1);if(typeof document!="undefined"){var f=document.createElement("div");t.HI_DPI&&f.style.transform!==undefined&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&typeof f.style.animationName!="undefined"&&(t.HAS_CSS_ANIMATION=!0),f=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){if(n||!i.readyState||i.readyState=="loaded"||i.readyState=="complete")i=i.onload=i.onreadystatechange=null,n||t()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o1&&(i=n[n.length-2]);var o=u[t+"Path"];return o==null?o=u.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return u.$moduleUrls[e]=t};var a=function(t,n){if(t==="ace/theme/textmate"||t==="./theme/textmate")return n(null,e("./theme/textmate"));if(f)return f(t,n);console.error("loader is not configured")},f;t.setLoader=function(e){f=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,n){var r;if(Array.isArray(e))var s=e[0],o=e[1];else if(typeof e=="string")var o=e;var u=function(e){if(e&&!t.$loading[o])return n&&n(e);t.$loading[o]||(t.$loading[o]=[]),t.$loading[o].push(n);if(t.$loading[o].length>1)return;var r=function(){a(o,function(e,n){n&&(t.$loaded[o]=n),t._emit("load.module",{name:o,module:n});var r=t.$loading[o];t.$loading[o]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get("packaged"))return r();i.loadScript(t.moduleUrl(o,s),r),l()};if(t.dynamicModules[o])t.dynamicModules[o]().then(function(e){e.default?u(e.default):u(e)});else{try{r=this.$require(o)}catch(f){}u(r||t.$loaded[o])}},t.$require=function(e){if(typeof n["require"]=="function"){var t="require";return n[t](e)}},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var l=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),l=function(){})};t.version="1.39.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,t,n){"use strict";function s(t){if(!i||!i.document)return;r.set("packaged",t||e.packaged||n.packaged||i.define&&define.packaged);var s={},u="",a=document.currentScript||document._currentScript,f=a&&a.ownerDocument||document;a&&a.src&&(u=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");var l=f.getElementsByTagName("script");for(var c=0;c ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?tthis.end.column?1:0:ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.rown)var i={row:n+1,column:0};else if(this.start.row1?(u++,u>4&&(u=1)):u=1;if(i.isIE){var o=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-f)>5;if(!l||o)u=1;l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),u==1&&(a=e.clientX,f=e.clientY)}e._clicks=u,r[s]("mousedown",e);if(u>4)u=0;else if(u>1)return r[s](h[u],e)}var u=0,a,f,l,h={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){c(e,"mousedown",p,o)})},t.getModifierString=function(e){return r.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){var i=null;c(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=d(n,e,e.keyCode);return i=e.defaultPrevented,t},r),c(e,"keypress",function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)},r),c(e,"keyup",function(e){s[e.keyCode]=null},r),s||(v(),c(window,"focus",v))};if(typeof window=="object"&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++,i=function(s){s.data==r&&(t.stopPropagation(s),h(n,"message",i),e())};c(n,"message",i),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function r(){t.$idleBlocked?setTimeout(r,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return r&&r>Date.now()-50?!0:r=!1},cancel:function(){r=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../config").nls,s=e("../lib/useragent"),o=e("../lib/dom"),u=e("../lib/lang"),a=e("../clipboard"),f=s.isChrome<18,l=s.isIE,c=s.isChrome>63,h=400,p=e("../lib/keys"),d=p.KEY_MODS,v=s.isIOS,m=v?/\s/:/\n/,g=s.isMobile,y;y=function(e,t){function Q(){T=!0,n.blur(),n.focus(),T=!1}function Y(e){e.keyCode==27&&n.value.lengthk&&N[s]=="\n")o=p.end;else if(rk&&N.slice(0,s).split("\n").length>2)o=p.down;else if(s>k&&N[s-1]==" ")o=p.right,u=d.option;else if(s>k||s==k&&k!=C&&r==s)o=p.right;r!==s&&(u|=d.shift);if(o){var a=t.onCommandKey({},u,o);if(!a&&t.commands){o=p.keyCodeToString(o);var f=t.commands.findKeyCommand(u,o);f&&t.execCommand(f)}C=r,k=s,H("")}};document.addEventListener("selectionchange",s),t.on("destroy",function(){document.removeEventListener("selectionchange",s)})}var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",e.insertBefore(n,e.firstChild);var y=!1,b=!1,w=!1,E=!1,S="";g||(n.style.fontSize="1px");var x=!1,T=!1,N="",C=0,k=0,L=0,A=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,M=0;try{var _=document.activeElement===n}catch(D){}this.setNumberOfExtraLines=function(e){A=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER;if(e<0){M=0;return}M=e},this.setAriaLabel=function(){var e="";t.$textInputAriaLabel&&(e+="".concat(t.$textInputAriaLabel,", "));if(t.session){var r=t.session.selection.cursor.row;e+=i("text-input.aria-label","Cursor at row $0",[r+1])}n.setAttribute("aria-label",e)},this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role),e.setLabel&&(n.setAttribute("aria-roledescription",i("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),r.addListener(n,"blur",function(e){if(T)return;t.onBlur(e),_=!1},t),r.addListener(n,"focus",function(e){if(T)return;_=!0;if(s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(H):H()},t),this.$focusScroll=!1,this.focus=function(){this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility});if(S||c||this.$focusScroll=="browser")return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var r=n.getBoundingClientRect().top!=0}catch(i){return}var s=[];if(r){var o=n.parentElement;while(o&&o.nodeType==1)s.push(o),o.setAttribute("ace_nocontext","true"),!o.parentElement&&o.getRootNode?o=o.getRootNode().host:o=o.parentElement}n.focus({preventScroll:!0}),r&&s.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){n.style.position="",n.style.top=="0px"&&(n.style.top=e)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return _},t.on("beforeEndOperation",function(){var e=t.curOp,r=e&&e.command&&e.command.name;if(r=="insertstring")return;var i=r&&(e.docChanged||e.selectionChanged);w&&i&&(N=n.value="",K()),H()}),t.on("changeSelection",this.setAriaLabel);var P=function(e,n){var r=n;for(var i=1;i<=e-A&&i<2*M+1;i++)r+=t.session.getLine(e-i).length+1;return r},H=v?function(e){if(!_||y&&!e||E)return;e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=N=r);var i=4,s=4+(e.length||(t.selection.isEmpty()?0:1));(C!=i||k!=s)&&n.setSelectionRange(i,s),C=i,k=s}:function(){if(w||E)return;if(!_&&!I)return;w=!0;var e=0,r=0,i="";if(t.session){var s=t.selection,o=s.getRange(),u=s.cursor.row;if(u===O+1)A=O+1,O=A+2*M;else if(u===A-1)O=A-1,A=O-2*M;else if(uO+1)A=u>M?u-M:0,O=u>M?u+M:2*M;var a=[];for(var f=A;f<=O;f++)a.push(t.session.getLine(f));i=a.join("\n"),e=P(o.start.row,o.start.column),r=P(o.end.row,o.end.column);if(o.start.rowO){var c=t.session.getLine(O+1);r=o.end.row>O+1?c.length:o.end.column,r+=i.length+1,i=i+"\n"+c}else g&&u>0&&(i="\n"+i,r+=1,e+=1);i.length>h&&(e=N.length&&e.value===N&&N&&e.selectionEnd!==k},j=function(e){if(w)return;y?y=!1:B(n)?(t.selectAll(),H()):g&&n.selectionStart!=C&&H()},F=null;this.setInputHandler=function(e){F=e},this.getInputHandler=function(){return F};var I=!1,q=function(e,r){I&&(I=!1);if(b)return H(),e&&t.onPaste(e),b=!1,"";var i=n.selectionStart,o=n.selectionEnd,u=C,a=N.length-k,f=e,l=e.length-i,c=e.length-o,h=0;while(u>0&&N[h]==e[h])h++,u--;f=f.slice(h),h=1;while(a>0&&N.length-h>C-1&&N[N.length-h]==e[e.length-h])h++,a--;l-=h-1,c-=h-1;var p=f.length-h+1;p<0&&(u=-p,p=0),f=f.slice(0,p);if(!r&&!f&&!l&&!u&&!a&&!c)return"";E=!0;var d=!1;return s.isAndroid&&f==". "&&(f=" ",d=!0),f&&!u&&!a&&!l&&!c||x?t.onTextInput(f):t.onTextInput(f,{extendLeft:u,extendRight:a,restoreStart:l,restoreEnd:c}),E=!1,N=e,C=i,k=o,L=c,d?"\n":f},R=function(e){if(w)return J();if(e&&e.inputType){if(e.inputType=="historyUndo")return t.execCommand("undo");if(e.inputType=="historyRedo")return t.execCommand("redo")}var r=n.value,i=q(r,!0);(r.length>h+100||m.test(i)||g&&C<1&&C==k)&&H()},U=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(!r||f)return;var i=l||n?"Text":"text/plain";try{return t?r.setData(i,t)!==!1:r.getData(i)}catch(e){if(!n)return U(e,t,!0)}},z=function(e,i){var s=t.getCopyText();if(!s)return r.preventDefault(e);U(e,s)?(v&&(H(s),y=s,setTimeout(function(){y=!1},10)),i?t.onCut():t.onCopy(),r.preventDefault(e)):(y=!0,n.value=s,n.select(),setTimeout(function(){y=!1,H(),i?t.onCut():t.onCopy()}))},W=function(e){z(e,!0)},X=function(e){z(e,!1)},V=function(e){var i=U(e);if(a.pasteCancelled())return;typeof i=="string"?(i&&t.onPaste(i,e),s.isIE&&setTimeout(H),r.preventDefault(e)):(n.value="",b=!0)};r.addCommandKeyListener(n,function(e,n,r){if(w)return;return t.onCommandKey(e,n,r)},t),r.addListener(n,"select",j,t),r.addListener(n,"input",R,t),r.addListener(n,"cut",W,t),r.addListener(n,"copy",X,t),r.addListener(n,"paste",V,t),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(s.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:X(e);break;case 86:V(e);break;case 88:W(e)}},t);var $=function(e){if(w||!t.onCompositionStart||t.$readOnly)return;w={};if(x)return;e.data&&(w.useTextareaForIME=!1),setTimeout(J,0),t._signal("compositionStart"),t.on("mousedown",Q);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,w.markerRange=r,w.selectionStart=C,t.onCompositionStart(w),w.useTextareaForIME?(N=n.value="",C=0,k=0):(n.msGetInputContext&&(w.context=n.msGetInputContext()),n.getInputContext&&(w.context=n.getInputContext()))},J=function(){if(!w||!t.onCompositionUpdate||t.$readOnly)return;if(x)return Q();if(w.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;q(e),w.markerRange&&(w.context&&(w.markerRange.start.column=w.selectionStart=w.context.compositionStartOffset),w.markerRange.end.column=w.markerRange.start.column+k-w.selectionStart+L)}},K=function(e){if(!t.onCompositionEnd||t.$readOnly)return;w=!1,t.onCompositionEnd(),t.off("mousedown",Q),e&&R()},G=u.delayedCall(J,50).schedule.bind(null,null);r.addListener(n,"compositionstart",$,t),r.addListener(n,"compositionupdate",J,t),r.addListener(n,"keyup",Y,t),r.addListener(n,"keydown",G,t),r.addListener(n,"compositionend",K,t),this.getElement=function(){return n},this.setCommandMode=function(e){x=e,n.readOnly=!1},this.setReadOnly=function(e){x||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){I=!0,H(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,i){S||(S=n.style.cssText),n.style.cssText=(i?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(C+k)*t.renderer.characterWidth*.5+"px;";var u=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),f=u.top+(parseInt(a.borderTopWidth)||0),l=u.left+(parseInt(a.borderLeftWidth)||0),c=u.bottom-f-n.clientHeight-2,h=function(e){o.translate(n,e.clientX-l-2,Math.min(e.clientY-f-2,c))};h(e);if(e.type!="mousedown")return;t.renderer.$isMousePressed=!0,clearTimeout(Z),s.isWin&&r.capture(t.container,h,et)},this.onContextMenuClose=et;var Z,tt=function(e){t.textInput.onContextMenu(e),et()};r.addListener(n,"mouseup",tt,t),r.addListener(n,"mousedown",function(e){e.preventDefault(),et()},t),r.addListener(t.renderer.scroller,"contextmenu",tt,t),r.addListener(n,"contextmenu",tt,t),v&&nt(e,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.TextInput=y,t.$setUserAgentForTests=function(e,t){g=e,v=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";function u(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function a(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var n=t.column-4;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/useragent"),i=0,s=550,o=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,s=e.getButton();if(s!==0){var o=i.getSelectionRange(),u=o.isEmpty();(u||s==1)&&i.selection.moveToPosition(n),s==2&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault());return}this.mousedownEvent.time=Date.now();if(t&&!i.isFocused()){i.focus();if(this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode){this.setState("focusWait"),this.captureMouse(e);return}}return this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;if(!this.mousedownEvent)return;this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select")},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=a(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=a(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>i||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,u=i?e.wheelY/i:n.vy;i=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(f=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(f=!0);if(f)n.allowed=r;else if(r-n.allowedn.clientHeight;r||t.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/dom"),o=e("./lib/event"),u=e("./range").Range,a=e("./lib/scroll").preventParentScroll,f="ace_tooltip",l=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=s.createElement("div"),this.$element.className=f,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){s.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=f+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){e!=null&&this.setText(e),t!=null&&n!=null&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=f,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),c=function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);t!==-1&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,r;this.popups.sort(function(e,t){return t.priority-e.priority});var s=[];try{for(var o=i(this.popups),u=o.next();!u.done;u=o.next()){var a=u.value,f=!0;try{for(var l=(n=void 0,i(s)),c=l.next();!c.done;c=l.next()){var h=c.value;if(this.doPopupsOverlap(h,a)){f=!1;break}}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}f?s.push(a):a.hide()}}catch(d){e={error:d}}finally{try{u&&!u.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),r=t.getElement().getBoundingClientRect();return n.leftr.left&&n.topr.top},e}(),h=new c;t.popupManager=h,t.Tooltip=l;var p=function(e){function t(t){t===void 0&&(t=document.body);var n=e.call(this,t)||this;n.timeout=undefined,n.lastT=0,n.idleTime=350,n.lastEvent=undefined,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var r=n.getElement();return r.style.whiteSpace="pre-wrap",r.style.pointerEvents="auto",r.addEventListener("mouseout",n.onMouseOut),r.tabIndex=-1,r.addEventListener("blur",function(){r.contains(document.activeElement)||this.hide()}.bind(n)),r.addEventListener("wheel",a),n}return r(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var r=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(r.row,r.column)||n||this.isOutsideOfText(this.lastEvent))&&this.hide()}if(this.timeout||n)return;this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime)},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;if(this.idleTime-e>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-e);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),r=t.session.getLine(n.row);if(n.column==r.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),s=t.session.documentToScreenPosition(n.row,n.column);if(s.column!=i.column||s.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,r){var i=10;if(r&&r!=this.lastEvent)return;if(this.isOpen&&document.activeElement==this.getElement())return;var s=e.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(s.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=u.fromPoints(t.start,t.end);var o=s.textToScreenCoordinates(t.start.row,t.start.column),a=s.scroller.getBoundingClientRect();o.pageXt.session.documentToScreenRow(a.row,a.column))return c()}r.showTooltip(i);if(!r.isOpen)return;t.on("mousewheel",c),t.on("changeSession",c),window.addEventListener("keydown",c,!0);if(e.$tooltipFollowsMouse)p(u);else{var h=u.getGutterRow(),d=n.$lines.get(h);if(d){var v=d.element.querySelector(".ace_gutter_annotation"),m=v.getBoundingClientRect(),g=r.getElement().style;g.left=m.right-f+"px",g.top=m.bottom-l+"px"}else p(u)}}function c(e){if(e&&e.type==="keydown"&&(e.ctrlKey||e.metaKey))return;if(e&&e.type==="mouseout"&&(!e.relatedTarget||r.getElement().contains(e.relatedTarget)))return;i&&(i=clearTimeout(i)),r.isOpen&&(r.hideTooltip(),t.off("mousewheel",c),t.off("changeSession",c),window.removeEventListener("keydown",c,!0))}function p(e){r.setPosition(e.x,e.y)}var t=e.editor,n=t.renderer.$gutterLayer,r=new h(t,!0);e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var i,u;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(s.hasCssClass(n,"ace_fold-widget"))return c();r.isOpen&&e.$tooltipFollowsMouse&&p(t),u=t;if(i)return;i=setTimeout(function(){i=null,u&&!e.isMousePressed&&a()},50)}),o.addListener(t.renderer.$gutter,"mouseout",function(e){u=null;if(!r.isOpen)return;i=setTimeout(function(){i=null,c(e)},50)},t)}var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("../lib/dom"),o=e("../lib/event"),u=e("../tooltip").Tooltip,a=e("../config").nls,f=5,l=3;t.GUTTER_TOOLTIP_LEFT_OFFSET=f,t.GUTTER_TOOLTIP_TOP_OFFSET=l,t.GutterHandler=c;var h=function(e){function t(t,n){n===void 0&&(n=!1);var r=e.call(this,t.container)||this;r.editor=t,r.visibleTooltipRow;var i=r.getElement();return i.setAttribute("role","tooltip"),i.style.pointerEvents="auto",n&&(r.onMouseOut=r.onMouseOut.bind(r),i.addEventListener("mouseout",r.onMouseOut)),r}return r(t,e),t.prototype.onMouseOut=function(e){if(!this.isOpen)return;if(!e.relatedTarget||this.getElement().contains(e.relatedTarget))return;if(e&&e.currentTarget.contains(e.relatedTarget))return;this.hideTooltip()},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+s>r&&(t-=20+s),u.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,r=this.editor.renderer.$gutterLayer,i=r.$annotations[e],o;i?o={displayText:Array.from(i.displayText),type:Array.from(i.type)}:o={displayText:[],type:[]};var u=r.session.getFoldLine(e);if(u&&r.$showFoldedAnnotations){var a={error:[],security:[],warning:[],info:[],hint:[]},f={error:1,security:2,warning:3,info:4,hint:5},l;for(var c=e+1;c<=u.end.row;c++){if(!r.$annotations[c])continue;for(var h=0;ha?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),C(),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.selection.fromOrientedRange(m),t.isFocused()&&!w&&t.$resetCursorStyle(),m=null,g=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\u00a0";var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||(k(),y++),A!==null&&(A=null),e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!g)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e),t),i.addListener(c,"dragend",this.onDragEnd.bind(e),t),i.addListener(c,"dragenter",this.onDragEnter.bind(e),t),i.addListener(c,"dragover",this.onDragOver.bind(e),t),i.addListener(c,"dragleave",this.onDragLeave.bind(e),t),i.addListener(c,"drop",this.onDrop.bind(e),t);var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),s=e("../lib/dom");t.addTouchListeners=function(e,t){function b(){var e=window.navigator&&window.navigator.clipboard,r=!1,i=function(){var n=t.getCopyText(),i=t.session.getUndoManager().hasUndo();y.replaceChild(s.buildDom(r?["span",!n&&o("selectall")&&["span",{"class":"ace_mobile-button",action:"selectall"},"Select All"],n&&o("copy")&&["span",{"class":"ace_mobile-button",action:"copy"},"Copy"],n&&o("cut")&&["span",{"class":"ace_mobile-button",action:"cut"},"Cut"],e&&o("paste")&&["span",{"class":"ace_mobile-button",action:"paste"},"Paste"],i&&o("undo")&&["span",{"class":"ace_mobile-button",action:"undo"},"Undo"],o("find")&&["span",{"class":"ace_mobile-button",action:"find"},"Find"],o("openCommandPalette")&&["span",{"class":"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),y.firstChild)},o=function(e){return t.commands.canExecute(e,t)},u=function(n){var s=n.target.getAttribute("action");if(s=="more"||!r)return r=!r,i();if(s=="paste")e.readText().then(function(e){t.execCommand(s,e)});else if(s){if(s=="cut"||s=="copy")e?e.writeText(t.getCopyText()):document.execCommand("copy");t.execCommand(s)}y.firstChild.style.display="none",r=!1,s!="openCommandPalette"&&t.focus()};y=s.buildDom(["div",{"class":"ace_mobile-menu",ontouchstart:function(e){n="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),u(e)},onclick:u},["span"],["span",{"class":"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){if(!t.getOption("enableMobileMenu")){y&&E();return}y||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,s=t.container.getBoundingClientRect();y.style.top=n.pageY-s.top-3+"px",n.pageX-s.left=2?t.selection.getLineRange(p.row):t.session.getBracketRange(p);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),n="wait"}function T(){h+=60,c=setInterval(function(){h--<=0&&(clearInterval(c),c=null),Math.abs(v)<.01&&(v=0),Math.abs(m)<.01&&(m=0),h<20&&(v=.9*v),h<20&&(m=.9*m);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*m),e==t.session.getScrollTop()&&(h=0)},10)}var n="scroll",o,u,a,f,l,c,h=0,p,d=0,v=0,m=0,g,y;i.addListener(e,"contextmenu",function(e){if(!g)return;var n=t.textInput.getElement();n.focus()},t),i.addListener(e,"touchstart",function(e){var i=e.touches;if(l||i.length>1){clearTimeout(l),l=null,a=-1,n="zoom";return}g=t.$mouseHandler.isMousePressed=!0;var s=t.renderer.layerConfig.lineHeight,c=t.renderer.layerConfig.lineHeight,y=e.timeStamp;f=y;var b=i[0],w=b.clientX,E=b.clientY;Math.abs(o-w)+Math.abs(u-E)>s&&(a=-1),o=e.clientX=w,u=e.clientY=E,v=m=0;var T=new r(e,t);p=T.getDocumentPosition();if(y-a<500&&i.length==1&&!h)d++,e.preventDefault(),e.button=0,x();else{d=0;var N=t.selection.cursor,C=t.selection.isEmpty()?N:t.selection.anchor,k=t.renderer.$cursorLayer.getPixelPosition(N,!0),L=t.renderer.$cursorLayer.getPixelPosition(C,!0),A=t.renderer.scroller.getBoundingClientRect(),O=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,_=function(e,t){return e/=c,t=t/s-.75,e*e+t*t};if(e.clientXP?"cursor":"anchor"),P<3.5?n="anchor":D<3.5?n="cursor":n="scroll",l=setTimeout(S,450)}a=y},t),i.addListener(e,"touchend",function(e){g=t.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),n=="zoom"?(n="",h=0):l?(t.selection.moveToPosition(p),h=0,w()):n=="scroll"?(T(),E()):w(),clearTimeout(l),l=null},t),i.addListener(e,"touchmove",function(e){l&&(clearTimeout(l),l=null);var i=e.touches;if(i.length>1||n=="zoom")return;var s=i[0],a=o-s.clientX,c=u-s.clientY;if(n=="wait"){if(!(a*a+c*c>4))return e.preventDefault();n="cursor"}o=s.clientX,u=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var h=e.timeStamp,p=h-f;f=h;if(n=="scroll"){var d=new r(e,t);d.speed=1,d.wheelX=a,d.wheelY=c,10*Math.abs(a)0)if(g==16){for(w=b;w-1){for(w=b;w=0;C--){if(r[C]!=N)break;t[C]=s}}}function I(e,t,n){if(o=e){u=i+1;while(u=e)u++;for(a=i,l=u-1;a=t.length||(o=n[r-1])!=b&&o!=w||(c=t[r+1])!=b&&c!=w)return E;return u&&(c=w),c==o?c:E;case k:o=r>0?n[r-1]:S;if(o==b&&r+10&&n[r-1]==b)return b;if(u)return E;p=r+1,h=t.length;while(p=1425&&d<=2303||d==64286;o=t[p];if(v&&(o==y||o==T))return y}if(r<1||(o=t[r-1])==S)return E;return n[r-1];case S:return u=!1,f=!0,s;case x:return l=!0,E;case O:case M:case D:case P:case _:u=!1;case H:return E}}function R(e){var t=e.charCodeAt(0),n=t>>8;return n==0?t>191?g:B[t]:n==5?/[\u0591-\u05f4]/.test(e)?y:g:n==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?A:/[\u0660-\u0669\u066b-\u066c]/.test(e)?w:t==1642?L:/[\u06f0-\u06f9]/.test(e)?b:T:n==32&&t<=8287?j[t&255]:n==254?t>=65136?T:E:E}function U(e){return e>="\u064b"&&e<="\u0655"}var r=["\u0621","\u0641"],i=["\u063a","\u064a"],s=0,o=0,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],v=0,m=1,g=0,y=1,b=2,w=3,E=4,S=5,x=6,T=7,N=8,C=9,k=10,L=11,A=12,O=13,M=14,_=15,D=16,P=17,H=18,B=[H,H,H,H,H,H,H,H,H,x,S,x,N,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,S,S,S,x,N,E,E,L,L,L,E,E,E,E,E,k,C,k,C,C,b,b,b,b,b,b,b,b,b,b,C,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,H,H,H,H,H,H,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,C,E,L,L,L,L,E,E,E,E,g,E,E,H,E,E,L,L,b,b,E,g,E,E,E,b,g,E,E,E,E,E],j=[N,N,N,N,N,N,N,N,N,N,N,H,H,H,g,y,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N,S,O,M,_,D,P,C,L,L,L,L,L,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,C,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N];t.L=g,t.R=y,t.EN=b,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\u00b7",t.doBidiReorder=function(e,n,r){if(e.length<2)return{};var i=e.split(""),o=new Array(i.length),u=new Array(i.length),a=[];s=r?m:v,F(i,a,i.length,n);for(var f=0;fT&&n[f]0&&i[f-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(i[f])&&(a[f-1]=a[f]=t.R_H,f++);i[i.length-1]===t.DOT&&(a[i.length-1]=t.B),i[0]==="\u202b"&&(a[0]=t.RLE);for(var f=0;f=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n,r=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){n=this.session.$getRowCacheIndex(t,this.currentRow-e-1);if(n!==r)break;r=n,e++}}else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){e===undefined&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1,s=n?this.EOF:this.EOL;this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE;if(this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(t===undefined&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&e<=t&&s[i]%2!==0&&i++;for(var u=0;ut&&s[i]%2===0&&(o+=this.charWidths[s[i]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},e.prototype.getSelections=function(e,t){var n=this.bidiMap,r=n.bidiLevels,i,s=[],o=0,u=Math.min(e,t)-this.wrapIndent,a=Math.max(e,t)-this.wrapIndent,f=!1,l=!1,c=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,p=0;p=u&&hn+s/2){n+=s;if(r===i.length-1){s=0;break}s=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!==0&&i[r]%2===0?(e0&&i[r-1]%2===0&&i[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&s===0&&i[r-1]%2===0||!this.isRtlDir&&r===0&&i[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!==0&&s!==0&&r--,t=this.bidiMap.logicalFromVisual[r]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},e.prototype.$setSelection=function(e,t,n,r){if(this.$silent)return;var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||s)&&this._emit("changeSelection")},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},e.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t));if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)},e.prototype.$shortWordEndIndex=function(e){var t=0,n,r=/\s/,i=this.session.tokenRe;i.lastIndex=0;if(this.session.tokenRe.exec(e))t=this.session.tokenRe.lastIndex;else{while((n=e[t])&&r.test(n))t++;if(t<1){i.lastIndex=0;while((n=e[t])&&!i.test(n)){i.lastIndex=0,t++;if(r.test(n)){if(t>2){t--;break}while((n=e[t])&&r.test(n))t++;if(t>2)break}}}}return i.lastIndex=0,t},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;t===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);if(e!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(n.row+e,n.column,r);e!==0&&t===0&&s.row===this.lead.row&&s.column===this.lead.column,this.moveCursorTo(s.row,s.column+t,t===0)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch(r){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},e.prototype.fromJSON=function(e){if(e.start==undefined){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,r.implement(u.prototype,s),t.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var r=e("./lib/report_error").reportError,i=2e3,s=function(){function e(e){this.splitRegex,this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a1?f.onMatch=this.$applyToken:f.onMatch=f.token),c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null)}r.length||(s[0]=0,r.push("$")),u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}}return e.prototype.$setMaxTokenCount=function(e){i=e|0},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;il){var g=e.substring(l,m-v.length);h.type==p?h.value+=g:(h.type&&f.push(h),h={type:p,value:g})}for(var y=0;yi){c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(l1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:f,state:n.length?n:r}},e}();s.prototype.reportError=r,t.Tokenizer=s}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var r=e("../lib/deep_copy").deepCopy,i;i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],f,l={},c={'"':'"',"'":"'"},h=function(e){var t=-1;e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount}));if(l[t])return f=l[t];f=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},d;d=function(e){e=e||{},this.add("braces","insertion",function(t,n,r,i,s){var u=r.getCursorPosition(),a=i.doc.getLine(u.row);if(s=="{"){h(r);var l=r.getSelectionRange(),c=i.doc.getTextRange(l),v=i.getTokenAt(u.row,u.column);if(c!==""&&c!=="{"&&r.getWrapBehavioursEnabled())return p(l,c,"{","}");if(v&&/(?:string)\.quasi|\.xml/.test(v.type)){var m=[/tag\-(?:open|name)/,/attribute\-name/];if(m.some(function(e){return e.test(v.type)})||/(string)\.quasi/.test(v.type)&&v.value[u.column-v.start-1]!=="$")return;return d.recordAutoInsert(r,i,"}"),{text:"{}",selection:[1,1]}}if(d.isSaneInsertion(r,i))return/[\]\}\)]/.test(a[u.column])||r.inMultiSelectMode||e.braces?(d.recordAutoInsert(r,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(r,i,"{"),{text:"{",selection:[1,1]})}else if(s=="}"){h(r);var g=a.substring(u.column,u.column+1);if(g=="}"){var y=i.$findOpeningBracket("}",{column:u.column+1,row:u.row});if(y!==null&&d.isAutoInsertedClosing(u,a,s))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if(s=="\n"||s=="\r\n"){h(r);var b="";d.isMaybeInsertedClosing(u,a)&&(b=o.stringRepeat("}",f.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var g=a.substring(u.column,u.column+1);if(g==="}"){var w=i.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!w)return null;var E=this.$getIndent(i.getLine(w.row))}else{if(!b){d.clearMaybeInsertedClosing();return}var E=this.$getIndent(a)}var S=E+i.getTabString();return{text:"\n"+S+"\n"+E+b,selection:[1,S.length,1,S.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;f.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"(",")");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"[","]");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var s=r.$mode.$quotes||c;if(i.length==1&&s[i]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(i)!=-1)return;h(n);var o=i,u=n.getSelectionRange(),a=r.doc.getTextRange(u);if(a!==""&&(a.length!=1||!s[a])&&n.getWrapBehavioursEnabled())return p(u,a,o,o);if(!a){var f=n.getCursorPosition(),l=r.doc.getLine(f.row),d=l.substring(f.column-1,f.column),v=l.substring(f.column,f.column+1),m=r.getTokenAt(f.row,f.column),g=r.getTokenAt(f.row,f.column+1);if(d=="\\"&&m&&/escape/.test(m.type))return null;var y=m&&/string|escape/.test(m.type),b=!g||/string|escape/.test(g.type),w;if(v==o)w=y!==b,w&&/string\.end/.test(g.type)&&(w=!1);else{if(y&&!b)return null;if(y&&b)return null;var E=r.$mode.tokenRe;E.lastIndex=0;var S=E.test(d);E.lastIndex=0;var x=E.test(v),T=r.$mode.$pairQuotesAfter,N=T&&T[o]&&T[o].test(d);if(!N&&S||x)return null;if(v&&!/[\s;,.})\]\\]/.test(v))return null;var C=l[f.column-2];if(!(d!=o||C!=o&&!E.test(C)))return null;w=!0}return{text:w?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.$mode.$quotes||c,o=r.doc.getTextRange(i);if(!i.isMultiLine()&&s.hasOwnProperty(o)){h(n);var u=r.doc.getLine(i.start.row),a=u.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}}),e.closeDocComment!==!1&&this.add("doc comment end","insertion",function(e,t,n,r,i){if(e==="doc-start"&&(i==="\n"||i==="\r\n")&&n.selection.isEmpty()){var s=n.getCursorPosition();if(s.column===0)return;var o=r.doc.getLine(s.row),u=r.doc.getLine(s.row+1),a=r.getTokens(s.row),f=0;for(var l=0;l=s.column){if(f===s.column){if(!/\.doc/.test(c.type))return;if(/\*\//.test(c.value)){var h=a[l+1];if(!h||!/\.doc/.test(h.type))return}}var p=s.column-(f-c.value.length),d=c.value.indexOf("*/"),v=c.value.indexOf("/**",d>-1?d+2:0);if(v!==-1&&p>v&&p=d&&p<=v||!/\.doc/.test(c.type))return;break}}var m=this.$getIndent(o);if(/\s*\*/.test(u))return/^\s*\*/.test(o)?{text:i+m+"* ",selection:[1,2+m.length,1,2+m.length]}:{text:i+m+" * ",selection:[1,3+m.length,1,3+m.length]};if(/\/\*\*/.test(o.substring(0,s.column)))return{text:i+m+" * "+i+" "+m+"*/",selection:[1,4+m.length,1,4+m.length]}}})},d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,f.autoInsertedLineEnd[0])||(f.autoInsertedBrackets=0),f.autoInsertedRow=r.row,f.autoInsertedLineEnd=n+i.substr(r.column),f.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(f.maybeInsertedBrackets=0),f.maybeInsertedRow=r.row,f.maybeInsertedLineStart=i.substr(0,r.column)+n,f.maybeInsertedLineEnd=i.substr(r.column),f.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return f.autoInsertedBrackets>0&&e.row===f.autoInsertedRow&&n===f.autoInsertedLineEnd[0]&&t.substr(e.column)===f.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return f.maybeInsertedBrackets>0&&e.row===f.maybeInsertedRow&&t.substr(e.column)===f.maybeInsertedLineEnd&&t.substr(0,e.column)==f.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){f.autoInsertedLineEnd=f.autoInsertedLineEnd.substr(1),f.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){f&&(f.maybeInsertedBrackets=0,f.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,s=[];for(var o=0;o2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(ne.length&&(E=e.length)}),u==Infinity&&(u=E,s=!1,o=!1),l&&u%f!=0&&(u=Math.floor(u/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new f(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,a=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new l(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new f(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new l(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);a.start.row==c&&(a.start.column+=h),a.end.row==c&&(a.end.column+=h),t.selection.fromOrientedRange(a)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)if(e[t]){var n=e[t],i=n.prototype.$id,s=r.$modes[i];s||(r.$modes[i]=s=new n),r.$modes[t]||(r.$modes[t]=s),this.$embeds.push(t),this.$modes[t]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],u=function(e){(function(t){var n=o[e],r=t[n];t[o[e]]=function(){return this.$delegator(n,arguments,r)}})(a)},a=this;for(var t=0;tt[n].column&&n++,s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(!e)return;var t=!0;e.forEach(function(e,n){if(e){t=!1,e.row=n;while(e.$oldWidget)e.$oldWidget.row=n,e=e.$oldWidget}}),t&&(this.session.lineWidgets=null)},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){this.$registerLineWidget(e),e.session=this.session;if(!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=r.createElement("div"),e.el.textContent=e.text),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&r.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),e.pixelHeight==null&&(e.pixelHeight=e.el.offsetHeight)),e.rowCount==null&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);e.$fold=n;if(n){var i=this.session.lineWidgets;e.row==n.end.row&&!i[n.start.row]?i[n.start.row]=e:e.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el);if(e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}if(this.session.lineWidgets){var n=this.session.lineWidgets[e.row];if(n==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else while(n){if(n.$oldWidget==e){n.$oldWidget=e.$oldWidget;break}n=n.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){var t=this.session.lineWidgets,n=t&&t[e],r=[];while(n)r.push(n),n=n.$oldWidget;return r},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!n||!n.length)return;var i=Infinity;for(var s=0;s0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=n.width+2*n.padding+"px"),u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}},e}();t.LineWidgets=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";function o(e,t,n){var r=n?e.column<=t.column:e.columnthis.row)return;var t=u(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)},e.prototype.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();s.prototype.$insertRight=!1,r.implement(s.prototype,i),t.Anchor=s}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(){function e(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new u(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,r==-1&&(r=t),s<=r&&n.fireUpdateEvent(s,r)}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.lines[t]=null;else if(e.action=="remove")this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();r.implement(s.prototype,i),t.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./range").Range,s=function(){function e(e,t,n){n===void 0&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},e.prototype.update=function(e,t,n,s){if(!this.regExp)return;var o=s.firstRow,u=s.lastRow,a={},f=n.$editor.$search,l=f.$isMultilineSearch(n.$editor.getLastSearchOptions());for(var c=o;c<=u;c++){var h=this.cache[c];if(h==null||n.getValue().length!=this.docLen){if(l){h=[];var p=f.$multiLineForward(n,this.regExp,c,u);if(p){var d=p.endRow<=u?p.endRow-1:u;d>c&&(c=d),h.push(new i(p.startRow,p.startCol,p.endRow,p.endCol))}h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES))}else h=r.getMatchOffsets(n.getLine(c),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new i(c,e.offset,c,e.offset+e.length)});this.cache[c]=h.length?h:""}if(h.length===0)continue;for(var v=h.length;v--;){var m=h[v].toScreenRange(n),g=m.toString();if(a[g])continue;a[g]=!0,t.drawSingleLineMarker(e,m,this.clazz,s)}}this.docLen=n.getValue().length},e}();s.prototype.MAX_RANGES=500,t.SearchHighlight=s}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){while(n0){a.row+=i,a.column+=a.row==r.row?s:0;continue}!t&&l<=0&&(a.row=n.row,a.column=n.column,l===0&&(a.bias=1))}}function f(e){return{row:e.row,column:e.column}}function l(e){return{start:f(e.start),end:f(e.end),action:e.action,lines:e.lines.slice()}}function c(e){e=e||this;if(Array.isArray(e))return e.map(c).join("\n");var t="";e.action?(t=e.action=="insert"?"+":"-",t+="["+e.lines+"]"):e.value&&(Array.isArray(e.value)?t=e.value.map(h).join("\n"):t=h(e.value)),e.start&&(t+=h(e));if(e.id||e.rev)t+=" ("+(e.id||e.rev)+")";return t}function h(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function p(e,t){var n=e.action=="insert",r=t.action=="insert";if(n&&r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;m(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;m(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)m(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;m(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)m(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;m(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var r=0;r=0?m(e,t,-1):o(e.start,t.start)<=0?m(t,e,1):(m(e,s.fromPoints(t.start,e.start),-1),m(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?m(t,e,-1):o(t.start,e.start)<=0?m(e,t,1):(m(t,s.fromPoints(e.start,t.start),-1),m(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.end,e.start)<=0)){var i,u;return o(e.start,t.start)<0&&(i=e,e=y(e,t.start)),o(e.end,t.end)>0&&(u=y(e,t.end)),g(t.end,e.start,e.end,-1),u&&!i&&(e.lines=u.lines,e.start=u.start,e.end=u.end,u=e),[t,i,u].filter(Boolean)}m(e,t,-1)}return[t,e]}function m(e,t,n){g(e.start,t.start,t.end,n),g(e.end,t.start,t.end,n)}function g(e,t,n,r){e.row==(r==1?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function y(e,t){var n=e.lines,r=e.end;e.end=f(t);var i=e.end.row-e.start.row,s=n.splice(i,n.length),o=i?t.column:t.column-e.start.column;n.push(s[0].substring(0,o)),s[0]=s[0].substr(o);var u={start:f(t),end:r,lines:s,action:e.action};return u}function b(e,t){t=l(t);for(var n=e.length;n--;){var r=e[n];for(var i=0;ithis.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}if(e.action=="remove"||e.action=="insert")this.$lastDelta=e;this.lastDeltas.push(e)},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){t==null&&(t=this.$rev+1);var n=this.$undoStack;for(var r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){e==undefined&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?c(e):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)},e}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;var s=e("./range").Range,o=s.comparePoints,u=s.comparePoints;t.UndoManager=r}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if(e.action=="insert"){var f=i-r,l=-t.column+n.column;for(;or)break;a.start.row==r&&a.start.column>=t.column&&(a.start.column==t.column&&this.$bias<=0||(a.start.column+=l,a.start.row+=f));if(a.end.row==r&&a.end.column>=t.column){if(a.end.column==t.column&&this.$bias<0)continue;a.end.column==t.column&&l>0&&oa.start.column&&a.end.column==s[o+1].start.column&&(a.end.column-=l),a.end.column+=l,a.end.row+=f}}}else{var f=r-i,l=t.column-n.column;for(;oi)break;if(a.end.rowt.column)a.end.column=t.column,a.end.row=t.row}else a.end.column+=l,a.end.row+=f;else a.end.row>i&&(a.end.row+=f);if(a.start.rowt.column)a.start.column=t.column,a.start.row=t.row}else a.start.column+=l,a.start.row+=f;else a.start.row>i&&(a.start.row+=f)}}if(f!=0&&o=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i=t){u=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column,c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);c&&!c.range.isStart(u,a)&&this.removeFold(c),h&&!h.range.isEnd(f,l)&&this.removeFold(h);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.collapseChildren||p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(e==null)n=new r(0,0,this.getLength(),0),t==null&&(t=!0);else if(typeof e=="number")n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;n=e}i=this.getFoldsInRangeList(n);var s=i;while(i.length==1&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0)this.expandFolds(i),i=this.getFoldsInRangeList(n);t!=0?this.removeFolds(i):this.expandFolds(i);if(s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row),i==null&&(i=0),t==null&&(t=e.end.row),n==null&&(n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(tc)break}while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return f.end.row=i.getCurrentTokenRow(),f.end.column=i.getCurrentTokenColumn(),f}},this.foldAll=function(e,t,n,r){n==undefined&&(n=1e5);var i=this.foldWidgets;if(!i)return;t=t||this.getLength(),e=e||0;for(var s=e;s=e&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}},this.foldToLevel=function(e){this.foldAll();while(e-->0)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){var n=e.getTokens(t);for(var r=0;r=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof u&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(!this.getFoldWidget)return;var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range))return this.removeFold(s),s}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,f,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action=="remove")this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator,u=e("../mouse/mouse_event").MouseEvent;t.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,s=!t&&n.charAt(e.column-1),o=s&&s.match(r);o||(s=(t===undefined||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(r));if(!o)return null;var u=new i(e.row,e.column-1,e.row,e.column),a=o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e);if(!a)return[u];var f=new i(a.row,a.column,a.row,a.column+1);return[u,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a"?r=!0:t.type.indexOf("tag-name")!==-1&&(n=!0));while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,s=t.value,o=0,u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var a=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),f=!1;do{n=t;if(n.type.indexOf("tag-close")!==-1&&!f){var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);f=!0}t=e.stepForward();if(t){if(t.value===">"&&!f){var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);f=!0}if(t.type.indexOf("tag-name")!==-1){r=t.value;if(s===r)if(n.value==="<")o++;else if(n.value==="")return;var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}}else if(s===r&&t.value==="/>"){o--;if(o<0)var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),h=c,p=h,l=new i(a.end.row,a.end.column,a.end.row,a.end.column+1)}}}while(t&&o>=0);if(u&&l&&c&&p&&a&&h)return{openTag:new i(u.start.row,u.start.column,l.end.row,l.end.column),closeTag:new i(c.start.row,c.start.column,p.end.row,p.end.column),openTagName:a,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,s=0,o=e.getCurrentTokenRow(),u=e.getCurrentTokenColumn(),a=u+2,f=new i(o,u,o,a);e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);t.type.indexOf("tag-close")===-1&&(t=e.stepForward());if(!t||t.value!==">")return;var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{t=n,o=e.getCurrentTokenRow(),u=e.getCurrentTokenColumn(),a=u+t.value.length,n=e.stepBackward();if(t)if(t.type.indexOf("tag-name")!==-1){if(r===t.value)if(n.value==="<"){s++;if(s>0){var h=new i(o,u,o,a),p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do t=e.stepForward();while(t&&t.value!==">");var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else n.value===""){var v=0,m=n;while(m){if(m.type.indexOf("tag-name")!==-1&&m.value===r){s--;break}if(m.value==="<")break;m=e.stepBackward(),v++}for(var g=0;g=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./bidihandler").BidiHandler,o=e("./config"),u=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,f=e("./mode/text").Mode,l=e("./range").Range,c=e("./line_widgets").LineWidgets,h=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,v=e("./undomanager").UndoManager,m=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new p((new f).getTokenizer(),this);var r=this;this.bgTokenizer.on("update",function(e){r._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof t!="object"||!t.getLine)t=new h(t);this.setDocument(t),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new s(this),o.resetOptions(this),this.setMode(n),o._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on("changeSelection",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1){this.curOp=null,this._signal("endOperation",e);return}if(e==1&&this.curOp.command&&this.curOp.command.name=="mouse")return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new c(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},e.prototype.setUndoManager=function(e){this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):" "},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(oe&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;ao){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;for(var n=e.length-1;n!=-1;n--){var r=e[n];r.action=="insert"||r.action=="remove"?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1},e.prototype.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;for(var n=0;ne.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,f=s.start,o=f.row-a.row,u=f.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new l(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,u),o.length&&this.addFolds(o),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode")},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,s=r.row,o=i.row,u=o-s,a=null;this.$updating=!0;if(u!=0)if(n==="remove"){this[t?"$wrapData":"$rowLengthCache"].splice(s,u);var f=this.$foldData;a=this.getFoldsInRange(e),this.removeFolds(a);var l=this.getFoldLine(i.row),c=0;if(l){l.addRemoveChars(i.row,i.column,r.column-i.column),l.shiftRow(-u);var h=this.getFoldLine(s);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c=i.row&&l.shiftRow(-u)}o=s}else{var p=Array(u);p.unshift(s,0);var d=t?this.$wrapData:this.$rowLengthCache;d.splice.apply(d,p);var f=this.$foldData,l=this.getFoldLine(s),c=0;if(l){var v=l.range.compareInside(r.row,r.column);v==0?(l=l.split(r.row,r.column),l&&(l.shiftRow(u),l.addRemoveChars(o,0,i.column-r.column))):v==-1&&(l.addRemoveChars(s,0,i.column-r.column),l.shiftRow(u)),c=f.indexOf(l)+1}for(c;c=s&&l.shiftRow(u)}}else{u=Math.abs(e.start.column-e.end.column),n==="remove"&&(a=this.getFoldsInRange(e),this.removeFolds(a),u=-u);var l=this.getFoldLine(s);l&&l.addRemoveChars(s,r.column,u)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),a},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,s=this.$wrapLimit,o,u,a=e;t=Math.min(t,n.length-1);while(a<=t)u=this.getFoldLine(a,u),u?(o=[],u.walk(function(e,t,r,i){var s;if(e!=null){s=this.$getDisplayTokens(e,o.length),s[0]=b;for(var u=1;ut-h){var p=s+t-h;if(e[p-1]>=S&&e[p]>=S){c(p);continue}if(e[p]==b||e[p]==w){for(p;p!=s-1;p--)if(e[p]==b)break;if(p>s){c(p);continue}p=s+t;for(p;p>2)),s-1);while(p>d&&e[p]d&&e[p]d&&e[p]==E)p--}else while(p>d&&e[p]d){c(++p);continue}p=s+t,e[p]==y&&p--,c(p-h)}return r},e.prototype.$getDisplayTokens=function(e,t){var n=[],r;t=t||0;for(var i=0;i39&&s<48||s>57&&s<64?n.push(E):s>=4352&&N(s)?n.push(g,y):n.push(g)}return n},e.prototype.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i=4352&&N(r)?n+=2:n+=1;if(n>t)break}return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),!this.$useWrapMode||!this.$wrapData[e]?t:this.$wrapData[e].length+t},e.prototype.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0)var u=f[l],i=this.$docRowCache[l],h=e>f[c-1];else var h=!c;var p=this.getLength()-1,d=this.getNextFoldLine(i),v=d?d.start.row:Infinity;while(u<=e){a=this.getRowLength(i);if(u+a>e||i>=p)break;u+=a,i++,i>v&&(i=d.end.row+1,d=this.getNextFoldLine(i,d),v=d?d.start.row:Infinity),h&&(this.$docRowCache.push(i),this.$screenRowCache.push(u))}if(d&&d.start.row<=i)r=this.getFoldDisplayLine(d),i=d.start.row;else{if(u+a<=e||i>p)return{row:p,column:this.getLine(p).length};r=this.getLine(i),d=null}var m=0,g=Math.floor(e-u);if(this.$useWrapMode){var y=this.$wrapData[i];y&&(o=y[g],g>0&&y.length&&(m=y.indent,s=y[g-1]||y[y.length-1],r=r.substring(s)))}return n!==undefined&&this.$bidiHandler.isBidiRow(u+g,i,g)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),d?d.idxToPosition(s):{row:i,column:s}},e.prototype.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);var v=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var g=0;while(d.length>=m[g])r++,g++;d=d.substring(m[g-1]||0,d.length),v=g>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[u]&&this.lineWidgets[u].rowsAbove&&(r+=this.lineWidgets[u].rowsAbove),{row:r,column:v+this.$getStringScreenWidth(d)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;ro&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){if(!this.$enableVarChar)return;this.$getStringScreenWidth=function(t,n,r){if(n===0)return[0,0];n||(n=Infinity),r=r||0;var i,s;for(s=0;sn)break}return[r,s]}},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();if(e.column===0)return e.row===0?"":this.doc.getNewLineCharacter();var t=this.getLine(e.row);return t[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();m.$uid=0,m.prototype.$modes=o.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=N,r.implement(m.prototype,u);var g=1,y=2,b=3,w=4,E=9,S=10,x=11,T=12;e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),o.defineOptions(m.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;this.$wrap=e;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){e=parseInt(e),e>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function u(e,t){function i(e,r){r===void 0&&(r=!0);var i=n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");if(i.test(e)||t.regExp)return n&&t.$supportsUnicodeFlag?r?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b";return""}var n=r.supportsLookbehind(),s=Array.from(e),o=s[0],u=s[s.length-1];return i(o)+e+i(u,!1)}function a(e,t,n){var r=null,i=0;while(i<=e.length){t.lastIndex=i;var s=t.exec(e);if(!s)break;var o=s.index+s[0].length;if(o>e.length-n)break;if(!r||o>r.index+r[0].length)r=s;i=s.index+1}return r}function f(e,t){var n=5e3,r={row:t,column:0},i=e.doc.positionToIndex(r),s=i+n,o=e.doc.indexToPosition(s),u=o.row;return u+1}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new s(e,n,i,o),n==o&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start)?(r=null,!1):!0}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a,l;e:for(var c=u.offset||0;c<=f;c++){for(var h=0;hv)continue;o.push(l=new s(c,v,c+a-1,m)),a>2&&(c=c+a-2)}}else for(var g,y=0;yy&&(y=w),o.push(new s(g.startRow,g.startCol,g.endRow,g.endCol))}}else{g=r.getMatchOffsets(i[y],u);for(var h=0;hx&&o[h].end.row==T)h--;o=o.slice(y,h+1);for(y=0,h=o.length;y=i){n+="\\";break}var o=e.charCodeAt(r);switch(o){case t.Backslash:n+="\\";break;case t.n:n+="\n";break;case t.t:n+=" "}continue}if(s===t.DollarSign){r++;if(r>=i){n+="$";break}var u=e.charCodeAt(r);if(u===t.DollarSign){n+="$$";continue}if(u===t.Digit0||u===t.Ampersand){n+="$&";continue}if(t.Digit1<=u&&u<=t.Digit9){n+="$"+e[r];continue}}n+=e[r]}return n||e},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var s=r.exec(e);if(!s||!i&&s[0].length!=e.length)return null;t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var u=e[o];u&&u.toLowerCase()!=u?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,i+="u"}catch(s){e.$supportsUnicodeFlag=!1}e.wholeWord&&(n=u(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(s){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;ir)break;var a=e.getLine(o++);i=i==null?a:i+"\n"+a}var l=t.exec(i);t.lastIndex=0;if(l){var c=i.slice(0,l.index).split("\n"),h=l[0].split("\n"),p=n+c.length-1,d=c[c.length-1].length,v=p+h.length-1,m=h.length==1?d+h[0].length:h[h.length-1].length;return{startRow:p,startCol:d,endRow:v,endCol:m}}}return null},e.prototype.$multiLineBackward=function(e,t,n,r,i){var s,o=f(e,r),u=e.getLine(r).length-n;for(var l=r;l>=i;){for(var c=0;c=i;c++){var h=e.getLine(l--);s=s==null?h:h+"\n"+s}var p=a(s,t,u);if(p){var d=s.slice(0,p.index).split("\n"),v=p[0].split("\n"),m=l+d.length,g=d[d.length-1].length,y=m+v.length-1,b=v.length==1?g+v[0].length:v[v.length-1].length;return{startRow:m,startCol:g,endRow:y,endCol:b}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this.$isMultilineSearch(t),s=this.$multiLineForward,o=this.$multiLineBackward,u=t.backwards==1,a=t.skipCurrent!=0,f=n.unicode,l=t.range,c=t.start;c||(c=l?l[u?"end":"start"]:e.selection.getRange()),c.start&&(c=c[a!=u?"end":"start"]);var h=l?l.start.row:0,p=l?l.end.row:e.getLength()-1;if(u)var d=function(e){var n=c.row;if(m(n,c.column,e))return;for(n--;n>=h;n--)if(m(n,Number.MAX_VALUE,e))return;if(t.wrap==0)return;for(n=p,h=c.row;n>=h;n--)if(m(n,Number.MAX_VALUE,e))return};else var d=function(e){var n=c.row;if(m(n,c.column,e))return;for(n+=1;n<=p;n++)if(m(n,0,e))return;if(t.wrap==0)return;for(n=h,p=c.row;n<=p;n++)if(m(n,0,e))return};if(t.$isMultiLine)var v=n.length,m=function(t,r,i){var s=u?t-v+1:t;if(s<0||s+v>e.getLength())return;var o=e.getLine(s),a=o.search(n[0]);if(!u&&ar)return;if(i(s,a,s+v-1,l))return!0};else if(u)var m=function(t,s,u){if(i){var a=o(e,n,s,t,h);if(!a)return!1;if(u(a.startRow,a.startCol,a.endRow,a.endCol))return!0}else{var l=e.getLine(t),c=[],p,d=0;n.lastIndex=0;while(p=n.exec(l)){var v=p[0].length;d=p.index;if(!v){if(d>=l.length)break;n.lastIndex=d+=r.skipEmptyMatch(l,d,f)}if(p.index+v>s)break;c.push(p.index,v)}for(var m=c.length-1;m>=0;m-=2){var g=c[m-1],v=c[m];if(u(t,g,t,g+v))return!0}}};else var m=function(t,o,u){n.lastIndex=o;if(i){var a=s(e,n,t,p);if(a){var l=a.endRow<=p?a.endRow-1:p;l>t&&(t=l)}if(!a)return!1;if(u(a.startRow,a.startCol,a.endRow,a.endCol))return!0}else{var c=e.getLine(t),h,d;while(d=n.exec(c)){var v=d[0].length;h=d.index;if(u(t,h,t,h+v))return!0;if(!v){n.lastIndex=h+=r.skipEmptyMatch(c,h,f);if(h>=c.length)return!1}}}};return{forEach:d}},e}();t.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function a(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/keys"),s=e("../lib/useragent"),o=i.KEY_MODS,u=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&(typeof e=="string"?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var s=r[i];if(s==e)delete r[i];else if(Array.isArray(s)){var o=s.indexOf(e);o!=-1&&(s.splice(o,1),s.length==1&&(r[i]=s[0]))}}},e.prototype.bindKey=function(e,t,n){typeof e=="object"&&e&&(n==undefined&&(n=e.position),e=e[this.platform]);if(!e)return;if(typeof t=="function")return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach(function(e){var r="";if(e.indexOf(" ")!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var s=this.parseKeys(e),u=o[s.hashId]+s.key;this._addCommandToBinding(r+u,t,n)},this)},e.prototype._addCommandToBinding=function(e,t,n){var r=this.commandKeyBinding,i;if(!t)delete r[e];else if(!r[e]||this.$singleCommand)r[e]=t;else{Array.isArray(r[e])?(i=r[e].indexOf(t))!=-1&&r[e].splice(i,1):r[e]=[r[e]],typeof n!="number"&&(n=a(t));var s=r[e];for(i=0;in)break}s.splice(i,0,t)}},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=i.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},e.prototype.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,r){if(r<0)return;var i=o[t]+n,s=this.commandKeyBinding[i];e.$keyChain&&(e.$keyChain+=" "+i,s=this.commandKeyBinding[e.$keyChain]||s);if(s)if(s=="chainKeys"||s[s.length-1]=="chainKeys")return e.$keyChain=e.$keyChain||i,{command:"null"};if(e.$keyChain)if(!!t&&t!=4||n.length!=1){if(t==-1||r>0)e.$keyChain=""}else e.$keyChain=e.$keyChain.slice(0,-i.length-1);return{command:s}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}(),f=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.$singleCommand=!0,r}return r(t,e),t}(u);f.call=function(e,t,n){u.prototype.$init.call(e,t,n,!0)},u.call=function(e,t,n){u.prototype.$init.call(e,t,n,!1)},t.HashHandler=f,t.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,u=function(e){function t(t,n){var r=e.call(this,n,t)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}),r}return r(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}typeof e=="string"&&(e=this.commands[e]);if(!this.canExecute(e,t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue===!1?!1:!0},t.prototype.canExecute=function(e,t){return typeof e=="string"&&(e=this.commands[e]),e?t&&t.$readOnly&&!e.readOnly?!1:this.$checkCommandState!=0&&e.isAvailable&&!e.isAvailable(t)?!1:!0:!1},t.prototype.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},t.prototype.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})},t}(s);i.implement(u.prototype,o),t.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(e,t){typeof t=="number"&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty(),n=t?e.selection.getLineRange():e.selection.getRange();e._emit("cut",n),n.isEmpty()||e.session.remove(n),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(e){var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,u=e.session.doc.getTextRange(e.selection.getRange()),a=u.replace(/\n\s*/," ").length,f=e.session.doc.getLine(n.row);for(var l=n.row+1;l<=i.row+1;l++){var c=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));c.length!==0&&(c=" "+c),f+=c}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o0||e+t=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;var t=0;while(e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(e==null)return;var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()},e.prototype.$focusAnnotation=function(e){if(e==null)return;var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){var e=this.activeRowIndex;while(e>0){e--;if(this.$isFoldWidgetVisible(e)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,this.$focusFoldWidget(this.activeRowIndex);return}}return},e.prototype.$moveFoldWidgetDown=function(){var e=this.activeRowIndex;while(e0){e--;if(this.$isAnnotationVisible(e)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);return}}return},e.prototype.$moveAnnotationDown=function(){var e=this.activeRowIndex;while(e=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/lang"),u=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,f=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,p=e("./search").Search,d=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,y=e("./config"),b=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,E=e("./config").nls,S=e("./clipboard"),x=e("./lib/keys"),T=function(){function e(t,n,r){this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new m(u.isMac?"mac":"win",g),typeof document=="object"&&(this.textInput=new a(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new f(this),new l(this)),this.keyBinding=new c(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(n||r&&r.session||new h("")),y.resetOptions(this),r&&this.setOptions(r),y._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&e.returnValue===!1){this.curOp=null;return}this._signal("beforeEndOperation");if(!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:}n=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},e.prototype.setKeyboardHandler=function(e,t){if(e&&typeof e=="string"&&e!="ace"){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session==e)return;this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(!t||t.destroyed)return;t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null);var n=e.getCursorPosition(),r=e.getKeyboardHandler(),i=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),s=t.getMatchingBracketRanges(n,i);if(!s){var o=new b(t,n.row,n.column),u=o.getCurrentToken();if(u&&/\b(?:tag-open|tag-name)/.test(u.type)){var a=t.getMatchingTags(n);a&&(s=[a.openTagName.isEmpty()?a.openTag:a.openTagName,a.closeTagName.isEmpty()?a.closeTag:a.closeTagName])}}!s&&t.$mode.getMatching&&(s=t.$mode.getMatching(e.session));if(!s){e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide();return}var f="ace_bracket";Array.isArray(s)?s.length==1&&(f="ace_error_bracket"):s=[s],s.length==2&&(d.comparePoints(s[0].end,s[1].start)==0?s=[d.fromPoints(s[0].start,s[1].end)]:d.comparePoints(s[0].start,s[1].end)==0&&(s=[d.fromPoints(s[1].start,s[0].end)])),t.$bracketHighlight={ranges:s,markerIds:s.map(function(e){return t.addMarker(e,f,"text")})},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()},50)},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e)},e.prototype.onBlur=function(e){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e)},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:Infinity;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine){if(this.$selectionStyle!="line"||!this.selection.isMultiLine())t=this.getCursorPosition();this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new d(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),s=i.substring(n,r);if(s.length>5e3||!/[\w\d]/.test(s))return;var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),u=i.substring(n-1,r+1);if(!o.test(u))return;return o},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;var r=this.selection.getAllRanges();for(var i=0;iu.search(/\S|$/)){var a=u.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var f=i.column,l=n.getState(i.row),u=n.getLine(i.row),c=r.checkOutdent(l,u,e);n.insert(i,e),s&&s.selection&&(s.selection.length==2?this.selection.setSelectionRange(new d(i.row,f+s.selection[0],i.row,f+s.selection[1])):this.selection.setSelectionRange(new d(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3])));if(this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=r.getNextLineIndent(l,u.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},h)}c&&r.autoOutdent(l,n,i.row)}},e.prototype.autoIndent=function(){var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new d(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),r="",i="",s="",o=e.getTabString();for(var u=0;u0&&(r=e.getState(l-1),i=e.getLine(l-1),s=t.getNextLineIndent(r,i,o));var c=e.getLine(l),h=t.$getIndent(c);if(s!==h){if(h.length>0){var p=new d(l,0,l,h.length);e.remove(p)}s.length>0&&e.insert({row:l,column:0},s)}t.autoOutdent(r,e,l)}}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){if(t.extendLeft||t.extendRight){var n=this.selection.getRange();n.start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove()}(e||!this.selection.isEmpty())&&this.insert(e,!0);if(t.restoreStart||t.restoreEnd){var n=this.selection.getRange();n.start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n)}},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column===0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;tt.toLowerCase()?1:0});var i=new d(0,0,0,0);for(var r=e.first;r<=e.last;r++){var s=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=s.length,t.replace(i,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new d(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n=u&&s<=a&&(n=t,f.selection.clearSelection(),f.moveCursorTo(e,u+r),f.selection.selectTo(e,a+r)),u=a});var l=this.$toggleWordPairs,c;for(var h=0;h=a&&u<=f&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){l=p.replace(/[\s:.,'";}\]]+$/,"");break}a=f}}catch(d){n={error:d}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),t!=null},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=r?n.start:n.end,o=t.insert(s,t.getTextRange(n));n.start=s,n.end=o,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var s=i.toOrientedRange();n=this.$getSelectedRows(s),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),s.moveBy(r,0),i.fromOrientedRange(s)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;var u=0,a=0,f=o.length;for(var l=0;lp+1)break;p=d.last}l--,u=this.session.$moveLines(h,p,t?0:e),t&&e==-1&&(c=l+1);while(c<=l)o[c].moveBy(u,0),c++;t||(u=0),a+=u}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),i=r.getCurrentToken(),s=0;i&&i.type.indexOf("tag-name")!==-1&&(i=r.stepBackward());var o=i||r.stepForward();if(!o)return;var u,a=!1,f={},l=n.column-o.start,c,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g))for(;l1?f[o.value]++:i.value==="=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),r},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&i.mixin(t,e);var r=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(r)||this.$search.$options.needle,e||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?r.start=r.end:r.end=r.start,this.selection.setRange(r)},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(!e)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.topwindow.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e)return;delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",u),this.renderer.off("beforeRender",o)}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!="wide",s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e))},e.prototype.prompt=function(e,t,n){var r=this;y.loadModule("ace/ext/prompt",function(i){i.prompt(r,e,t,n)})},e}();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],i.implement(T.prototype,v),y.defineOptions(T.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?N.attach(this):N.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?N.attach(this):N.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),s.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),s.addCssClass(this.container,"ace_hasPlaceholder");var t=s.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===x.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}},r;e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",n.bind(this)),this.commands.addCommand(t),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",E("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),r||(r=new w(this)),r.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",n.bind(this)),this.commands.removeCommand(t),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),r&&r.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var N={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\u00b7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=T}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight),s=n.documentToScreenRow(e,0)*t.lineHeight;return s-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);var t=r.createFragment(this.element);for(var n=0;ns&&(a=i.end.row+1,i=t.getNextFoldLine(a,i),s=i?i.start.row:Infinity);if(a>r){while(this.$lines.getLength()>u+1)this.$lines.pop();break}o=this.$lines.get(++u),o?o.row=a:(o=this.$lines.createCell(a,e,this.session,l),this.$lines.push(o)),this.$renderCell(o,e,i,a),a++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";if(this.$fixedWidth||t.$useWrapMode)i=t.getLength()+r-1;var s=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();s+=o.left+o.right,s!==this.gutterWidth&&!isNaN(s)&&(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},e.prototype.$updateCursorRow=function(){if(!this.$highlightGutterLine)return;var e=this.session.selection.getCursor();if(this.$cursorRow===e.row)return;this.$cursorRow=e.row},e.prototype.updateLineHighlight=function(){if(!this.$highlightGutterLine)return;var e=this.session.selection.cursor.row;this.$cursorRow=e;if(this.$cursorCell&&this.$cursorCell.row==e)return;this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}},e.prototype.scrollLines=function(e){var t=this.config;this.config=e,this.$updateCursorRow();if(this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;this.oldLastRow=n;if(!t||r0;i--)this.$lines.shift();if(r>n)for(var i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){var r=[],i=t,s=this.session.getNextFoldLine(i),o=s?s.start.row:Infinity;for(;;){i>o&&(i=s.end.row+1,s=this.session.getNextFoldLine(i,s),o=s?s.start.row:Infinity);if(i>n)break;var u=this.$lines.createCell(i,e,this.session,l);this.$renderCell(u,e,s,i),r.push(u),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var s=e.element,o=this.session,u=s.childNodes[0],f=s.childNodes[1],l=s.childNodes[2],c=l.firstChild,h=o.$firstLineNumber,p=o.$breakpoints,d=o.$decorations,v=o.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&o.foldWidgets,g=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",w=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=(v?v.getText(o,i):i+h).toString();this.$highlightGutterLine&&(i==this.$cursorRow||n&&i=g&&this.$cursorRow<=n.end.row)&&(b+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),p[i]&&(b+=p[i]),d[i]&&(b+=d[i]),this.$annotations[i]&&i!==g&&(b+=this.$annotations[i].className);if(m){var S=m[i];S==null&&(S=m[i]=o.getFoldWidget(i))}if(S){var x="ace_fold-widget ace_"+S,T=S=="start"&&i==g&&in.right-t.right)return"foldWidgets"},e}();f.prototype.$fixedWidth=!1,f.prototype.$highlightGutterLine=!0,f.prototype.$renderer="",f.prototype.$showLineNumbers=!0,f.prototype.$showFoldWidgets=!0,i.implement(f.prototype,o),t.Gutter=f}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";function o(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}var r=e("../range").Range,i=e("../lib/dom"),s=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(!e)return;this.config=e,this.i=0;var t;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(i.isEmpty())continue;i=i.toScreenRange(this.session);if(r.renderer){var s=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,s,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,i,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type=="text"?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start"+" ace_br15",e)}if(this.i!=-1)while(this.ip,l==f),i,l==f?0:1,s)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;i=i||"";if(this.session.$bidiHandler.isBidiRow(t.start.row)){var f=t.clone();f.end.row=f.start.row,f.end.column=this.session.getLine(f.start.row).length,this.drawBidiSingleLineMarker(e,f,n+" ace_br1 ace_start",r,null,i)}else this.elt(n+" ace_br1 ace_start","height:"+o+"px;"+"right:"+s+"px;"+"top:"+u+"px;left:"+a+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var f=t.clone();f.start.row=f.end.row,f.start.column=0,this.drawBidiSingleLineMarker(e,f,n+" ace_br12",r,null,i)}else{u=this.$getTop(t.end.row,r);var l=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+o+"px;"+"width:"+l+"px;"+"top:"+u+"px;"+"left:"+s+"px;"+(i||""))}o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<=0)return;u=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(c?" ace_br"+c:""),"height:"+o+"px;"+"right:"+s+"px;"+"top:"+u+"px;"+"left:"+s+"px;"+(i||""))},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,s);var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+o+"px;"+"width:"+u+"px;"+"top:"+a+"px;"+"left:"+f+"px;"+(s||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=this.$getTop(t.start.row,r),a=this.$padding,f=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);f.forEach(function(e){this.elt(n,"height:"+o+"px;"+"width:"+(e.width+(i||0))+"px;"+"top:"+u+"px;"+"left:"+(a+e.left)+"px;"+(s||""))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),this.elt(n,"height:"+o+"px;"+"top:"+s+"px;"+"left:0;right:0;"+(i||""))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;this.elt(n,"height:"+o+"px;"+"top:"+s+"px;"+"left:0;right:0;"+(i||""))},e}();s.prototype.$padding=0,t.Marker=s}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,t,n){var r=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return r.has(e)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("./lines").Lines,u=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,f=e("./text_util").isTextToken,l=function(){function e(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()=="\n"&&e.getNewLineMode()!="windows",n=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;nl&&(u=a.end.row+1,a=this.session.getNextFoldLine(u,a),l=a?a.start.row:Infinity);if(u>i)break;var c=s[o++];if(c){this.dom.removeChildren(c),this.$renderLine(c,u,u==l?a:!1),f&&(c.style.top=this.$lines.computeLineTop(u,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(u)+"px";c.style.height!=h&&(f=!0,c.style.height=h)}u++}if(f)while(o0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){var r=[],s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=this.$lines.createCell(s,e,this.session),f=a.element;this.dom.removeChildren(f),i.setStyle(f.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),i.setStyle(f.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(f,s,s==u?o:!1),this.$useLineGroups()?f.className="ace_line_group":f.className="ace_line",r.push(a),s++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;var t=e.firstRow,n=e.lastRow,r=this.$lines;while(r.getLength())r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){var i=this,o=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,u=this.dom.createFragment(this.element),l,c=0;while(l=o.exec(r)){var h=l[1],p=l[2],d=l[3],v=l[4],m=l[5];if(!i.showSpaces&&p)continue;var g=c!=l.index?r.slice(c,l.index):"";c=l.index+l[0].length,g&&u.appendChild(this.dom.createTextNode(g,this.element));if(h){var y=i.session.getScreenTabSize(t+l.index);u.appendChild(i.$tabStrings[y].cloneNode(!0)),t+=y-1}else if(p)if(i.showSpaces){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_space",b.textContent=s.stringRepeat(i.SPACE_CHAR,p.length),u.appendChild(b)}else u.appendChild(this.dom.createTextNode(p,this.element));else if(d){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_space ace_invalid",b.textContent=s.stringRepeat(i.SPACE_CHAR,d.length),u.appendChild(b)}else if(v){t+=1;var b=this.dom.createElement("span");b.style.width=i.config.characterWidth*2+"px",b.className=i.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=i.showSpaces?i.SPACE_CHAR:v,u.appendChild(b)}else if(m){t+=1;var b=this.dom.createElement("span");b.style.width=i.config.characterWidth*2+"px",b.className="ace_cjk",b.textContent=m,u.appendChild(b)}}u.appendChild(this.dom.createTextNode(c?r.slice(c):r,this.element));if(!f(n.type)){var w="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");n.type=="fold"&&(b.style.width=n.value.length*this.config.characterWidth+"px",b.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),b.className=w,b.appendChild(u),e.appendChild(b)}else e.appendChild(u);return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(t[0]==" "){r-=r%this.tabSize;var i=r/this.tabSize;for(var s=0;ss[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==""&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var o=t.row+1;o0))return;r=e.element.childNodes[0]}var i=r.childNodes;if(i){var s=i[t-1];s&&s.classList&&s.classList.contains("ace_indent-guide")&&s.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(!this.$lines)return;var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var n=0;n=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(var n=e.length-1;n>=0;n--){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row=o)u=this.$renderToken(a,u,l,c.substring(0,o-r)),c=c.substring(o-r),r=o,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(s.stringRepeat("\u00a0",n.indent),this.element)),i++,u=0,o=n[i]||Number.MAX_VALUE;c.length!=0&&(r+=c.length,u=this.$renderToken(a,u,l,c))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,u,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){var n=0;for(var r=0;rthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,s);n=this.$renderToken(e,n,i,s)}},e.prototype.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=i?"":"",e.appendChild(s)},e.prototype.$renderLine=function(e,t,n){!n&&n!=0&&(n=this.session.getFoldLine(t));if(n)var r=this.$getFoldLineTokens(t,n);else var r=this.session.getTokens(t);var i=e;if(r.length){var s=this.session.getRowSplitData(t);if(s&&s.length){this.$renderWrappedLine(e,r,s);var i=e.lastChild}else{var i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(o)}},e.prototype.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.lengthn-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(sn?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();l.prototype.EOF_CHAR="\u00b6",l.prototype.EOL_CHAR_LF="\u00ac",l.prototype.EOL_CHAR_CRLF="\u00a4",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="\u2014",l.prototype.SPACE_CHAR="\u00b7",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,r.implement(l.prototype,u),t.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){var t=this.cursors;for(var n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){var e=this.cursors;for(var t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0);if(!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)));if(r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||o.top<0)&&n>1)continue;var u=this.cursors[i++]||this.addCursor(),a=u.style;this.drawCursor?this.drawCursor(u,o,e,t[n],this.session):this.isCursorInView(o,e)?(r.setStyle(a,"display","block"),r.translate(u,o.left,o.top),r.setStyle(a,"width",Math.round(e.characterWidth)+"px"),r.setStyle(a,"height",e.lineHeight+"px")):r.setStyle(a,"display","none")}while(this.cursors.length>i)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=o,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter,a=32768,f=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\u00a0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(f.prototype,u);var l=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=s.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){this.scrollTop=this.element.scrollTop;if(this.coeff!=1){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(f);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var c=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}return r(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(f);t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter;s.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_sb"+t,this.inner=s.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(a.prototype,u);var f=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,r.parent=t,r.width=r.VScrollWidth,r.renderer=n,r.inner.style.width=r.element.style.width=(r.width||15)+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if(e!=="mousedown")return;if(o.getButton(t)!==0||t.detail===2)return;if(t.target===this.inner){var n=this,r=t.clientY,i=function(e){r=e.clientY},s=function(){clearInterval(l)},u=t.clientY,a=this.thumbTop,f=function(){if(r===undefined)return;var e=n.scrollTopFromThumbTop(a+r-u);if(e===n.scrollTop)return;n._emit("scroll",{data:e})};o.capture(this.inner,i,s);var l=setInterval(f,20);return o.preventDefault(t)}var c=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(c)}),o.preventDefault(t)},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return t>>=0,t<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){if(this.pageHeight===e&&!t)return;this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop}))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(a);f.prototype.setInnerHeight=f.prototype.setScrollHeight;var l=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=n,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if(e!=="mousedown")return;if(o.getButton(t)!==0||t.detail===2)return;if(t.target===this.inner){var n=this,r=t.clientX,i=function(e){r=e.clientX},s=function(){clearInterval(l)},u=t.clientX,a=this.thumbLeft,f=function(){if(r===undefined)return;var e=n.scrollLeftFromThumbLeft(a+r-u);if(e===n.scrollLeft)return;n._emit("scroll",{data:e})};o.capture(this.inner,i,s);var l=setInterval(f,20);return o.preventDefault(t)}var c=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(c)}),o.preventDefault(t)},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return t>>=0,t<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){if(this.pageWidth===e&&!t)return;this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft}))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(a);l.prototype.setInnerWidth=l.prototype.setScrollWidth,t.ScrollBar=f,t.ScrollBarV=f,t.ScrollBarH=l,t.VScrollBar=f,t.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(r.blockIdle(100),n.changes=0,n.onRender(t));if(n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),u=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,f=512,l=typeof ResizeObserver=="function",c=200,h=function(){function e(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",f),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",u.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){e===undefined&&(e=this.$measureSizes());if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=o.onIdle(function t(){e.checkForSizeChanges(),o.onIdle(t,500)},500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/f};return t.width===0||t.height===0?null:t},e.prototype.$measureCharWidth=function(e){this.$main.textContent=s.stringRepeat(e,f);var t=this.$main.getBoundingClientRect();return t.width/f},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return!e||!e.parentElement?1:(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement)},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(c,0),e(0,c),e(c,c)],this.el)},e.prototype.transformCoordinates=function(e,t){function r(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function s(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function u(e){var t=e.getBoundingClientRect();return[t.left,t.top]}if(e){var n=this.$getZoom(this.el);e=o(1/n,e)}this.els||this.$initTransformMeasureNodes();var a=u(this.els[0]),f=u(this.els[1]),l=u(this.els[2]),h=u(this.els[3]),p=r(i(h,f),i(h,l),i(s(f,l),s(h,a))),d=o(1+p[0],i(f,a)),v=o(1+p[1],i(l,a));if(t){var m=t,g=p[0]*m[0]/c+p[1]*m[1]/c+1,y=s(o(m[0],d),o(m[1],v));return s(o(1/g/c,y),a)}var b=i(e,a),w=r(i(d,o(p[0],b)),i(v,o(p[1],b)),b);return o(c,w)},e}();h.prototype.$characterSize={width:0,height:0},r.implement(h.prototype,a),t.FontMetrics=h}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "\u21a9";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event_emitter").EventEmitter,o=function(){function e(e,t){this.canvas=r.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){function i(e,t){return e.priorityt.priority?1:0}var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(e){this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height;var n=(e.lastRow+1)*this.lineHeight;nthis.canvasHeight&&(v=this.canvasHeight-this.halfMinDecorationHeight),h=Math.round(v-this.halfMinDecorationHeight),p=Math.round(v+this.halfMinDecorationHeight)}r.fillStyle=t[s[a].type]||null,r.fillRect(0,c,this.canvasWidth,p-h)}}var m=this.renderer.session.selection.getCursor();if(m){var l=this.compensateFoldRows(m.row,u),c=Math.round((m.row-l)*this.lineHeight*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,c,this.canvasWidth,2)}},e.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var r=0;rt[r].start.row&&e=t[r].end.row&&(n+=t[r].end.row-t[r].start.row);return n},e}();i.implement(o.prototype,s),t.Decorator=o}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),o=e("./config"),u=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,f=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,d=e("./scrollbar_custom").VScrollBar,v=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),b=e("./layer/decorators").Decorator,w=e("./lib/useragent"),E=e("./layer/text_util").isTextToken;i.importCssString(y,"ace_editor.css",!1);var S=function(){function e(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),o.get("useStrictCSP")==null&&o.set("useStrictCSP",!1),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new f(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),o.resetOptions(this),o._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e);if(!e)return;this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode)},e.prototype.updateLines=function(e,t,n){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow)return;this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),!r&&this.$maxLines&&this.lineHeight>1&&(!i.style.height||i.style.height=="0px")&&(i.style.height="1px",r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);this.$resizeTimer&&this.$resizeTimer.cancel();if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)},e.prototype.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var s=0,o=this.$size,u={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};r&&(e||o.height!=r)&&(o.height=r,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(o.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL);if(n&&(e||o.width!=n)){s|=this.CHANGE_SIZE,o.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var a=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",a),i.setStyle(this.scroller.style,"right",a),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(o.scrollerWidth);if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)s|=this.CHANGE_FULL}return o.$dirty=!n||!r,s&&this._signal("resize",u),s},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(this.$isMousePressed)return;var e=this.textarea.style,t=this.$composition;if(!this.$keepTextAreaAtCursor&&!t){i.translate(this.textarea,-100,0);return}var n=this.$cursorLayer.$pixelPos;if(!n)return;t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,s=n.top,o=n.left;s-=r.offset;var u=t&&t.useTextareaForIME||w.isMobile?this.lineHeight:1;if(s<0||s>r.height-u){i.translate(this.textarea,0,0);return}var a=1,f=this.$size.height-u;if(!t)s+=this.lineHeight;else if(t.useTextareaForIME){var l=this.textarea.value;a=this.characterWidth*this.session.$getStringScreenWidth(l)[0]}else s+=this.lineHeight+2;o-=this.scrollLeft,o>this.$size.scrollerWidth-a&&(o=this.$size.scrollerWidth-a),o+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",u+"px"),i.setStyle(e,"width",a+"px"),i.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-a),Math.min(s,f))},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,n=this.session.documentToScreenRow(t,0)*e.lineHeight;return n-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,r){var i=this.margin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){e|=this.$computeLayerConfig()|this.$loop.clear();if(n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var s=n.width+2*this.$padding+"px",o=n.minHeight+"px";i.setStyle(this.content.style,"width",s),i.setStyle(this.content.style,"height",o)}e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName));if(e&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal("afterRender",e);return}if(e&this.CHANGE_SCROLL){this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal("afterRender",e);return}e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=n<=2*this.lineHeight,i=!r&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var s=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,s=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),u=this.$horizScroll!==o;u&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var f=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=l;var c=this.scrollMargin;this.session.setScrollTop(Math.max(-c.top,Math.min(this.scrollTop,i-t.scrollerHeight+c.bottom))),this.session.setScrollLeft(Math.max(-c.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+c.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+l<0||this.scrollTop>c.top),p=a!==h;p&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var d=this.scrollTop%this.lineHeight,v=Math.ceil(f/this.lineHeight)-1,m=Math.max(0,Math.round((this.scrollTop-d)/this.lineHeight)),g=m+v,y,b,w=this.lineHeight;m=e.screenToDocumentRow(m,0);var E=e.getFoldLine(m);E&&(m=E.start.row),y=e.documentToScreenRow(m,0),b=e.getRowLength(m)*w,g=Math.min(e.screenToDocumentRow(g,0),e.getLength()-1),f=t.scrollerHeight+e.getRowLength(g)*w+b,d=this.scrollTop-y*w;var S=0;if(this.layerConfig.width!=s||u)S=this.CHANGE_H_SCROLL;if(u||p)S|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(s=this.$getLongestLine());return this.layerConfig={width:s,padding:this.$padding,firstRow:m,firstRowScreen:y,lastRow:g,lineHeight:w,characterWidth:this.characterWidth,minHeight:f,maxHeight:i,offset:d,gutterOffset:w?Math.max(0,Math.ceil((d+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),S},e.prototype.$updateLines=function(){if(!this.$changedLines)return;var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight===0)return;var r=this.$cursorLayer.getPixelPosition(e),i=r.left,s=r.top,o=n&&n.top||0,u=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var a=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;a+o>s?(t&&a+o>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):a+this.$size.scrollerHeight-u=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),u=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:u,side:s-u>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),u=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(u,Math.max(o,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),e.useTextareaForIME==undefined&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(!this.$composition)return;this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,r=t||{row:n.row,column:n.column};this.removeGhostText();var s=this.$calculateWrappedTextChunks(e,r);this.addToken(s[0].text,"ghost_text",r.row,r.column),this.$ghostText={text:e,position:{row:r.row,column:r.column}};var o=i.createElement("div");if(s.length>1){var u=this.hideTokensAfterPosition(r.row,r.column),a;s.slice(1).forEach(function(e){var t=i.createElement("div"),n=i.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),e.text.length===0&&(e.text=" "),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),o.appendChild(t),a=t}),u.forEach(function(e){var t=i.createElement("span");E(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(i.createTextNode(e.value)),a.appendChild(t)}),this.$ghostTextWidget={el:o,row:r.row,column:r.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var f=this.$cursorLayer.getPixelPosition(r,!0),l=this.container,c=l.getBoundingClientRect().height,h=s.length*this.lineHeight,p=h0){var f=0;a.push(i[o].length);for(var l=0;l1||Math.abs(e.$size.height-r)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)},e}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,r.implement(S.prototype,g),o.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){typeof e=="number"&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){this.$textLayer.setHighlightIndentGuides(e)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e=="number"&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0;if(this.$scrollPastEnd==e)return;this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";function u(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(t),s.getBlob("application/javascript")}}function a(e){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var t=u(e),n=window.URL||window.webkitURL,r=n.createObjectURL(t);return new Worker(r)}return new Worker(e)}var r=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,o=e("../config"),f=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,s),this.$createWorkerFromOldConfig=function(t,n,r,i,s){e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);if(o.get("packaged")||!e.toUrl)i=i||o.moduleUrl(n,"worker");else{var u=this.$normalizePath;i=i||u(e.toUrl("ace/worker/worker.js",null,"_"));var f={};t.forEach(function(t){f[t]=u(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(i),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:f,module:n,classname:r}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),e.action=="insert"?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;if(!e)return;this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})}}).call(f.prototype);var l=function(e,t,n){var r=null,i=!1,u=Object.create(s),a=[],l=new f({messageBuffer:a,terminate:function(){},postMessage:function(e){a.push(e);if(!r)return;i?setTimeout(c):c()}});l.setEmitSync=function(e){i=e};var c=function(){var e=a.shift();e.command?r[e.command].apply(r,e.args):e.event&&u._signal(e.event,e.data)};return u.postMessage=function(e){l.onMessage({data:e})},u.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},u.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){r=new e[n](u);while(a.length)c()}),l};t.UIWorkerClient=l,t.WorkerClient=f,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(){function e(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})},e.prototype.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;this.updateAnchors(e),i&&(this.length+=n);if(i&&!this.session.$fromUndo)if(e.action==="insert")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.insertMergedLines(a,e.lines)}else if(e.action==="remove")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(this.$updating)return;var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)},e.prototype.onCursorChange=function(e){if(this.$updating||!this.session)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(this.$undoStackDepth===-1)return;var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){var i=t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()},e),u.addListener(t,"keyup",r,e),u.addListener(t,"blur",r,e)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount===0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){var e=this.ranges.length?this.ranges:[this.getRange()],t=[];for(var n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column0)g--;if(g>0){var y=0;while(r[y].isEmpty())y++}for(var b=g;b>=y;b--)r[b].isEmpty()&&r.splice(b,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection")},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,u=this.selection,a=u.rangeList,f=(r?u:a).ranges,l;if(!f.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var c=u._eventRegistry;u._eventRegistry={};var h=new s(o);this.inVirtualSelectionMode=!0;for(var p=f.length;p--;){if(i)while(p>0&&f[p].start.row==f[p-1].end.row)p--;h.fromOrientedRange(f[p]),h.index=p,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});!l&&d!==undefined&&(l=d),h.toOrientedRange(f[p])}h.detach(),this.selection=o.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=c,u.mergeOverlappingRanges(),u.ranges[0]&&u.fromOrientedRange(u.ranges[0]);var v=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),v&&v.from==v.to&&this.renderer.animateScrolling(v.from),l},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r0);u<0&&(u=0),f>=c&&(f=c-1)}var p=this.session.removeFullLines(u,f);p=this.$reAlignText(p,l),this.session.insert({row:u,column:0},p.join("\n")+"\n"),l||(o.start.column=0,o.end.column=p[p.length-1].length),this.selection.setRange(o)}else{s.forEach(function(e){t.substractPoint(e.cursor)});var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),io?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),st[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++tf){var p=e.getLine(l).length;return new r(f,u,l,p)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(!r.length)return;var s=o(r,{row:t,column:-1},i.comparePoints);s<0&&(s=-s-1),s>=r.length?s=n>0?0:r.length-1:s===0&&n<0&&(s=r.length-1);var u=r[s];if(!u||!n)return;if(u.row===t){do u=r[s+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[s+=n];while(u&&u.row==t);return a.length&&a}var r=e("../lib/dom"),i=e("../range").Range,s=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,i=e.getCursorPosition(),o=i.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type=="errorMarker"})[0];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];i.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,i.row=c.row,l=e.renderer.$gutterLayer.$annotations[i.row]}else{if(a)return;l={displayText:[s("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(i.row),e.selection.moveToPosition(i);var h={row:i.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=h.el.appendChild(r.createElement("div")),d=h.el.appendChild(r.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(i).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,l.displayText.forEach(function(e,t){p.appendChild(r.createTextNode(e)),t-1}var r=e("../token_iterator").TokenIterator;t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){var n=new r(e,0,0),s=n.getCurrentToken(),o=e.getTabString(),u=t.singletonTags,a=t.blockTags,f=t.formatOptions||{},l,c=!1,h=!1,p=!1,d="",v="",m="",g=0,y=0,b=0,w=0,E=0,S=0,x=0,T,N=0,C=0,k=[],L=!1,A,O=!1,M=!1,_=!1,D=!1,P={0:0},H=[],B=!1,j=function(){l&&l.value&&l.type!=="string.regexp"&&(l.value=l.value.replace(/^\s*/,""))},F=function(){var e=d.length-1;for(;;){if(e==0)break;if(d[e]!==" ")break;e-=1}d=d.slice(0,e+1)},I=function(){d=d.trimRight(),c=!1};while(s!==null){N=n.getCurrentTokenRow(),k=n.$rowTokens,l=n.stepForward();if(typeof s!="undefined"){v=s.value,E=0,_=m==="style"||e.$modeId==="ace/mode/css",i(s,"tag-open")?(M=!0,l&&(D=a.indexOf(l.value)!==-1),v==="0;C--)d+="\n";c=!0,!i(s,"comment")&&!s.type.match(/^(comment|string)$/)&&(v=v.trimLeft())}if(v){s.type==="keyword"&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(H[g]=v,j(),p=!0,v.match(/^(else|elseif)$/)&&d.match(/\}[\s]*$/)&&(I(),h=!0)):s.type==="paren.lparen"?(j(),v.substr(-1)==="{"&&(p=!0,O=!1,M||(C=1)),v.substr(0,1)==="{"&&(h=!0,d.substr(-1)!=="["&&d.trimRight().substr(-1)==="["?(I(),h=!1):d.trimRight().substr(-1)===")"?I():F())):s.type==="paren.rparen"?(E=1,v.substr(0,1)==="}"&&(H[g-1]==="case"&&E++,d.trimRight().substr(-1)==="{"?I():(h=!0,_&&(C+=2))),v.substr(0,1)==="]"&&d.substr(-1)!=="}"&&d.trimRight().substr(-1)==="}"&&(h=!1,w++,I()),v.substr(0,1)===")"&&d.substr(-1)!=="("&&d.trimRight().substr(-1)==="("&&(h=!1,w++,I()),F()):s.type!=="keyword.operator"&&s.type!=="keyword"||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?s.type==="punctuation.operator"&&v===";"?(I(),j(),p=!0,_&&C++):s.type==="punctuation.operator"&&v.match(/^(:|,)$/)?(I(),j(),v.match(/^(,)$/)&&x>0&&S===0&&f.lineBreaksAfterCommasInCurlyBlock?C++:(p=!0,c=!1)):s.type==="support.php_tag"&&v==="?>"&&!c?(I(),h=!0):i(s,"attribute-name")&&d.substr(-1).match(/^\s$/)?h=!0:i(s,"attribute-equals")?(F(),j()):i(s,"tag-close")?(F(),v==="/>"&&(h=!0)):s.type==="keyword"&&v.match(/^(case|default)$/)&&B&&(E=1):(I(),j(),h=!0,p=!0);if(c&&(!s.type.match(/^(comment)$/)||!!v.substr(0,1).match(/^[/#]$/))&&(!s.type.match(/^(string)$/)||!!v.substr(0,1).match(/^['"@]$/))){w=b;if(g>y){w++;for(A=g;A>y;A--)P[A]=w}else g")D&&l&&l.value===""&&g--),i(s,"tag-name")&&(m=v),T=N}}s=l}d=d.trim(),e.doc.setValue(d)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}); (function() { + ace.require(["ace/ext/beautify"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-code_lens.js b/mixly/common/modules/web-modules/ace/ext-code_lens.js new file mode 100644 index 00000000..445cc858 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-code_lens.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/code_lens",["require","exports","module","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],function(e,t,n){"use strict";function o(e){var t=e.$textLayer,n=t.$lenses;n&&n.forEach(function(e){e.remove()}),t.$lenses=null}function u(e,t){var n=e&t.CHANGE_LINES||e&t.CHANGE_FULL||e&t.CHANGE_SCROLL||e&t.CHANGE_TEXT;if(!n)return;var r=t.session,i=t.session.lineWidgets,u=t.$textLayer,a=u.$lenses;if(!i){a&&o(t);return}var f=t.$textLayer.$lines.cells,l=t.layerConfig,c=t.$padding;a||(a=u.$lenses=[]);var h=0;for(var p=0;p2*y-1)g.lastChild.remove();var w=t.$cursorLayer.getPixelPosition({row:d,column:0},!0).top-l.lineHeight*v.rowsAbove-l.offset;g.style.top=w+"px";var E=t.gutterWidth,S=r.getLine(d).search(/\S|$/);S==-1&&(S=0),E+=S*l.characterWidth,g.style.paddingLeft=c+E+"px"}while(h1)return;var f=n.documentToScreenRow(r),l=e.renderer.layerConfig.lineHeight,c=n.getScrollTop()+(f-s)*l;u==0&&o-l/4&&(c=-l),n.setScrollTop(c)}var n=e.session;if(!n)return;var r=e.codeLensProviders.length,i=[];e.codeLensProviders.forEach(function(e){e.provideCodeLenses(n,function(e,t){if(e)return;t.forEach(function(e){i.push(e)}),r--,r==0&&s()})})};var n=i.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){n.delay(250)},e.on("input",e.$updateLensesOnInput)}function l(e){e.off("input",e.$updateLensesOnInput),e.renderer.off("afterRender",u),e.$codeLensClickHandler&&e.container.removeEventListener("click",e.$codeLensClickHandler)}var r=e("../lib/event"),i=e("../lib/lang"),s=e("../lib/dom");t.setLenses=function(e,t){var n=Number.MAX_VALUE;return a(e),t&&t.forEach(function(t){var r=t.start.row,i=t.start.column,s=e.lineWidgets&&e.lineWidgets[r];if(!s||!s.lenses)s=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:r,column:i,lenses:[]});s.lenses.push(t.command),r a {\n cursor: pointer;\n pointer-events: auto;\n}\n.ace_codeLens > a:hover {\n color: #0000ff;\n text-decoration: underline;\n}\n.ace_dark > .ace_codeLens > a:hover {\n color: #4e94ce;\n}\n","codelense.css",!1)}); (function() { + ace.require(["ace/ext/code_lens"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-command_bar.js b/mixly/common/modules/web-modules/ace/ext-command_bar.js new file mode 100644 index 00000000..53d2a198 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-command_bar.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/command_bar",["require","exports","module","ace/tooltip","ace/lib/event_emitter","ace/lib/lang","ace/lib/dom","ace/lib/oop","ace/lib/useragent"],function(e,t,n){var r=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("../tooltip").Tooltip,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/lang"),u=e("../lib/dom"),a=e("../lib/oop"),f=e("../lib/useragent"),l="command_bar_tooltip_button",c="command_bar_button_value",h="command_bar_button_caption",p="command_bar_keybinding",d="command_bar_tooltip",v="MoreOptionsButton",m=100,g=4,y=function(e,t){return t.row>e.row?e:t.row===e.row&&t.column>e.column?e:t},b={Ctrl:{mac:"^"},Option:{mac:"\u2325"},Command:{mac:"\u2318"},Cmd:{mac:"\u2318"},Shift:"\u21e7",Left:"\u2190",Right:"\u2192",Up:"\u2191",Down:"\u2193"},w=function(){function e(e,t){var n,s;t=t||{},this.parentNode=e,this.tooltip=new i(this.parentNode),this.moreOptions=new i(this.parentNode),this.maxElementsOnTooltip=t.maxElementsOnTooltip||g,this.$alwaysShow=t.alwaysShow||!1,this.eventListeners={},this.elements={},this.commands={},this.tooltipEl=u.buildDom(["div",{"class":d}],this.tooltip.getElement()),this.moreOptionsEl=u.buildDom(["div",{"class":d+" tooltip_more_options"}],this.moreOptions.getElement()),this.$showTooltipTimer=o.delayedCall(this.$showTooltip.bind(this),t.showDelay||m),this.$hideTooltipTimer=o.delayedCall(this.$hideTooltip.bind(this),t.hideDelay||m),this.$tooltipEnter=this.$tooltipEnter.bind(this),this.$onMouseMove=this.$onMouseMove.bind(this),this.$onChangeScroll=this.$onChangeScroll.bind(this),this.$onEditorChangeSession=this.$onEditorChangeSession.bind(this),this.$scheduleTooltipForHide=this.$scheduleTooltipForHide.bind(this),this.$preventMouseEvent=this.$preventMouseEvent.bind(this);try{for(var a=r(["mousedown","mouseup","click"]),f=a.next();!f.done;f=a.next()){var l=f.value;this.tooltip.getElement().addEventListener(l,this.$preventMouseEvent),this.moreOptions.getElement().addEventListener(l,this.$preventMouseEvent)}}catch(c){n={error:c}}finally{try{f&&!f.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}}return e.prototype.registerCommand=function(e,t){var n=Object.keys(this.commands).length=f.top&&s.top<=f.bottom&&s.left>=f.left+e.gutterWidth&&s.left<=f.right;if(!l&&this.isShown()){this.$hideTooltip();return}if(l&&!this.isShown()&&this.getAlwaysShow()){this.$showTooltip();return}var c=s.top-o.offsetHeight,h=Math.min(u-o.offsetWidth,s.left),p=c>=0&&c+o.offsetHeight<=a&&h>=0&&h+o.offsetWidth<=u;if(!p){this.$hideTooltip();return}this.tooltip.setPosition(h,c);if(this.isMoreOptionsShown()){c+=o.offsetHeight,h=this.elements[v].getBoundingClientRect().left;var d=this.moreOptions.getElement(),a=window.innerHeight;c+d.offsetHeight>a&&(c-=o.offsetHeight+d.offsetHeight),h+d.offsetWidth>u&&(h=u-d.offsetWidth),this.moreOptions.setPosition(h,c)}},e.prototype.update=function(){Object.keys(this.elements).forEach(this.$updateElement.bind(this))},e.prototype.detach=function(){this.tooltip.hide(),this.moreOptions.hide(),this.$updateOnHoverHandlers(!1),this.editor&&(this.editor.off("changeSession",this.$onEditorChangeSession),this.editor.session&&(this.editor.session.off("changeScrollLeft",this.$onChangeScroll),this.editor.session.off("changeScrollTop",this.$onChangeScroll))),this.$mouseInTooltip=!1,this.editor=null},e.prototype.destroy=function(){this.tooltip&&this.moreOptions&&(this.detach(),this.tooltip.destroy(),this.moreOptions.destroy()),this.eventListeners={},this.commands={},this.elements={},this.tooltip=this.moreOptions=this.parentNode=null},e.prototype.$createCommand=function(e,t,n){var r=n?this.tooltipEl:this.moreOptionsEl,i=[],s=t.bindKey;s&&(typeof s=="object"&&(s=f.isMac?s.mac:s.win),s=s.split("|")[0],i=s.split("-"),i=i.map(function(e){if(b[e]){if(typeof b[e]=="string")return b[e];if(f.isMac&&b[e].mac)return b[e].mac}return e}));var o;n&&t.iconCssClass?o=["div",{"class":["ace_icon_svg",t.iconCssClass].join(" "),"aria-label":t.name+" ("+t.bindKey+")"}]:(o=[["div",{"class":c}],["div",{"class":h},t.name]],i.length&&o.push(["div",{"class":p},i.map(function(e){return["div",e]})])),u.buildDom(["div",{"class":[l,t.cssClass||""].join(" "),ref:e},o],r,this.elements),this.commands[e]=t;var a=function(n){this.editor&&this.editor.focus(),this.$shouldHideMoreOptions=this.isMoreOptionsShown(),!this.elements[e].disabled&&t.exec&&t.exec(this.editor),this.$shouldHideMoreOptions&&this.$setMoreOptionsVisibility(!1),this.update(),n.preventDefault()}.bind(this);this.eventListeners[e]=a,this.elements[e].addEventListener("click",a.bind(this)),this.$updateElement(e)},e.prototype.$setMoreOptionsVisibility=function(e){e?(this.moreOptions.setTheme(this.editor.renderer.theme),this.moreOptions.setClassName(d+"_wrapper"),this.moreOptions.show(),this.update(),this.updatePosition()):this.moreOptions.hide()},e.prototype.$onEditorChangeSession=function(e){e.oldSession&&(e.oldSession.off("changeScrollTop",this.$onChangeScroll),e.oldSession.off("changeScrollLeft",this.$onChangeScroll)),this.detach()},e.prototype.$onChangeScroll=function(){this.editor.renderer&&(this.isShown()||this.getAlwaysShow())&&this.editor.renderer.once("afterRender",this.updatePosition.bind(this))},e.prototype.$onMouseMove=function(e){if(this.$mouseInTooltip)return;var t=this.editor.getCursorPosition(),n=this.editor.renderer.textToScreenCoordinates(t.row,t.column),r=this.editor.renderer.lineHeight,i=e.clientY>=n.pageY&&e.clientY-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},e.prototype.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;rt&&(t=i)}var s=[];for(var o=0;o=t.length?t.length:e.length,r=[];for(var i=0;i"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"],function(e,t,n){"use strict";var r=e("../keyboard/hash_handler").HashHandler,i=e("../editor").Editor,s=e("../snippets").snippetManager,o=e("../range").Range,u=e("../config"),a,f,l=function(){function e(){}return e.prototype.setupContext=function(e){this.ace=e,this.indentation=e.session.getTabString(),a||(a=window.emmet);var t=a.resources||a.require("resources");t.setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},e.prototype.getSelectionRange=function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},e.prototype.createSelection=function(e,t){var n=this.ace.session.doc;this.ace.selection.setRange({start:n.indexToPosition(e),end:n.indexToPosition(t)})},e.prototype.getCurrentLineRange=function(){var e=this.ace,t=e.getCursorPosition().row,n=e.session.getLine(t).length,r=e.session.doc.positionToIndex({row:t,column:0});return{start:r,end:r+n}},e.prototype.getCaretPos=function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},e.prototype.setCaretPos=function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},e.prototype.getCurrentLine=function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},e.prototype.replaceContent=function(e,t,n,r){n==null&&(n=t==null?this.getContent().length:t),t==null&&(t=0);var i=this.ace,u=i.session.doc,a=o.fromPoints(u.indexToPosition(t),u.indexToPosition(n));i.session.remove(a),a.end=a.start,e=this.$updateTabstops(e),s.insertSnippet(i,e)},e.prototype.getContent=function(){return this.ace.getValue()},e.prototype.getSyntax=function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if(e=="html"||e=="php"){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);typeof n!="string"&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:e=="php"&&(e="html"))}return e},e.prototype.getProfileName=function(){var e=a.resources||a.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var t=e.getVariable("profile");return t||(t=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)!=-1?"xhtml":"html"),t;default:var n=this.ace.session.$mode;return n.emmetConfig&&n.emmetConfig.profile||"xhtml"}},e.prototype.prompt=function(e){return prompt(e)},e.prototype.getSelection=function(){return this.ace.session.getTextRange()},e.prototype.getFilePath=function(){return""},e.prototype.$updateTabstops=function(e){var t=1e3,n=0,r=null,i=a.tabStops||a.require("tabStops"),s=a.resources||a.require("resources"),o=s.getVocabulary("user"),u={tabstop:function(e){var s=parseInt(e.group,10),o=s===0;o?s=++n:s+=t;var a=e.placeholder;a&&(a=i.processText(a,u));var f="${"+s+(a?":"+a:"")+"}";return o&&(r=[e.start,f]),f},escape:function(e){return e=="$"?"\\$":e=="\\"?"\\\\":e}};e=i.processText(e,u);if(o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e))e+="${0}";else if(r){var f=a.utils?a.utils.common:a.require("utils");e=f.replaceSubstring(e,"${0}",r[0],r[1])}return e},e}(),c={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},h=new l;t.commands=new r,t.runEmmetCommand=function v(e){if(this.action=="expand_abbreviation_with_tab"){if(!e.selection.isEmpty())return!1;var n=e.selection.lead,r=e.session.getTokenAt(n.row,n.column);if(r&&/\btag\b/.test(r.type))return!1}try{h.setupContext(e);var i=a.actions||a.require("actions");if(this.action=="wrap_with_abbreviation")return setTimeout(function(){i.run("wrap_with_abbreviation",h)},0);var s=i.run(this.action,h)}catch(o){if(!a){var f=t.load(v.bind(this,e));return this.action=="expand_abbreviation_with_tab"?!1:f}e._signal("changeStatus",typeof o=="string"?o:o.message),u.warn(o),s=!1}return s};for(var p in c)t.commands.addCommand({name:"emmet:"+p,action:p,bindKey:c[p],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,n){n?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){if(!e)return!1;if(e.emmetConfig)return!0;var t=e.$id||e;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(t)},t.isAvailable=function(e,n){if(/(evaluate_math_expression|expand_abbreviation)$/.test(n))return!0;var r=e.session.$mode,i=t.isSupportedMode(r);if(i&&r.$modes)try{h.setupContext(e),/js|php/.test(h.getSyntax())&&(i=!1)}catch(s){}return i};var d=function(e,n){var r=n;if(!r)return;var i=t.isSupportedMode(r.session.$mode);e.enableEmmet===!1&&(i=!1),i&&t.load(),t.updateCommands(r,i)};t.load=function(e){return typeof f!="string"?(u.warn("script for emmet-core is not loaded"),!1):(u.loadModule(f,function(){f=null,e&&e()}),!0)},t.AceEmmetEditor=l,u.defineOptions(i.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",d),d({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){typeof e=="string"?f=e:a=e}}); (function() { + ace.require(["ace/ext/emmet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-error_marker.js b/mixly/common/modules/web-modules/ace/ext-error_marker.js new file mode 100644 index 00000000..a98ffefc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-error_marker.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/ext/error_marker"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-hardwrap.js b/mixly/common/modules/web-modules/ace/ext-hardwrap.js new file mode 100644 index 00000000..bf646e75 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-hardwrap.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.lengthn)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){var r="doc-tooltip ";for(var i=0;i=l?r="bottom":r="top"),r==="top"?(c.bottom=e.top-this.$borderSize,c.top=c.bottom-l):r==="bottom"&&(c.top=e.top+t+this.$borderSize,c.bottom=c.top+l);var d=c.top>=0&&c.bottom<=u;if(!s&&!d)return!1;d?f.$maxPixelHeight=null:r==="top"?f.$maxPixelHeight=p:f.$maxPixelHeight=h,r==="top"?(o.style.top="",o.style.bottom=u-c.bottom+"px",n.isTopdown=!1):(o.style.top=c.top+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var v=e.left;return v+o.offsetWidth>a&&(v=a-o.offsetWidth),o.style.left=v+"px",o.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":undefined,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();a.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=m,t.$singleLineEditor=v,t.getAriaId=c}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var s=0;s=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(this.$elements||!this.editor)return;window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var e=this.editor.container.parentNode,t=[];while(e)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var s={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,u=othis.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var u=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else{var p=u.toLowerCase().indexOf(i);if(p>-1)l=p;else for(var d=0;d=0?m<0||v0&&(a===-1&&(l+=10),l+=h,f|=1<=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("../tooltip").Tooltip,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/lang"),u=e("../lib/dom"),a=e("../lib/oop"),f=e("../lib/useragent"),l="command_bar_tooltip_button",c="command_bar_button_value",h="command_bar_button_caption",p="command_bar_keybinding",d="command_bar_tooltip",v="MoreOptionsButton",m=100,g=4,y=function(e,t){return t.row>e.row?e:t.row===e.row&&t.column>e.column?e:t},b={Ctrl:{mac:"^"},Option:{mac:"\u2325"},Command:{mac:"\u2318"},Cmd:{mac:"\u2318"},Shift:"\u21e7",Left:"\u2190",Right:"\u2192",Up:"\u2191",Down:"\u2193"},w=function(){function e(e,t){var n,s;t=t||{},this.parentNode=e,this.tooltip=new i(this.parentNode),this.moreOptions=new i(this.parentNode),this.maxElementsOnTooltip=t.maxElementsOnTooltip||g,this.$alwaysShow=t.alwaysShow||!1,this.eventListeners={},this.elements={},this.commands={},this.tooltipEl=u.buildDom(["div",{"class":d}],this.tooltip.getElement()),this.moreOptionsEl=u.buildDom(["div",{"class":d+" tooltip_more_options"}],this.moreOptions.getElement()),this.$showTooltipTimer=o.delayedCall(this.$showTooltip.bind(this),t.showDelay||m),this.$hideTooltipTimer=o.delayedCall(this.$hideTooltip.bind(this),t.hideDelay||m),this.$tooltipEnter=this.$tooltipEnter.bind(this),this.$onMouseMove=this.$onMouseMove.bind(this),this.$onChangeScroll=this.$onChangeScroll.bind(this),this.$onEditorChangeSession=this.$onEditorChangeSession.bind(this),this.$scheduleTooltipForHide=this.$scheduleTooltipForHide.bind(this),this.$preventMouseEvent=this.$preventMouseEvent.bind(this);try{for(var a=r(["mousedown","mouseup","click"]),f=a.next();!f.done;f=a.next()){var l=f.value;this.tooltip.getElement().addEventListener(l,this.$preventMouseEvent),this.moreOptions.getElement().addEventListener(l,this.$preventMouseEvent)}}catch(c){n={error:c}}finally{try{f&&!f.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}}return e.prototype.registerCommand=function(e,t){var n=Object.keys(this.commands).length=f.top&&s.top<=f.bottom&&s.left>=f.left+e.gutterWidth&&s.left<=f.right;if(!l&&this.isShown()){this.$hideTooltip();return}if(l&&!this.isShown()&&this.getAlwaysShow()){this.$showTooltip();return}var c=s.top-o.offsetHeight,h=Math.min(u-o.offsetWidth,s.left),p=c>=0&&c+o.offsetHeight<=a&&h>=0&&h+o.offsetWidth<=u;if(!p){this.$hideTooltip();return}this.tooltip.setPosition(h,c);if(this.isMoreOptionsShown()){c+=o.offsetHeight,h=this.elements[v].getBoundingClientRect().left;var d=this.moreOptions.getElement(),a=window.innerHeight;c+d.offsetHeight>a&&(c-=o.offsetHeight+d.offsetHeight),h+d.offsetWidth>u&&(h=u-d.offsetWidth),this.moreOptions.setPosition(h,c)}},e.prototype.update=function(){Object.keys(this.elements).forEach(this.$updateElement.bind(this))},e.prototype.detach=function(){this.tooltip.hide(),this.moreOptions.hide(),this.$updateOnHoverHandlers(!1),this.editor&&(this.editor.off("changeSession",this.$onEditorChangeSession),this.editor.session&&(this.editor.session.off("changeScrollLeft",this.$onChangeScroll),this.editor.session.off("changeScrollTop",this.$onChangeScroll))),this.$mouseInTooltip=!1,this.editor=null},e.prototype.destroy=function(){this.tooltip&&this.moreOptions&&(this.detach(),this.tooltip.destroy(),this.moreOptions.destroy()),this.eventListeners={},this.commands={},this.elements={},this.tooltip=this.moreOptions=this.parentNode=null},e.prototype.$createCommand=function(e,t,n){var r=n?this.tooltipEl:this.moreOptionsEl,i=[],s=t.bindKey;s&&(typeof s=="object"&&(s=f.isMac?s.mac:s.win),s=s.split("|")[0],i=s.split("-"),i=i.map(function(e){if(b[e]){if(typeof b[e]=="string")return b[e];if(f.isMac&&b[e].mac)return b[e].mac}return e}));var o;n&&t.iconCssClass?o=["div",{"class":["ace_icon_svg",t.iconCssClass].join(" "),"aria-label":t.name+" ("+t.bindKey+")"}]:(o=[["div",{"class":c}],["div",{"class":h},t.name]],i.length&&o.push(["div",{"class":p},i.map(function(e){return["div",e]})])),u.buildDom(["div",{"class":[l,t.cssClass||""].join(" "),ref:e},o],r,this.elements),this.commands[e]=t;var a=function(n){this.editor&&this.editor.focus(),this.$shouldHideMoreOptions=this.isMoreOptionsShown(),!this.elements[e].disabled&&t.exec&&t.exec(this.editor),this.$shouldHideMoreOptions&&this.$setMoreOptionsVisibility(!1),this.update(),n.preventDefault()}.bind(this);this.eventListeners[e]=a,this.elements[e].addEventListener("click",a.bind(this)),this.$updateElement(e)},e.prototype.$setMoreOptionsVisibility=function(e){e?(this.moreOptions.setTheme(this.editor.renderer.theme),this.moreOptions.setClassName(d+"_wrapper"),this.moreOptions.show(),this.update(),this.updatePosition()):this.moreOptions.hide()},e.prototype.$onEditorChangeSession=function(e){e.oldSession&&(e.oldSession.off("changeScrollTop",this.$onChangeScroll),e.oldSession.off("changeScrollLeft",this.$onChangeScroll)),this.detach()},e.prototype.$onChangeScroll=function(){this.editor.renderer&&(this.isShown()||this.getAlwaysShow())&&this.editor.renderer.once("afterRender",this.updatePosition.bind(this))},e.prototype.$onMouseMove=function(e){if(this.$mouseInTooltip)return;var t=this.editor.getCursorPosition(),n=this.editor.renderer.textToScreenCoordinates(t.row,t.column),r=this.editor.renderer.lineHeight,i=e.clientY>=n.pageY&&e.clientY",o.escapeHTML(e.caption),"","
",o.escapeHTML(l(e.snippet))].join(""))},id:"snippetCompleter"},h=[c,a,f];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=a,t.keyWordCompleter=f,t.snippetCompleter=c;var p={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},d=function(e,t){v(t.session.$mode)},v=function(e){typeof e=="string"&&(e=s.$modes[e]);if(!e)return;r.files||(r.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(v)},m=function(e,t){if(!t||!e||r.files[e])return;r.files[e]={},s.loadModule(t,function(t){if(!t)return;r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){v("ace/mode/"+e)}))})},g=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):w(e)}},y,b=o.delayedCall(function(){w(y)},0),w=function(e){var t=e.editor,n=u.getCompletionPrefix(t),r=e.args,s=u.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||s){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},E=e("../editor").Editor;e("../config").defineOptions(E.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",g)):this.commands.off("afterExec",g)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(p),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(p),this.off("changeMode",d))},value:!1}})}),ace.define("ace/ext/inline_autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/inline","ace/autocomplete","ace/autocomplete","ace/editor","ace/autocomplete/util","ace/lib/dom","ace/lib/lang","ace/ext/command_bar","ace/ext/command_bar","ace/ext/language_tools","ace/ext/language_tools","ace/ext/language_tools","ace/config"],function(e,t,n){"use strict";var r=e("../keyboard/hash_handler").HashHandler,i=e("../autocomplete/inline").AceInline,s=e("../autocomplete").FilteredList,o=e("../autocomplete").CompletionProvider,u=e("../editor").Editor,a=e("../autocomplete/util"),f=e("../lib/dom"),l=e("../lib/lang"),c=e("./command_bar").CommandBarTooltip,h=e("./command_bar").BUTTON_CLASS_NAME,p=e("./language_tools").snippetCompleter,d=e("./language_tools").textCompleter,v=e("./language_tools").keyWordCompleter,m=function(e,t){t.completer&&t.completer.destroy()},g=function(){function e(e){this.editor=e,this.keyboardHandler=new r(this.commands),this.$index=-1,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions()}.bind(this))}return e.prototype.getInlineRenderer=function(){return this.inlineRenderer||(this.inlineRenderer=new i),this.inlineRenderer},e.prototype.getInlineTooltip=function(){return this.inlineTooltip||(this.inlineTooltip=e.createInlineTooltip(document.body||document.documentElement)),this.inlineTooltip},e.prototype.show=function(e){this.activated=!0,this.editor.completer!==this&&(this.editor.completer&&this.editor.completer.detach(),this.editor.completer=this),this.editor.on("changeSelection",this.changeListener),this.editor.on("blur",this.blurListener),this.updateCompletions(e)},e.prototype.$open=function(){this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({}),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.getInlineTooltip().attach(this.editor),this.$index===-1?this.setIndex(0):this.$showCompletion(),this.changeTimer.cancel()},e.prototype.insertMatch=function(){var e=this.getCompletionProvider().insertByIndex(this.editor,this.$index);return this.detach(),e},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column=0},e.prototype.setIndex=function(e){if(!this.completions||!this.completions.filtered)return;var t=Math.max(-1,Math.min(this.completions.filtered.length-1,e));t!==this.$index&&(this.$index=t,this.$showCompletion())},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new o(e)),this.completionProvider},e.prototype.$showCompletion=function(){this.getInlineRenderer().show(this.editor,this.completions.filtered[this.$index],this.completions.filterText)||this.getInlineRenderer().hide(),this.inlineTooltip&&this.inlineTooltip.isShown()&&this.inlineTooltip.update()},e.prototype.$updatePrefix=function(){var e=this.editor.getCursorPosition(),t=this.editor.session.getTextRange({start:this.base,end:e});return this.completions.setFilter(t),this.completions.filtered.length?this.completions.filtered.length==1&&this.completions.filtered[0].value==t&&!this.completions.filtered[0].snippet?this.detach():(this.$open(this.editor,t),t):this.detach()},e.prototype.updateCompletions=function(e){var t="";if(e&&e.matches){var n=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new s(e.matches),this.$open(this.editor,"")}this.base&&this.completions&&(t=this.$updatePrefix());var r=this.editor.getSession(),n=this.editor.getCursorPosition(),t=a.getCompletionPrefix(this.editor);this.base=r.doc.createAnchor(n.row,n.column-t.length),this.base.$insertRight=!0;var e={exactMatch:!0,ignoreCaption:!0};this.getCompletionProvider({prefix:t,base:this.base,pos:n}).provideCompletions(this.editor,e,function(e,t,n){var r=t.filtered,i=a.getCompletionPrefix(this.editor);if(n){if(!r.length)return this.detach();if(r.length==1&&r[0].value==i&&!r[0].snippet)return this.detach()}this.completions=t,this.$open(this.editor,i)}.bind(this))},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener)),this.changeTimer.cancel(),this.inlineTooltip&&this.inlineTooltip.detach(),this.setIndex(-1),this.completionProvider&&this.completionProvider.detach(),this.inlineRenderer&&this.inlineRenderer.isOpen()&&this.inlineRenderer.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},e.prototype.destroy=function(){this.detach(),this.inlineRenderer&&this.inlineRenderer.destroy(),this.inlineTooltip&&this.inlineTooltip.destroy(),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineTooltip=this.editor=this.inlineRenderer=null},e.prototype.updateDocTooltip=function(){},e}();g.prototype.commands={Previous:{bindKey:"Alt-[",name:"Previous",exec:function(e){e.completer.goTo("prev")}},Next:{bindKey:"Alt-]",name:"Next",exec:function(e){e.completer.goTo("next")}},Accept:{bindKey:{win:"Tab|Ctrl-Right",mac:"Tab|Cmd-Right"},name:"Accept",exec:function(e){return e.completer.insertMatch()}},Close:{bindKey:"Esc",name:"Close",exec:function(e){e.completer.detach()}}},g.for=function(e){return e.completer instanceof g?e.completer:(e.completer&&(e.completer.destroy(),e.completer=null),e.completer=new g(e),e.once("destroy",m),e.completer)},g.startCommand={name:"startInlineAutocomplete",exec:function(e,t){var n=g.for(e);n.show(t)},bindKey:{win:"Alt-C",mac:"Option-C"}};var y=[p,d,v];e("../config").defineOptions(u.prototype,"editor",{enableInlineAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:y),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1}}),g.createInlineTooltip=function(e){var t=new c(e);return t.registerCommand("Previous",Object.assign({},g.prototype.commands.Previous,{enabled:!0,type:"button",iconCssClass:"ace_arrow_rotated"})),t.registerCommand("Position",{enabled:!1,getValue:function(e){return e?[e.completer.getIndex()+1,e.completer.getLength()].join("/"):""},type:"text",cssClass:"completion_position"}),t.registerCommand("Next",Object.assign({},g.prototype.commands.Next,{enabled:!0,type:"button",iconCssClass:"ace_arrow"})),t.registerCommand("Accept",Object.assign({},g.prototype.commands.Accept,{enabled:function(e){return!!e&&e.completer.getIndex()>=0},type:"button"})),t.registerCommand("ShowTooltip",{name:"Always Show Tooltip",exec:function(){t.setAlwaysShow(!t.getAlwaysShow())},enabled:!0,getValue:function(){return t.getAlwaysShow()},type:"checkbox"}),t},f.importCssString('\n\n.ace_icon_svg.ace_arrow,\n.ace_icon_svg.ace_arrow_rotated {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODM3MDEgMTVMNC41ODc1MSAxMy43MTU1TDEwLjE0NjggOEw0LjU4NzUxIDIuMjg0NDZMNS44MzcwMSAxTDEyLjY0NjUgOEw1LjgzNzAxIDE1WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=");\n}\n\n.ace_icon_svg.ace_arrow_rotated {\n transform: rotate(180deg);\n}\n\ndiv.'.concat(h,".completion_position {\n padding: 0;\n}\n"),"inlineautocomplete.css",!1),t.InlineAutocomplete=g}); (function() { + ace.require(["ace/ext/inline_autocomplete"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-keybinding_menu.js b/mixly/common/modules/web-modules/ace/ext-keybinding_menu.js new file mode 100644 index 00000000..c44aa555 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-keybinding_menu.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.exports="#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'
'+t.command+" : "+''+t.key+"
"},"");s.id="kbshortcutmenu",s.innerHTML="

Keyboard Shortcuts

"+o+"
",n(t,s)}}var r=e("../editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}); (function() { + ace.require(["ace/ext/keybinding_menu"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-language_tools.js b/mixly/common/modules/web-modules/ace/ext-language_tools.js new file mode 100644 index 00000000..fba1a768 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-language_tools.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,t,n){"use strict";function p(e){var t=(new Date).toLocaleString("en-us",e);return t.length==1?"0"+t:t}var r=e("./lib/dom"),i=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),u=e("./range").Range,a=e("./range_list").RangeList,f=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,c=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return c.getText&&c.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){var t=e.session.$mode||{};return t.lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};h.SELECTED_TEXT=h.SELECTION;var d=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var r={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag="",""},next:"formatString"};return e.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:r=="n"?e="\n":r=="t"?e=" ":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,s=e("../range").Range,o=e("../lib/event"),u=e("../lib/lang"),a=e("../lib/dom"),f=e("../config").nls,l=e("./../lib/useragent"),c=function(e){return"suggest-aria-id:".concat(e)},h=l.isSafari?"menu":"listbox",p=l.isSafari?"menuitem":"option",d=l.isSafari?"aria-current":"aria-selected",v=function(e){var t=new r(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},m=function(){function e(e){var t=a.createElement("div"),n=v(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",h),n.renderer.$textLayer.element.setAttribute("aria-roledescription",f("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",f("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()});var i,l=new s(-1,0,-1,Infinity),m=new s(-1,0,-1,Infinity);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?l.id&&(n.session.removeMarker(l.id),l.id=null):l.id=n.session.addMarker(l,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!i){i=e;return}if(i.x==e.x&&i.y==e.y)return;i=e,i.scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;l.start.row!=t&&(l.id||n.setRow(t),y(t))}),n.renderer.on("beforeRender",function(){if(i&&l.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;l.id||n.setRow(e),y(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.renderer.$textLayer;for(var t=e.config.firstRow,r=e.config.lastRow;t<=r;t++){var i=e.element.childNodes[t-e.config.firstRow];i.setAttribute("role",p),i.setAttribute("aria-roledescription",f("autocomplete.popup.item.aria-roledescription","item")),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute("aria-posinset",t+1);var s=n.getData(t);if(s){var o="".concat(s.caption||s.value).concat(s.meta?", ".concat(s.meta):"");i.setAttribute("aria-label",o)}var u=i.querySelectorAll(".ace_completion-highlight");u.forEach(function(e){e.setAttribute("role","mark")})}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow],i=document.activeElement;r!==n.selectedNode&&n.selectedNode&&(a.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(d),n.selectedNode.removeAttribute("id")),i.removeAttribute("aria-activedescendant"),n.selectedNode=r;if(r){var s=c(e);a.addCssClass(r,"ace_selected"),r.id=s,t.element.setAttribute("aria-activedescendant",s),i.setAttribute("aria-activedescendant",s),r.setAttribute(d,"true")}});var g=function(){y(-1)},y=function(e,t){e!==l.start.row&&(l.start.row=l.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return l.start.row},o.addListener(n.container,"mouseout",function(){n.isMouseOver=!1,g()}),n.on("hide",g),n.on("changeSelection",g),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t=="string"?t:t&&t.value||""};var b=n.session.bgTokenizer;return b.$tokenizeRow=function(e){function s(e,n){e&&r.push({type:(t.className||"")+(n||""),value:e})}var t=n.data[e],r=[];if(!t)return r;typeof t=="string"&&(t={value:t});var i=t.caption||t.value||t.name,o=i.toLowerCase(),u=(n.filterText||"").toLowerCase(),a=0,f=0;for(var l=0;l<=u.length;l++)if(l!=f&&(t.matchMask&1<=l?r="bottom":r="top"),r==="top"?(c.bottom=e.top-this.$borderSize,c.top=c.bottom-l):r==="bottom"&&(c.top=e.top+t+this.$borderSize,c.bottom=c.top+l);var d=c.top>=0&&c.bottom<=u;if(!s&&!d)return!1;d?f.$maxPixelHeight=null:r==="top"?f.$maxPixelHeight=p:f.$maxPixelHeight=h,r==="top"?(o.style.top="",o.style.bottom=u-c.bottom+"px",n.isTopdown=!1):(o.style.top=c.top+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var v=e.left;return v+o.offsetWidth>a&&(v=a-o.offsetWidth),o.style.left=v+"px",o.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":undefined,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();a.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=m,t.$singleLineEditor=v,t.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){var r="doc-tooltip ";for(var i=0;i=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(this.$elements||!this.editor)return;window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var e=this.editor.container.parentNode,t=[];while(e)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var s={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,u=othis.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var u=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else{var p=u.toLowerCase().indexOf(i);if(p>-1)l=p;else for(var d=0;d=0?m<0||v0&&(a===-1&&(l+=10),l+=h,f|=1<",o.escapeHTML(e.caption),"","
",o.escapeHTML(l(e.snippet))].join(""))},id:"snippetCompleter"},h=[c,a,f];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=a,t.keyWordCompleter=f,t.snippetCompleter=c;var p={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},d=function(e,t){v(t.session.$mode)},v=function(e){typeof e=="string"&&(e=s.$modes[e]);if(!e)return;r.files||(r.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(v)},m=function(e,t){if(!t||!e||r.files[e])return;r.files[e]={},s.loadModule(t,function(t){if(!t)return;r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){v("ace/mode/"+e)}))})},g=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):w(e)}},y,b=o.delayedCall(function(){w(y)},0),w=function(e){var t=e.editor,n=u.getCompletionPrefix(t),r=e.args,s=u.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||s){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},E=e("../editor").Editor;e("../config").defineOptions(E.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",g)):this.commands.off("afterExec",g)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(p),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(p),this.off("changeMode",d))},value:!1}})}); (function() { + ace.require(["ace/ext/language_tools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-linking.js b/mixly/common/modules/web-modules/ace/ext-linking.js new file mode 100644 index 00000000..1b0706d0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-linking.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (function() { + ace.require(["ace/ext/linking"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-modelist.js b/mixly/common/modules/web-modules/ace/ext-modelist.js new file mode 100644 index 00000000..1f6e29dd --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-modelist.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i=l?r="bottom":r="top"),r==="top"?(c.bottom=e.top-this.$borderSize,c.top=c.bottom-l):r==="bottom"&&(c.top=e.top+t+this.$borderSize,c.bottom=c.top+l);var d=c.top>=0&&c.bottom<=u;if(!s&&!d)return!1;d?f.$maxPixelHeight=null:r==="top"?f.$maxPixelHeight=p:f.$maxPixelHeight=h,r==="top"?(o.style.top="",o.style.bottom=u-c.bottom+"px",n.isTopdown=!1):(o.style.top=c.top+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var v=e.left;return v+o.offsetWidth>a&&(v=a-o.offsetWidth),o.style.left=v+"px",o.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":undefined,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();a.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=m,t.$singleLineEditor=v,t.getAriaId=c}),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,t,n){"use strict";function p(e){var t=(new Date).toLocaleString("en-us",e);return t.length==1?"0"+t:t}var r=e("./lib/dom"),i=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),u=e("./range").Range,a=e("./range_list").RangeList,f=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,c=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return c.getText&&c.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){var t=e.session.$mode||{};return t.lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};h.SELECTED_TEXT=h.SELECTION;var d=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var r={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag="",""},next:"formatString"};return e.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:r=="n"?e="\n":r=="t"?e=" ":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){var r="doc-tooltip ";for(var i=0;i=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(this.$elements||!this.editor)return;window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var e=this.editor.container.parentNode,t=[];while(e)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var s={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,u=othis.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var u=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else{var p=u.toLowerCase().indexOf(i);if(p>-1)l=p;else for(var d=0;d=0?m<0||v0&&(a===-1&&(l+=10),l+=h,f|=1<0?e=x():e=o.getValue();var t=m?m.getData(m.getRow()):e;t&&!t.error&&(E(),n.onAccept&&n.onAccept({value:e,item:t},o))}function E(){v.close(),r&&r(),p=null}function S(){if(n.getCompletions){var e;n.getPrefix&&(e=n.getPrefix(o));var t=n.getCompletions(o);m.setData(t,e),m.resize(!0)}}function x(){var e=m.getData(m.getRow());if(e&&!e.error)return e.value||e.caption||e}if(typeof t=="object")return d(e,"",t,n);if(p){var i=p;e=i.editor,i.close();if(i.name&&i.name==n.name)return}if(n.$type)return d[n.$type](e,r);var o=a();o.session.setUndoManager(new f);var h=s.buildDom(["div",{"class":"ace_prompt_container"+(n.hasDescription?" input-box-with-description":"")}]),v=c(e,h,E);h.appendChild(o.container),e&&(e.cmdLine=o,o.setOption("fontSize",e.getOption("fontSize"))),t&&o.setValue(t,1),n.selection&&o.selection.setRange({start:o.session.doc.indexToPosition(n.selection[0]),end:o.session.doc.indexToPosition(n.selection[1])});if(n.getCompletions){var m=new u;m.renderer.setStyle("ace_autocomplete_inline"),m.container.style.display="block",m.container.style.maxWidth="600px",m.container.style.width="100%",m.container.style.marginTop="3px",m.renderer.setScrollMargin(2,2,0,0),m.autoSelect=!1,m.renderer.$maxLines=15,m.setRow(-1),m.on("click",function(e){var t=m.getData(m.getRow());t.error||(o.setValue(t.value||t.name||t),b(),e.stop())}),h.appendChild(m.container),S()}if(n.$rules){var g=new l(n.$rules);o.session.bgTokenizer.setTokenizer(g)}n.placeholder&&o.setOption("placeholder",n.placeholder);if(n.hasDescription){var y=s.buildDom(["div",{"class":"ace_prompt_text_container"}]);s.buildDom(n.prompt||"Press 'Enter' to confirm or 'Escape' to cancel",y),h.appendChild(y)}v.setIgnoreFocusOut(n.ignoreFocusOut);var w={Enter:b,"Esc|Shift-Esc":function(){n.onCancel&&n.onCancel(o.getValue(),o),E()}};m&&Object.assign(w,{Up:function(e){m.goTo("up"),x()},Down:function(e){m.goTo("down"),x()},"Ctrl-Up|Ctrl-Home":function(e){m.goTo("start"),x()},"Ctrl-Down|Ctrl-End":function(e){m.goTo("end"),x()},Tab:function(e){m.goTo("down"),x()},PageUp:function(e){m.gotoPageUp(),x()},PageDown:function(e){m.gotoPageDown(),x()}}),o.commands.bindKeys(w),o.on("input",function(){n.onInput&&n.onInput(),S()}),o.resize(!0),m&&m.resize(!0),o.focus(),p={close:E,name:n.name,editor:e}}var r=e("../config").nls,i=e("../range").Range,s=e("../lib/dom"),o=e("../autocomplete").FilteredList,u=e("../autocomplete/popup").AcePopup,a=e("../autocomplete/popup").$singleLineEditor,f=e("../undomanager").UndoManager,l=e("../tokenizer").Tokenizer,c=e("./menu_tools/overlay_page").overlayPage,h=e("./modelist"),p;d.gotoLine=function(e,t){function n(e){return Array.isArray(e)||(e=[e]),e.map(function(e){var t=e.isBackwards?e.start:e.end,n=e.isBackwards?e.end:e.start,r=n.row,i=r+1+":"+n.column;return n.row==t.row?n.column!=t.column&&(i+=">:"+t.column):i+=">"+(t.row+1)+":"+t.column,i}).reverse().join(", ")}d(e,":"+n(e.selection.toJSON()),{name:"gotoLine",selection:[1,Number.MAX_VALUE],onAccept:function(t){var n=t.value,r=d.gotoLine._history;r||(d.gotoLine._history=r=[]),r.indexOf(n)!=-1&&r.splice(r.indexOf(n),1),r.unshift(n),r.length>20&&(r.length=20);var s=e.getCursorPosition(),o=[];n.replace(/^:/,"").split(/,/).map(function(t){function u(){var t=n[r++];if(!t)return;if(t[0]=="c"){var i=parseInt(t.slice(1))||0;return e.session.doc.indexToPosition(i)}var o=s.row,u=0;return/\d/.test(t)&&(o=parseInt(t)-1,t=n[r++]),t==":"&&(t=n[r++],/\d/.test(t)&&(u=parseInt(t)||0)),{row:o,column:u}}var n=t.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean),r=0;s=u();var a=i.fromPoints(s,s);n[r]==">"?(r++,a.end=u()):n[r]=="<"&&(r++,a.start=u()),o.unshift(a)}),e.selection.fromJSON(o);var u=e.renderer.scrollTop;e.renderer.scrollSelectionIntoView(e.selection.anchor,e.selection.cursor,.5),e.renderer.animateScrolling(u)},history:function(){return d.gotoLine._history?d.gotoLine._history:[]},getCompletions:function(t){var n=t.getValue(),r=n.replace(/^:/,"").split(":"),i=Math.min(parseInt(r[0])||1,e.session.getLength())-1,s=e.session.getLine(i),o=n+" "+s;return[o].concat(this.history())},$rules:{start:[{regex:/\d+/,token:"string"},{regex:/[:,><+\-c]/,token:"keyword"}]}})},d.commands=function(e,t){function n(e){return(e||"").replace(/^./,function(e){return e.toUpperCase(e)}).replace(/[a-z][A-Z]/g,function(e){return e[0]+" "+e[1].toLowerCase(e)})}function i(t){var r=[],i={};return e.keyBinding.$handlers.forEach(function(e){var s=e.platform,o=e.byName;for(var u in o){var a=o[u].bindKey;typeof a!="string"&&(a=a&&a[s]||"");var f=o[u],l=f.description||n(f.name);Array.isArray(f)||(f=[f]),f.forEach(function(e){typeof e!="string"&&(e=e.name);var n=t.find(function(t){return t===e});n||(i[e]?i[e].key+="|"+a:(i[e]={key:a,command:e,description:l},r.push(i[e])))})}}),r}var s=["insertstring","inserttext","setIndentation","paste"],u=i(s);u=u.map(function(e){return{value:e.description,meta:e.key,command:e.command}}),d(e,"",{name:"commands",selection:[0,Number.MAX_VALUE],maxHistoryCount:5,onAccept:function(t){if(t.item){var n=t.item.command;this.addToHistory(t.item),e.execCommand(n)}},addToHistory:function(e){var t=this.history();t.unshift(e),delete e.message;for(var n=1;n0&&t.length>this.maxHistoryCount&&t.splice(t.length-1,1),d.commands.history=t},history:function(){return d.commands.history||[]},getPrefix:function(e){var t=e.getCursorPosition(),n=e.getValue();return n.substring(0,t.column)},getCompletions:function(e){function t(e,t){var n=JSON.parse(JSON.stringify(e)),r=new o(n);return r.filterCompletions(n,t)}function n(e,t){if(!t||!t.length)return e;var n=[];t.forEach(function(e){n.push(e.command)});var r=[];return e.forEach(function(e){n.indexOf(e.command)===-1&&r.push(e)}),r}var i=this.getPrefix(e),s=t(this.history(),i),a=n(u,s);a=t(a,i),s.length&&a.length&&(s[0].message=r("prompt.recently-used","Recently used"),a[0].message=r("prompt.other-commands","Other commands"));var f=s.concat(a);return f.length>0?f:[{value:r("prompt.no-matching-commands","No matching commands"),error:1}]}})},d.modes=function(e,t){var n=h.modes;n=n.map(function(e){return{value:e.caption,mode:e.name}}),d(e,"",{name:"modes",selection:[0,Number.MAX_VALUE],onAccept:function(t){if(t.item){var n="ace/mode/"+t.item.mode;e.session.setMode(n)}},getPrefix:function(e){var t=e.getCursorPosition(),n=e.getValue();return n.substring(0,t.column)},getCompletions:function(e){function t(e,t){var n=JSON.parse(JSON.stringify(e)),r=new o(n);return r.filterCompletions(n,t)}var r=this.getPrefix(e),i=t(n,r);return i.length>0?i:[{caption:"No mode matching",value:"No mode matching",error:1}]}})},s.importCssString(".ace_prompt_container {\n max-width: 603px;\n width: 100%;\n margin: 20px auto;\n padding: 3px;\n background: white;\n border-radius: 2px;\n box-shadow: 0px 2px 3px 0px #555;\n}","promtp.css",!1),t.prompt=d}); (function() { + ace.require(["ace/ext/prompt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-rtl.js b/mixly/common/modules/web-modules/ace/ext-rtl.js new file mode 100644 index 00000000..e7f85cfd --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-rtl.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";function s(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&n.column===0&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function o(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function u(e,t){var n=t.session;n.$bidiHandler.currentRow=null;if(n.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var r=e.start.row;rl)break;if(!c[0]){t.lastIndex=a+=i.skipEmptyMatch(o,a,n);if(a>=o.length)break}}}this.searchCounter.textContent=f("search-box.search-counter","$0 of $1",[s,r>l?l+"+":r])},e.prototype.findNext=function(){this.find(!0,!1)},e.prototype.findPrev=function(){this.find(!0,!0)},e.prototype.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},e.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},e.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},e.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},e.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},e.prototype.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=t,this.editor.$search.$options.regExp&&(e=i.escapeRegExp(e)),e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},e.prototype.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput},e}(),h=new u;h.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){if(e.editor.getReadOnly())return;e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),h.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]);var p=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]);c.prototype.$searchBarKb=h,c.prototype.$closeSearchBarKb=p,t.SearchBox=c,t.Search=function(e,t){var n=e.searchBox||new c(e);n.show(e.session.getTextRange(),t)}}); (function() { + ace.require(["ace/ext/searchbox"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/ext-settings_menu.js b/mixly/common/modules/web-modules/ace/ext-settings_menu.js new file mode 100644 index 00000000..0f52f188 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/ext-settings_menu.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.exports="#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splitse)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i")}return this.textContent&&e.push(this.textContent),this.type!="fragment"&&e.push(""),e.join("")},e}(),l={createTextNode:function(e,t){return a(e)},createElement:function(e){return new f(e)},createFragment:function(){return new f("fragment")}},c=function(){this.config={},this.dom=l};c.prototype=i.prototype;var h=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var f=0;for(var l=0;l");return}e.push("")}var s=null,o={mode:"Mode:",wrap:"Soft Wrap:",theme:"Theme:",fontSize:"Font Size:",showGutter:"Display Gutter:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},u={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",gob:"Green on Black",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},showGutter:s,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},wrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:s,useSoftTabs:s,showInvisibles:s},a=[];a.push("");for(var l in t.defaultOptions)a.push(""),a.push("");a.push("
SettingValue
",o[l],""),f(a,l,u[l],i.getOption(l)),a.push("
"),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(up.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||di+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;ai&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c30&&this.$data.shift()},append:function(e){var t=this.$data.length-1,n=this.$data[t]||"";e&&(n+=e),n&&(this.$data[t]=n)},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}); (function() { + ace.require(["ace/keyboard/emacs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/keybinding-sublime.js b/mixly/common/modules/web-modules/ace/keybinding-sublime.js new file mode 100644 index 00000000..c1c77b11 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/keybinding-sublime.js @@ -0,0 +1,8 @@ +ace.define("ace/keyboard/sublime",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){"use strict";function i(e,t,n){function f(e){return e?/\s/.test(e)?"s":e=="_"?"_":e.toUpperCase()==e&&e.toLowerCase()!=e?"W":e.toUpperCase()!=e&&e.toLowerCase()==e?"w":"o":"-"}var r=e.selection,i=r.lead.row,s=r.lead.column,o=e.session.getLine(i);if(!o[s+t]){var u=(n?"selectWord":"moveCursorShortWord")+(t==1?"Right":"Left");return e.selection[u]()}t==-1&&s--;while(o[s]){var a=f(o[s])+f(o[s+t]);s+=t;if(t==1){if(a=="WW"&&f(o[s+1])=="w")break}else{if(a=="wW"){if(f(o[s-1])=="W"){s-=1;break}continue}if(a=="Ww")break}if(/w[s_oW]|_[sWo]|o[s_wW]|s[W]|W[so]/.test(a))break}t==-1&&s++,n?e.selection.moveCursorTo(i,s):e.selection.moveTo(i,s)}var r=e("../keyboard/hash_handler").HashHandler;t.handler=new r,t.handler.addCommands([{name:"find_all_under",exec:function(e){e.selection.isEmpty()&&e.selection.selectWord(),e.findAll()},readOnly:!0},{name:"find_under",exec:function(e){e.selection.isEmpty()&&e.selection.selectWord(),e.findNext()},readOnly:!0},{name:"find_under_prev",exec:function(e){e.selection.isEmpty()&&e.selection.selectWord(),e.findPrevious()},readOnly:!0},{name:"find_under_expand",exec:function(e){e.selectMore(1,!1,!0)},scrollIntoView:"animate",readOnly:!0},{name:"find_under_expand_skip",exec:function(e){e.selectMore(1,!0,!0)},scrollIntoView:"animate",readOnly:!0},{name:"delete_to_hard_bol",exec:function(e){var t=e.selection.getCursor();e.session.remove({start:{row:t.row,column:0},end:t})},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"delete_to_hard_eol",exec:function(e){var t=e.selection.getCursor();e.session.remove({start:t,end:{row:t.row,column:Infinity}})},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"moveToWordStartLeft",exec:function(e){e.selection.moveCursorLongWordLeft(),e.clearSelection()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"moveToWordEndRight",exec:function(e){e.selection.moveCursorLongWordRight(),e.clearSelection()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"selectToWordStartLeft",exec:function(e){var t=e.selection;t.$moveSelection(t.moveCursorLongWordLeft)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"selectToWordEndRight",exec:function(e){var t=e.selection;t.$moveSelection(t.moveCursorLongWordRight)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"selectSubWordRight",exec:function(e){i(e,1,!0)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectSubWordLeft",exec:function(e){i(e,-1,!0)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"moveSubWordRight",exec:function(e){i(e,1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"moveSubWordLeft",exec:function(e){i(e,-1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0}]),[{bindKey:{mac:"cmd-k cmd-backspace|cmd-backspace",win:"ctrl-shift-backspace|ctrl-k ctrl-backspace"},name:"removetolinestarthard"},{bindKey:{mac:"cmd-k cmd-k|cmd-delete|ctrl-k",win:"ctrl-shift-delete|ctrl-k ctrl-k"},name:"removetolineendhard"},{bindKey:{mac:"cmd-shift-d",win:"ctrl-shift-d"},name:"duplicateSelection"},{bindKey:{mac:"cmd-l",win:"ctrl-l"},name:"expandtoline"},{bindKey:{mac:"cmd-shift-a",win:"ctrl-shift-a"},name:"expandSelection",args:{to:"tag"}},{bindKey:{mac:"cmd-shift-j",win:"ctrl-shift-j"},name:"expandSelection",args:{to:"indentation"}},{bindKey:{mac:"ctrl-shift-m",win:"ctrl-shift-m"},name:"expandSelection",args:{to:"brackets"}},{bindKey:{mac:"cmd-shift-space",win:"ctrl-shift-space"},name:"expandSelection",args:{to:"scope"}},{bindKey:{mac:"ctrl-cmd-g",win:"alt-f3"},name:"find_all_under"},{bindKey:{mac:"alt-cmd-g",win:"ctrl-f3"},name:"find_under"},{bindKey:{mac:"shift-alt-cmd-g",win:"ctrl-shift-f3"},name:"find_under_prev"},{bindKey:{mac:"cmd-g",win:"f3"},name:"findnext"},{bindKey:{mac:"shift-cmd-g",win:"shift-f3"},name:"findprevious"},{bindKey:{mac:"cmd-d",win:"ctrl-d"},name:"find_under_expand"},{bindKey:{mac:"cmd-k cmd-d",win:"ctrl-k ctrl-d"},name:"find_under_expand_skip"},{bindKey:{mac:"cmd-alt-[",win:"ctrl-shift-["},name:"toggleFoldWidget"},{bindKey:{mac:"cmd-alt-]",win:"ctrl-shift-]"},name:"unfold"},{bindKey:{mac:"cmd-k cmd-0|cmd-k cmd-j",win:"ctrl-k ctrl-0|ctrl-k ctrl-j"},name:"unfoldall"},{bindKey:{mac:"cmd-k cmd-1",win:"ctrl-k ctrl-1"},name:"foldOther",args:{level:1}},{bindKey:{win:"ctrl-left",mac:"alt-left"},name:"moveToWordStartLeft"},{bindKey:{win:"ctrl-right",mac:"alt-right"},name:"moveToWordEndRight"},{bindKey:{win:"ctrl-shift-left",mac:"alt-shift-left"},name:"selectToWordStartLeft"},{bindKey:{win:"ctrl-shift-right",mac:"alt-shift-right"},name:"selectToWordEndRight"},{bindKey:{mac:"ctrl-alt-shift-right|ctrl-shift-right",win:"alt-shift-right"},name:"selectSubWordRight"},{bindKey:{mac:"ctrl-alt-shift-left|ctrl-shift-left",win:"alt-shift-left"},name:"selectSubWordLeft"},{bindKey:{mac:"ctrl-alt-right|ctrl-right",win:"alt-right"},name:"moveSubWordRight"},{bindKey:{mac:"ctrl-alt-left|ctrl-left",win:"alt-left"},name:"moveSubWordLeft"},{bindKey:{mac:"ctrl-m",win:"ctrl-m"},name:"jumptomatching",args:{to:"brackets"}},{bindKey:{mac:"ctrl-f6",win:"ctrl-f6"},name:"goToNextError"},{bindKey:{mac:"ctrl-shift-f6",win:"ctrl-shift-f6"},name:"goToPreviousError"},{bindKey:{mac:"ctrl-o"},name:"splitline"},{bindKey:{mac:"ctrl-shift-w",win:"alt-shift-w"},name:"surrowndWithTag"},{bindKey:{mac:"cmd-alt-.",win:"alt-."},name:"close_tag"},{bindKey:{mac:"cmd-j",win:"ctrl-j"},name:"joinlines"},{bindKey:{mac:"ctrl--",win:"alt--"},name:"jumpBack"},{bindKey:{mac:"ctrl-shift--",win:"alt-shift--"},name:"jumpForward"},{bindKey:{mac:"cmd-k cmd-l",win:"ctrl-k ctrl-l"},name:"tolowercase"},{bindKey:{mac:"cmd-k cmd-u",win:"ctrl-k ctrl-u"},name:"touppercase"},{bindKey:{mac:"cmd-shift-v",win:"ctrl-shift-v"},name:"paste_and_indent"},{bindKey:{mac:"cmd-k cmd-v|cmd-alt-v",win:"ctrl-k ctrl-v"},name:"paste_from_history"},{bindKey:{mac:"cmd-shift-enter",win:"ctrl-shift-enter"},name:"addLineBefore"},{bindKey:{mac:"cmd-enter",win:"ctrl-enter"},name:"addLineAfter"},{bindKey:{mac:"ctrl-shift-k",win:"ctrl-shift-k"},name:"removeline"},{bindKey:{mac:"ctrl-alt-up",win:"ctrl-up"},name:"scrollup"},{bindKey:{mac:"ctrl-alt-down",win:"ctrl-down"},name:"scrolldown"},{bindKey:{mac:"cmd-a",win:"ctrl-a"},name:"selectall"},{bindKey:{linux:"alt-shift-down",mac:"ctrl-shift-down",win:"ctrl-alt-down"},name:"addCursorBelow"},{bindKey:{linux:"alt-shift-up",mac:"ctrl-shift-up",win:"ctrl-alt-up"},name:"addCursorAbove"},{bindKey:{mac:"cmd-k cmd-c|ctrl-l",win:"ctrl-k ctrl-c"},name:"centerselection"},{bindKey:{mac:"f5",win:"f9"},name:"sortlines"},{bindKey:{mac:"ctrl-f5",win:"ctrl-f9"},name:"sortlines",args:{caseSensitive:!0}},{bindKey:{mac:"cmd-shift-l",win:"ctrl-shift-l"},name:"splitSelectionIntoLines"},{bindKey:{mac:"ctrl-cmd-down",win:"ctrl-shift-down"},name:"movelinesdown"},{bindKey:{mac:"ctrl-cmd-up",win:"ctrl-shift-up"},name:"movelinesup"},{bindKey:{mac:"alt-down",win:"alt-down"},name:"modifyNumberDown"},{bindKey:{mac:"alt-up",win:"alt-up"},name:"modifyNumberUp"},{bindKey:{mac:"cmd-/",win:"ctrl-/"},name:"togglecomment"},{bindKey:{mac:"cmd-alt-/",win:"ctrl-shift-/"},name:"toggleBlockComment"},{bindKey:{linux:"ctrl-alt-q",mac:"ctrl-q",win:"ctrl-q"},name:"togglerecording"},{bindKey:{linux:"ctrl-alt-shift-q",mac:"ctrl-shift-q",win:"ctrl-shift-q"},name:"replaymacro"},{bindKey:{mac:"ctrl-t",win:"ctrl-t"},name:"transpose"}].forEach(function(e){var n=t.handler.commands[e.name];n&&(n.bindKey=e.bindKey),t.handler.bindKey(e.bindKey,n||e.name)})}); (function() { + ace.require(["ace/keyboard/sublime"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/keybinding-vim.js b/mixly/common/modules/web-modules/ace/keybinding-vim.js new file mode 100644 index 00000000..2d812401 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/keybinding-vim.js @@ -0,0 +1,8 @@ +ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.lengthn)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length"+t(e.head):Array.isArray(e)?"["+e.map(function(e){return t(e)})+"]":JSON.stringify(e)}var e="";for(var n=0;n=n.ch-1){var r=e.getLine(t.line),i=r.charCodeAt(t.ch);55296<=i&&i<=55551&&(n.ch+=1)}return{start:t,end:n}}function C(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),m.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",cr),Y(e),m.on(e.getInputField(),"paste",L(e))}function k(e){e.setOption("disableInput",!1),e.off("cursorActivity",cr),m.off(e.getInputField(),"paste",L(e)),e.state.vim=null,Wn&&clearTimeout(Wn)}function L(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(Mt(e.getCursor(),0,1)),kt.enterInsertMode(e,{},t))}),t.onPasteFn}function j(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function F(e){return/^[a-z]$/.test(e)}function I(e){return"()[]{}".indexOf(e)!=-1}function q(e){return A.test(e)}function R(e){return H.test(e)}function U(e){return/^\s*$/.test(e)}function z(e){return".?!".indexOf(e)!=-1}function W(e,t){for(var n=0;n|./gi,o;while(o=s.exec(t)){var u=o[0],a=i.insertMode;if(st){ot(u);continue}var f=nt.handleKey(e,u,"mapping");if(!f&&a&&i.insertMode){if(u[0]=="<"){var l=u.toLowerCase().slice(1,-1),c=l.split("-");l=c.pop()||"";if(l=="lt")u="<";else if(l=="space")u=" ";else if(l=="cr")u="\n";else{if(lt.hasOwnProperty(l)){u=lt[l],mr(e,u);continue}u=u[0],s.lastIndex=o.index+1}}e.replaceSelection(u)}}}finally{rt.pop(),it=rt.length?r:!1;if(!rt.length&&st){var h=st;st=null,qn(e,h)}}}function ct(e,t){var n=e.key;if(ft[n])return;n.length>1&&n[0]=="n"&&(n=n.replace("Numpad","")),n=at[n]||n;var r="";e.ctrlKey&&(r+="C-"),e.altKey&&(r+="A-"),e.metaKey&&(r+="M-"),m.isMac&&e.altKey&&!e.metaKey&&!e.ctrlKey&&(r=r.slice(2)),(r||n.length>1)&&e.shiftKey&&(r+="S-");if(t&&!t.expectLiteralNext&&n.length==1)if(N.keymap&&n in N.keymap){if(N.remapCtrl!=0||!r)n=N.keymap[n]}else if(n.charCodeAt(0)>255){var i=e.code&&e.code.slice(-1)||"";e.shiftKey||(i=i.toLowerCase()),i&&(n=i)}return r+=n,r.length>1&&(r="<"+r+">"),r}function ht(e,t){N.string!==e&&(N=pt(e)),N.remapCtrl=t}function pt(e){function n(e){return e.split(/\\?(.)/).filter(Boolean)}var t={};return e?(e.split(/((?:[^\\,]|\\.)+),/).map(function(e){if(!e)return;var r=e.split(/((?:[^\\;]|\\.)+);/);if(r.length==3){var i=n(r[1]),s=n(r[2]);if(i.length!==s.length)return;for(var o=0;oa&&(l=-1),a+=l,a>u&&(a-=2)}return new w(s,a)}function Ot(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Mt(e,t,n){return typeof t=="object"&&(n=t.ch,t=t.line),new w(e.line+t,e.ch+n)}function _t(e,t,n,r){r.operator&&(n="operatorPending");var i,s=[],o=[],u=it?t.length-x:0;for(var a=u;a",r=t.slice(-10)=="";if(n||r){var i=t.length-(n?11:10),s=e.slice(0,i),o=t.slice(0,i);return s==o&&e.length>i?"full":o.indexOf(s)==0?"partial":!1}return e==t?"full":t.indexOf(e)==0?"partial":!1}function Pt(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}function Ht(e,t,n){return function(){for(var r=0;r2&&(t=It.apply(undefined,Array.prototype.slice.call(arguments,1))),Ft(e,t)?e:t}function qt(e,t){return arguments.length>2&&(t=qt.apply(undefined,Array.prototype.slice.call(arguments,1))),Ft(e,t)?t:e}function Rt(e,t,n){var r=Ft(e,t),i=Ft(t,n);return r&&i}function Ut(e,t){return e.getLine(t).length}function zt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Wt(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xt(e,t,n){var r=Ut(e,t),i=(new Array(n-r+1)).join(" ");e.setCursor(new w(t,r)),e.replaceRange(i,e.getCursor())}function Vt(e,t){var n=[],r=e.listSelections(),i=Bt(e.clipPos(t)),s=!jt(t,i),o=e.getCursor("head"),u=Jt(r,o),a=jt(r[u].head,r[u].anchor),f=r.length-1,l=f-u>u?f:0,c=r[l].anchor,h=Math.min(c.line,i.line),p=Math.max(c.line,i.line),d=c.ch,v=i.ch,m=r[l].head.ch-d,g=v-d;m>0&&g<=0?(d++,s||v--):m<0&&g>=0?(d--,a||v++):m<0&&g==-1&&(d--,v++);for(var y=h;y<=p;y++){var b={anchor:new w(y,d),head:new w(y,v)};n.push(b)}return e.setSelections(n),t.ch=v,c.ch=d,c}function $t(e,t,n){var r=[];for(var i=0;ia&&(i.line=a),i.ch=Ut(e,i.line)}else i.ch=0,s.ch=Ut(e,s.line);return{ranges:[{anchor:s,head:i}],primary:0}}if(n=="block"){var f=Math.min(s.line,i.line),l=s.ch,c=Math.max(s.line,i.line),h=i.ch;l0&&s&&U(s);s=i.pop())n.line--,n.ch=0;s?(n.line--,n.ch=Ut(e,n.line)):n.ch=0}}function rn(e,t,n){t.ch=0,n.ch=0,n.line++}function sn(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function on(e,t,n){var r=t.inclusive,i=t.innerWord,s=t.bigWord,o=t.noSymbol,u=t.multiline,a=n||en(e),f=e.getLine(a.line),l=f,c=a.line,h=c,p=a.ch,d,v=o?O[0]:M[0];if(i&&/\s/.test(f.charAt(p)))v=function(e){return/\s/.test(e)};else{while(!v(f.charAt(p))){p++;if(p>=f.length){if(!u)return null;p--,d=pn(e,a,!0,s,!0);break}}s?v=M[0]:(v=O[0],v(f.charAt(p))||(v=O[1]))}var m=p,g=p;while(v(f.charAt(g))&&g>=0)g--;g++;if(d)m=d.to,h=d.line,l=e.getLine(h),!l&&m==0&&m++;else while(v(f.charAt(m))&&m0)g--;!g&&!b&&(g=E)}}return{start:new w(c,g),end:new w(h,m)}}function un(e,t,n){var r=t;if(!m.findMatchingTag||!m.findEnclosingTag)return{start:r,end:r};var i=m.findMatchingTag(e,t)||m.findEnclosingTag(e,t);return!i||!i.open||!i.close?{start:r,end:r}:n?{start:i.open.from,end:i.close.to}:{start:i.open.to,end:i.close.from}}function an(e,t,n){jt(t,n)||Z.jumpList.add(e,t,n)}function fn(e,t){Z.lastCharacterSearch.increment=e,Z.lastCharacterSearch.forward=t.forward,Z.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function hn(e,t,n,r){var i=Bt(e.getCursor()),s=n?1:-1,o=n?e.lineCount():-1,u=i.ch,a=i.line,f=e.getLine(a),l={lineText:f,nextCh:f.charAt(u),lastCh:null,index:u,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},c=ln[r];if(!c)return i;var h=cn[c].init,p=cn[c].isComplete;h&&h(l);while(a!==o&&t){l.index+=s,l.nextCh=l.lineText.charAt(l.index);if(!l.nextCh){a+=s,l.lineText=e.getLine(a)||"";if(s>0)l.index=0;else{var d=l.lineText.length;l.index=d>0?d-1:0}l.nextCh=l.lineText.charAt(l.index)}p(l)&&(i.line=a,i.ch=l.index,t--)}return l.nextCh||l.curMoveThrough?new w(a,l.index):i}function pn(e,t,n,r,i){var s=t.line,o=t.ch,u=e.getLine(s),a=n?1:-1,f=r?M:O;if(i&&u==""){s+=a,u=e.getLine(s);if(!j(e,s))return null;o=n?0:u.length}for(;;){if(i&&u=="")return{from:0,to:0,line:s};var l=a>0?u.length:-1,c=l,h=l;while(o!=l){var p=!1;for(var d=0;d0?0:u.length}}function dn(e,t,n,r,i,s){var o=Bt(t),u=[];(r&&!i||!r&&i)&&n++;var a=!r||!i;for(var f=0;f0?1:-1;var n=e.ace.session.getFoldLine(t);n&&t+r>n.start.row&&t+r0?n.end.row:n.start.row)-t)}var s=t.line,o=e.firstLine(),u=e.lastLine(),a,f,l=s;if(r){while(o<=l&&l<=u&&n>0)p(l),h(l,r)&&n--,l+=r;return new w(l,0)}var d=e.state.vim;if(d.visualLine&&h(s,1,!0)){var v=d.sel.anchor;h(v.line,-1,!0)&&(!i||v.line!=s)&&(s+=1)}var m=c(s);for(l=s;l<=u&&n;l++)h(l,1,!0)&&(!i||c(l)!=m)&&n--;f=new w(l,0),l>u&&!m?m=!0:i=!1;for(l=s;l>o;l--)if(!i||c(l)==m||l==s)if(h(l,-1,!0))break;return a=new w(l,0),{start:a,end:f}}function En(e,t,n,r,i){function s(e){e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir}function o(e,t,n,r){var o=e.getLine(t),u={line:o,ln:t,pos:n,dir:r};if(u.line==="")return{ln:u.ln,pos:u.pos};var a=u.pos;s(u);while(u.line!==null){a=u.pos;if(z(u.line[u.pos])){if(!i)return{ln:u.ln,pos:u.pos+1};s(u);while(u.line!==null){if(!U(u.line[u.pos]))break;a=u.pos,s(u)}return{ln:u.ln,pos:a+1}}s(u)}return{ln:u.ln,pos:a+1}}function u(e,t,n,r){var o=e.getLine(t),u={line:o,ln:t,pos:n,dir:r};if(u.line==="")return{ln:u.ln,pos:u.pos};var a=u.pos;s(u);while(u.line!==null){if(!U(u.line[u.pos])&&!z(u.line[u.pos]))a=u.pos;else if(z(u.line[u.pos]))return i?U(u.line[u.pos+1])?{ln:u.ln,pos:u.pos+1}:{ln:u.ln,pos:a}:{ln:u.ln,pos:a};s(u)}return u.line=o,i&&U(u.line[u.pos])?{ln:u.ln,pos:u.pos}:{ln:u.ln,pos:a}}var a={ln:t.line,pos:t.ch};while(n>0)r<0?a=u(e,a.ln,a.pos,r):a=o(e,a.ln,a.pos,r),n--;return new w(a.ln,a.pos)}function Sn(e,t,n,r){function i(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){t.ln+=t.dir;if(!j(e,t.ln)){t.line=null,t.ln=null,t.pos=null;return}t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function s(e,t,n,r){var s=e.getLine(t),o=s==="",u={line:s,ln:t,pos:n,dir:r},a={ln:u.ln,pos:u.pos},f=u.line==="";i(e,u);while(u.line!==null){a.ln=u.ln,a.pos=u.pos;if(u.line===""&&!f)return{ln:u.ln,pos:u.pos};if(o&&u.line!==""&&!U(u.line[u.pos]))return{ln:u.ln,pos:u.pos};z(u.line[u.pos])&&!o&&(u.pos===u.line.length-1||U(u.line[u.pos+1]))&&(o=!0),i(e,u)}var s=e.getLine(a.ln);a.pos=0;for(var l=s.length-1;l>=0;--l)if(!U(s[l])){a.pos=l;break}return a}function o(e,t,n,r){var s=e.getLine(t),o={line:s,ln:t,pos:n,dir:r},u={ln:o.ln,pos:null},a=o.line==="";i(e,o);while(o.line!==null){if(o.line===""&&!a)return u.pos!==null?u:{ln:o.ln,pos:o.pos};if(!(!z(o.line[o.pos])||u.pos===null||o.ln===u.ln&&o.pos+1===u.pos))return u;o.line!==""&&!U(o.line[o.pos])&&(a=!1,u={ln:o.ln,pos:o.pos}),i(e,o)}var s=e.getLine(u.ln);u.pos=0;for(var f=0;f0)r<0?u=o(e,u.ln,u.pos,r):u=s(e,u.ln,u.pos,r),n--;return new w(u.ln,u.pos)}function xn(e,t,n,r){var i=t,s,o,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],a={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],f=e.getLine(i.line).charAt(i.ch),l=f===a?1:0;s=e.scanForBracket(new w(i.line,i.ch+l),-1,undefined,{bracketRegex:u}),o=e.scanForBracket(new w(i.line,i.ch+l),1,undefined,{bracketRegex:u});if(!s||!o)return null;s=s.pos,o=o.pos;if(s.line==o.line&&s.ch>o.ch||s.line>o.line){var c=s;s=o,o=c}return r?o.ch+=1:s.ch+=1,{start:s,end:o}}function Tn(e,t,n,r){var i=Bt(t),s=e.getLine(i.line),o=s.split(""),u,a,f,l,c=o.indexOf(n);if(i.ch-1&&!u;f--)o[f]==n&&(u=f+1);if(u&&!a)for(f=u,l=o.length;f=t&&e<=n:e==t}function Qn(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function Gn(e,t,n){if(n=="'"||n=="`")return Z.jumpList.find(e,-1)||new w(0,0);if(n==".")return Yn(e);var r=t.marks[n];return r&&r.find()}function Yn(e){if(e.getLastEditEnd)return e.getLastEditEnd();var t=e.doc.history.done;for(var n=t.length;n--;)if(t[n].changes)return Bt(t[n].changes[0].to)}function nr(e,t,n,r,i,s,o,u,a){function p(){e.operation(function(){while(!f)d(),g();y()})}function d(){var t=e.getRange(s.from(),s.to()),n=t.replace(o,u),r=s.to().line;s.replace(n),c=s.to().line,i+=c-r,h=c":case"":case"":y(r)}return f&&y(r),!0}e.state.vim.exMode=!0;var f=!1,l,c,h;g();if(f){Fn(e,"No matches for "+o.source);return}if(!t){p(),a&&a();return}qn(e,{prefix:jn("span","replace with ",jn("strong",u)," (y/n/a/q/l)"),onKeyDown:b})}function rr(e,t){var n=e.state.vim,r=Z.macroModeState,i=Z.registerController.getRegister("."),s=r.isPlaying,o=r.lastInsertModeChanges;s||(e.off("change",lr),n.insertEnd&&n.insertEnd.clear(),n.insertEnd=null,m.off(e.getInputField(),"keydown",dr)),!s&&n.insertModeRepeat>1&&(vr(e,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t||e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),i.setText(o.changes.join("")),m.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&ar(r)}function ir(e){S.unshift(e)}function sr(e,t,n,r,i){var s={keys:e,type:t};s[t]=n,s[t+"Args"]=r;for(var o in i)s[o]=i[o];ir(s)}function or(e,t,n,r){var i=Z.registerController.getRegister(r);if(r==":"){i.keyBuffer[0]&&tr.processCommand(e,i.keyBuffer[0]),n.isPlaying=!1;return}var s=i.keyBuffer,o=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var u=0;u|<\w+>|./.exec(a),l=f[0],a=a.substring(f.index+l.length),nt.handleKey(e,l,"macro");if(t.insertMode){var c=i.insertModeChanges[o++].changes;Z.macroModeState.lastInsertModeChanges.changes=c,gr(e,c,1),rr(e)}}}n.isPlaying=!1}function ur(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Z.registerController.getRegister(n);r&&r.pushText(t)}function ar(e){if(e.isPlaying)return;var t=e.latestRegister,n=Z.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}function fr(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Z.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}function lr(e,t){var n=Z.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying){var i=e.state.vim;while(t){r.expectCursorActivityForChange=!0;if(r.ignoreCount>1)r.ignoreCount--;else if(t.origin=="+input"||t.origin=="paste"||t.origin===undefined){var s=e.listSelections().length;s>1&&(r.ignoreCount=s);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1);if(o)if(e.state.overwrite&&!/\n/.test(o))r.changes.push([o]);else{if(o.length>1){var u=i&&i.insertEnd&&i.insertEnd.find(),a=e.getCursor();if(u&&u.line==a.line){var f=u.ch-a.ch;f>0&&f",qt(i,r))}else!t.insertMode&&!n&&(t.lastHPos=e.getCursor().ch)}function pr(e,t){this.keyName=e,this.key=t.key,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey}function dr(e){var t=Z.macroModeState,n=t.lastInsertModeChanges,r=m.keyName?m.keyName(e):e.key;if(!r)return;if(r.indexOf("Delete")!=-1||r.indexOf("Backspace")!=-1)n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new pr(r,e))}function vr(e,t,n,r){function u(){s?Et.processAction(e,t,t.lastEditActionCommand):Et.evalInput(e,t)}function a(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;gr(e,r.changes,n)}}var i=Z.macroModeState;i.isPlaying=!0;var s=!!t.lastEditActionCommand,o=t.inputState;t.inputState=t.lastEditInputState;if(s&&t.lastEditActionCommand.interlaceInsertRepeat)for(var f=0;f1&&t[0]=="n"&&(t=t.replace("numpad","")),t=yr[t]||t;var i="";n.ctrlKey&&(i+="C-"),n.altKey&&(i+="A-"),(i||t.length>1)&&n.shiftKey&&(i+="S-");if(r&&!r.expectLiteralNext&&t.length==1)if(N.keymap&&t in N.keymap){if(N.remapCtrl!==!1||!i)t=N.keymap[t]}else if(t.charCodeAt(0)>255){var s=n.code&&n.code.slice(-1)||"";n.shiftKey||(s=s.toLowerCase()),s&&(t=s)}return i+=t,i.length>1&&(i="<"+i+">"),i}function Er(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){if(n=="insertEnd")return;var r=e[n];Array.isArray(r)?r=r.slice():r&&typeof r=="object"&&r.constructor!=Object&&(r=Er(r)),t[n]=r}),e.sel&&(t.sel={head:e.sel.head&&Bt(e.sel.head),anchor:e.sel.anchor&&Bt(e.sel.anchor)}),t}function Sr(e,t,n){var r=!1,i=nt.maybeInitVimState_(e),s=i.visualBlock||i.wasInVisualBlock,o=e.ace.inMultiSelectMode;i.wasInVisualBlock&&!o?i.wasInVisualBlock=!1:o&&i.visualBlock&&(i.wasInVisualBlock=!0);if(t==""&&!i.insertMode&&!i.visualMode&&o)e.ace.exitMultiSelectMode();else if(s||!o||e.ace.inVirtualSelectionMode)r=nt.handleKey(e,t,n);else{var u=Er(i),a=i.inputState.changeQueueList||[];e.operation(function(){e.curOp.isVimOp=!0;var s=0;e.ace.forEachSelection(function(){var i=e.ace.selection;e.state.vim.lastHPos=i.$desiredColumn==null?i.lead.column:i.$desiredColumn,e.state.vim.inputState.changeQueue=a[s];var o=e.getCursor("head"),f=e.getCursor("anchor"),l=Ft(o,f)?0:-1,c=Ft(o,f)?-1:0;o=Mt(o,0,l),f=Mt(f,0,c),e.state.vim.sel.head=o,e.state.vim.sel.anchor=f,r=wr(e,t,n),i.$desiredColumn=e.state.vim.lastHPos==-1?null:e.state.vim.lastHPos,e.ace.inVirtualSelectionMode&&(a[s]=e.state.vim.inputState.changeQueue),e.virtualSelectionMode()&&(e.state.vim=Er(u)),s++}),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),i.status=e.state.vim.status,e.state.vim=i,i.inputState.changeQueueList=a,i.inputState.changeQueue=null},!0)}return r&&!i.visualMode&&!i.insert&&i.visualMode!=e.somethingSelected()&&hr(e,i,!0),r}function Tr(e,t){t.off("beforeEndOperation",Tr);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}var i=e("../range").Range,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/dom"),u=e("../lib/oop"),a=e("../lib/keys"),f=e("../lib/event"),l=e("../search").Search,c=e("../lib/useragent"),h=e("../search_highlight").SearchHighlight,p=e("../commands/multi_select_commands"),d=e("../mode/text").Mode.prototype.tokenRe,v=e("../ext/hardwrap").hardWrap;e("../multi_select");var m=function(e){this.ace=e,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};m.Pos=function(e,t){if(!(this instanceof w))return new w(e,t);this.line=e,this.ch=t},m.defineOption=function(e,t,n){},m.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")},goLineLeft:function(e){e.ace.selection.moveCursorLineStart()},goLineRight:function(e){e.ace.selection.moveCursorLineEnd()}},m.keyMap={},m.addClass=m.rmClass=function(){},m.e_stop=m.e_preventDefault=f.stopEvent,m.keyName=function(e){var t=a[e.keyCode]||e.key||"";return t.length==1&&(t=t.toUpperCase()),t=f.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t,t},m.keyMap["default"]=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&t.ace.execCommand(n)!==!1}},m.lookupKey=function Nr(e,t,n){t||(t="default"),typeof t=="string"&&(t=m.keyMap[t]||m.keyMap["default"]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return Nr(e,t.fallthrough,n);for(var i=0;i0){a.row+=s,a.column+=a.row==r.row?o:0;continue}!t&&l<=0&&(a.row=n.row,a.column=n.column,l===0&&(a.bias=1))}};var e=function(e,t,n,r){this.cm=e,this.id=t,this.row=n,this.column=r,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return y(this)},this.setBookmark=function(t,n){var r=new e(this,this.$uid++,t.line,t.ch);if(!n||!n.insertLeft)r.$insertRight=!0;return this.marks[r.id]=r,r},this.moveH=function(e,t){if(t=="char"){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,r){if(n=="page"){var i=this.ace.renderer,s=i.layerConfig;t*=Math.floor(s.height/s.lineHeight),n="line"}if(n=="line"){var o=this.ace.session.documentToScreenPosition(e.line,e.ch);r!=null&&(o.column=r),o.row+=t,o.row=Math.min(Math.max(0,o.row),this.ace.session.getScreenLength()-1);var u=this.ace.session.screenToDocumentPosition(o.row,o.column);return y(u)}debugger},this.charCoords=function(e,t){if(t=="div"||!t){var n=this.ace.session.documentToScreenPosition(e.line,e.ch);return{left:n.column,top:n.row}}if(t=="local"){var r=this.ace.renderer,n=this.ace.session.documentToScreenPosition(e.line,e.ch),i=r.layerConfig.lineHeight,s=r.layerConfig.characterWidth,o=i*n.row;return{left:n.column*s,top:o,bottom:o+i}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if(t=="local"){var r=Math.max(0,Math.floor(e.top/n.lineHeight)),i=Math.max(0,Math.floor(e.left/n.characterWidth)),s=n.session.screenToDocumentPosition(r,i);return y(s)}if(t=="div")throw"not implemented"},this.getSearchCursor=function(e,t,n){var r=!1,i=!1;e instanceof RegExp&&!e.global&&(r=!e.ignoreCase,e=e.source,i=!0),e=="\\n"&&(e="\n",i=!1);var s=new l;t.ch==undefined&&(t.ch=Number.MAX_VALUE);var o={row:t.line,column:t.ch},u=this,a=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){s.setOptions({needle:e,caseSensitive:r,wrap:!1,backwards:t,regExp:i,start:a||o});var n=s.find(u.ace.session);return a=n,a&&[!a.isEmpty()]},from:function(){return a&&y(a.start)},to:function(){return a&&y(a.end)},replace:function(e){a&&(a.end=u.ace.session.doc.replace(a,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,r=n.layerConfig,i=r.maxHeight;i-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,t!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,i))),e!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,r.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){if(e){var n=this.ace.renderer,r={top:0,bottom:t};n.scrollCursorIntoView(g(e),n.lineHeight*2/n.$size.scrollerHeight,r)}},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new i(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){n||(n=t);var r=new i(t.line,t.ch,n.line,n.ch);return this.ace.session.$clipRangeToDocument(r),this.ace.session.replace(r,e)},this.replaceSelection=this.replaceSelections=function(e){var t=Array.isArray(e)&&e,n=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(n.getRange(),t?e[0]||"":e);return}n.inVirtualSelectionMode=!0;var r=n.rangeList.ranges;r.length||(r=[this.ace.multiSelect.getRange()]);for(var i=r.length;i--;)this.ace.session.replace(r[i],t?e[i]||"":e);n.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(e){return this.getRange(e.anchor,e.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(e,n){this.state[e]=n;switch(e){case"indentWithTabs":e=t[e],n=!n;break;case"keyMap":this.state.$keyMap=n;return;default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e){var n,r=t[e];r&&(n=this.ace.getOption(r));switch(e){case"indentWithTabs":return e=t[e],!n;case"keyMap":return this.state.$keyMap||"vim"}return r?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new h(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){var n=e.start.row;n==e.end.row?t.cache[n]=undefined:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var r=new RegExp(e.query.source,"gmi");this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(r),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e,-1)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(g(e));return{to:t&&y(t)}},this.findMatchingTag=function(e){var t=this.ace.session.getMatchingTags(g(e));if(!t)return;return{open:{from:y(t.openTag.start),to:y(t.openTag.end)},close:{from:y(t.closeTag.start),to:y(t.closeTag.end)}}},this.indentLine=function(e,t){t===!0?this.ace.session.indentRows(e,e," "):t===!1&&this.ace.session.outdentRows(new i(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(g(e))},this.posFromIndex=function(e){return y(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.textInput.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,r){var i=r.bracketRegex.source,s=/paren|text|operator|tag/;if(t==1)var o=this.ace.session.$findClosingBracket(i.slice(1,2),g(e),s);else{var o=this.ace.session.$findOpeningBracket(i.slice(-2,-1),{row:e.line,column:e.ch+1},s);!o&&r.bracketRegex&&r.bracketRegex.test(this.getLine(e.line)[e.ch-1])&&(o={row:e.line,column:e.ch-1})}return o&&{pos:y(o)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(e){if(m.commands.hasOwnProperty(e))return m.commands[e](this);if(e=="indentAuto")return this.ace.execCommand("autoindent");console.log(e+" is not implemented")},this.getLineNumber=function(e){var t=this.$lineHandleChanges;if(!t)return null;var n=e.row;for(var r=0;r0)return null;n-=i.end.row-i.start.row}}return n},this.getLineHandle=function(e){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(e),row:e}},this.releaseLineHandles=function(){this.$lineHandleChanges=undefined},this.getLastEditEnd=function(){var e=this.ace.session.$undoManager;if(e&&e.$lastDelta)return y(e.$lastDelta.end)}}.call(m.prototype);var b=m.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};b.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.post},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e!="string"){var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},m.defineExtension=function(e,t){m.prototype[e]=t},o.importCssString(".normal-mode .ace_cursor{\n border: none;\n background-color: rgba(255,0,0,0.5);\n}\n.normal-mode .ace_hidden-cursors .ace_cursor{\n background-color: transparent;\n border: 1px solid red;\n opacity: 0.7\n}\n.ace_dialog {\n position: absolute;\n left: 0; right: 0;\n background: inherit;\n z-index: 15;\n padding: .1em .8em;\n overflow: hidden;\n color: inherit;\n}\n.ace_dialog-top {\n border-bottom: 1px solid #444;\n top: 0;\n}\n.ace_dialog-bottom {\n border-top: 1px solid #444;\n bottom: 0;\n}\n.ace_dialog input {\n border: none;\n outline: none;\n background: transparent;\n width: 20em;\n color: inherit;\n font-family: monospace;\n}","vimMode",!1),function(){function e(e,t,n){var r=e.ace.container,i;return i=r.appendChild(document.createElement("div")),n?i.className="ace_dialog ace_dialog-bottom":i.className="ace_dialog ace_dialog-top",typeof t=="string"?i.innerHTML=t:i.appendChild(t),i}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}m.defineExtension("openDialog",function(n,r,i){function a(e){if(typeof e=="string")f.value=e;else{if(o)return;if(e&&e.type=="blur"&&document.activeElement===f)return;u.state.dialog==s&&(u.state.dialog=null,u.focus()),o=!0,s.remove(),i.onClose&&i.onClose(s);var t=u;t.state.vim&&(t.state.vim.status=null,t.ace._signal("changeStatus"),t.ace.renderer.$loop.schedule(t.ace.renderer.CHANGE_CURSOR))}}if(this.virtualSelectionMode())return;i||(i={}),t(this,null);var s=e(this,n,i.bottom),o=!1,u=this;this.state.dialog=s;var f=s.getElementsByTagName("input")[0],l;if(f)i.value&&(f.value=i.value,i.selectValueOnOpen!==!1&&f.select()),i.onInput&&m.on(f,"input",function(e){i.onInput(e,f.value,a)}),i.onKeyUp&&m.on(f,"keyup",function(e){i.onKeyUp(e,f.value,a)}),m.on(f,"keydown",function(e){if(i&&i.onKeyDown&&i.onKeyDown(e,f.value,a))return;e.keyCode==13&&r(f.value);if(e.keyCode==27||i.closeOnEnter!==!1&&e.keyCode==13)m.e_stop(e),a()}),i.closeOnBlur!==!1&&m.on(f,"blur",a),f.focus();else if(l=s.getElementsByTagName("button")[0])m.on(l,"click",function(){a(),u.focus()}),i.closeOnBlur!==!1&&m.on(l,"blur",a),l.focus();return a}),m.defineExtension("openNotification",function(n,r){function a(){if(s)return;s=!0,clearTimeout(o),i.remove()}if(this.virtualSelectionMode())return;t(this,a);var i=e(this,n,r&&r.bottom),s=!1,o,u=r&&typeof r.duration!="undefined"?r.duration:5e3;return m.on(i,"click",function(e){m.e_preventDefault(e),a()}),u&&(o=setTimeout(a,u)),a})}();var w=m.Pos,S=[{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"},{keys:"",type:"keyToKey",toKeys:"x"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b"},{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:""},{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"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{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:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{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:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},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:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"",type:"action",action:"oneNormalCommand",context:"insert"},{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:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],x=S.length,T=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{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:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],N=pt(""),A=/[\d]/,O=[m.isWordChar,function(e){return e&&!m.isWordChar(e)&&!/\s/.test(e)}],M=[function(e){return/\S/.test(e)}],_=["<",">"],D=["-",'"',".",":","_","/","+"],P=/^\w$/,H;try{H=new RegExp("^[\\p{Lu}]$","u")}catch(B){H=/^[A-Z]$/}var X={};V("filetype",undefined,"string",["ft"],function(e,t){if(t===undefined)return;if(e===undefined){var n=t.getOption("mode");return n=="null"?"":n}var n=e==""?"null":e;t.setOption("mode",n)}),V("textwidth",80,"number",["tw"],function(e,t){if(t===undefined)return;if(e===undefined){var n=t.getOption("textwidth");return n}var r=Math.round(e);r>1&&t.setOption("textwidth",r)});var K=function(){function s(s,o,u){function l(n){var r=++t%e,o=i[r];o&&o.clear(),i[r]=s.setBookmark(n)}var a=t%e,f=i[a];if(f){var c=f.find();c&&!jt(c,o)&&l(o)}else l(o);l(u),n=t,r=t-e+1,r<0&&(r=0)}function o(s,o){t+=o,t>n?t=n:t0?1:-1,f,l=s.getCursor();do{t+=a,u=i[(e+t)%e];if(u&&(f=u.find())&&!jt(l,f))break}while(tr)}return u}function u(e,n){var r=t,i=o(e,n);return t=r,i&&i.find()}var e=100,t=-1,n=0,r=0,i=new Array(e);return{cachedCursor:undefined,add:s,find:u,move:o}},Q=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};G.prototype={exitMacroRecordMode:function(){var e=Z.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=undefined,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Z.registerController.getRegister(t);if(n){n.clear(),this.latestRegister=t;if(e.openDialog){var r=jn("span",{"class":"cm-vim-message"},"recording @"+t);this.onRecordingDone=e.openDialog(r,null,{bottom:!0})}this.isRecording=!0}}};var Z,tt,nt={enterVimMode:C,leaveVimMode:k,buildKeyMap:function(){},getRegisterController:function(){return Z.registerController},resetVimGlobalState_:et,getVimGlobalState_:function(){return Z},maybeInitVimState_:Y,suppressErrorLogging:!1,InsertModeKey:pr,map:function(e,t,n){tr.map(e,t,n)},unmap:function(e,t){return tr.unmap(e,t)},noremap:function(e,t,n){tr.map(e,t,n,!0)},mapclear:function(e){var t=S.length,n=x,r=S.slice(0,t-n);S=S.slice(t-n);if(e)for(var i=r.length-1;i>=0;i--){var s=r[i];if(e!==s.context)if(s.context)this._mapCommand(s);else{var o=["normal","insert","visual"];for(var u in o)if(o[u]!==e){var a={};for(var f in s)a[f]=s[f];a.context=o[u],this._mapCommand(a)}}}},langmap:ht,vimKeyFromEvent:ct,setOption:$,getOption:J,defineOption:V,defineEx:function(e,t,n){if(!t)t=e;else if(e.indexOf(t)!==0)throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered');er[e]=n,tr.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if(typeof r=="function")return r()},multiSelectHandleKey:Sr,findKey:function(e,t,n){function i(){var r=Z.macroModeState;if(r.isRecording){if(t=="q")return r.exitMacroRecordMode(),vt(e),!0;n!="mapping"&&ur(r,t)}}function s(){if(t==""){if(r.visualMode)tn(e);else{if(!r.insertMode)return;rr(e)}return vt(e),!0}}function o(){if(s())return!0;r.inputState.keyBuffer.push(t);var n=r.inputState.keyBuffer.join(""),i=t.length==1,o=Et.matchCommand(n,S,r.inputState,"insert"),u=r.inputState.changeQueue;if(o.type=="none")return vt(e),!1;if(o.type=="partial"){o.expectLiteralNext&&(r.expectLiteralNext=!0),tt&&window.clearTimeout(tt),tt=i&&window.setTimeout(function(){r.insertMode&&r.inputState.keyBuffer.length&&vt(e)},J("insertModeEscKeysTimeout"));if(i){var a=e.listSelections();if(!u||u.removed.length!=a.length)u=r.inputState.changeQueue=new mt;u.inserted+=t;for(var f=0;f0||this.motionRepeat.length>0)e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10));return e},gt.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Q(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},bt.prototype={pushText:function(e,t,n,r,i){if(e==="_")return;r&&n.charAt(n.length-1)!=="\n"&&(n+="\n");var s=this.isValidRegister(e)?this.getRegister(e):null;if(!s){switch(t){case"yank":this.registers[0]=new gt(n,r,i);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new gt(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new gt(n,r))}this.unnamedRegister.setText(n,r,i);return}var o=R(e);o?s.pushText(n,r):s.setText(n,r,i),e==="+"&&typeof navigator!="undefined"&&typeof navigator.clipboard!="undefined"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(n),this.unnamedRegister.setText(s.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new gt),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&(W(e,D)||P.test(e))},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},wt.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;this.initialPrefix===null&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i=n.length)return this.iterator=n.length,this.initialPrefix;if(i<0)return e},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Et={matchCommand:function(e,t,n,r){var i=_t(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial",expectLiteralNext:i.partial.length==1&&i.partial[0].keys.slice(-11)==""};var s;for(var o=0;o"||s.keys.slice(-10)==""){var a=Pt(e);if(!a||a.length>1)return{type:"clear"};n.selectedCharacter=a}return{type:"full",command:s}},processCommand:function(e,t,n){t.inputState.repeatOverride=n.repeatOverride;switch(n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=Ot(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator){r.motion="expandToLine",r.motionArgs={linewise:!0},this.evalInput(e,t);return}vt(e)}r.operator=n.operator,r.operatorArgs=Ot(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,Yt(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=Ot(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),s=!!i,o=Ot(n.actionArgs)||{};r.selectedCharacter&&(o.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),o.repeat=i||1,o.repeatIsExplicit=s,o.registerName=r.registerName,vt(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),kt[n.action](e,o,t)},processSearch:function(e,t,n){function a(r,i,s){Z.searchHistoryController.pushInput(r),Z.searchHistoryController.reset();try{Un(e,r,i,s)}catch(o){Fn(e,"Invalid regex: "+r),vt(e);return}Et.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function f(e){a(e,!0,!0);var t=Z.macroModeState;t.isRecording&&fr(t,e)}function l(t,n,i){var s=ct(t),o,a;s==""||s==""?(o=s==""?!0:!1,a=t.target?t.target.selectionEnd:0,n=Z.searchHistoryController.nextMatch(n,o)||"",i(n),a&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(a,t.target.value.length))):s&&s!=""&&s!=""&&Z.searchHistoryController.reset();var f;try{f=Un(e,n,!0,!0)}catch(t){}f?e.scrollIntoView(Vn(e,!r,f),30):(Jn(e),e.scrollTo(u.left,u.top))}function c(t,n,r){var i=ct(t);i==""||i==""||i==""||i==""&&n==""?(Z.searchHistoryController.pushInput(n),Z.searchHistoryController.reset(),Un(e,o),Jn(e),e.scrollTo(u.left,u.top),m.e_stop(t),vt(e),r(),e.focus()):i==""||i==""?m.e_stop(t):i==""&&(m.e_stop(t),r(""))}if(!e.getSearchCursor)return;var r=n.searchArgs.forward,i=n.searchArgs.wholeWordOnly;Cn(e).setReversed(!r);var s=r?"/":"?",o=Cn(e).getQuery(),u=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var h=Z.macroModeState;if(h.isPlaying){var p=h.replaySearchQueries.shift();a(p,!0,!1)}else qn(e,{onClose:f,prefix:s,desc:"(JavaScript regexp)",onKeyUp:l,onKeyDown:c});break;case"wordUnderCursor":var d=on(e,{noSymbol:!0}),v=!0;d||(d=on(e,{noSymbol:!1}),v=!1);if(!d){Fn(e,"No word under cursor"),vt(e);return}var p=e.getLine(d.start.line).substring(d.start.ch,d.end.ch);v&&i?p="\\b"+p+"\\b":p=Wt(p),Z.jumpList.cachedCursor=e.getCursor(),e.setCursor(d.start),a(p,!0,!1)}},processEx:function(e,t,n){function r(t){Z.exCommandHistoryController.pushInput(t),Z.exCommandHistoryController.reset(),tr.processCommand(e,t),e.state.vim&&vt(e)}function i(t,n,r){var i=ct(t),s,o;if(i==""||i==""||i==""||i==""&&n=="")Z.exCommandHistoryController.pushInput(n),Z.exCommandHistoryController.reset(),m.e_stop(t),vt(e),r(),e.focus();i==""||i==""?(m.e_stop(t),s=i==""?!0:!1,o=t.target?t.target.selectionEnd:0,n=Z.exCommandHistoryController.nextMatch(n,s)||"",r(n),o&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(o,t.target.value.length))):i==""?(m.e_stop(t),r("")):i&&i!=""&&i!=""&&Z.exCommandHistoryController.reset()}n.type=="keyToEx"?tr.processCommand(e,n.exArgs.input):t.visualMode?qn(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):qn(e,{onClose:r,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,r=n.motion,i=n.motionArgs||{},s=n.operator,o=n.operatorArgs||{},u=n.registerName,a=t.sel,f=Bt(t.visualMode?At(e,a.head):e.getCursor("head")),l=Bt(t.visualMode?At(e,a.anchor):e.getCursor("anchor")),c=Bt(f),h=Bt(l),p,d,v;s&&this.recordLastEdit(t,n),n.repeatOverride!==undefined?v=n.repeatOverride:v=n.getRepeat();if(v>0&&i.explicitRepeat)i.repeatIsExplicit=!0;else if(i.noRepeat||!i.explicitRepeat&&v===0)v=1,i.repeatIsExplicit=!1;n.selectedCharacter&&(i.selectedCharacter=o.selectedCharacter=n.selectedCharacter),i.repeat=v,vt(e);if(r){var m=St[r](e,f,i,t,n);t.lastMotion=St[r];if(!m)return;if(i.toJumplist){!s&&e.ace.curOp!=null&&(e.ace.curOp.command.scrollIntoView="center-animate");var g=Z.jumpList,y=g.cachedCursor;y?(an(e,y,m),delete g.cachedCursor):an(e,f,m)}m instanceof Array?(d=m[0],p=m[1]):p=m,p||(p=Bt(f));if(t.visualMode){if(!t.visualBlock||p.ch!==Infinity)p=At(e,p,c);d&&(d=At(e,d)),d=d||h,a.anchor=d,a.head=p,Yt(e),yn(e,t,"<",Ft(d,p)?d:p),yn(e,t,">",Ft(d,p)?p:d)}else s||(e.ace.curOp&&(e.ace.curOp.vimDialogScroll="center-animate"),p=At(e,p,c),e.setCursor(p.line,p.ch))}if(s){if(o.lastSel){d=h;var b=o.lastSel,S=Math.abs(b.head.line-b.anchor.line),x=Math.abs(b.head.ch-b.anchor.ch);b.visualLine?p=new w(h.line+S,h.ch):b.visualBlock?p=new w(h.line+S,h.ch+x):b.head.line==b.anchor.line?p=new w(h.line,h.ch+x):p=new w(h.line+S,h.ch),t.visualMode=!0,t.visualLine=b.visualLine,t.visualBlock=b.visualBlock,a=t.sel={anchor:d,head:p},Yt(e)}else t.visualMode&&(o.lastSel={anchor:Bt(a.anchor),head:Bt(a.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var T,N,C,k,L;if(t.visualMode){T=It(a.head,a.anchor),N=qt(a.head,a.anchor),C=t.visualLine||o.linewise,k=t.visualBlock?"block":C?"line":"char";var A=E(e,T,N);L=Zt(e,{anchor:A.start,head:A.end},k);if(C){var O=L.ranges;if(k=="block")for(var M=0;Mf&&i.line==f)return vn(e,t,n,r,!0);var l=e.ace.session.getFoldLine(u);return l&&(n.forward?u>l.start.row&&(u=l.end.row+1):u=l.start.row),n.toFirstChar&&(s=sn(e.getLine(u)),r.lastHPos=s),r.lastHSPos=e.charCoords(new w(u,s),"div").left,new w(u,s)},moveByDisplayLines:function(e,t,n,r){var i=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(i,"div").left}var s=n.repeat,o=e.findPosV(i,n.forward?s:-s,"line",r.lastHSPos);if(o.hitSide)if(n.forward)var u=e.charCoords(o,"div"),a={top:u.top+8,left:r.lastHSPos},o=e.coordsChar(a,"div");else{var f=e.charCoords(new w(e.firstLine(),0),"div");f.left=r.lastHSPos,o=e.coordsChar(f,"div")}return r.lastHPos=o.ch,o},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return wn(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return Sn(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),s=null,o=n.repeat;o||(o=i.clientHeight/(2*e.defaultTextHeight()));var u=e.charCoords(t,"local");n.repeat=o,s=St.moveByDisplayLines(e,t,n,r);if(!s)return null;var a=e.charCoords(s,"local");return e.scrollTo(null,i.top+a.top-u.top),s},moveByWords:function(e,t,n){return dn(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,i=mn(e,r,n.forward,n.selectedCharacter,t),s=n.forward?-1:1;return fn(s,n),i?(i.ch+=s,i):null},moveToCharacter:function(e,t,n){var r=n.repeat;return fn(0,n),mn(e,r,n.forward,n.selectedCharacter,t)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return hn(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,gn(e,i)},moveToEol:function(e,t,n,r){return vn(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return new w(n.line,sn(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n=t,r=n.line,i=n.ch,s=e.getLine(r),o;for(;i]/.test(s[i])?/[(){}[\]<>]/:/[(){}[\]]/,f=e.findMatchingBracket(new w(r,i+1),{bracketRegex:a});return f.to}return n},moveToStartOfLine:function(e,t){return new w(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),new w(r,sn(e.getLine(r)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return t.sticky=="before"&&t.ch--,t},textObjectManipulation:function(e,t,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},s={"'":!0,'"':!0,"`":!0},o=n.selectedCharacter;o=="b"?o="(":o=="B"&&(o="{");var u=!n.textObjectInner,a,f;if(i[o]){f=!0,a=xn(e,t,o,u);if(!a){var l=e.getSearchCursor(new RegExp("\\"+o,"g"),t);l.find()&&(a=xn(e,l.from(),o,u))}}else if(s[o])f=!0,a=Tn(e,t,o,u);else if(o==="W"||o==="w"){var c=n.repeat||1;while(c-->0){var h=on(e,{inclusive:u,innerWord:!u,bigWord:o==="W",noSymbol:o==="W",multiline:!0},a&&a.end);h&&(a||(a=h),a.end=h.end)}}else if(o==="p"){a=wn(e,t,n.repeat,0,u),n.linewise=!0;if(r.visualMode)r.visualLine||(r.visualLine=!0);else{var p=r.inputState.operatorArgs;p&&(p.linewise=!0),a.end.line--}}else if(o==="t")a=un(e,t,u);else if(o==="s"){var d=e.getLine(t.line);t.ch>0&&z(d[t.ch])&&(t.ch-=1);var v=En(e,t,n.repeat,1,u),m=En(e,t,n.repeat,-1,u);U(e.getLine(m.line)[m.ch])&&U(e.getLine(v.line)[v.ch-1])&&(m={line:m.line,ch:m.ch+1}),a={start:m,end:v}}return a?e.state.vim.visualMode?Gt(e,a.start,a.end,f):[a.start,a.end]:null},repeatLastCharacterSearch:function(e,t,n){var r=Z.lastCharacterSearch,i=n.repeat,s=n.forward===r.forward,o=(r.increment?1:0)*(s?-1:1);e.moveH(-o,"char"),n.inclusive=s?!0:!1;var u=mn(e,i,s,r.selectedCharacter);return u?(u.ch+=o,u):(e.moveH(o,"char"),t)}},Nt={change:function(e,t,n){var r,i,s=e.state.vim,o=n[0].anchor,u=n[0].head;if(!s.visualMode){i=e.getRange(o,u);var a=s.lastEditInputState||{};if(a.motion=="moveByWords"&&!U(i)){var f=/\s+$/.exec(i);f&&a.motionArgs&&a.motionArgs.forward&&(u=Mt(u,0,-f[0].length),i=i.slice(0,-f[0].length))}t.linewise&&(o=new w(o.line,sn(e.getLine(o.line))),u.line>o.line&&(u=new w(u.line-1,Number.MAX_VALUE))),e.replaceRange("",o,u),r=o}else if(t.fullLine)u.ch=Number.MAX_VALUE,u.line--,e.setSelection(o,u),i=e.getSelection(),e.replaceSelection(""),r=o;else{i=e.getSelection();var l=Tt("",n.length);e.replaceSelections(l),r=It(n[0].head,n[0].anchor)}Z.registerController.pushText(t.registerName,"change",i,t.linewise,n.length>1),kt.enterInsertMode(e,{head:r},e.state.vim)},"delete":function(e,t,n){var r,i,s=e.state.vim;if(!s.visualBlock){var o=n[0].anchor,u=n[0].head;t.linewise&&u.line!=e.firstLine()&&o.line==e.lastLine()&&o.line==u.line-1&&(o.line==e.firstLine()?o.ch=0:o=new w(o.line-1,Ut(e,o.line-1))),i=e.getRange(o,u),e.replaceRange("",o,u),r=o,t.linewise&&(r=St.moveToFirstNonWhiteSpaceCharacter(e,o))}else{i=e.getSelection();var a=Tt("",n.length);e.replaceSelections(a),r=It(n[0].head,n[0].anchor)}return Z.registerController.pushText(t.registerName,"delete",i,t.linewise,s.visualBlock),At(e,r)},indent:function(e,t,n){var r=e.state.vim,i=r.visualMode?t.repeat:1;if(r.visualBlock){var s=e.getOption("tabSize"),o=e.getOption("indentWithTabs")?" ":" ".repeat(s),u;for(var a=n.length-1;a>=0;a--){u=It(n[a].anchor,n[a].head);if(t.indentRight)e.replaceRange(o.repeat(i),u,u);else{var f=e.getLine(u.line),l=0;for(var c=0;cs&&t.linewise&&u--,t.keepCursor?r:new w(u,0)},changeCase:function(e,t,n,r,i){var s=e.getSelections(),o=[],u=t.toLower;for(var a=0;af.top?(a.line+=(u-f.top)/i,a.line=Math.ceil(a.line),e.setCursor(a),f=e.charCoords(a,"local"),e.scrollTo(null,f.top)):e.scrollTo(null,u);else{var l=u+e.getScrollInfo().clientHeight;l=i.anchor.line?s=Mt(i.head,0,1):s=new w(i.anchor.line,0)}else if(r=="inplace"){if(n.visualMode)return}else r=="lastEdit"&&(s=Yn(e)||s);e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),m.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),m.signal(e,"vim-mode-change",{mode:"insert"})),Z.macroModeState.isPlaying||(e.on("change",lr),n.insertEnd&&n.insertEnd.clear(),n.insertEnd=e.setBookmark(s,{insertLeft:!0}),m.on(e.getInputField(),"keydown",dr)),n.visualMode&&tn(e),$t(e,s,o)},toggleVisualMode:function(e,t,n){var r=t.repeat,i=e.getCursor(),s;if(!n.visualMode){n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,s=At(e,new w(i.line,i.ch+r-1));var o=E(e,i,s);n.sel={anchor:o.start,head:o.end},m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Yt(e),yn(e,n,"<",It(i,s)),yn(e,n,">",qt(i,s))}else n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Yt(e)):tn(e)},reselectLastSelection:function(e,t,n){var r=n.lastSelection;n.visualMode&&Qt(e,n);if(r){var i=r.anchorMark.find(),s=r.headMark.find();if(!i||!s)return;n.sel={anchor:i,head:s},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,Yt(e),yn(e,n,"<",It(i,s)),yn(e,n,">",qt(i,s)),m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,i;if(n.visualMode){r=e.getCursor("anchor"),i=e.getCursor("head");if(Ft(i,r)){var s=i;i=r,r=s}i.ch=Ut(e,i.line)-1}else{var o=Math.max(t.repeat,2);r=e.getCursor(),i=At(e,new w(r.line+o-1,Infinity))}var u=0;for(var a=r.line;a1)var r=Array(t.repeat+1).join(r);var p=i.linewise,d=i.blockwise;if(d){r=r.split("\n"),p&&r.pop();for(var v=0;ve.lastLine()&&e.replaceRange("\n",new w(N,0));var C=Ut(e,N);Ca.length&&(s=a.length),o=new w(i.line,s)}var f=E(e,i,o);i=f.start,o=f.end;if(r=="\n")n.visualMode||e.replaceRange("",i,o),(m.commands.newlineAndIndentContinueComment||m.commands.newlineAndIndent)(e);else{var l=e.getRange(i,o);l=l.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r),l=l.replace(/[^\n]/g,r);if(n.visualBlock){var c=(new Array(e.getOption("tabSize")+1)).join(" ");l=e.getSelection(),l=l.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r),l=l.replace(/\t/g,c).replace(/[^\n]/g,r).split("\n"),e.replaceSelections(l)}else e.replaceRange(l,i,o);n.visualMode?(i=Ft(u[0].anchor,u[0].head)?u[0].anchor:u[0].head,e.setCursor(i),tn(e,!1)):e.setCursor(Mt(o,0,-1))}},incrementNumberToken:function(e,t){var n=e.getCursor(),r=e.getLine(n.line),i=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,s,o,u,a;while((s=i.exec(r))!==null){o=s.index,u=o+s[0].length;if(n.ch=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return e.index===0&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t=e.lastCh==="*"&&e.nextCh==="/";return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb=e.symb==="m"?"{":"}",e.reverseSymb=e.symb==="{"?"}":"{"},isComplete:function(e){return e.nextCh===e.symb?!0:!1}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if(e.nextCh==="#"){var t=e.lineText.match(/^#(\w+)/)[1];if(t==="endif"){if(e.forward&&e.depth===0)return!0;e.depth++}else if(t==="if"){if(!e.forward&&e.depth===0)return!0;e.depth--}if(t==="else"&&e.depth===0)return!0}return!1}}};V("pcre",!0,"boolean"),Nn.prototype={getQuery:function(){return Z.query},setQuery:function(e){Z.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Z.isReversed},setReversed:function(e){Z.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var _n={"\\n":"\n","\\r":"\r","\\t":" "},Pn={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":" ","\\&":"&"},Wn=0,Zn=function(){this.buildCommandMap_()};Zn.prototype={processCommand:function(e,t,n){var r=this;e.operation(function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)})},_processCommand:function(e,t,n){var r=e.state.vim,i=Z.registerController.getRegister(":"),s=i.toString(),o=new m.StringStream(t);i.setText(t);var u=n||{};u.input=t;try{this.parseInput_(e,o,u)}catch(a){throw Fn(e,a.toString()),a}r.visualMode&&tn(e);var f,l;if(!u.commandName)u.line!==undefined&&(l="move");else{f=this.matchCommand_(u.commandName);if(f){l=f.name,f.excludeFromCommandHistory&&i.setText(s),this.parseCommandArgs_(o,u,f);if(f.type=="exToKey"){ut(e,f.toKeys,f);return}if(f.type=="exToEx"){this.processCommand(e,f.toInput);return}}}if(!l){Fn(e,'Not an editor command ":'+t+'"');return}try{er[l](e,u),(!f||!f.possiblyAsync)&&u.callback&&u.callback()}catch(a){throw Fn(e,a.toString()),a}},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),n.line!==undefined&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));if(n.line==undefined)if(e.state.vim.visualMode){var r=Gn(e,e.state.vim,"<");n.selectionLine=r&&r.line,r=Gn(e,e.state.vim,">"),n.selectionLineEnd=r&&r.line}else n.selectionLine=e.getCursor().line;else n.selectionLine=n.line,n.selectionLineEnd=n.lineEnd;var i=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return i?n.commandName=i[1]:n.commandName=t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=Gn(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return t.backUp(1),undefined}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);n[1]=="-"?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(e.eol())return;t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=zt(t.argString).split(r);i.length&&i[0]&&(t.args=i)},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(r.name.indexOf(e)===0)return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e1)return"Invalid arguments";s=a&&"decimal"||f&&"hex"||l&&"octal"}u[2]&&(o=new RegExp(u[2].substr(1,u[2].length-2),r?"i":""))}}function S(e,t){if(n){var i;i=e,e=t,t=i}r&&(e=e.toLowerCase(),t=t.toLowerCase());var o=s&&d.exec(e),u=s&&d.exec(t);return o?(o=parseInt((o[1]+o[2]).toLowerCase(),v),u=parseInt((u[1]+u[2]).toLowerCase(),v),o-u):e=f){Fn(e,"Invalid argument: "+t.argString.substring(i));return}for(var l=0;l<=f-a;l++){var c=String.fromCharCode(a+l);delete n.marks[c]}}else delete n.marks[s]}}},tr=new Zn;V("insertModeEscKeysTimeout",200,"number"),m.Vim=nt;var yr={"return":"CR",backspace:"BS","delete":"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},wr=nt.handleKey.bind(nt);nt.handleKey=function(e,t,n){return e.operation(function(){return wr(e,t,n)},!0)},et(),t.CodeMirror=m;var xr=nt.maybeInitVimState_;t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,r,s){var u=this.state.vim||{},a=n.characterWidth,f=n.lineHeight,l=t.top,c=t.left;if(!u.insertMode){var h=r.cursor?i.comparePoints(r.cursor,r.start)<=0:s.selection.isBackwards()||s.selection.isEmpty();!h&&c>a&&(c-=a)}!u.insertMode&&u.status&&(f/=2,l+=f),o.translate(e,c,l),o.setStyle(e.style,"width",a+"px"),o.setStyle(e.style,"height",f+"px")},$getDirectionForHighlight:function(e){var t=e.state.cm,n=xr(t);if(!n.insertMode)return e.session.selection.isBackwards()||e.session.selection.isEmpty()},handleKeyboard:function(e,t,n,r,i){var s=e.editor,o=s.state.cm,u=xr(o);if(r==-1)return;u.insertMode||(t==-1?(n.charCodeAt(0)>255&&e.inputKey&&(n=e.inputKey,n&&e.inputHash==4&&(n=n.toUpperCase())),e.inputChar=n):t==4||t==0?e.inputKey==n&&e.inputHash==t&&e.inputChar?(n=e.inputChar,t=-1):(e.inputChar=null,e.inputKey=n,e.inputHash=t):e.inputChar=e.inputKey=null);if(o.state.overwrite&&u.insertMode&&n=="backspace"&&t==0)return{command:"gotoleft"};if(n=="c"&&t==1&&!c.isMac&&s.getCopyText())return s.once("copy",function(){u.insertMode?s.selection.clearSelection():o.operation(function(){tn(o)})}),{command:"null",passEvent:!0};if(n=="esc"&&!u.insertMode&&!u.visualMode&&!o.ace.inMultiSelectMode){var a=Cn(o),f=a.getOverlay();f&&o.removeOverlay(f)}if(t==-1||t&1||t===0&&n.length>1){var l=u.insertMode,h=br(t,n,i||{},u);u.status==null&&(u.status="");var p=Sr(o,h,"user");u=xr(o),p&&u.status!=null?u.status+=h:u.status==null&&(u.status=""),o._signal("changeStatus");if(!p&&(t!=-1||l))return;return{command:"null",passEvent:!p}}},attach:function(e){function n(){var n=xr(t).insertMode;t.ace.renderer.setStyle("normal-mode",!n),e.textInput.setCommandMode(!n),e.renderer.$keepTextAreaAtCursor=n,e.renderer.$blockCursor=!n}e.state||(e.state={});var t=new m(e);e.state.cm=t,e.$vimModeHandler=this,C(t),xr(t).status=null,t.on("vim-command-done",function(){if(t.virtualSelectionMode())return;xr(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup()}),t.on("changeStatus",function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")}),t.on("vim-mode-change",function(){if(t.virtualSelectionMode())return;n(),t._signal("changeStatus")}),n(),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t)},detach:function(e){var t=e.state.cm;k(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),e.textInput.setCommandMode(!1),e.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(e){var t=e.state.cm,n=xr(t);if(n.insertMode)return"INSERT";var r="";return n.visualMode&&(r+="VISUAL",n.visualLine&&(r+=" LINE"),n.visualBlock&&(r+=" BLOCK")),n.status&&(r+=(r?" ":"")+n.status),r}},nt.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),nt.defineEx("write","w",function(){console.log(":write is not implemented")}),S.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),S.push({keys:"gq",type:"operator",operator:"hardWrap"}),nt.defineOperator("hardWrap",function(e,t,n,r,i){var s=n[0].anchor.line,o=n[0].head.line;return t.linewise&&o--,v(e.ace,{startRow:s,endRow:o}),w(o,0)}),V("textwidth",undefined,"number",["tw"],function(e,t){if(t===undefined)return;if(e===undefined){var n=t.ace.getOption("printMarginColumn");return n}var r=Math.round(e);r>1&&t.ace.setOption("printMarginColumn",r)}),kt.aceCommand=function(e,t,n){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",Tr):Tr(null,e.ace)},kt.fold=function(e,t,n){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},x=S.length,t.handler.defaultKeymap=S,t.handler.actions=kt,t.Vim=nt}); (function() { + ace.require(["ace/keyboard/vim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/keybinding-vscode.js b/mixly/common/modules/web-modules/ace/keybinding-vscode.js new file mode 100644 index 00000000..44d3aac4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/keybinding-vscode.js @@ -0,0 +1,8 @@ +ace.define("ace/keyboard/vscode",["require","exports","module","ace/keyboard/hash_handler","ace/config"],function(e,t,n){"use strict";var r=e("../keyboard/hash_handler").HashHandler,i=e("../config");t.handler=new r,t.handler.$id="ace/keyboard/vscode",t.handler.addCommands([{name:"toggleWordWrap",exec:function(e){var t=e.session.getUseWrapMode();e.session.setUseWrapMode(!t)},readOnly:!0},{name:"navigateToLastEditLocation",exec:function(e){var t=e.session.getUndoManager().$lastDelta,n=t.action=="remove"?t.start:t.end;e.moveCursorTo(n.row,n.column),e.clearSelection()}},{name:"replaceAll",exec:function(e){e.searchBox?e.searchBox.active===!0&&e.searchBox.replaceOption.checked===!0&&e.searchBox.replaceAll():i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"replaceOne",exec:function(e){e.searchBox?e.searchBox.active===!0&&e.searchBox.replaceOption.checked===!0&&e.searchBox.replace():i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"selectAllMatches",exec:function(e){e.searchBox?e.searchBox.active===!0&&e.searchBox.findAll():i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1)})}},{name:"toggleFindCaseSensitive",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.caseSensitiveOption.checked=!n.caseSensitiveOption.checked,n.$syncOptions()})}},{name:"toggleFindInSelection",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.searchOption.checked=!n.searchRange,n.setSearchRange(n.searchOption.checked&&n.editor.getSelectionRange()),n.$syncOptions()})}},{name:"toggleFindRegex",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.regExpOption.checked=!n.regExpOption.checked,n.$syncOptions()})}},{name:"toggleFindWholeWord",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.wholeWordOption.checked=!n.wholeWordOption.checked,n.$syncOptions()})}},{name:"removeSecondaryCursors",exec:function(e){var t=e.selection.ranges;t&&t.length>1?e.selection.toSingleRange(t[t.length-1]):e.selection.clearSelection()}}]),[{bindKey:{mac:"Ctrl-G",win:"Ctrl-G"},name:"gotoline"},{bindKey:{mac:"Command-Shift-L|Command-F2",win:"Ctrl-Shift-L|Ctrl-F2"},name:"findAll"},{bindKey:{mac:"Shift-F8|Shift-Option-F8",win:"Shift-F8|Shift-Alt-F8"},name:"goToPreviousError"},{bindKey:{mac:"F8|Option-F8",win:"F8|Alt-F8"},name:"goToNextError"},{bindKey:{mac:"Command-Shift-P|F1",win:"Ctrl-Shift-P|F1"},name:"openCommandPalette"},{bindKey:{mac:"Shift-Option-Up",win:"Alt-Shift-Up"},name:"copylinesup"},{bindKey:{mac:"Shift-Option-Down",win:"Alt-Shift-Down"},name:"copylinesdown"},{bindKey:{mac:"Command-Shift-K",win:"Ctrl-Shift-K"},name:"removeline"},{bindKey:{mac:"Command-Enter",win:"Ctrl-Enter"},name:"addLineAfter"},{bindKey:{mac:"Command-Shift-Enter",win:"Ctrl-Shift-Enter"},name:"addLineBefore"},{bindKey:{mac:"Command-Shift-\\",win:"Ctrl-Shift-\\"},name:"jumptomatching"},{bindKey:{mac:"Command-]",win:"Ctrl-]"},name:"blockindent"},{bindKey:{mac:"Command-[",win:"Ctrl-["},name:"blockoutdent"},{bindKey:{mac:"Ctrl-PageDown",win:"Alt-PageDown"},name:"pagedown"},{bindKey:{mac:"Ctrl-PageUp",win:"Alt-PageUp"},name:"pageup"},{bindKey:{mac:"Shift-Option-A",win:"Shift-Alt-A"},name:"toggleBlockComment"},{bindKey:{mac:"Option-Z",win:"Alt-Z"},name:"toggleWordWrap"},{bindKey:{mac:"Command-G",win:"F3|Ctrl-K Ctrl-D"},name:"findnext"},{bindKey:{mac:"Command-Shift-G",win:"Shift-F3"},name:"findprevious"},{bindKey:{mac:"Option-Enter",win:"Alt-Enter"},name:"selectAllMatches"},{bindKey:{mac:"Command-D",win:"Ctrl-D"},name:"selectMoreAfter"},{bindKey:{mac:"Command-K Command-D",win:"Ctrl-K Ctrl-D"},name:"selectOrFindNext"},{bindKey:{mac:"Shift-Option-I",win:"Shift-Alt-I"},name:"splitSelectionIntoLines"},{bindKey:{mac:"Command-K M",win:"Ctrl-K M"},name:"modeSelect"},{bindKey:{mac:"Command-Option-[",win:"Ctrl-Shift-["},name:"toggleFoldWidget"},{bindKey:{mac:"Command-Option-]",win:"Ctrl-Shift-]"},name:"toggleFoldWidget"},{bindKey:{mac:"Command-K Command-0",win:"Ctrl-K Ctrl-0"},name:"foldall"},{bindKey:{mac:"Command-K Command-J",win:"Ctrl-K Ctrl-J"},name:"unfoldall"},{bindKey:{mac:"Command-K Command-1",win:"Ctrl-K Ctrl-1"},name:"foldOther"},{bindKey:{mac:"Command-K Command-Q",win:"Ctrl-K Ctrl-Q"},name:"navigateToLastEditLocation"},{bindKey:{mac:"Command-K Command-R|Command-K Command-S",win:"Ctrl-K Ctrl-R|Ctrl-K Ctrl-S"},name:"showKeyboardShortcuts"},{bindKey:{mac:"Command-K Command-X",win:"Ctrl-K Ctrl-X"},name:"trimTrailingSpace"},{bindKey:{mac:"Shift-Down|Command-Shift-Down",win:"Shift-Down|Ctrl-Shift-Down"},name:"selectdown"},{bindKey:{mac:"Shift-Up|Command-Shift-Up",win:"Shift-Up|Ctrl-Shift-Up"},name:"selectup"},{bindKey:{mac:"Command-Alt-Enter",win:"Ctrl-Alt-Enter"},name:"replaceAll"},{bindKey:{mac:"Command-Shift-1",win:"Ctrl-Shift-1"},name:"replaceOne"},{bindKey:{mac:"Option-C",win:"Alt-C"},name:"toggleFindCaseSensitive"},{bindKey:{mac:"Option-L",win:"Alt-L"},name:"toggleFindInSelection"},{bindKey:{mac:"Option-R",win:"Alt-R"},name:"toggleFindRegex"},{bindKey:{mac:"Option-W",win:"Alt-W"},name:"toggleFindWholeWord"},{bindKey:{mac:"Command-L",win:"Ctrl-L"},name:"expandtoline"},{bindKey:{mac:"Shift-Esc",win:"Shift-Esc"},name:"removeSecondaryCursors"}].forEach(function(e){var n=t.handler.commands[e.name];n&&(n.bindKey=e.bindKey),t.handler.bindKey(e.bindKey,n||e.name)})}); (function() { + ace.require(["ace/keyboard/vscode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-abap.js b/mixly/common/modules/web-modules/ace/mode-abap.js new file mode 100644 index 00000000..8dcd2c2a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-abap.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"ADD ALIAS ALIASES ASCENDING ASSERT ASSIGN ASSIGNING AT BACK CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY DATA DEFINE DEFINITION DEFERRED DELETE DESCENDING DESCRIBE DETAIL DIVIDE DO ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT FETCH FIELDS FORM FORMAT FREE FROM FUNCTION GENERATE GET HIDE IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION LEAVE LIKE LINE LOAD LOCAL LOOP MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY ON OVERLAY OPTIONAL OTHERS PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURN RETURNING ROLLBACK SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES UNASSIGN ULINE UNPACK UPDATE WHEN WHILE WINDOW WRITE OCCURS STRUCTURE OBJECT PROPERTY CASTING APPEND RAISING VALUE COLOR CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT ID NUMBER FOR TITLE OUTPUT WITH EXIT USING INTO WHERE GROUP BY HAVING ORDER BY SINGLE APPENDING CORRESPONDING FIELDS OF TABLE LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN","constant.language":"TRUE FALSE NULL SPACE","support.type":"c n i p f d t x string xstring decfloat16 decfloat34","keyword.operator":"abs sign ceil floor trunc frac acos asin atan cos sin tan abapOperator cosh sinh tanh exp log log10 sqrt strlen xstrlen charlen numofchar dbmaxlen lines"},"text",!0," "),t="WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";this.$rules={start:[{token:"string",regex:"`",next:"string"},{token:"string",regex:"'",next:"qstring"},{token:"doc.comment",regex:/^\*.+/},{token:"comment",regex:/".+$/},{token:"invalid",regex:"\\.{2,}"},{token:"keyword.operator",regex:/\W[\-+%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},{token:"paren.lparen",regex:"[\\[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"constant.numeric",regex:"[+-]?\\d+\\b"},{token:"variable.parameter",regex:/sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},{token:"keyword",regex:t},{token:"variable.parameter",regex:/\w+-\w[\-\w]*/},{token:e,regex:"\\b\\w+\\b"},{caseInsensitive:!0}],qstring:[{token:"constant.language.escape",regex:"''"},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}],string:[{token:"constant.language.escape",regex:"``"},{token:"string",regex:"`",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.AbapHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<0-9]*)",comment:"Notes"},{token:"zupfnoter.jumptarget.string.quoted",regex:'[\\"!]\\^\\:.*?[\\"!]',comment:"Zupfnoter jumptarget"},{token:"zupfnoter.goto.string.quoted",regex:'[\\"!]\\^\\@.*?[\\"!]',comment:"Zupfnoter goto"},{token:"zupfnoter.annotation.string.quoted",regex:'[\\"!]\\^\\!.*?[\\"!]',comment:"Zupfnoter annoation"},{token:"zupfnoter.annotationref.string.quoted",regex:'[\\"!]\\^\\#.*?[\\"!]',comment:"Zupfnoter annotation reference"},{token:"chordname.string.quoted",regex:'[\\"!]\\^.*?[\\"!]',comment:"abc chord"},{token:"string.quoted",regex:'[\\"!].*?[\\"!]',comment:"abc annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.$id="ace/mode/abc",this.snippetFileId="ace/snippets/abc"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/abc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-actionscript.js b/mixly/common/modules/web-modules/ace/mode-actionscript.js new file mode 100644 index 00000000..dc4dc929 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-actionscript.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"support.class.actionscript.2",regex:"\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b"},{token:"support.function.actionscript.2",regex:"\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b"},{token:"support.constant.actionscript.2",regex:"\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b"},{token:"keyword.control.actionscript.2",regex:"\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b"},{token:"storage.type.actionscript.2",regex:"\\b(?:Boolean|Number|String|Void)\\b"},{token:"constant.language.actionscript.2",regex:"\\b(?:null|undefined|true|false)\\b"},{token:"constant.numeric.actionscript.2",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"punctuation.definition.string.begin.actionscript.2",regex:'"',push:[{token:"punctuation.definition.string.end.actionscript.2",regex:'"',next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.double.actionscript.2"}]},{token:"punctuation.definition.string.begin.actionscript.2",regex:"'",push:[{token:"punctuation.definition.string.end.actionscript.2",regex:"'",next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.single.actionscript.2"}]},{token:"support.constant.actionscript.2",regex:"\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b"},{token:"punctuation.definition.comment.actionscript.2",regex:"/\\*",push:[{token:"punctuation.definition.comment.actionscript.2",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.actionscript.2"}]},{token:"punctuation.definition.comment.actionscript.2",regex:"//.*$",push_:[{token:"comment.line.double-slash.actionscript.2",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.actionscript.2"}]},{token:"keyword.operator.actionscript.2",regex:"\\binstanceof\\b"},{token:"keyword.operator.symbolic.actionscript.2",regex:"[-!%&*+=/?:]"},{token:["meta.preprocessor.actionscript.2","punctuation.definition.preprocessor.actionscript.2","meta.preprocessor.actionscript.2"],regex:"^([ \\t]*)(#)([a-zA-Z]+)"},{token:["storage.type.function.actionscript.2","meta.function.actionscript.2","entity.name.function.actionscript.2","meta.function.actionscript.2","punctuation.definition.parameters.begin.actionscript.2"],regex:"\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()",push:[{token:"punctuation.definition.parameters.end.actionscript.2",regex:"\\)",next:"pop"},{token:"variable.parameter.function.actionscript.2",regex:"[^,)$]+"},{defaultToken:"meta.function.actionscript.2"}]},{token:["storage.type.class.actionscript.2","meta.class.actionscript.2","entity.name.type.class.actionscript.2","meta.class.actionscript.2","storage.modifier.extends.actionscript.2","meta.class.actionscript.2","entity.other.inherited-class.actionscript.2"],regex:"\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?"}]},this.normalizeRules()};s.metaData={fileTypes:["as"],keyEquivalent:"^~A",name:"ActionScript",scopeName:"source.actionscript.2"},r.inherits(s,i),t.ActionScriptHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./actionscript_highlight_rules").ActionScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/actionscript",this.snippetFileId="ace/snippets/actionscript"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/actionscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ada.js b/mixly/common/modules/web-modules/ace/mode-ada.js new file mode 100644 index 00000000..dc3811e4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ada.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*(begin|loop|then|is|do)\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){var r=t+n;return r.match(/^\s*(begin|end)$/)?!0:!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=t.getLine(n-1),s=this.$getIndent(i).length,u=this.$getIndent(r).length;if(u<=s)return;t.outdentRows(new o(n,0,n+2,0))},this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/ada"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-alda.js b/mixly/common/modules/web-modules/ace/mode-alda.js new file mode 100644 index 00000000..57ecc750 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-alda.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/alda_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={pitch:[{token:"variable.parameter.operator.pitch.alda",regex:/(?:[+\-]+|\=)/},{token:"",regex:"",next:"timing"}],timing:[{token:"string.quoted.operator.timing.alda",regex:/\d+(?:s|ms)?/},{token:"",regex:"",next:"start"}],start:[{token:["constant.language.instrument.alda","constant.language.instrument.alda","meta.part.call.alda","storage.type.nickname.alda","meta.part.call.alda"],regex:/^([a-zA-Z]{2}[\w\-+\'()]*)((?:\s*\/\s*[a-zA-Z]{2}[\w\-+\'()]*)*)(?:(\s*)(\"[a-zA-Z]{2}[\w\-+\'()]*\"))?(\s*:)/},{token:["text","entity.other.inherited-class.voice.alda","text"],regex:/^(\s*)(V\d+)(:)/},{token:"comment.line.number-sign.alda",regex:/#.*$/},{token:"entity.name.function.pipe.measure.alda",regex:/\|/},{token:"comment.block.inline.alda",regex:/\(comment\b/,push:[{token:"comment.block.inline.alda",regex:/\)/,next:"pop"},{defaultToken:"comment.block.inline.alda"}]},{token:"entity.name.function.marker.alda",regex:/%[a-zA-Z]{2}[\w\-+\'()]*/},{token:"entity.name.function.at-marker.alda",regex:/@[a-zA-Z]{2}[\w\-+\'()]*/},{token:"keyword.operator.octave-change.alda",regex:/\bo\d+\b/},{token:"keyword.operator.octave-shift.alda",regex:/[><]/},{token:"keyword.operator.repeat.alda",regex:/\*\s*\d+/},{token:"string.quoted.operator.timing.alda",regex:/[.]|r\d*(?:s|ms)?/},{token:"text",regex:/([cdefgab])/,next:"pitch"},{token:"string.quoted.operator.timing.alda",regex:/~/,next:"timing"},{token:"punctuation.section.embedded.cram.alda",regex:/\}/,next:"timing"},{token:"constant.numeric.subchord.alda",regex:/\//},{todo:{token:"punctuation.section.embedded.cram.alda",regex:/\{/,push:[{token:"punctuation.section.embedded.cram.alda",regex:/\}/,next:"pop"},{include:"$self"}]}},{todo:{token:"keyword.control.sequence.alda",regex:/\[/,push:[{token:"keyword.control.sequence.alda",regex:/\]/,next:"pop"},{include:"$self"}]}},{token:"meta.inline.clojure.alda",regex:/\(/,push:[{token:"meta.inline.clojure.alda",regex:/\)/,next:"pop"},{include:"source.clojure"},{defaultToken:"meta.inline.clojure.alda"}]}]},this.normalizeRules()};s.metaData={scopeName:"source.alda",fileTypes:["alda"],name:"Alda"},r.inherits(s,i),t.AldaHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/alda",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/alda_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./alda_highlight_rules").AldaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/alda"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/alda"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-apache_conf.js b/mixly/common/modules/web-modules/ace/mode-apache_conf.js new file mode 100644 index 00000000..487a358c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-apache_conf.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["punctuation.definition.comment.apacheconf","comment.line.hash.ini","comment.line.hash.ini"],regex:"^((?:\\s)*)(#)(.*$)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","text","string.value.apacheconf","punctuation.definition.tag.apacheconf"],regex:"(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","punctuation.definition.tag.apacheconf"],regex:"()"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.replacement.apacheconf","text"],regex:"(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?"},{token:["keyword.alias.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:"keyword.core.apacheconf",regex:"\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b"},{token:"keyword.mpm.apacheconf",regex:"\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b"},{token:"keyword.access.apacheconf",regex:"\\b(?:Allow|Deny|Order)\\b"},{token:"keyword.actions.apacheconf",regex:"\\b(?:Action|Script)\\b"},{token:"keyword.alias.apacheconf",regex:"\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b"},{token:"keyword.auth.apacheconf",regex:"\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b"},{token:"keyword.auth_anon.apacheconf",regex:"\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b"},{token:"keyword.auth_dbm.apacheconf",regex:"\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b"},{token:"keyword.auth_digest.apacheconf",regex:"\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b"},{token:"keyword.auth_ldap.apacheconf",regex:"\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b"},{token:"keyword.autoindex.apacheconf",regex:"\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b"},{token:"keyword.cache.apacheconf",regex:"\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b"},{token:"keyword.cern_meta.apacheconf",regex:"\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b"},{token:"keyword.cgi.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b"},{token:"keyword.cgid.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b"},{token:"keyword.charset_lite.apacheconf",regex:"\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b"},{token:"keyword.dav.apacheconf",regex:"\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b"},{token:"keyword.deflate.apacheconf",regex:"\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b"},{token:"keyword.dir.apacheconf",regex:"\\b(?:DirectoryIndex|DirectorySlash)\\b"},{token:"keyword.disk_cache.apacheconf",regex:"\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b"},{token:"keyword.dumpio.apacheconf",regex:"\\b(?:DumpIOInput|DumpIOOutput)\\b"},{token:"keyword.env.apacheconf",regex:"\\b(?:PassEnv|SetEnv|UnsetEnv)\\b"},{token:"keyword.expires.apacheconf",regex:"\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b"},{token:"keyword.ext_filter.apacheconf",regex:"\\b(?:ExtFilterDefine|ExtFilterOptions)\\b"},{token:"keyword.file_cache.apacheconf",regex:"\\b(?:CacheFile|MMapFile)\\b"},{token:"keyword.headers.apacheconf",regex:"\\b(?:Header|RequestHeader)\\b"},{token:"keyword.imap.apacheconf",regex:"\\b(?:ImapBase|ImapDefault|ImapMenu)\\b"},{token:"keyword.include.apacheconf",regex:"\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b"},{token:"keyword.isapi.apacheconf",regex:"\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b"},{token:"keyword.ldap.apacheconf",regex:"\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b"},{token:"keyword.log.apacheconf",regex:"\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b"},{token:"keyword.mem_cache.apacheconf",regex:"\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b"},{token:"keyword.mime.apacheconf",regex:"\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b"},{token:"keyword.misc.apacheconf",regex:"\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b"},{token:"keyword.negotiation.apacheconf",regex:"\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b"},{token:"keyword.nw_ssl.apacheconf",regex:"\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b"},{token:"keyword.proxy.apacheconf",regex:"\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b"},{token:"keyword.rewrite.apacheconf",regex:"\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b"},{token:"keyword.setenvif.apacheconf",regex:"\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b"},{token:"keyword.so.apacheconf",regex:"\\b(?:LoadFile|LoadModule)\\b"},{token:"keyword.ssl.apacheconf",regex:"\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b"},{token:"keyword.usertrack.apacheconf",regex:"\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b"},{token:"keyword.vhost_alias.apacheconf",regex:"\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b"},{token:["keyword.php.apacheconf","text","entity.property.apacheconf","text","string.value.apacheconf","text"],regex:"\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)"},{token:["punctuation.variable.apacheconf","variable.env.apacheconf","variable.misc.apacheconf","punctuation.variable.apacheconf"],regex:"(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})"},{token:["entity.mime-type.apacheconf","text"],regex:"\\b((?:text|image|application|video|audio)/.+?)(\\s)"},{token:"entity.helper.apacheconf",regex:"\\b(?:from|unset|set|on|off)\\b",caseInsensitive:!0},{token:"constant.integer.apacheconf",regex:"\\b\\d+\\b"},{token:["text","punctuation.definition.flag.apacheconf","string.flag.apacheconf","punctuation.definition.flag.apacheconf","text"],regex:"(\\s)(\\[)(.*?)(\\])(\\s)"}]},this.normalizeRules()};s.metaData={fileTypes:["conf","CONF","htaccess","HTACCESS","htgroups","HTGROUPS","htpasswd","HTPASSWD",".htaccess",".HTACCESS",".htgroups",".HTGROUPS",".htpasswd",".HTPASSWD"],name:"Apache Conf",scopeName:"source.apacheconf"},r.inherits(s,i),t.ApacheConfHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./apache_conf_highlight_rules").ApacheConfHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/apache_conf"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/apache_conf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-apex.js b/mixly/common/modules/web-modules/ace/mode-apex.js new file mode 100644 index 00000000..e0a6319d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-apex.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/apex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../mode/text_highlight_rules").TextHighlightRules,s=e("../mode/doc_comment_highlight_rules").DocCommentHighlightRules,o=function(){function t(t){return t.slice(-3)=="__c"?"support.function":e(t)}function n(e,t){return{regex:e+(t.multiline?"":"(?=.)"),token:"string.start",next:[{regex:t.escape,token:"character.escape"},{regex:t.error,token:"error.invalid"},{regex:e+(t.multiline?"":"|$"),token:"string.end",next:t.next||"start"},{defaultToken:"string"}]}}function r(){return[{token:"comment",regex:"\\/\\/(?=.)",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]},s.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]}]}var e=this.createKeywordMapper({"variable.language":"activate|any|autonomous|begin|bigdecimal|byte|cast|char|collect|const|end|exit|export|float|goto|group|having|hint|import|inner|into|join|loop|number|object|of|outer|parallel|pragma|retrieve|returning|search|short|stat|synchronized|then|this_month|transaction|type|when",keyword:"private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final|and|array|as|asc|break|bulk|by|catch|class|commit|continue|convertcurrency|delete|desc|do|else|enum|extends|false|final|finally|for|from|future|global|if|implements|in|insert|instanceof|interface|last_90_days|last_month|last_n_days|last_week|like|limit|list|map|merge|new|next_90_days|next_month|next_n_days|next_week|not|null|nulls|on|or|override|package|return|rollback|savepoint|select|set|sort|super|testmethod|this|this_week|throw|today|tolabel|tomorrow|trigger|true|try|undelete|update|upsert|using|virtual|webservice|where|while|yesterday|switch|case|default","storage.type":"def|boolean|byte|char|short|int|float|pblob|date|datetime|decimal|double|id|integer|long|string|time|void|blob|Object","constant.language":"true|false|null|after|before|count|excludes|first|includes|last|order|sharing|with","support.function":"system|apex|label|apexpages|userinfo|schema"},"identifier",!0);this.$rules={start:[n("'",{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1}),r("c"),{type:"decoration",token:["meta.package.apex","keyword.other.package.apex","meta.package.apex","storage.modifier.package.apex","meta.package.apex","punctuation.terminator.apex"],regex:/^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*)((?:;)?))?/},{regex:/@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:"constant.language"},{regex:/[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:t},{regex:"`#%",token:"error.invalid"},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[LlDdEe][+-]?\d+)?)\b|\.\d+[LlDdEe]/},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[]/,next:"maybe_soql",merge:!1},{token:"paren.lparen",regex:/[\[({]/,next:"start",merge:!1},{token:"paren.rparen",regex:/[\])}]/,merge:!1}],maybe_soql:[{regex:/\s+/,token:"text"},{regex:/(SELECT|FIND)\b/,token:"keyword",caseInsensitive:!0,next:"soql"},{regex:"",token:"none",next:"start"}],soql:[{regex:"(:?ASC|BY|CATEGORY|CUBE|DATA|DESC|END|FIND|FIRST|FOR|FROM|GROUP|HAVING|IN|LAST|LIMIT|NETWORK|NULLS|OFFSET|ORDER|REFERENCE|RETURNING|ROLLUP|SCOPE|SELECT|SNIPPET|TRACKING|TYPEOF|UPDATE|USING|VIEW|VIEWSTAT|WHERE|WITH|AND|OR)\\b",token:"keyword",caseInsensitive:!0},{regex:"(:?target_length|toLabel|convertCurrency|count|Contact|Account|User|FIELDS)\\b",token:"support.function",caseInsensitive:!0},{token:"paren.rparen",regex:/[\]]/,next:"start",merge:!1},n("'",{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1,next:"soql"}),n('"',{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1,next:"soql"}),{regex:/\\./,token:"character.escape"},{regex:/[\?\&\|\!\{\}\[\]\(\)\^\~\*\:\"\'\+\-\,\.=\\\/]/,token:"keyword.operator"}],"log-start":[{token:"timestamp.invisible",regex:/^[\d:.() ]+\|/,next:"log-header"},{token:"timestamp.invisible",regex:/^ (Number of|Maximum)[^:]*:/,next:"log-comment"},{token:"invisible",regex:/^Execute Anonymous:/,next:"log-comment"},{defaultToken:"text"}],"log-comment":[{token:"log-comment",regex:/.*$/,next:"log-start"}],"log-header":[{token:"timestamp.invisible",regex:/((USER_DEBUG|\[\d+\]|DEBUG)\|)+/},{token:"keyword",regex:"(?:EXECUTION_FINISHED|EXECUTION_STARTED|CODE_UNIT_STARTED|CUMULATIVE_LIMIT_USAGE|LIMIT_USAGE_FOR_NS|CUMULATIVE_LIMIT_USAGE_END|CODE_UNIT_FINISHED)"},{regex:"",next:"log-start"}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(o,i),t.ApexHighlightRules=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";function u(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour}var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./apex_highlight_rules").ApexHighlightRules,o=e("../mode/folding/cstyle").FoldMode;r.inherits(u,i),u.prototype.lineCommentStart="//",u.prototype.blockComment={start:"/*",end:"*/"},t.Mode=u}); (function() { + ace.require(["ace/mode/apex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-applescript.js b/mixly/common/modules/web-modules/ace/mode-applescript.js new file mode 100644 index 00000000..d2fd9ff1 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-applescript.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="about|above|after|against|and|around|as|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|continue|copy|div|does|eighth|else|end|equal|equals|error|every|exit|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|try|until|where|while|whose|with|without",t="AppleScript|false|linefeed|return|pi|quote|result|space|tab|true",n="activate|beep|count|delay|launch|log|offset|read|round|run|say|summarize|write",r="alias|application|boolean|class|constant|date|file|integer|list|number|real|record|string|text|character|characters|contents|day|frontmost|id|item|length|month|name|paragraph|paragraphs|rest|reverse|running|time|version|weekday|word|words|year",i=this.createKeywordMapper({"support.function":n,"constant.language":t,"support.type":r,keyword:e},"identifier");this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\(\\*",next:"comment"},{token:"string",regex:'".*?"'},{token:"support.type",regex:"\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{token:"support.function",regex:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{token:"constant.language",regex:"\\b(text item delimiters|current application|missing value)\\b"},{token:"keyword",regex:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{token:i,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.AppleScriptHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./applescript_highlight_rules").AppleScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"(*",end:"*)"},this.$id="ace/mode/applescript"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/applescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-aql.js b/mixly/common/modules/web-modules/ace/mode-aql.js new file mode 100644 index 00000000..8effc12c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-aql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="for|return|filter|search|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|shortest_path|outbound|inbound|any|all|none|at least|aggregate|like|k_shortest_paths|k_paths|all_shortest_paths|prune|window",t="true|false",n="to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|typename|json_stringify|json_parse|concat|concat_separator|char_length|lower|upper|substring|left|right|trim|reverse|contains|log|log2|log10|exp|exp2|sin|cos|tan|asin|acos|atan|atan2|radians|degrees|pi|regex_test|regex_replace|like|floor|ceil|round|abs|rand|sqrt|pow|length|count|min|max|average|avg|sum|product|median|variance_population|variance_sample|variance|percentile|bit_and|bit_or|bit_xor|bit_negate|bit_test|bit_popcount|bit_shift_left|bit_shift_right|bit_construct|bit_deconstruct|bit_to_string|bit_from_string|first|last|unique|outersection|interleave|in_range|jaccard|matches|merge|merge_recursive|has|attributes|keys|values|unset|unset_recursive|keep|keep_recursive|near|within|within_rectangle|is_in_polygon|distance|fulltext|stddev_sample|stddev_population|stddev|slice|nth|position|contains_array|translate|zip|call|apply|push|append|pop|shift|unshift|remove_value|remove_values|remove_nth|replace_nth|date_now|date_timestamp|date_iso8601|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_isoweekyear|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_round|date_add|date_subtract|date_diff|date_compare|date_format|date_utctolocal|date_localtoutc|date_timezone|date_timezones|fail|passthru|v8|sleep|schema_get|schema_validate|shard_id|call_greenspun|version|noopt|noeval|not_null|first_list|first_document|parse_identifier|current_user|current_database|collection_count|pregel_result|collections|document|decode_rev|range|union|union_distinct|minus|intersection|flatten|is_same_collection|check_document|ltrim|rtrim|find_first|find_last|split|substitute|ipv4_to_number|ipv4_from_number|is_ipv4|md5|sha1|sha512|crc32|fnv64|hash|random_token|to_base64|to_hex|encode_uri_component|soundex|assert|warn|is_key|sorted|sorted_unique|count_distinct|count_unique|levenshtein_distance|levenshtein_match|regex_matches|regex_split|ngram_match|ngram_similarity|ngram_positional_similarity|uuid|tokens|exists|starts_with|phrase|min_match|bm25|tfidf|boost|analyzer|cosine_similarity|decay_exp|decay_gauss|decay_linear|l1_distance|l2_distance|minhash|minhash_count|minhash_error|minhash_match|geo_point|geo_multipoint|geo_polygon|geo_multipolygon|geo_linestring|geo_multilinestring|geo_contains|geo_intersects|geo_equals|geo_distance|geo_area|geo_in_range",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.AqlHighlightRules=s}),ace.define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./aql_highlight_rules").AqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="//",this.$id="ace/mode/aql"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/aql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-asciidoc.js b/mixly/common/modules/web-modules/ace/mode-asciidoc.js new file mode 100644 index 00000000..111603e7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-asciidoc.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){function t(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var e="[a-zA-Z\u00a1-\uffff]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:e},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:t("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:t("\\*")},{token:"literal",regex:t("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:t("`")},{token:"keyword",regex:t("^")},{token:"keyword",regex:t("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var r in this.$rules){var i=this.$rules[r];for(var s=i.length;s--;){var o=i[s];if(o.include||typeof o=="string"){var u=[s,1].concat(this.$rules[o.include||o]);o.noEscape&&(u=u.filter(function(e){return!e.next})),i.splice.apply(i,u)}else o.token in n&&(o.token=n[o.token])}}};r.inherits(s,i),t.AsciidocHighlightRules=s}),ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="="?this.singleLineHeadingRe.test(r)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":e.bgTokenizer.getState(n)=="dissallowDelimitedBlock"?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type}function d(){var t=f.value.match(p);if(t)return t[0].length;var r=c.indexOf(f.value[0])+1;return r==1&&e.getLine(n-1).length!=e.getLine(n).length?Infinity:r}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;var f,c=["=","-","~","^","+"],h="markup.heading",p=this.singleLineHeadingRe;if(l(n)==h){var v=d();while(++nu)while(a>u&&(!l(a)||f.value[0]=="["))a--;if(a>u){var y=e.getLine(a).length;return new s(u,i,a,y)}}else{var b=e.bgTokenizer.getState(n);if(b=="dissallowDelimitedBlock"){while(n-->0)if(e.bgTokenizer.getState(n).lastIndexOf("Block")==-1)break;a=n+1;if(au){var y=e.getLine(n).length;return new s(u,5,a,y-5)}}}}}.call(o.prototype)}),ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./asciidoc_highlight_rules").AsciidocHighlightRules,o=e("./folding/asciidoc").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^((?:.+)?)([-+*][ ]+)/.exec(t);return r?(new Array(r[1].length+1)).join(" ")+r[2]:""}return this.$getIndent(t)},this.$id="ace/mode/asciidoc"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/asciidoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-asl.js b/mixly/common/modules/web-modules/ace/mode-asl.js new file mode 100644 index 00000000..a10a791e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-asl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="Default|DefinitionBlock|Device|Method|Else|ElseIf|For|Function|If|Include|Method|Return|Scope|Switch|Case|While|Break|BreakPoint|Continue|NoOp|Wait|True|False|AccessAs|Acquire|Alias|BankField|Buffer|Concatenate|ConcatenateResTemplate|CondRefOf|Connection|CopyObject|CreateBitField|CreateByteField|CreateDWordField|CreateField|CreateQWordField|CreateWordField|DataTableRegion|Debug|DMA|DWordIO|DWordMemory|DWordSpace|EisaId|EISAID|EndDependentFn|Event|ExtendedIO|ExtendedMemory|ExtendedSpace|External|Fatal|Field|FindSetLeftBit|FindSetRightBit|FixedDMA|FixedIO|Fprintf|FromBCD|GpioInt|GpioIo|I2CSerialBusV2|IndexField|Interrupt|IO|IRQ|IRQNoFlags|Load|LoadTable|Match|Memory32|Memory32Fixed|Mid|Mutex|Name|Notify|Offset|ObjectType|OperationRegion|Package|PowerResource|Printf|QWordIO|QWordMemory|QWordSpace|RawDataBuffer|Register|Release|Reset|ResourceTemplate|Signal|SizeOf|Sleep|SPISerialBusV2|Stall|StartDependentFn|StartDependentFnNoPri|Store|ThermalZone|Timer|ToBCD|ToBuffer|ToDecimalString|ToInteger|ToPLD|ToString|ToUUID|UARTSerialBusV2|Unicode|Unload|VendorLong|VendorShort|WordBusNumber|WordIO|WordSpace",t="Add|And|Decrement|Divide|Increment|Index|LAnd|LEqual|LGreater|LGreaterEqual|LLess|LLessEqual|LNot|LNotEqual|LOr|Mod|Multiply|NAnd|NOr|Not|Or|RefOf|Revision|ShiftLeft|ShiftRight|Subtract|XOr|DerefOf",n="AttribQuick|AttribSendReceive|AttribByte|AttribBytes|AttribRawBytes|AttribRawProcessBytes|AttribWord|AttribBlock|AttribProcessCall|AttribBlockProcessCall|AnyAcc|ByteAcc|WordAcc|DWordAcc|QWordAcc|BufferAcc|AddressRangeMemory|AddressRangeReserved|AddressRangeNVS|AddressRangeACPI|RegionSpaceKeyword|FFixedHW|PCC|AddressingMode7Bit|AddressingMode10Bit|DataBitsFive|DataBitsSix|DataBitsSeven|DataBitsEight|DataBitsNine|BusMaster|NotBusMaster|ClockPhaseFirst|ClockPhaseSecond|ClockPolarityLow|ClockPolarityHigh|SubDecode|PosDecode|BigEndianing|LittleEndian|FlowControlNone|FlowControlXon|FlowControlHardware|Edge|Level|ActiveHigh|ActiveLow|ActiveBoth|Decode16|Decode10|IoRestrictionNone|IoRestrictionInputOnly|IoRestrictionOutputOnly|IoRestrictionNoneAndPreserve|Lock|NoLock|MTR|MEQ|MLE|MLT|MGE|MGT|MaxFixed|MaxNotFixed|Cacheable|WriteCombining|Prefetchable|NonCacheable|MinFixed|MinNotFixed|ParityTypeNone|ParityTypeSpace|ParityTypeMark|ParityTypeOdd|ParityTypeEven|PullDefault|PullUp|PullDown|PullNone|PolarityHigh|PolarityLow|ISAOnlyRanges|NonISAOnlyRanges|EntireRange|ReadWrite|ReadOnly|UserDefRegionSpace|SystemIO|SystemMemory|PCI_Config|EmbeddedControl|SMBus|SystemCMOS|PciBarTarget|IPMI|GeneralPurposeIO|GenericSerialBus|ResourceConsumer|ResourceProducer|Serialized|NotSerialized|Shared|Exclusive|SharedAndWake|ExclusiveAndWake|ControllerInitiated|DeviceInitiated|StopBitsZero|StopBitsOne|StopBitsOnePlusHalf|StopBitsTwo|Width8Bit|Width16Bit|Width32Bit|Width64Bit|Width128Bit|Width256Bit|SparseTranslation|DenseTranslation|TypeTranslation|TypeStatic|Preserve|WriteAsOnes|WriteAsZeros|Transfer8|Transfer16|Transfer8_16|ThreeWireMode|FourWireMode",r="UnknownObj|IntObj|StrObj|BuffObj|PkgObj|FieldUnitObj|DeviceObj|EventObj|MethodObj|MutexObj|OpRegionObj|PowerResObj|ProcessorObj|ThermalZoneObj|BuffFieldObj|DDBHandleObj",s="__FILE__|__PATH__|__LINE__|__DATE__|__IASL__",o="One|Ones|Zero",u="Memory24|Processor",a=this.createKeywordMapper({keyword:e,"constant.numeric":o,"keyword.operator":t,"constant.language":s,"storage.type":r,"constant.library":n,"invalid.deprecated":u},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\[",next:"ignoredfield"},{token:"variable",regex:"\\Local[0-7]|\\Arg[0-6]"},{token:"keyword",regex:"#\\s*(?:define|elif|else|endif|error|if|ifdef|ifndef|include|includebuffer|line|pragma|undef|warning)\\b",next:"directive"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.character",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[0-9]+\b/},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:/[!\~\*\/%+-<>\^|=&]/},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],ignoredfield:[{token:"comment",regex:"\\]",next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>*s",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]*s',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.ASLHighlightRules=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/asl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asl_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./asl_highlight_rules").ASLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/asl"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/asl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-assembly_arm32.js b/mixly/common/modules/web-modules/ace/mode-assembly_arm32.js new file mode 100644 index 00000000..d13e6dba --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-assembly_arm32.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/assembly_arm32_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.control.assembly",regex:"\\b(?:cpsid|cpsie|cps|setend|(?:srs|rfe)(?:ia|ib|da|db|fd|ed|fa|ea)|bkpt|nop|pld|cdp2|mrc2|mrrc2|mcr2|mcrr2|ldc2|stc2|(?:add|adc|sub|sbc|rsb|rsc|mul|mla|umull|umlal|smull|smlal|mvn|and|eor|orr|bic)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?s?|(?:(?:q|qd)?(?:add|sub)|umaal|smul(?:b|t)(?:b|t)|smulw(?:b|t)|smla(?:b|t)(?:b|t)|smlaw(?:b|t)|smlal(?:b|t)(?:b|t)|smuadx?|smladx?|smlaldx?|smusdx?|smlsdx?|smlsldx?|smmulr?|smmlar?|smmlsr?|mia|miaph|mia(?:b|t)(?:b|t)|clz|(?:s|q|sh|u|uq|uh)(?:add16|sub16|add8|sub8|addsubx|subaddx)|usad8|usada8|mrs|msr|mra|mar|cpy|tst|teq|cmp|cmn|ssat|ssat16|usat|usat16|pkhbt|pkhtb|sxth|sxtb16|sxtb|uxth|uxtb16|uxtb|sxtah|sxtab16|sxtab|uxtah|uxtab16|uxtab|rev|rev16|revsh|sel|b|bl|bx|blx|bxj|swi|svc|ldrex|strex|cdp|mrc|mrrc|mcr|mcrr|ldc|stc)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?|ldr(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|sb|h|sh|d)?|str(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|h|d)?|(?:ldm|stm)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:ia|ib|da|db|fd|ed|fa|ea)|swp(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?b?|mov(?:t|w)?)\\b",caseInsensitive:!0},{token:"variable.parameter.register.assembly",regex:"\\b(?:r0|r1|r2|r3|r4|r5|r6|r7|r8|r9|r10|r11|r12|r13|r14|r15|fp|ip|sp|lr|pc|cpsr|spsr|c|f|s|x|lsl|lsr|asr|ror|rrx)\\b",caseInsensitive:!0},{token:"constant.character.hexadecimal.assembly",regex:"#0x[A-F0-9]+",caseInsensitive:!0},{token:"constant.character.decimal.assembly",regex:"#[0-9]+"},{token:"string.assembly",regex:/'([^\\']|\\.)*'/},{token:"string.assembly",regex:/"([^\\"]|\\.)*"/},{token:"support.function.directive.assembly",regex:"(?:.section|.global|.text|.asciz|.asciiz|.ascii|.align|.byte|.end|.data|.equ|.extern|.include)"},{token:"entity.name.function.assembly",regex:"^\\s*%%[\\w.]+?:$"},{token:"entity.name.function.assembly",regex:"^\\s*%\\$[\\w.]+?:$"},{token:"entity.name.function.assembly",regex:"^[\\w.]+?:"},{token:"entity.name.function.assembly",regex:"^[\\w.]+?\\b"},{token:"comment.assembly",regex:"\\/\\*",next:"comment"},{token:"comment.assembly",regex:"(?:;|//|@).*$"}],comment:[{token:"comment.assembly",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};s.metaData={fileTypes:["s"],name:"Assembly ARM32",scopeName:"source.assembly"},r.inherits(s,i),t.AssemblyARM32HighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&ua){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/astro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=function(){function r(e){for(var t in this.$rules[e+"jsxAttributes"])if(this.$rules[e+"jsxAttributes"][t].token==="meta.tag.punctuation.tag-close.xml"){this.$rules[e+"jsxAttributes"][t].onMatch=function(t,n,r){return n==r[0]&&r.shift(),t.length==2&&(r[0]==this.nextState&&r[1]--,(!r[1]||r[1]<0)&&r.splice(0,2)),this.next=r[0]||e+"start",[{type:this.token,value:t}]};break}}i.call(this);var e={token:"paren.quasi.start",regex:/{/,next:function(e,t){return e!=="start"&&(e.indexOf("attribute-equals")!==-1?(t.splice(0),t.unshift("tag_stuff")):t.unshift(e)),"inline-js-start"}};for(var t in this.$rules){if(t.startsWith("js")||t.startsWith("css")||t.startsWith("comment"))continue;this.$rules[t].unshift(e)}this.$rules.start.unshift({token:"comment",regex:/^---$/,onMatch:function(e,t,n){return n.splice(0),this.token},next:"javascript-start"}),this.embedRules(s,"javascript-",[{regex:/^---$/,token:"comment",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}]),this.embedRules(s,"inline-js-");var n=[{regex:/}/,token:"paren.quasi.end",onMatch:function(e,t,n){return n[0]==="inline-js-start"?(n.shift(),this.next=n.shift(),this.next.indexOf("string")!==-1?"paren.quasi.end":"paren.rparen"):(this.next=n.shift()||"start",this.token)}},{regex:/{/,token:"paren.lparen",push:"inline-js-start"}];this.$rules["inline-js-start"].unshift(n),this.$rules["inline-js-no_regex"].unshift(n),r.call(this,"javascript-"),r.call(this,"inline-js-"),this.normalizeRules()};r.inherits(o,i),t.AstroHighlightRules=o}),ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=function(){i.call(this)};r.inherits(s,i),t.HtmlBehaviour=s}),ace.define("ace/mode/astro",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/astro_highlight_rules","ace/mode/behaviour/html"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./astro_highlight_rules").AstroHighlightRules,o=e("./behaviour/html").HtmlBehaviour,u=function(){i.call(this),this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.$id="ace/mode/astro"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/astro"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-autohotkey.js b/mixly/common/modules/web-modules/ace/mode-autohotkey.js new file mode 100644 index 00000000..9a96d798 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-autohotkey.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters",t="AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR";this.$rules={start:[{token:"comment.line.ahk",regex:"(?:^| );.*$"},{token:"comment.block.ahk",regex:"/\\*",push:[{token:"comment.block.ahk",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.ahk"}]},{token:"doc.comment.ahk",regex:"#cs",push:[{token:"doc.comment.ahk",regex:"#ce",next:"pop"},{defaultToken:"doc.comment.ahk"}]},{token:"keyword.command.ahk",regex:"(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b",caseInsensitive:!0},{token:"keyword.control.ahk",regex:"(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b",caseInsensitive:!0},{token:"support.function.ahk",regex:"(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b",caseInsensitive:!0},{token:"variable.predefined.ahk",regex:"(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\\b",caseInsensitive:!0},{token:"support.constant.ahk",regex:"(?:\\b|^)(?:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\\b",caseInsensitive:!0},{token:"variable.parameter",regex:"(?:\\b|^)(?:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian)\\b",caseInsensitive:!0},{keywordMap:{"constant.language":e},regex:"\\w+\\b"},{keywordMap:{"variable.function":t},regex:"@\\w+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword.operator.ahk",regex:"=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-"},{token:"punctuation.ahk",regex:/#|`|::|,|%/},{token:"paren",regex:/[{}()]/},{token:["punctuation.quote.double","string.quoted.ahk","punctuation.quote.double"],regex:'(")((?:[^"]|"")*)(")'},{token:["label.ahk","punctuation.definition.label.ahk"],regex:"^([^: ]+)(:)(?!:)"}]},this.normalizeRules()};s.metaData={name:"AutoHotKey",scopeName:"source.ahk",fileTypes:["ahk"],foldingStartMarker:"^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))",foldingStopMarker:"^\\s*\\*/|^\\s*\\}"},r.inherits(s,i),t.AutoHotKeyHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./autohotkey_highlight_rules").AutoHotKeyHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/autohotkey"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/autohotkey"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-basic.js b/mixly/common/modules/web-modules/ace/mode-basic.js new file mode 100644 index 00000000..28feee95 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-basic.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/basic_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"keyword.control":"FOR|TO|NEXT|GOSUB|RETURN|IF|THEN|ELSE|GOTO|ON|WHILE|WEND|TRON|TROFF","entity.name":"Auto|Call|Chain|Clear|Close|Common|Cont|Data|MERGE|ALL|Delete|DIM|EDIT|END|ERASE|ERROR|FIELD|GET|INPUT|KILL|LET|LIST|LLIST|LOAD|LSET|RSET|MERGE|NEW|NULL|OPEN|OUT|POKE|PRINT|PUT|RANDOMIZE|READ|RENUM|RESTORE|RESUME|RUN|SAVE|STOP|SWAP|WAIT|WIDTH","keyword.operator":"Mod|And|Not|Or|Xor|Eqv|Imp","support.function":"ABS|ASC|ATN|CDBL|CINT|COS|CSNG|CVI|CVS|CVD|EOF|EXP|FIX|FRE|INP|INSTR|INT|LEN|LOC|LOG|LPOS|PEEK|POS|RND|SGN|SIN|SPC|SQR|TAB|TAN|USR|VAL|VARPTR"},"identifier",!0);this.$rules={start:[{token:"string",regex:/"(?:\\.|[^"\\])*"/},{token:"support.function",regex:/(HEX|CHR|INPUT|LEFT|MID|MKI|MKS|MKD|OCT|RIGHT|SPACE|STR|STRING)\$/},{token:"entity.name",regex:/(?:DEF\s(?:SEG|USR|FN[a-zA-Z]+)|LINE\sINPUT|L?PRINT#?(?:\sUSING)?|MID\$|ON\sERROR\sGOTO|OPTION\sBASE|WRITE#?|DATE\$|INKEY\$|TIME\$)/},{token:"variable",regex:/[a-zA-Z][a-zA-Z0-9_]{0,38}[$%!#]?(?=\s*=)/},{token:"keyword.operator",regex:/\\|=|\^|\*|\/|\+|\-|<|>|-/},{token:"paren.lparen",regex:/[([]/},{token:"paren.rparen",regex:/[\)\]]/},{token:"constant.numeric",regex:/[+-]?\d+(\.\d+)?([ED][+-]?\d+)?(?:[!#])?/},{token:"constant.numeric",regex:/&[HO]?[0-9A-F]+/},{token:"comment",regex:/REM\s+.*$/},{regex:"\\w+",token:e},{token:"punctiation",regex:/[,;]/}]},this.normalizeRules()};r.inherits(s,i),t.BasicHighlightRules=s}),ace.define("ace/mode/folding/basic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={tron:1,"while":1,"for":1,troff:-1,wend:-1,next:-1},this.foldingStartMarker=/(?:\s|^)(tron|while|for)\b/i,this.foldingStopMarker=/(?:\b)(troff|next|wend)\b/i,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i||s){var o=s?this.foldingStopMarker.exec(r):this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a==="keyword.control")return this.basicBlock(e,n,o.index+2)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword.control")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker),u=o&&o[1].toLowerCase();return this.indentKeywords[u]&&e.getTokenAt(n,o.index+2).type==="keyword.control"?"end":""},this.basicBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword.control")return;var a=u.value.toLowerCase(),f=[a],l=this.indentKeywords[a];if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){a=u.value.toLowerCase();if(u.type!=="keyword.control"||!this.indentKeywords[a])continue;var p=l*this.indentKeywords[a];p>0?f.unshift(a):p<=0&&f.shift();if(f.length===0)break}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),ace.define("ace/mode/basic",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/basic_highlight_rules","ace/mode/folding/basic"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./basic_highlight_rules").BasicHighlightRules,o=e("./folding/basic").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(u,i),function(){this.lineCommentStart=["REM"],this.getMatching=function(e,t,n,r){if(t==undefined){var i=e.selection.lead;n=i.column,t=i.row}r==undefined&&(r=!0);var s=e.getTokenAt(t,n);if(s){var o=s.value.toLowerCase();if(o in this.indentKeywords)return this.foldingRules.basicBlock(e,t,n,r)}},this.$id="ace/mode/basic"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/basic"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-batchfile.js b/mixly/common/modules/web-modules/ace/mode-batchfile.js new file mode 100644 index 00000000..84928c50 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-batchfile.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/batchfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-bibtex.js b/mixly/common/modules/web-modules/ace/mode-bibtex.js new file mode 100644 index 00000000..a320c602 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-bibtex.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/bibtex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/@Comment\{/,stateName:"bibtexComment",push:[{token:"comment",regex:/}/,next:"pop"},{token:"comment",regex:/\{/,push:"bibtexComment"},{defaultToken:"comment"}]},{token:["keyword","text","paren.lparen","text","variable","text","keyword.operator"],regex:/(@String)(\s*)(\{)(\s*)([a-zA-Z]*)(\s*)(=)/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen","text","variable","text","keyword.operator"],regex:/(@String)(\s*)(\()(\s*)([a-zA-Z]*)(\s*)(=)/,push:[{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen"],regex:/(@preamble)(\s*)(\()/,push:[{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen"],regex:/(@preamble)(\s*)(\{)/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen","text","support.class"],regex:/(@[a-zA-Z]+)(\s*)(\{)(\s*)([\w-]+)/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{token:["variable","text","keyword.operator"],regex:/([a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+)(\s*)(=)/,push:[{token:"text",regex:/(?=[,}])/,next:"pop"},{include:"#misc"},{include:"#integer"},{defaultToken:"text"}]},{token:"punctuation",regex:/,/},{defaultToken:"text"}]},{defaultToken:"comment"}],"#integer":[{token:"constant.numeric.bibtex",regex:/\d+/}],"#misc":[{token:"string",regex:/"/,push:"#string_quotes"},{token:"paren.lparen",regex:/\{/,push:"#string_braces"},{token:"keyword.operator",regex:/#/}],"#string_braces":[{token:"paren.rparen",regex:/\}/,next:"pop"},{token:"invalid.illegal",regex:/@/},{include:"#misc"},{defaultToken:"string"}],"#string_quotes":[{token:"string",regex:/"/,next:"pop"},{include:"#misc"},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(s,i),t.BibTeXHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/bibtex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bibtex_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./bibtex_highlight_rules").BibTeXHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/bibtex"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/bibtex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-c9search.js b/mixly/common/modules/web-modules/ace/mode-c9search.js new file mode 100644 index 00000000..fa970afd --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-c9search.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(e,t){try{return new RegExp(e,t)}catch(n){}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:/(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,s=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}];r[3]&&(r[3]==" "?s[1]={type:i[1],value:r[2]+" "}:s.push({type:i[1],value:r[3]}));var o=n[1],u=r[4],a,f=0;if(o&&o.exec){o.lastIndex=0;while(a=o.exec(u)){var l=u.substring(f,a.index);f=o.lastIndex,l&&s.push({type:i[2],value:l});if(a[0])s.push({type:i[3],value:a[0]});else if(!l)break}}return f=0;c--){s=r[c];if(a.test(s))break}f=c}if(f!=l){var p=s.length;return a===o&&(p=s.search(/\(Found[^)]+\)$|$/)),new i(f,p,l,0)}}}.call(o.prototype)}),ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c9search_highlight_rules").C9SearchHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/c9search").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/c9search"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-c_cpp.js b/mixly/common/modules/web-modules/ace/mode-c_cpp.js new file mode 100644 index 00000000..0d002ffe --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-c_cpp.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|class|wchar_t|template|char16_t|char32_t",r="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local",s="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/c_cpp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-cirru.js b/mixly/common/modules/web-modules/ace/mode-cirru.js new file mode 100644 index 00000000..a47f4e12 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-cirru.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"comment.line.double-dash",regex:/--/,next:"comment"},{token:"storage.modifier",regex:/\(/},{token:"storage.modifier",regex:/,/,next:"line"},{token:"support.function",regex:/[^\(\)"\s{}\[\]]+/,next:"line"},{token:"string.quoted.double",regex:/"/,next:"string"},{token:"storage.modifier",regex:/\)/}],comment:[{token:"comment.line.double-dash",regex:/ +[^\n]+/,next:"start"}],string:[{token:"string.quoted.double",regex:/"/,next:"line"},{token:"constant.character.escape",regex:/\\/,next:"escape"},{token:"string.quoted.double",regex:/[^\\"]+/}],escape:[{token:"constant.character.escape",regex:/./,next:"string"}],line:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"markup.raw",regex:/^\s*/,next:"start"},{token:"storage.modifier",regex:/\$/,next:"start"},{token:"variable.parameter",regex:/[^\(\)"\s{}\[\]]+/},{token:"storage.modifier",regex:/\(/,next:"start"},{token:"storage.modifier",regex:/\)/},{token:"markup.raw",regex:/^ */,next:"start"},{token:"string.quoted.double",regex:/"/,next:"string"}]}};r.inherits(s,i),t.CirruHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u=|<>|<|>|!|&&]"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"string",regex:'"',next:"string"},{token:"constant",regex:/:[^()\[\]{}'"\^%`,;\s]+/}],string:[{token:"constant.language.escape",regex:"\\\\.|\\\\$"},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:'"',next:"start"},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.charachterclass"}]}};r.inherits(s,i),t.ClojureHighlightRules=s}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i}),ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./clojure_highlight_rules").ClojureHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.minorIndentFunctions=["defn","defn-","defmacro","def","deftest","testing"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){var n=this.$getIndent(e),r=0,i,s;for(var o=e.length-1;o>=0;o--){s=e[o],s==="("?(r--,i=!0):s==="("||s==="["||s==="{"?(r--,i=!1):(s===")"||s==="]"||s==="}")&&r++;if(r<0)break}if(!(r<0&&i))return r<0&&!i?this.$toIndent(e.substring(0,o+1)):r>0?(n=n.substring(0,n.length-t.length),n):n;o+=1;var u=o,a="";for(;;){s=e[o];if(s===" "||s===" ")return this.minorIndentFunctions.indexOf(a)!==-1?this.$toIndent(e.substring(0,u-1)+t):this.$toIndent(e.substring(0,o+1));if(s===undefined)return this.$toIndent(e.substring(0,u-1)+t);a+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/clojure",this.snippetFileId="ace/snippets/clojure"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/clojure"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-cobol.js b/mixly/common/modules/web-modules/ace/mode-cobol.js new file mode 100644 index 00000000..23143857 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-cobol.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),ace.define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/cobol"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-coffee.js b/mixly/common/modules/web-modules/ace/mode-coffee.js new file mode 100644 index 00000000..8a45ff18 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-coffee.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes|yield|export|import|default",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift()||"";if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;this.lineCommentStart="#",this.blockComment={start:"###",end:"###"},this.getNextLineIndent=function(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/coffee",this.snippetFileId="ace/snippets/coffee"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/coffee"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-coldfusion.js b/mixly/common/modules/web-modules/ace/mode-coldfusion.js new file mode 100644 index 00000000..98976d3f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-coldfusion.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./html_highlight_rules").HtmlHighlightRules,o=function(){s.call(this),this.$rules.tag[2].token=function(e,t){var n=t.slice(0,2)=="cf"?"keyword":"meta.tag";return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml",n+".tag-name.xml"]};var e=Object.keys(this.$rules).filter(function(e){return/^(js|css)-/.test(e)});this.embedRules({cfmlComment:[{regex:"",token:"comment.end",next:"pop"},{defaultToken:"comment"}]},"",[{regex:"",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/csound_document_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_orchestra_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules,s=e("./csound_score_highlight_rules").CsoundScoreHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=new i("csound-"),t=new s("csound-score-");this.$rules={start:[{token:["meta.tag.punctuation.tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:/(<)(CsoundSynthesi[sz]er)(>)/,next:"synthesizer"},{defaultToken:"text.csound-document"}],synthesizer:[{token:["meta.tag.punctuation.end-tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"()",next:"start"},{token:["meta.tag.punctuation.tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"(<)(CsInstruments)(>)",next:e.embeddedRulePrefix+"start"},{token:["meta.tag.punctuation.tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"(<)(CsScore)(>)",next:t.embeddedRulePrefix+"start"},{token:["meta.tag.punctuation.tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"(<)([Hh][Tt][Mm][Ll])(>)",next:"html-start"}]},this.embedRules(e.getRules(),e.embeddedRulePrefix,[{token:["meta.tag.punctuation.end-tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"()",next:"synthesizer"}]),this.embedRules(t.getRules(),t.embeddedRulePrefix,[{token:["meta.tag.punctuation.end-tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"()",next:"synthesizer"}]),this.embedRules(o,"html-",[{token:["meta.tag.punctuation.end-tag-open.csound-document","entity.name.tag.begin.csound-document","meta.tag.punctuation.tag-close.csound-document"],regex:"()",next:"synthesizer"}]),this.normalizeRules()};r.inherits(a,u),t.CsoundDocumentHighlightRules=a}),ace.define("ace/mode/csound_document",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_document_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./csound_document_highlight_rules").CsoundDocumentHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/csound_document",this.snippetFileId="ace/snippets/csound_document"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/csound_document"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-csound_orchestra.js b/mixly/common/modules/web-modules/ace/mode-csound_orchestra.js new file mode 100644 index 00000000..aca4287d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-csound_orchestra.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){this.embeddedRulePrefix=e===undefined?"":e,this.semicolonComments={token:"comment.line.semicolon.csound",regex:";.*$"},this.comments=[{token:"punctuation.definition.comment.begin.csound",regex:"/\\*",push:[{token:"punctuation.definition.comment.end.csound",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.csound"}]},{token:"comment.line.double-slash.csound",regex:"//.*$"},this.semicolonComments],this.macroUses=[{token:["entity.name.function.preprocessor.csound","punctuation.definition.macro-parameter-value-list.begin.csound"],regex:/(\$[A-Z_a-z]\w*\.?)(\()/,next:"macro parameter value list"},{token:"entity.name.function.preprocessor.csound",regex:/\$[A-Z_a-z]\w*(?:\.|\b)/}],this.numbers=[{token:"constant.numeric.float.csound",regex:/(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/},{token:["storage.type.number.csound","constant.numeric.integer.hexadecimal.csound"],regex:/(0[Xx])([0-9A-Fa-f]+)/},{token:"constant.numeric.integer.decimal.csound",regex:/\d+/}],this.bracedStringContents=[{token:"constant.character.escape.csound",regex:/\\(?:[\\abnrt"]|[0-7]{1,3})/},{token:"constant.character.placeholder.csound",regex:/%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/},{token:"constant.character.escape.csound",regex:/%%/}],this.quotedStringContents=[this.macroUses,this.bracedStringContents];var t=[this.comments,{token:"keyword.preprocessor.csound",regex:/#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/},{token:"keyword.preprocessor.csound",regex:/#include/,push:[this.comments,{token:"string.csound",regex:/([^ \t])(?:.*?\1)/,next:"pop"}]},{token:"keyword.preprocessor.csound",regex:/#includestr/,push:[this.comments,{token:"string.csound",regex:/([^ \t])(?:.*?\1)/,next:"pop"}]},{token:"keyword.preprocessor.csound",regex:/#[ \t]*define/,next:"define directive"},{token:"keyword.preprocessor.csound",regex:/#(?:ifn?def|undef)\b/,next:"macro directive"},this.macroUses];this.$rules={start:t,"define directive":[this.comments,{token:"entity.name.function.preprocessor.csound",regex:/[A-Z_a-z]\w*/},{token:"punctuation.definition.macro-parameter-name-list.begin.csound",regex:/\(/,next:"macro parameter name list"},{token:"punctuation.definition.macro.begin.csound",regex:/#/,next:"macro body"}],"macro parameter name list":[{token:"variable.parameter.preprocessor.csound",regex:/[A-Z_a-z]\w*/},{token:"punctuation.definition.macro-parameter-name-list.end.csound",regex:/\)/,next:"define directive"}],"macro body":[{token:"constant.character.escape.csound",regex:/\\#/},{token:"punctuation.definition.macro.end.csound",regex:/#/,next:"start"},t],"macro directive":[this.comments,{token:"entity.name.function.preprocessor.csound",regex:/[A-Z_a-z]\w*/,next:"start"}],"macro parameter value list":[{token:"punctuation.definition.macro-parameter-value-list.end.csound",regex:/\)/,next:"start"},{token:"punctuation.definition.string.begin.csound",regex:/"/,next:"macro parameter value quoted string"},this.pushRule({token:"punctuation.macro-parameter-value-parenthetical.begin.csound",regex:/\(/,next:"macro parameter value parenthetical"}),{token:"punctuation.macro-parameter-value-separator.csound",regex:"[#']"}],"macro parameter value quoted string":[{token:"constant.character.escape.csound",regex:/\\[#'()]/},{token:"invalid.illegal.csound",regex:/[#'()]/},{token:"punctuation.definition.string.end.csound",regex:/"/,next:"macro parameter value list"},this.quotedStringContents,{defaultToken:"string.quoted.csound"}],"macro parameter value parenthetical":[{token:"constant.character.escape.csound",regex:/\\\)/},this.popRule({token:"punctuation.macro-parameter-value-parenthetical.end.csound",regex:/\)/}),this.pushRule({token:"punctuation.macro-parameter-value-parenthetical.begin.csound",regex:/\(/,next:"macro parameter value parenthetical"}),t]}};r.inherits(s,i),function(){this.pushRule=function(e){if(Array.isArray(e.next))for(var t=0;t1?r[r.length-1]:r.pop(),e.token}}}}.call(s.prototype),t.CsoundPreprocessorHighlightRules=s}),ace.define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules,s=function(e){i.call(this,e),this.quotedStringContents.push({token:"invalid.illegal.csound-score",regex:/[^"]*$/});var t=this.$rules.start;t.push({token:"keyword.control.csound-score",regex:/[aBbCdefiqstvxy]/},{token:"invalid.illegal.csound-score",regex:/w/},{token:"constant.numeric.language.csound-score",regex:/z/},{token:["keyword.control.csound-score","constant.numeric.integer.decimal.csound-score"],regex:/([nNpP][pP])(\d+)/},{token:"keyword.other.csound-score",regex:/[mn]/,push:[{token:"empty",regex:/$/,next:"pop"},this.comments,{token:"entity.name.label.csound-score",regex:/[A-Z_a-z]\w*/}]},{token:"keyword.preprocessor.csound-score",regex:/r\b/,next:"repeat section"},this.numbers,{token:"keyword.operator.csound-score",regex:"[!+\\-*/^%&|<>#~.]"},this.pushRule({token:"punctuation.definition.string.begin.csound-score",regex:/"/,next:"quoted string"}),this.pushRule({token:"punctuation.braced-loop.begin.csound-score",regex:/{/,next:"loop after left brace"})),this.addRules({"repeat section":[{token:"empty",regex:/$/,next:"start"},this.comments,{token:"constant.numeric.integer.decimal.csound-score",regex:/\d+/,next:"repeat section before label"}],"repeat section before label":[{token:"empty",regex:/$/,next:"start"},this.comments,{token:"entity.name.label.csound-score",regex:/[A-Z_a-z]\w*/,next:"start"}],"quoted string":[this.popRule({token:"punctuation.definition.string.end.csound-score",regex:/"/}),this.quotedStringContents,{defaultToken:"string.quoted.csound-score"}],"loop after left brace":[this.popRule({token:"constant.numeric.integer.decimal.csound-score",regex:/\d+/,next:"loop after repeat count"}),this.comments,{token:"invalid.illegal.csound",regex:/\S.*/}],"loop after repeat count":[this.popRule({token:"entity.name.function.preprocessor.csound-score",regex:/[A-Z_a-z]\w*\b/,next:"loop after macro name"}),this.comments,{token:"invalid.illegal.csound",regex:/\S.*/}],"loop after macro name":[t,this.popRule({token:"punctuation.braced-loop.end.csound-score",regex:/}/})]}),this.normalizeRules()};r.inherits(s,i),t.CsoundScoreHighlightRules=s}),ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",r="string|package|os|io|math|debug|table|coroutine",i="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:e,"support.function":n,"keyword.deprecated":i,"constant.library":r,"constant.language":t,"variable.language":"self"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:"+o+"|"+u+")",f="(?:\\.\\d+)",l="(?:\\d+)",c="(?:(?:"+l+"?"+f+")|(?:"+l+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment.body"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};r.inherits(s,i),t.LuaHighlightRules=s}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/csound_orchestra_highlight_rules",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/lua_highlight_rules","ace/mode/python_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../lib/oop"),s=e("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules,o=e("./csound_score_highlight_rules").CsoundScoreHighlightRules,u=e("./lua_highlight_rules").LuaHighlightRules,a=e("./python_highlight_rules").PythonHighlightRules,f=function(e){s.call(this,e);var t=["ATSadd","ATSaddnz","ATSbufread","ATScross","ATSinfo","ATSinterpread","ATSpartialtap","ATSread","ATSreadnz","ATSsinnoi","FLbox","FLbutBank","FLbutton","FLcloseButton","FLcolor","FLcolor2","FLcount","FLexecButton","FLgetsnap","FLgroup","FLgroupEnd","FLgroup_end","FLhide","FLhvsBox","FLhvsBoxSetValue","FLjoy","FLkeyIn","FLknob","FLlabel","FLloadsnap","FLmouse","FLpack","FLpackEnd","FLpack_end","FLpanel","FLpanelEnd","FLpanel_end","FLprintk","FLprintk2","FLroller","FLrun","FLsavesnap","FLscroll","FLscrollEnd","FLscroll_end","FLsetAlign","FLsetBox","FLsetColor","FLsetColor2","FLsetFont","FLsetPosition","FLsetSize","FLsetSnapGroup","FLsetText","FLsetTextColor","FLsetTextSize","FLsetTextType","FLsetVal","FLsetVal_i","FLsetVali","FLsetsnap","FLshow","FLslidBnk","FLslidBnk2","FLslidBnk2Set","FLslidBnk2Setk","FLslidBnkGetHandle","FLslidBnkSet","FLslidBnkSetk","FLslider","FLtabs","FLtabsEnd","FLtabs_end","FLtext","FLupdate","FLvalue","FLvkeybd","FLvslidBnk","FLvslidBnk2","FLxyin","JackoAudioIn","JackoAudioInConnect","JackoAudioOut","JackoAudioOutConnect","JackoFreewheel","JackoInfo","JackoInit","JackoMidiInConnect","JackoMidiOut","JackoMidiOutConnect","JackoNoteOut","JackoOn","JackoTransport","K35_hpf","K35_lpf","MixerClear","MixerGetLevel","MixerReceive","MixerSend","MixerSetLevel","MixerSetLevel_i","OSCbundle","OSCcount","OSCinit","OSCinitM","OSClisten","OSCraw","OSCsend","OSCsend_lo","S","STKBandedWG","STKBeeThree","STKBlowBotl","STKBlowHole","STKBowed","STKBrass","STKClarinet","STKDrummer","STKFMVoices","STKFlute","STKHevyMetl","STKMandolin","STKModalBar","STKMoog","STKPercFlut","STKPlucked","STKResonate","STKRhodey","STKSaxofony","STKShakers","STKSimple","STKSitar","STKStifKarp","STKTubeBell","STKVoicForm","STKWhistle","STKWurley","a","abs","active","adsr","adsyn","adsynt","adsynt2","aftouch","allpole","alpass","alwayson","ampdb","ampdbfs","ampmidi","ampmidicurve","ampmidid","apoleparams","arduinoRead","arduinoReadF","arduinoStart","arduinoStop","areson","aresonk","atone","atonek","atonex","autocorr","babo","balance","balance2","bamboo","barmodel","bbcutm","bbcuts","betarand","bexprnd","bformdec1","bformdec2","bformenc1","binit","biquad","biquada","birnd","bob","bpf","bpfcos","bqrez","butbp","butbr","buthp","butlp","butterbp","butterbr","butterhp","butterlp","button","buzz","c2r","cabasa","cauchy","cauchyi","cbrt","ceil","cell","cent","centroid","ceps","cepsinv","chanctrl","changed","changed2","chani","chano","chebyshevpoly","checkbox","chn_S","chn_a","chn_k","chnclear","chnexport","chnget","chngeta","chngeti","chngetk","chngetks","chngets","chnmix","chnparams","chnset","chnseta","chnseti","chnsetk","chnsetks","chnsets","chuap","clear","clfilt","clip","clockoff","clockon","cmp","cmplxprod","cntCreate","cntCycles","cntDelete","cntDelete_i","cntRead","cntReset","cntState","comb","combinv","compilecsd","compileorc","compilestr","compress","compress2","connect","control","convle","convolve","copya2ftab","copyf2array","cos","cosh","cosinv","cosseg","cossegb","cossegr","count","count_i","cps2pch","cpsmidi","cpsmidib","cpsmidinn","cpsoct","cpspch","cpstmid","cpstun","cpstuni","cpsxpch","cpumeter","cpuprc","cross2","crossfm","crossfmi","crossfmpm","crossfmpmi","crosspm","crosspmi","crunch","ctlchn","ctrl14","ctrl21","ctrl7","ctrlinit","ctrlpreset","ctrlprint","ctrlprintpresets","ctrlsave","ctrlselect","cuserrnd","dam","date","dates","db","dbamp","dbfsamp","dcblock","dcblock2","dconv","dct","dctinv","deinterleave","delay","delay1","delayk","delayr","delayw","deltap","deltap3","deltapi","deltapn","deltapx","deltapxw","denorm","diff","diode_ladder","directory","diskgrain","diskin","diskin2","dispfft","display","distort","distort1","divz","doppler","dot","downsamp","dripwater","dssiactivate","dssiaudio","dssictls","dssiinit","dssilist","dumpk","dumpk2","dumpk3","dumpk4","duserrnd","dust","dust2","elapsedcycles","elapsedtime","envlpx","envlpxr","ephasor","eqfil","evalstr","event","event_i","eventcycles","eventtime","exciter","exitnow","exp","expcurve","expon","exprand","exprandi","expseg","expsega","expsegb","expsegba","expsegr","fareylen","fareyleni","faustaudio","faustcompile","faustctl","faustdsp","faustgen","faustplay","fft","fftinv","ficlose","filebit","filelen","filenchnls","filepeak","filescal","filesr","filevalid","fillarray","filter2","fin","fini","fink","fiopen","flanger","flashtxt","flooper","flooper2","floor","fluidAllOut","fluidCCi","fluidCCk","fluidControl","fluidEngine","fluidInfo","fluidLoad","fluidNote","fluidOut","fluidProgramSelect","fluidSetInterpMethod","fmanal","fmax","fmb3","fmbell","fmin","fmmetal","fmod","fmpercfl","fmrhode","fmvoice","fmwurlie","fof","fof2","fofilter","fog","fold","follow","follow2","foscil","foscili","fout","fouti","foutir","foutk","fprintks","fprints","frac","fractalnoise","framebuffer","freeverb","ftaudio","ftchnls","ftconv","ftcps","ftexists","ftfree","ftgen","ftgenonce","ftgentmp","ftlen","ftload","ftloadk","ftlptim","ftmorf","ftom","ftprint","ftresize","ftresizei","ftsamplebank","ftsave","ftsavek","ftset","ftslice","ftslicei","ftsr","gain","gainslider","gauss","gaussi","gausstrig","gbuzz","genarray","genarray_i","gendy","gendyc","gendyx","getcfg","getcol","getftargs","getrow","getseed","gogobel","grain","grain2","grain3","granule","gtadsr","gtf","guiro","harmon","harmon2","harmon3","harmon4","hdf5read","hdf5write","hilbert","hilbert2","hrtfearly","hrtfmove","hrtfmove2","hrtfreverb","hrtfstat","hsboscil","hvs1","hvs2","hvs3","hypot","i","ihold","imagecreate","imagefree","imagegetpixel","imageload","imagesave","imagesetpixel","imagesize","in","in32","inch","inh","init","initc14","initc21","initc7","inleta","inletf","inletk","inletkid","inletv","ino","inq","inrg","ins","insglobal","insremot","int","integ","interleave","interp","invalue","inx","inz","jacktransport","jitter","jitter2","joystick","jspline","k","la_i_add_mc","la_i_add_mr","la_i_add_vc","la_i_add_vr","la_i_assign_mc","la_i_assign_mr","la_i_assign_t","la_i_assign_vc","la_i_assign_vr","la_i_conjugate_mc","la_i_conjugate_mr","la_i_conjugate_vc","la_i_conjugate_vr","la_i_distance_vc","la_i_distance_vr","la_i_divide_mc","la_i_divide_mr","la_i_divide_vc","la_i_divide_vr","la_i_dot_mc","la_i_dot_mc_vc","la_i_dot_mr","la_i_dot_mr_vr","la_i_dot_vc","la_i_dot_vr","la_i_get_mc","la_i_get_mr","la_i_get_vc","la_i_get_vr","la_i_invert_mc","la_i_invert_mr","la_i_lower_solve_mc","la_i_lower_solve_mr","la_i_lu_det_mc","la_i_lu_det_mr","la_i_lu_factor_mc","la_i_lu_factor_mr","la_i_lu_solve_mc","la_i_lu_solve_mr","la_i_mc_create","la_i_mc_set","la_i_mr_create","la_i_mr_set","la_i_multiply_mc","la_i_multiply_mr","la_i_multiply_vc","la_i_multiply_vr","la_i_norm1_mc","la_i_norm1_mr","la_i_norm1_vc","la_i_norm1_vr","la_i_norm_euclid_mc","la_i_norm_euclid_mr","la_i_norm_euclid_vc","la_i_norm_euclid_vr","la_i_norm_inf_mc","la_i_norm_inf_mr","la_i_norm_inf_vc","la_i_norm_inf_vr","la_i_norm_max_mc","la_i_norm_max_mr","la_i_print_mc","la_i_print_mr","la_i_print_vc","la_i_print_vr","la_i_qr_eigen_mc","la_i_qr_eigen_mr","la_i_qr_factor_mc","la_i_qr_factor_mr","la_i_qr_sym_eigen_mc","la_i_qr_sym_eigen_mr","la_i_random_mc","la_i_random_mr","la_i_random_vc","la_i_random_vr","la_i_size_mc","la_i_size_mr","la_i_size_vc","la_i_size_vr","la_i_subtract_mc","la_i_subtract_mr","la_i_subtract_vc","la_i_subtract_vr","la_i_t_assign","la_i_trace_mc","la_i_trace_mr","la_i_transpose_mc","la_i_transpose_mr","la_i_upper_solve_mc","la_i_upper_solve_mr","la_i_vc_create","la_i_vc_set","la_i_vr_create","la_i_vr_set","la_k_a_assign","la_k_add_mc","la_k_add_mr","la_k_add_vc","la_k_add_vr","la_k_assign_a","la_k_assign_f","la_k_assign_mc","la_k_assign_mr","la_k_assign_t","la_k_assign_vc","la_k_assign_vr","la_k_conjugate_mc","la_k_conjugate_mr","la_k_conjugate_vc","la_k_conjugate_vr","la_k_current_f","la_k_current_vr","la_k_distance_vc","la_k_distance_vr","la_k_divide_mc","la_k_divide_mr","la_k_divide_vc","la_k_divide_vr","la_k_dot_mc","la_k_dot_mc_vc","la_k_dot_mr","la_k_dot_mr_vr","la_k_dot_vc","la_k_dot_vr","la_k_f_assign","la_k_get_mc","la_k_get_mr","la_k_get_vc","la_k_get_vr","la_k_invert_mc","la_k_invert_mr","la_k_lower_solve_mc","la_k_lower_solve_mr","la_k_lu_det_mc","la_k_lu_det_mr","la_k_lu_factor_mc","la_k_lu_factor_mr","la_k_lu_solve_mc","la_k_lu_solve_mr","la_k_mc_set","la_k_mr_set","la_k_multiply_mc","la_k_multiply_mr","la_k_multiply_vc","la_k_multiply_vr","la_k_norm1_mc","la_k_norm1_mr","la_k_norm1_vc","la_k_norm1_vr","la_k_norm_euclid_mc","la_k_norm_euclid_mr","la_k_norm_euclid_vc","la_k_norm_euclid_vr","la_k_norm_inf_mc","la_k_norm_inf_mr","la_k_norm_inf_vc","la_k_norm_inf_vr","la_k_norm_max_mc","la_k_norm_max_mr","la_k_qr_eigen_mc","la_k_qr_eigen_mr","la_k_qr_factor_mc","la_k_qr_factor_mr","la_k_qr_sym_eigen_mc","la_k_qr_sym_eigen_mr","la_k_random_mc","la_k_random_mr","la_k_random_vc","la_k_random_vr","la_k_subtract_mc","la_k_subtract_mr","la_k_subtract_vc","la_k_subtract_vr","la_k_t_assign","la_k_trace_mc","la_k_trace_mr","la_k_upper_solve_mc","la_k_upper_solve_mr","la_k_vc_set","la_k_vr_set","lag","lagud","lastcycle","lenarray","lfo","lfsr","limit","limit1","lincos","line","linen","linenr","lineto","link_beat_force","link_beat_get","link_beat_request","link_create","link_enable","link_is_enabled","link_metro","link_peers","link_tempo_get","link_tempo_set","linlin","linrand","linseg","linsegb","linsegr","liveconv","locsend","locsig","log","log10","log2","logbtwo","logcurve","loopseg","loopsegp","looptseg","loopxseg","lorenz","loscil","loscil3","loscil3phs","loscilphs","loscilx","lowpass2","lowres","lowresx","lpcanal","lpcfilter","lpf18","lpform","lpfreson","lphasor","lpinterp","lposcil","lposcil3","lposcila","lposcilsa","lposcilsa2","lpread","lpreson","lpshold","lpsholdp","lpslot","lufs","mac","maca","madsr","mags","mandel","mandol","maparray","maparray_i","marimba","massign","max","max_k","maxabs","maxabsaccum","maxaccum","maxalloc","maxarray","mclock","mdelay","median","mediank","metro","metro2","metrobpm","mfb","midglobal","midiarp","midic14","midic21","midic7","midichannelaftertouch","midichn","midicontrolchange","midictrl","mididefault","midifilestatus","midiin","midinoteoff","midinoteoncps","midinoteonkey","midinoteonoct","midinoteonpch","midion","midion2","midiout","midiout_i","midipgm","midipitchbend","midipolyaftertouch","midiprogramchange","miditempo","midremot","min","minabs","minabsaccum","minaccum","minarray","mincer","mirror","mode","modmatrix","monitor","moog","moogladder","moogladder2","moogvcf","moogvcf2","moscil","mp3bitrate","mp3in","mp3len","mp3nchnls","mp3out","mp3scal","mp3sr","mpulse","mrtmsg","ms2st","mtof","mton","multitap","mute","mvchpf","mvclpf1","mvclpf2","mvclpf3","mvclpf4","mvmfilter","mxadsr","nchnls_hw","nestedap","nlalp","nlfilt","nlfilt2","noise","noteoff","noteon","noteondur","noteondur2","notnum","nreverb","nrpn","nsamp","nstance","nstrnum","nstrstr","ntof","ntom","ntrpol","nxtpow2","octave","octcps","octmidi","octmidib","octmidinn","octpch","olabuffer","oscbnk","oscil","oscil1","oscil1i","oscil3","oscili","oscilikt","osciliktp","oscilikts","osciln","oscils","oscilx","out","out32","outall","outc","outch","outh","outiat","outic","outic14","outipat","outipb","outipc","outkat","outkc","outkc14","outkpat","outkpb","outkpc","outleta","outletf","outletk","outletkid","outletv","outo","outq","outq1","outq2","outq3","outq4","outrg","outs","outs1","outs2","outvalue","outx","outz","p","p5gconnect","p5gdata","pan","pan2","pareq","part2txt","partials","partikkel","partikkelget","partikkelset","partikkelsync","passign","paulstretch","pcauchy","pchbend","pchmidi","pchmidib","pchmidinn","pchoct","pchtom","pconvolve","pcount","pdclip","pdhalf","pdhalfy","peak","pgmassign","pgmchn","phaser1","phaser2","phasor","phasorbnk","phs","pindex","pinker","pinkish","pitch","pitchac","pitchamdf","planet","platerev","plltrack","pluck","poisson","pol2rect","polyaft","polynomial","port","portk","poscil","poscil3","pow","powershape","powoftwo","pows","prealloc","prepiano","print","print_type","printarray","printf","printf_i","printk","printk2","printks","printks2","println","prints","printsk","product","pset","ptablew","ptrack","puts","pvadd","pvbufread","pvcross","pvinterp","pvoc","pvread","pvs2array","pvs2tab","pvsadsyn","pvsanal","pvsarp","pvsbandp","pvsbandr","pvsbandwidth","pvsbin","pvsblur","pvsbuffer","pvsbufread","pvsbufread2","pvscale","pvscent","pvsceps","pvscfs","pvscross","pvsdemix","pvsdiskin","pvsdisp","pvsenvftw","pvsfilter","pvsfread","pvsfreeze","pvsfromarray","pvsftr","pvsftw","pvsfwrite","pvsgain","pvsgendy","pvshift","pvsifd","pvsin","pvsinfo","pvsinit","pvslock","pvslpc","pvsmaska","pvsmix","pvsmooth","pvsmorph","pvsosc","pvsout","pvspitch","pvstanal","pvstencil","pvstrace","pvsvoc","pvswarp","pvsynth","pwd","pyassign","pyassigni","pyassignt","pycall","pycall1","pycall1i","pycall1t","pycall2","pycall2i","pycall2t","pycall3","pycall3i","pycall3t","pycall4","pycall4i","pycall4t","pycall5","pycall5i","pycall5t","pycall6","pycall6i","pycall6t","pycall7","pycall7i","pycall7t","pycall8","pycall8i","pycall8t","pycalli","pycalln","pycallni","pycallt","pyeval","pyevali","pyevalt","pyexec","pyexeci","pyexect","pyinit","pylassign","pylassigni","pylassignt","pylcall","pylcall1","pylcall1i","pylcall1t","pylcall2","pylcall2i","pylcall2t","pylcall3","pylcall3i","pylcall3t","pylcall4","pylcall4i","pylcall4t","pylcall5","pylcall5i","pylcall5t","pylcall6","pylcall6i","pylcall6t","pylcall7","pylcall7i","pylcall7t","pylcall8","pylcall8i","pylcall8t","pylcalli","pylcalln","pylcallni","pylcallt","pyleval","pylevali","pylevalt","pylexec","pylexeci","pylexect","pylrun","pylruni","pylrunt","pyrun","pyruni","pyrunt","qinf","qnan","r2c","rand","randc","randh","randi","random","randomh","randomi","rbjeq","readclock","readf","readfi","readk","readk2","readk3","readk4","readks","readscore","readscratch","rect2pol","release","remoteport","remove","repluck","reshapearray","reson","resonbnk","resonk","resonr","resonx","resonxk","resony","resonz","resyn","reverb","reverb2","reverbsc","rewindscore","rezzy","rfft","rifft","rms","rnd","rnd31","rndseed","round","rspline","rtclock","s16b14","s32b14","samphold","sandpaper","sc_lag","sc_lagud","sc_phasor","sc_trig","scale","scale2","scalearray","scanhammer","scanmap","scans","scansmap","scantable","scanu","scanu2","schedkwhen","schedkwhennamed","schedule","schedulek","schedwhen","scoreline","scoreline_i","seed","sekere","select","semitone","sense","sensekey","seqtime","seqtime2","sequ","sequstate","serialBegin","serialEnd","serialFlush","serialPrint","serialRead","serialWrite","serialWrite_i","setcol","setctrl","setksmps","setrow","setscorepos","sfilist","sfinstr","sfinstr3","sfinstr3m","sfinstrm","sfload","sflooper","sfpassign","sfplay","sfplay3","sfplay3m","sfplaym","sfplist","sfpreset","shaker","shiftin","shiftout","signum","sin","sinh","sininv","sinsyn","skf","sleighbells","slicearray","slicearray_i","slider16","slider16f","slider16table","slider16tablef","slider32","slider32f","slider32table","slider32tablef","slider64","slider64f","slider64table","slider64tablef","slider8","slider8f","slider8table","slider8tablef","sliderKawai","sndloop","sndwarp","sndwarpst","sockrecv","sockrecvs","socksend","socksends","sorta","sortd","soundin","space","spat3d","spat3di","spat3dt","spdist","spf","splitrig","sprintf","sprintfk","spsend","sqrt","squinewave","st2ms","statevar","sterrain","stix","strcat","strcatk","strchar","strchark","strcmp","strcmpk","strcpy","strcpyk","strecv","streson","strfromurl","strget","strindex","strindexk","string2array","strlen","strlenk","strlower","strlowerk","strrindex","strrindexk","strset","strstrip","strsub","strsubk","strtod","strtodk","strtol","strtolk","strupper","strupperk","stsend","subinstr","subinstrinit","sum","sumarray","svfilter","svn","syncgrain","syncloop","syncphasor","system","system_i","tab","tab2array","tab2pvs","tab_i","tabifd","table","table3","table3kt","tablecopy","tablefilter","tablefilteri","tablegpw","tablei","tableicopy","tableigpw","tableikt","tableimix","tablekt","tablemix","tableng","tablera","tableseg","tableshuffle","tableshufflei","tablew","tablewa","tablewkt","tablexkt","tablexseg","tabmorph","tabmorpha","tabmorphak","tabmorphi","tabplay","tabrec","tabsum","tabw","tabw_i","tambourine","tan","tanh","taninv","taninv2","tbvcf","tempest","tempo","temposcal","tempoval","timedseq","timeinstk","timeinsts","timek","times","tival","tlineto","tone","tonek","tonex","tradsyn","trandom","transeg","transegb","transegr","trcross","trfilter","trhighest","trigExpseg","trigLinseg","trigexpseg","trigger","trighold","triglinseg","trigphasor","trigseq","trim","trim_i","trirand","trlowest","trmix","trscale","trshift","trsplit","turnoff","turnoff2","turnoff2_i","turnoff3","turnon","tvconv","unirand","unwrap","upsamp","urandom","urd","vactrol","vadd","vadd_i","vaddv","vaddv_i","vaget","valpass","vaset","vbap","vbapg","vbapgmove","vbaplsinit","vbapmove","vbapz","vbapzmove","vcella","vclpf","vco","vco2","vco2ft","vco2ift","vco2init","vcomb","vcopy","vcopy_i","vdel_k","vdelay","vdelay3","vdelayk","vdelayx","vdelayxq","vdelayxs","vdelayxw","vdelayxwq","vdelayxws","vdivv","vdivv_i","vecdelay","veloc","vexp","vexp_i","vexpseg","vexpv","vexpv_i","vibes","vibr","vibrato","vincr","vlimit","vlinseg","vlowres","vmap","vmirror","vmult","vmult_i","vmultv","vmultv_i","voice","vosim","vphaseseg","vport","vpow","vpow_i","vpowv","vpowv_i","vps","vpvoc","vrandh","vrandi","vsubv","vsubv_i","vtaba","vtabi","vtabk","vtable1k","vtablea","vtablei","vtablek","vtablewa","vtablewi","vtablewk","vtabwa","vtabwi","vtabwk","vwrap","waveset","websocket","weibull","wgbow","wgbowedbar","wgbrass","wgclar","wgflute","wgpluck","wgpluck2","wguide1","wguide2","wiiconnect","wiidata","wiirange","wiisend","window","wrap","writescratch","wterrain","wterrain2","xadsr","xin","xout","xtratim","xyscale","zacl","zakinit","zamod","zar","zarg","zaw","zawm","zdf_1pole","zdf_1pole_mode","zdf_2pole","zdf_2pole_mode","zdf_ladder","zfilter2","zir","ziw","ziwm","zkcl","zkmod","zkr","zkw","zkwm"],n=["OSCsendA","array","beadsynt","beosc","bformdec","bformenc","buchla","copy2ftab","copy2ttab","getrowlin","hrtfer","ktableseg","lentab","lua_exec","lua_iaopcall","lua_iaopcall_off","lua_ikopcall","lua_ikopcall_off","lua_iopcall","lua_iopcall_off","lua_opdef","maxtab","mintab","mp3scal_check","mp3scal_load","mp3scal_load2","mp3scal_play","mp3scal_play2","pop","pop_f","ptable","ptable3","ptablei","ptableiw","push","push_f","pvsgendy","scalet","signalflowgraph","sndload","socksend_k","soundout","soundouts","specaddm","specdiff","specdisp","specfilt","spechist","specptrk","specscal","specsum","spectrum","stack","sumTableFilter","sumtab","systime","tabgen","tableiw","tabmap","tabmap_i","tabrowlin","tabslice","tb0","tb0_init","tb1","tb10","tb10_init","tb11","tb11_init","tb12","tb12_init","tb13","tb13_init","tb14","tb14_init","tb15","tb15_init","tb1_init","tb2","tb2_init","tb3","tb3_init","tb4","tb4_init","tb5","tb5_init","tb6","tb6_init","tb7","tb7_init","tb8","tb8_init","tb9","tb9_init","vbap16","vbap1move","vbap4","vbap4move","vbap8","vbap8move","xscanmap","xscans","xscansmap","xscanu","xyin"];t=r.arrayToMap(t),n=r.arrayToMap(n),this.lineContinuations=[{token:"constant.character.escape.line-continuation.csound",regex:/\\$/},this.pushRule({token:"constant.character.escape.line-continuation.csound",regex:/\\/,next:"line continuation"})],this.comments.push(this.lineContinuations),this.quotedStringContents.push(this.lineContinuations,{token:"invalid.illegal",regex:/[^"\\]*$/});var i=this.$rules.start;i.splice(1,0,{token:["text.csound","entity.name.label.csound","entity.punctuation.label.csound","text.csound"],regex:/^([ \t]*)(\w+)(:)([ \t]+|$)/}),i.push(this.pushRule({token:"keyword.function.csound",regex:/\binstr\b/,next:"instrument numbers and identifiers"}),this.pushRule({token:"keyword.function.csound",regex:/\bopcode\b/,next:"after opcode keyword"}),{token:"keyword.other.csound",regex:/\bend(?:in|op)\b/},{token:"variable.language.csound",regex:/\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b/},this.numbers,{token:"keyword.operator.csound",regex:"\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~\u00ac]|[=!+\\-*/^%&|<>#?:]"},this.pushRule({token:"punctuation.definition.string.begin.csound",regex:/"/,next:"quoted string"}),this.pushRule({token:"punctuation.definition.string.begin.csound",regex:/{{/,next:"braced string"}),{token:"keyword.control.csound",regex:/\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\b/},this.pushRule({token:"keyword.control.csound",regex:/\b[ik]?goto\b/,next:"goto before label"}),this.pushRule({token:"keyword.control.csound",regex:/\b(?:r(?:einit|igoto)|tigoto)\b/,next:"goto before label"}),this.pushRule({token:"keyword.control.csound",regex:/\bc(?:g|in?|k|nk?)goto\b/,next:["goto before label","goto before argument"]}),this.pushRule({token:"keyword.control.csound",regex:/\btimout\b/,next:["goto before label","goto before argument","goto before argument"]}),this.pushRule({token:"keyword.control.csound",regex:/\bloop_[gl][et]\b/,next:["goto before label","goto before argument","goto before argument","goto before argument"]}),this.pushRule({token:"support.function.csound",regex:/\b(?:readscore|scoreline(?:_i)?)\b/,next:"Csound score opcode"}),this.pushRule({token:"support.function.csound",regex:/\bpyl?run[it]?\b(?!$)/,next:"Python opcode"}),this.pushRule({token:"support.function.csound",regex:/\blua_(?:exec|opdef)\b(?!$)/,next:"Lua opcode"}),{token:"support.variable.csound",regex:/\bp\d+\b/},{regex:/\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b/,onMatch:function(e,r,i,s){var o=e.split(this.splitRegex),u=o[1],a;return t.hasOwnProperty(u)?a="support.function.csound":n.hasOwnProperty(u)&&(a="invalid.deprecated.csound"),a?o[2]?[{type:a,value:u},{type:"punctuation.type-annotation.csound",value:o[2]},{type:"type-annotation.storage.type.csound",value:o[3]}]:a:"text.csound"}}),this.$rules["macro parameter value list"].splice(2,0,{token:"punctuation.definition.string.begin.csound",regex:/{{/,next:"macro parameter value braced string"});var f=new o("csound-score-");this.addRules({"macro parameter value braced string":[{token:"constant.character.escape.csound",regex:/\\[#'()]/},{token:"invalid.illegal.csound.csound",regex:/[#'()]/},{token:"punctuation.definition.string.end.csound",regex:/}}/,next:"macro parameter value list"},{defaultToken:"string.braced.csound"}],"instrument numbers and identifiers":[this.comments,{token:"entity.name.function.csound",regex:/\d+|[A-Z_a-z]\w*/},this.popRule({token:"empty",regex:/$/})],"after opcode keyword":[this.comments,this.popRule({token:"empty",regex:/$/}),this.popRule({token:"entity.name.function.opcode.csound",regex:/[A-Z_a-z]\w*/,next:"opcode type signatures"})],"opcode type signatures":[this.comments,this.popRule({token:"empty",regex:/$/}),{token:"storage.type.csound",regex:/\b(?:0|[afijkKoOpPStV\[\]]+)/}],"quoted string":[this.popRule({token:"punctuation.definition.string.end.csound",regex:/"/}),this.quotedStringContents,{defaultToken:"string.quoted.csound"}],"braced string":[this.popRule({token:"punctuation.definition.string.end.csound",regex:/}}/}),this.bracedStringContents,{defaultToken:"string.braced.csound"}],"goto before argument":[this.popRule({token:"text.csound",regex:/,/}),i],"goto before label":[{token:"text.csound",regex:/\s+/},this.comments,this.popRule({token:"entity.name.label.csound",regex:/\w+/}),this.popRule({token:"empty",regex:/(?!\w)/})],"Csound score opcode":[this.comments,{token:"punctuation.definition.string.begin.csound",regex:/{{/,next:f.embeddedRulePrefix+"start"},this.popRule({token:"empty",regex:/$/})],"Python opcode":[this.comments,{token:"punctuation.definition.string.begin.csound",regex:/{{/,next:"python-start"},this.popRule({token:"empty",regex:/$/})],"Lua opcode":[this.comments,{token:"punctuation.definition.string.begin.csound",regex:/{{/,next:"lua-start"},this.popRule({token:"empty",regex:/$/})],"line continuation":[this.popRule({token:"empty",regex:/$/}),this.semicolonComments,{token:"invalid.illegal.csound",regex:/\S.*/}]});var l=[this.popRule({token:"punctuation.definition.string.end.csound",regex:/}}/})];this.embedRules(f.getRules(),f.embeddedRulePrefix,l),this.embedRules(a,"python-",l),this.embedRules(u,"lua-",l),this.normalizeRules()};i.inherits(f,s),t.CsoundOrchestraHighlightRules=f}),ace.define("ace/mode/csound_orchestra",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_orchestra_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/csound_orchestra",this.snippetFileId="ace/snippets/csound_orchestra"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/csound_orchestra"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-csound_score.js b/mixly/common/modules/web-modules/ace/mode-csound_score.js new file mode 100644 index 00000000..a975aa8f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-csound_score.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){this.embeddedRulePrefix=e===undefined?"":e,this.semicolonComments={token:"comment.line.semicolon.csound",regex:";.*$"},this.comments=[{token:"punctuation.definition.comment.begin.csound",regex:"/\\*",push:[{token:"punctuation.definition.comment.end.csound",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.csound"}]},{token:"comment.line.double-slash.csound",regex:"//.*$"},this.semicolonComments],this.macroUses=[{token:["entity.name.function.preprocessor.csound","punctuation.definition.macro-parameter-value-list.begin.csound"],regex:/(\$[A-Z_a-z]\w*\.?)(\()/,next:"macro parameter value list"},{token:"entity.name.function.preprocessor.csound",regex:/\$[A-Z_a-z]\w*(?:\.|\b)/}],this.numbers=[{token:"constant.numeric.float.csound",regex:/(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/},{token:["storage.type.number.csound","constant.numeric.integer.hexadecimal.csound"],regex:/(0[Xx])([0-9A-Fa-f]+)/},{token:"constant.numeric.integer.decimal.csound",regex:/\d+/}],this.bracedStringContents=[{token:"constant.character.escape.csound",regex:/\\(?:[\\abnrt"]|[0-7]{1,3})/},{token:"constant.character.placeholder.csound",regex:/%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/},{token:"constant.character.escape.csound",regex:/%%/}],this.quotedStringContents=[this.macroUses,this.bracedStringContents];var t=[this.comments,{token:"keyword.preprocessor.csound",regex:/#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/},{token:"keyword.preprocessor.csound",regex:/#include/,push:[this.comments,{token:"string.csound",regex:/([^ \t])(?:.*?\1)/,next:"pop"}]},{token:"keyword.preprocessor.csound",regex:/#includestr/,push:[this.comments,{token:"string.csound",regex:/([^ \t])(?:.*?\1)/,next:"pop"}]},{token:"keyword.preprocessor.csound",regex:/#[ \t]*define/,next:"define directive"},{token:"keyword.preprocessor.csound",regex:/#(?:ifn?def|undef)\b/,next:"macro directive"},this.macroUses];this.$rules={start:t,"define directive":[this.comments,{token:"entity.name.function.preprocessor.csound",regex:/[A-Z_a-z]\w*/},{token:"punctuation.definition.macro-parameter-name-list.begin.csound",regex:/\(/,next:"macro parameter name list"},{token:"punctuation.definition.macro.begin.csound",regex:/#/,next:"macro body"}],"macro parameter name list":[{token:"variable.parameter.preprocessor.csound",regex:/[A-Z_a-z]\w*/},{token:"punctuation.definition.macro-parameter-name-list.end.csound",regex:/\)/,next:"define directive"}],"macro body":[{token:"constant.character.escape.csound",regex:/\\#/},{token:"punctuation.definition.macro.end.csound",regex:/#/,next:"start"},t],"macro directive":[this.comments,{token:"entity.name.function.preprocessor.csound",regex:/[A-Z_a-z]\w*/,next:"start"}],"macro parameter value list":[{token:"punctuation.definition.macro-parameter-value-list.end.csound",regex:/\)/,next:"start"},{token:"punctuation.definition.string.begin.csound",regex:/"/,next:"macro parameter value quoted string"},this.pushRule({token:"punctuation.macro-parameter-value-parenthetical.begin.csound",regex:/\(/,next:"macro parameter value parenthetical"}),{token:"punctuation.macro-parameter-value-separator.csound",regex:"[#']"}],"macro parameter value quoted string":[{token:"constant.character.escape.csound",regex:/\\[#'()]/},{token:"invalid.illegal.csound",regex:/[#'()]/},{token:"punctuation.definition.string.end.csound",regex:/"/,next:"macro parameter value list"},this.quotedStringContents,{defaultToken:"string.quoted.csound"}],"macro parameter value parenthetical":[{token:"constant.character.escape.csound",regex:/\\\)/},this.popRule({token:"punctuation.macro-parameter-value-parenthetical.end.csound",regex:/\)/}),this.pushRule({token:"punctuation.macro-parameter-value-parenthetical.begin.csound",regex:/\(/,next:"macro parameter value parenthetical"}),t]}};r.inherits(s,i),function(){this.pushRule=function(e){if(Array.isArray(e.next))for(var t=0;t1?r[r.length-1]:r.pop(),e.token}}}}.call(s.prototype),t.CsoundPreprocessorHighlightRules=s}),ace.define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules,s=function(e){i.call(this,e),this.quotedStringContents.push({token:"invalid.illegal.csound-score",regex:/[^"]*$/});var t=this.$rules.start;t.push({token:"keyword.control.csound-score",regex:/[aBbCdefiqstvxy]/},{token:"invalid.illegal.csound-score",regex:/w/},{token:"constant.numeric.language.csound-score",regex:/z/},{token:["keyword.control.csound-score","constant.numeric.integer.decimal.csound-score"],regex:/([nNpP][pP])(\d+)/},{token:"keyword.other.csound-score",regex:/[mn]/,push:[{token:"empty",regex:/$/,next:"pop"},this.comments,{token:"entity.name.label.csound-score",regex:/[A-Z_a-z]\w*/}]},{token:"keyword.preprocessor.csound-score",regex:/r\b/,next:"repeat section"},this.numbers,{token:"keyword.operator.csound-score",regex:"[!+\\-*/^%&|<>#~.]"},this.pushRule({token:"punctuation.definition.string.begin.csound-score",regex:/"/,next:"quoted string"}),this.pushRule({token:"punctuation.braced-loop.begin.csound-score",regex:/{/,next:"loop after left brace"})),this.addRules({"repeat section":[{token:"empty",regex:/$/,next:"start"},this.comments,{token:"constant.numeric.integer.decimal.csound-score",regex:/\d+/,next:"repeat section before label"}],"repeat section before label":[{token:"empty",regex:/$/,next:"start"},this.comments,{token:"entity.name.label.csound-score",regex:/[A-Z_a-z]\w*/,next:"start"}],"quoted string":[this.popRule({token:"punctuation.definition.string.end.csound-score",regex:/"/}),this.quotedStringContents,{defaultToken:"string.quoted.csound-score"}],"loop after left brace":[this.popRule({token:"constant.numeric.integer.decimal.csound-score",regex:/\d+/,next:"loop after repeat count"}),this.comments,{token:"invalid.illegal.csound",regex:/\S.*/}],"loop after repeat count":[this.popRule({token:"entity.name.function.preprocessor.csound-score",regex:/[A-Z_a-z]\w*\b/,next:"loop after macro name"}),this.comments,{token:"invalid.illegal.csound",regex:/\S.*/}],"loop after macro name":[t,this.popRule({token:"punctuation.braced-loop.end.csound-score",regex:/}/})]}),this.normalizeRules()};r.inherits(s,i),t.CsoundScoreHighlightRules=s}),ace.define("ace/mode/csound_score",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_score_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./csound_score_highlight_rules").CsoundScoreHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/csound_score"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/csound_score"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-csp.js b/mixly/common/modules/web-modules/ace/mode-csp.js new file mode 100644 index 00000000..1b9c8f44 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-csp.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language":"child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri",variable:"'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'"},"identifier",!0);this.$rules={start:[{token:"string.link",regex:/https?:[^;\s]*/},{token:"operator.punctuation",regex:/;/},{token:e,regex:/[^\s;]+/}]}};r.inherits(s,i),t.CspHighlightRules=s}),ace.define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./text").Mode,i=e("./csp_highlight_rules").CspHighlightRules,s=e("../lib/oop"),o=function(){this.HighlightRules=i};s.inherits(o,r),function(){this.$id="ace/mode/csp"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/csp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-css.js b/mixly/common/modules/web-modules/ace/mode-css.js new file mode 100644 index 00000000..1e1d0a1d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-css.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}); (function() { + ace.require(["ace/mode/css"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-csv.js b/mixly/common/modules/web-modules/ace/mode-csv.js new file mode 100644 index 00000000..3387bb08 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-csv.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/csv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){i.call(this)};r.inherits(s,i),t.CsvHighlightRules=s}),ace.define("ace/mode/csv",["require","exports","module","ace/lib/oop","ace/mode/text","ace/lib/lang","ace/mode/csv_highlight_rules"],function(e,t,n){"use strict";function f(e,t,n){var r=[],i=e.split(n.separatorRegex),s=n.spliter,o=n.quote||'"',u=(t||"start").split("-"),f=parseInt(u[1])||0,l=u[0]=="string",c=!l;for(var h=0;h))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=function(){i.call(this),this.$rules.start.unshift({token:"variable",regex:"{{",push:"curly-start"}),this.$rules["curly-start"]=[{token:"variable",regex:"}}",next:"pop"}],this.normalizeRules()};r.inherits(s,i),t.CurlyHighlightRules=s}),ace.define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/folding/html","ace/mode/curly_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./folding/html").FoldMode,u=e("./curly_highlight_rules").CurlyHighlightRules,a=function(){i.call(this),this.HighlightRules=u,this.$outdent=new s,this.foldingRules=new o};r.inherits(a,i),function(){this.$id="ace/mode/curly"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/curly"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-cuttlefish.js b/mixly/common/modules/web-modules/ace/mode-cuttlefish.js new file mode 100644 index 00000000..ce17a085 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-cuttlefish.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/cuttlefish_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["text","comment"],regex:/^([ \t]*)(#.*)$/},{token:["text","keyword","text","string","text","comment"],regex:/^([ \t]*)(include)([ \t]*)([A-Za-z0-9-\_\.\*\/]+)([ \t]*)(#.*)?$/},{token:["text","keyword","text","operator","text","string","text","comment"],regex:/^([ \t]*)([A-Za-z0-9-_]+(?:\.[A-Za-z0-9-_]+)*)([ \t]*)(=)([ \t]*)([^ \t#][^#]*?)([ \t]*)(#.*)?$/},{defaultToken:"invalid"}]},this.normalizeRules()};s.metaData={fileTypes:["conf"],keyEquivalent:"^~C",name:"Cuttlefish",scopeName:"source.conf"},r.inherits(s,i),t.CuttlefishHighlightRules=s}),ace.define("ace/mode/cuttlefish",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cuttlefish_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cuttlefish_highlight_rules").CuttlefishHighlightRules,o=function(){this.HighlightRules=s,this.foldingRules=null,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.blockComment=null,this.$id="ace/mode/cuttlefish"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/cuttlefish"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-d.js b/mixly/common/modules/web-modules/ace/mode-d.js new file mode 100644 index 00000000..b3028ac8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-d.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters",t="break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|return|switch|while|catch|try|throw|finally|version|assert|unittest|with",n="auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|cfloat|creal|cdouble|cent|ifloat|ireal|idouble|int|long|short|void|uint|ulong|ushort|ucent|function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object",r="abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|ref|immutable|lazy|nothrow|override|package|pragma|private|protected|public|pure|scope|shared|__gshared|synchronized|static|volatile",s="class|struct|union|template|interface|enum|macro",o={token:"constant.language.escape",regex:"\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))"},u="null|true|false|__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__",a="/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#",f=this.$keywords=this.createKeywordMapper({"keyword.modifier":r,"keyword.control":t,"keyword.type":n,keyword:e,"keyword.storage":s,punctation:"\\.|\\,|;|\\.\\.|\\.\\.\\.","keyword.operator":a,"constant.language":u},"identifier"),l="[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"star-comment"},{token:"comment.shebang",regex:"^\\s*#!.*"},{token:"comment",regex:"\\/\\+",next:"plus-comment"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[\\[\\(\\{\\<]+)',next:"operator-heredoc-string"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[a-zA-Z_]+)$',next:"identifier-heredoc-string"},{token:"string",regex:'[xr]?"',next:"quote-string"},{token:"string",regex:"[xr]?`",next:"backtick-string"},{token:"string",regex:"[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"},{token:["keyword","text","paren.lparen"],regex:/(asm)(\s*)({)/,next:"d-asm"},{token:["keyword","text","paren.lparen","constant.language"],regex:"(__traits)(\\s*)(\\()("+l+")"},{token:["keyword","text","variable.module"],regex:"(import|module)(\\s+)((?:"+l+"\\.?)*)"},{token:["keyword.storage","text","entity.name.type"],regex:"("+s+")(\\s*)("+l+")"},{token:["keyword","text","variable.storage","text"],regex:"(alias|typedef)(\\s*)("+l+")(\\s*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"},{token:"entity.other.attribute-name",regex:"@"+l},{token:f,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:a},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.|\\:"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],"star-comment":[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],"plus-comment":[{token:"comment",regex:"\\+\\/",next:"start"},{defaultToken:"comment"}],"quote-string":[o,{token:"string",regex:'"[cdw]?',next:"start"},{defaultToken:"string"}],"backtick-string":[o,{token:"string",regex:"`[cdw]?",next:"start"},{defaultToken:"string"}],"operator-heredoc-string":[{onMatch:function(e,t,n){e=e.substring(e.length-2,e.length-1);var r={">":"<","]":"[",")":"(","}":"{"};return Object.keys(r).indexOf(e)!=-1&&(e=r[e]),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'(?:[\\]\\)}>]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"identifier-heredoc-string":[{onMatch:function(e,t,n){return e=e.substring(0,e.length-1),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'^(?:[A-Za-z_][a-zA-Z0-9]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"d-asm":[{token:"paren.rparen",regex:"\\}",next:"start"},{token:"keyword.instruction",regex:"[a-zA-Z]+",next:"d-asm-instruction"},{token:"text",regex:"\\s+"}],"d-asm-instruction":[{token:"constant.language",regex:/AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i},{token:"identifier",regex:"[a-zA-Z]+"},{token:"string",regex:'"[^"]*"'},{token:"comment",regex:"//.*$"},{token:"constant.numeric",regex:"[0-9.xA-F]+"},{token:"punctuation.operator",regex:"\\,"},{token:"punctuation.operator",regex:";",next:"d-asm"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};o.metaData={comment:"D language",fileTypes:["d","di"],firstLineMatch:"^#!.*\\b[glr]?dmd\\b.",foldingStartMarker:"(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))",foldingStopMarker:"(?f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./d_highlight_rules").DHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/d"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/d"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-dart.js b/mixly/common/modules/web-modules/ace/mode-dart.js new file mode 100644 index 00000000..b2d84fe5 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-dart.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|class|wchar_t|template|char16_t|char32_t",r="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local",s="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="true|false|null",t="this|super",n="try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await",r="abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum",s="static|final|const",o="void|bool|num|int|double|dynamic|var|String",u=this.createKeywordMapper({"constant.language.dart":e,"variable.language.dart":t,"keyword.control.dart":n,"keyword.declaration.dart":r,"storage.modifier.dart":s,"storage.type.primitive.dart":o},"identifier"),a=[{token:"constant.language.escape",regex:/\\./},{token:"text",regex:/\$(?:\w+|{[^"'}]+})?/},{defaultToken:"string"}];this.$rules={start:[{token:"comment",regex:/\/\/.*$/},i.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:["meta.preprocessor.script.dart"],regex:"^(#!.*)$"},{token:"keyword.other.import.dart",regex:"(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)"},{token:["keyword.other.import.dart","text"],regex:"(?:\\b)(prefix)(\\s*:)"},{regex:"\\bas\\b",token:"keyword.cast.dart"},{regex:"\\?|:",token:"keyword.control.ternary.dart"},{regex:"(?:\\b)(is\\!?)(?:\\b)",token:["keyword.operator.dart"]},{regex:"(<<|>>>?|~|\\^|\\||&)",token:["keyword.operator.bitwise.dart"]},{regex:"((?:&|\\^|\\||<<|>>>?)=)",token:["keyword.operator.assignment.bitwise.dart"]},{regex:"(===?|!==?|<=?|>=?)",token:["keyword.operator.comparison.dart"]},{regex:"((?:[+*/%-]|\\~)=)",token:["keyword.operator.assignment.arithmetic.dart"]},{regex:"=",token:"keyword.operator.assignment.dart"},{token:"string",regex:"'''",next:"qdoc"},{token:"string",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{regex:"(\\-\\-|\\+\\+)",token:["keyword.operator.increment-decrement.dart"]},{regex:"(\\-|\\+|\\*|\\/|\\~\\/|%)",token:["keyword.operator.arithmetic.dart"]},{regex:"(!|&&|\\|\\|)",token:["keyword.operator.logical.dart"]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:u,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qdoc:[{token:"string",regex:"'''",next:"start"}].concat(a),qqdoc:[{token:"string",regex:'"""',next:"start"}].concat(a),qstring:[{token:"string",regex:"'|$",next:"start"}].concat(a),qqstring:[{token:"string",regex:'"|$',next:"start"}].concat(a)},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.DartHighlightRules=o}),ace.define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./dart_highlight_rules").DartHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/dart",this.snippetFileId="ace/snippets/dart"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/dart"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-diff.js b/mixly/common/modules/web-modules/ace/mode-diff.js new file mode 100644 index 00000000..e61e053c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-diff.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./html").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant",regex:"[0-9]+"},{token:"variable",regex:"[-_a-zA-Z0-9:]+"}],tag:[{token:"entity.name.function",regex:"[a-zA-Z][_a-zA-Z0-9]*",next:"start"}]}};r.inherits(u,o);var a=function(){this.$rules=(new s).getRules();for(var e in this.$rules)this.$rules[e].unshift({token:"comment.line",regex:"\\{#.*?#\\}"},{token:"comment.block",regex:"\\{\\%\\s*comment\\s*\\%\\}",merge:!0,next:"django-comment"},{token:"constant.language",regex:"\\{\\{",next:"django-start"},{token:"constant.language",regex:"\\{\\%",next:"django-tag"}),this.embedRules(u,"django-",[{token:"comment.block",regex:"\\{\\%\\s*endcomment\\s*\\%\\}",merge:!0,next:"start"},{token:"constant.language",regex:"\\%\\}",next:"start"},{token:"constant.language",regex:"\\}\\}",next:"start"}])};r.inherits(a,s);var f=function(){i.call(this),this.HighlightRules=a};r.inherits(f,i),function(){this.$id="ace/mode/django",this.snippetFileId="ace/snippets/django"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/django"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-dockerfile.js b/mixly/common/modules/web-modules/ace/mode-dockerfile.js new file mode 100644 index 00000000..93fdd510 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-dockerfile.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};r.inherits(u,i),t.ShHighlightRules=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./sh_highlight_rules").ShHighlightRules,s=function(){i.call(this);var e=this.$rules.start;for(var t=0;t/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}};r.inherits(u,s),t.DotHighlightRules=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./dot_highlight_rules").DotHighlightRules,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=o,this.$outdent=new s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/dot"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/dot"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-drools.js b/mixly/common/modules/web-modules/ace/mode-drools.js new file mode 100644 index 00000000..80f6b043 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-drools.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[a-zA-Z_$][a-zA-Z0-9_$]*",t="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|var|exports|opens|requires|uses|yield|module|permits|(?:non\\-)?sealed|var|provides|to|when|open|record|transitive|with",n="null|Infinity|NaN|undefined",r="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",s=this.createKeywordMapper({"variable.language":"this","constant.language":n,"support.function":r},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",next:[{regex:"}",token:"paren.rparen",next:"start"},{regex:"\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",token:"keyword"}]},{token:"text",regex:"\\s+"},{token:"identifier",regex:"\\w+"},{token:"punctuation.operator",regex:"."},{token:"text",regex:"\\s+"},{regex:"",next:"start"}]},{include:"statements"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],strings:[{token:["punctuation","string"],regex:/(\.)(")/,push:[{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"string",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}],"multiline-strings":[{token:["punctuation","string"],regex:/(\.)(""")/,push:[{token:"string",regex:'"""',next:"pop"},{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:'"""',push:[{token:"string",regex:'"""',next:"pop"},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]}],constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+e+")\\b"},{token:"keyword",regex:"(?:"+t+")\\b"},{token:"storage.type.annotation",regex:"@"+e+"\\b"},{token:"entity.name.function",regex:e+"(?=\\()"},{token:s,regex:e+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.JavaHighlightRules=o}),ace.define("ace/mode/drools_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/java_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./java_highlight_rules").JavaHighlightRules,o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,u="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",a="[a-zA-Z\\$_\u00a1-\uffff][\\.a-zA-Z\\d\\$_\u00a1-\uffff]*",f=function(){var e="date|effective|expires|lock|on|active|no|loop|auto|focus|activation|group|agenda|ruleflow|duration|timer|calendars|refract|direct|dialect|salience|enabled|attributes|extends|template|function|contains|matches|eval|excludes|soundslike|memberof|not|in|or|and|exists|forall|over|from|entry|point|accumulate|acc|collect|action|reverse|result|end|init|instanceof|extends|super|boolean|char|byte|short|int|long|float|double|this|void|class|new|case|final|if|else|for|while|do|default|try|catch|finally|switch|synchronized|return|throw|break|continue|assert|modify|static|public|protected|private|abstract|native|transient|volatile|strictfp|throws|interface|enum|implements|type|window|trait|no-loop|str",t="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":"null","support.class":t,"support.function":"retract|update|modify|insert"},"identifier"),r=function(){return[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}]},i=function(e){return[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:e},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}]},f=function(e){return[{token:"comment.block",regex:"\\*\\/",next:e},{defaultToken:"comment.block"}]},l=function(){return[{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]};this.$rules={start:[].concat(i("block.comment"),[{token:"entity.name.type",regex:"@[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:["keyword","text","entity.name.type"],regex:"(package)(\\s+)("+a+")"},{token:["keyword","text","keyword","text","entity.name.type"],regex:"(import)(\\s+)(function)(\\s+)("+a+")"},{token:["keyword","text","entity.name.type"],regex:"(import)(\\s+)("+a+")"},{token:["keyword","text","entity.name.type","text","variable"],regex:"(global)(\\s+)("+a+")(\\s+)("+u+")"},{token:["keyword","text","keyword","text","entity.name.type"],regex:"(declare)(\\s+)(trait)(\\s+)("+u+")"},{token:["keyword","text","entity.name.type"],regex:"(declare)(\\s+)("+u+")"},{token:["keyword","text","entity.name.type"],regex:"(extends)(\\s+)("+a+")"},{token:["keyword","text"],regex:"(rule)(\\s+)",next:"asset.name"}],r(),[{token:["variable.other","text","text"],regex:"("+u+")(\\s*)(:)"},{token:["keyword","text"],regex:"(query)(\\s+)",next:"asset.name"},{token:["keyword","text"],regex:"(when)(\\s*)"},{token:["keyword","text"],regex:"(then)(\\s*)",next:"java-start"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],l()),"block.comment":f("start"),"asset.name":[{token:"entity.name",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"entity.name",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"entity.name",regex:u},{regex:"",token:"empty",next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")]),this.embedRules(s,"java-",[{token:"support.function",regex:"\\b(insert|modify|retract|update)\\b"},{token:"keyword",regex:"\\bend\\b",next:"start"}])};r.inherits(f,i),t.DroolsHighlightRules=f}),ace.define("ace/mode/folding/drools",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,s),function(){this.foldingStartMarker=/\b(rule|declare|query|when|then)\b/,this.foldingStopMarker=/\bend\b/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),s=r.match(this.foldingStartMarker);if(s){var u=s.index;if(s[1]){var a={row:n,column:r.length},f=new o(e,a.row,a.column),l="end",c=f.getCurrentToken();c.value=="when"&&(l="then");while(c){if(c.value==l)return i.fromPoints(a,{row:f.getCurrentTokenRow(),column:f.getCurrentTokenColumn()});c=f.stepForward()}}}}}.call(u.prototype)}),ace.define("ace/mode/drools",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/drools_highlight_rules","ace/mode/folding/drools"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./drools_highlight_rules").DroolsHighlightRules,o=e("./folding/drools").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/drools",this.snippetFileId="ace/snippets/drools"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/drools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-edifact.js b/mixly/common/modules/web-modules/ace/mode-edifact.js new file mode 100644 index 00000000..216fd836 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-edifact.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/edifact_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="UNH",t="ADR|AGR|AJT|ALC|ALI|APP|APR|ARD|ARR|ASI|ATT|AUT|BAS|BGM|BII|BUS|CAV|CCD|CCI|CDI|CDS|CDV|CED|CIN|CLA|CLI|CMP|CNI|CNT|COD|COM|COT|CPI|CPS|CPT|CST|CTA|CUX|DAM|DFN|DGS|DII|DIM|DLI|DLM|DMS|DOC|DRD|DSG|DSI|DTM|EDT|EFI|ELM|ELU|ELV|EMP|EQA|EQD|EQN|ERC|ERP|EVE|FCA|FII|FNS|FNT|FOR|FSQ|FTX|GDS|GEI|GID|GIN|GIR|GOR|GPO|GRU|HAN|HYN|ICD|IDE|IFD|IHC|IMD|IND|INP|INV|IRQ|LAN|LIN|LOC|MEA|MEM|MKS|MOA|MSG|MTD|NAD|NAT|PAC|PAI|PAS|PCC|PCD|PCI|PDI|PER|PGI|PIA|PNA|POC|PRC|PRI|PRV|PSD|PTY|PYT|QRS|QTY|QUA|QVR|RCS|REL|RFF|RJL|RNG|ROD|RSL|RTE|SAL|SCC|SCD|SEG|SEL|SEQ|SFI|SGP|SGU|SPR|SPS|STA|STC|STG|STS|TAX|TCC|TDT|TEM|TMD|TMP|TOD|TPL|TRU|TSR|UNB|UNZ|UNT|UGH|UGT|UNS|VLI",e="UNH",n="null|Infinity|NaN|undefined",r="",s="BY|SE|ON|INV|JP|UNOA",o=this.createKeywordMapper({"variable.language":"this",keyword:s,"entity.name.segment":t,"entity.name.header":e,"constant.language":n,"support.function":r},"identifier");this.$rules={start:[{token:"punctuation.operator",regex:"\\+.\\+"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+"},{token:"punctuation.operator",regex:"\\:|'"},{token:"identifier",regex:"\\:D\\:"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};o.metaData={fileTypes:["edi"],keyEquivalent:"^~E",name:"Edifact",scopeName:"source.edifact"},r.inherits(o,s),t.EdifactHighlightRules=o}),ace.define("ace/mode/edifact",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/edifact_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./edifact_highlight_rules").EdifactHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/edifact",this.snippetFileId="ace/snippets/edifact"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/edifact"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-eiffel.js b/mixly/common/modules/web-modules/ace/mode-eiffel.js new file mode 100644 index 00000000..9a75ce9d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-eiffel.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="across|agent|alias|all|attached|as|assign|attribute|check|class|convert|create|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|Precursor|redefine|rename|require|rescue|retry|select|separate|some|then|undefine|until|variant|when",t="and|implies|or|xor",n="Void",r="True|False",i="Current|Result",s=this.createKeywordMapper({"constant.language":n,"constant.language.boolean":r,"variable.language":i,"keyword.operator":t,keyword:e},"identifier",!0),o=/(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;this.$rules={start:[{token:"string.quoted.other",regex:/"\[/,next:"aligned_verbatim_string"},{token:"string.quoted.other",regex:/"\{/,next:"non-aligned_verbatim_string"},{token:"string.quoted.double",regex:/"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/},{token:"comment.line.double-dash",regex:/--.*/},{token:"constant.character",regex:/'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/},{token:"constant.numeric",regex:/\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/},{token:"constant.numeric",regex:/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/},{token:"paren.lparen",regex:/[\[({]|<<|\|\(/},{token:"paren.rparen",regex:/[\])}]|>>|\|\)/},{token:"keyword.operator",regex:/:=|->|\.(?=\w)|[;,:?]/},{token:"keyword.operator",regex:/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/},{token:function(e){var t=s(e);return t==="identifier"&&e===e.toUpperCase()&&(t="entity.name.type"),t},regex:/[a-zA-Z][a-zA-Z\d_]*\b/},{token:"text",regex:/\s+/}],aligned_verbatim_string:[{token:"string",regex:/]"/,next:"start"},{token:"string",regex:o}],"non-aligned_verbatim_string":[{token:"string.quoted.other",regex:/}"/,next:"start"},{token:"string.quoted.other",regex:o}]}};r.inherits(s,i),t.EiffelHighlightRules=s}),ace.define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./eiffel_highlight_rules").EiffelHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/eiffel"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/eiffel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ejs.js b/mixly/common/modules/web-modules/ace/mode-ejs.js new file mode 100644 index 00000000..f30d3ffa --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ejs.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};r.inherits(d,i),t.RubyHighlightRules=d}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={"class":1,def:1,module:1,"do":1,unless:1,"if":1,"while":1,"for":1,until:1,begin:1,"else":0,elsif:0,rescue:0,ensure:0,when:0,end:-1,"case":1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=function(e,t){i.call(this),e||(e="(?:<%|<\\?|{{)"),t||(t="(?:%>|\\?>|}})");for(var n in this.$rules)this.$rules[n].unshift({token:"markup.list.meta.tag",regex:e+"(?![>}])[-=]?",push:"ejs-start"});this.embedRules((new s({jsx:!1})).getRules(),"ejs-",[{token:"markup.list.meta.tag",regex:"-?"+t,next:"pop"},{token:"comment",regex:"//.*?"+t,next:"pop"}]),this.normalizeRules()};r.inherits(o,i),t.EjsHighlightRules=o;var r=e("../lib/oop"),u=e("./html").Mode,a=e("./javascript").Mode,f=e("./css").Mode,l=e("./ruby").Mode,c=function(){u.call(this),this.HighlightRules=o,this.createModeDelegates({"js-":a,"css-":f,"ejs-":a})};r.inherits(c,u),function(){this.$id="ace/mode/ejs"}.call(c.prototype),t.Mode=c}); (function() { + ace.require(["ace/mode/ejs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-elixir.js b/mixly/common/modules/web-modules/ace/mode-elixir.js new file mode 100644 index 00000000..5e386e0c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-elixir.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["meta.module.elixir","keyword.control.module.elixir","meta.module.elixir","entity.name.type.module.elixir"],regex:"^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)"},{token:"comment.documentation.heredoc",regex:'@(?:module|type)?doc (?:~[a-z])?"""',push:[{token:"comment.documentation.heredoc",regex:'\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:'@(?:module|type)?doc ~[A-Z]"""',push:[{token:"comment.documentation.heredoc",regex:'\\s*"""',next:"pop"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:"@(?:module|type)?doc (?:~[a-z])?'''",push:[{token:"comment.documentation.heredoc",regex:"\\s*'''",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:"@(?:module|type)?doc ~[A-Z]'''",push:[{token:"comment.documentation.heredoc",regex:"\\s*'''",next:"pop"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.false",regex:"@(?:module|type)?doc false",comment:"@doc false is treated as documentation"},{token:"comment.documentation.string",regex:'@(?:module|type)?doc "',push:[{token:"comment.documentation.string",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.string"}],comment:"@doc with string is treated as documentation"},{token:"keyword.control.elixir",regex:"\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b"},{token:"punctuation.definition.constant.elixir",regex:":'",push:[{token:"punctuation.definition.constant.elixir",regex:"'",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"constant.other.symbol.single-quoted.elixir"}]},{token:"punctuation.definition.constant.elixir",regex:':"',push:[{token:"punctuation.definition.constant.elixir",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"constant.other.symbol.double-quoted.elixir"}]},{token:"punctuation.definition.string.begin.elixir",regex:"(?:''')",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?>''')",push:[{token:"punctuation.definition.string.end.elixir",regex:"^\\s*'''",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"support.function.variable.quoted.single.heredoc.elixir"}],comment:"Single-quoted heredocs"},{token:"punctuation.definition.string.begin.elixir",regex:"'",push:[{token:"punctuation.definition.string.end.elixir",regex:"'",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"support.function.variable.quoted.single.elixir"}],comment:"single quoted string (allows for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'(?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'(?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.heredoc.elixir"}],comment:"Double-quoted heredocs"},{token:"punctuation.definition.string.begin.elixir",regex:'"',push:[{token:"punctuation.definition.string.end.elixir",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.elixir"}],comment:"double quoted string (allows for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'~[a-z](?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'~[a-z](?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.heredoc.elixir"}],comment:"Double-quoted heredocs sigils"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\{",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\}[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\[",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\][a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\<",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\>[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\(",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\)[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z][^\\w]",push:[{token:"punctuation.definition.string.end.elixir",regex:"[^\\w][a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'~[A-Z](?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'~[A-Z](?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"Double-quoted heredocs sigils"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\{",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\}[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\[",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\][a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\<",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\>[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\(",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\)[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z][^\\w]",push:[{token:"punctuation.definition.string.end.elixir",regex:"[^\\w][a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:["punctuation.definition.constant.elixir","constant.other.symbol.elixir"],regex:"(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)",comment:"symbols"},{token:"punctuation.definition.constant.elixir",regex:"(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)",comment:"symbols"},{token:["punctuation.definition.comment.elixir","comment.line.number-sign.elixir"],regex:"(#)(.*)"},{token:"constant.numeric.elixir",regex:"\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?=?"},{token:"keyword.operator.bitwise.elixir",regex:"\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}"},{token:"keyword.operator.logical.elixir",regex:"!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b",originalRegex:"(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b"},{token:"keyword.operator.arithmetic.elixir",regex:"\\*|\\+|\\-|/"},{token:"keyword.operator.other.elixir",regex:"\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>"},{token:"keyword.operator.assignment.elixir",regex:"="},{token:"punctuation.separator.other.elixir",regex:":"},{token:"punctuation.separator.statement.elixir",regex:"\\;"},{token:"punctuation.separator.object.elixir",regex:","},{token:"punctuation.separator.method.elixir",regex:"\\."},{token:"punctuation.section.scope.elixir",regex:"\\{|\\}"},{token:"punctuation.section.array.elixir",regex:"\\[|\\]"},{token:"punctuation.section.function.elixir",regex:"\\(|\\)"}],"#escaped_char":[{token:"constant.character.escape.elixir",regex:"\\\\(?:x[\\da-fA-F]{1,2}|.)"}],"#interpolated_elixir":[{token:["source.elixir.embedded.source","source.elixir.embedded.source.empty"],regex:"(#\\{)(\\})"},{todo:{token:"punctuation.section.embedded.elixir",regex:"#\\{",push:[{token:"punctuation.section.embedded.elixir",regex:"\\}",next:"pop"},{include:"#nest_curly_and_self"},{include:"$self"},{defaultToken:"source.elixir.embedded.source"}]}}],"#nest_curly_and_self":[{token:"punctuation.section.scope.elixir",regex:"\\{",push:[{token:"punctuation.section.scope.elixir",regex:"\\}",next:"pop"},{include:"#nest_curly_and_self"}]},{include:"$self"}],"#regex_sub":[{include:"#interpolated_elixir"},{include:"#escaped_char"},{token:["punctuation.definition.arbitrary-repitition.elixir","string.regexp.arbitrary-repitition.elixir","string.regexp.arbitrary-repitition.elixir","punctuation.definition.arbitrary-repitition.elixir"],regex:"(\\{)(\\d+)((?:,\\d+)?)(\\})"},{token:"punctuation.definition.character-class.elixir",regex:"\\[(?:\\^?\\])?",push:[{token:"punctuation.definition.character-class.elixir",regex:"\\]",next:"pop"},{include:"#escaped_char"},{defaultToken:"string.regexp.character-class.elixir"}]},{token:"punctuation.definition.group.elixir",regex:"\\(",push:[{token:"punctuation.definition.group.elixir",regex:"\\)",next:"pop"},{include:"#regex_sub"},{defaultToken:"string.regexp.group.elixir"}]},{token:["punctuation.definition.comment.elixir","comment.line.number-sign.elixir"],regex:"(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)",originalRegex:"(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$",comment:"We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags."}]},this.normalizeRules()};s.metaData={comment:"Textmate bundle for Elixir Programming Language.",fileTypes:["ex","exs"],firstLineMatch:"^#!/.*\\belixir",foldingStartMarker:"(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$",foldingStopMarker:"^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)",keyEquivalent:"^~E",name:"Elixir",scopeName:"source.elixir"},r.inherits(s,i),t.ElixirHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|<-|\u2192/},{token:"keyword.operator",regex:/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/},{token:"operator.punctuation",regex:/[,;`]/},{regex:r+i+"+\\.?",token:function(e){return e[e.length-1]=="."?"entity.name.function":"constant.language"}},{regex:"^"+n+i+"+",token:function(e){return"constant.language"}},{token:e,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{regex:"{-#?",token:"comment.start",onMatch:function(e,t,n){return this.next=e.length==2?"blockComment":"docComment",this.token}},{token:"variable.language",regex:/\[markdown\|/,next:"markdown"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],markdown:[{regex:/\|\]/,next:"start"},{defaultToken:"string"}],blockComment:[{regex:"{-",token:"comment.start",push:"blockComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"comment"}],docComment:[{regex:"{-",token:"comment.start",push:"docComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"doc.comment"}],string:[{token:"constant.language.escape",regex:t},{token:"text",regex:/\\(\s|$)/,next:"stringGap"},{token:"string.end",regex:'"',next:"start"},{defaultToken:"string"}],stringGap:[{token:"text",regex:/\\/,next:"string"},{token:"error",regex:"",next:"start"}]},this.normalizeRules()};r.inherits(s,i),t.ElmHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./elm_highlight_rules").ElmHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"{-",end:"-}",nestable:!0},this.$id="ace/mode/elm"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/elm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-erlang.js b/mixly/common/modules/web-modules/ace/mode-erlang.js new file mode 100644 index 00000000..e14341f6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-erlang.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#module-directive"},{include:"#import-export-directive"},{include:"#behaviour-directive"},{include:"#record-directive"},{include:"#define-directive"},{include:"#macro-directive"},{include:"#directive"},{include:"#function"},{include:"#everything-else"}],"#atom":[{token:"punctuation.definition.symbol.begin.erlang",regex:"'",push:[{token:"punctuation.definition.symbol.end.erlang",regex:"'",next:"pop"},{token:["punctuation.definition.escape.erlang","constant.other.symbol.escape.erlang","punctuation.definition.escape.erlang","constant.other.symbol.escape.erlang","constant.other.symbol.escape.erlang"],regex:"(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.atom.erlang",regex:"\\\\\\^?.?"},{defaultToken:"constant.other.symbol.quoted.single.erlang"}]},{token:"constant.other.symbol.unquoted.erlang",regex:"[a-z][a-zA-Z\\d@_]*"}],"#behaviour-directive":[{token:["meta.directive.behaviour.erlang","punctuation.section.directive.begin.erlang","meta.directive.behaviour.erlang","keyword.control.directive.behaviour.erlang","meta.directive.behaviour.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.behaviour.erlang","entity.name.type.class.behaviour.definition.erlang","meta.directive.behaviour.erlang","punctuation.definition.parameters.end.erlang","meta.directive.behaviour.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)"}],"#binary":[{token:"punctuation.definition.binary.begin.erlang",regex:"<<",push:[{token:"punctuation.definition.binary.end.erlang",regex:">>",next:"pop"},{token:["punctuation.separator.binary.erlang","punctuation.separator.value-size.erlang"],regex:"(,)|(:)"},{include:"#internal-type-specifiers"},{include:"#everything-else"},{defaultToken:"meta.structure.binary.erlang"}]}],"#character":[{token:["punctuation.definition.character.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","constant.character.escape.erlang"],regex:"(\\$)(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.character.erlang",regex:"\\$\\\\\\^?.?"},{token:["punctuation.definition.character.erlang","constant.character.erlang"],regex:"(\\$)(\\S)"},{token:"invalid.illegal.character.erlang",regex:"\\$.?"}],"#comment":[{token:"punctuation.definition.comment.erlang",regex:"%.*$",push_:[{token:"comment.line.percentage.erlang",regex:"$",next:"pop"},{defaultToken:"comment.line.percentage.erlang"}]}],"#define-directive":[{token:["meta.directive.define.erlang","punctuation.section.directive.begin.erlang","meta.directive.define.erlang","keyword.control.directive.define.erlang","meta.directive.define.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.define.erlang","entity.name.function.macro.definition.erlang","meta.directive.define.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.define.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.directive.define.erlang"}]},{token:"meta.directive.define.erlang",regex:"(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.define.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{token:["text","punctuation.section.directive.begin.erlang","text","keyword.control.directive.define.erlang","text","punctuation.definition.parameters.begin.erlang","text","entity.name.function.macro.definition.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()",push:[{token:["punctuation.definition.parameters.end.erlang","text","punctuation.separator.parameters.erlang"],regex:"(\\))(\\s*)(,)",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:"punctuation.separator.define.erlang",regex:"\\|\\||\\||:|;|,|\\.|->"},{include:"#everything-else"},{defaultToken:"meta.directive.define.erlang"}]}],"#directive":[{token:["meta.directive.erlang","punctuation.section.directive.begin.erlang","meta.directive.erlang","keyword.control.directive.erlang","meta.directive.erlang","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.erlang","punctuation.section.directive.end.erlang"],regex:"(\\)?)(\\s*)(\\.)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.directive.erlang"}]},{token:["meta.directive.erlang","punctuation.section.directive.begin.erlang","meta.directive.erlang","keyword.control.directive.erlang","meta.directive.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)"}],"#everything-else":[{include:"#comment"},{include:"#record-usage"},{include:"#macro-usage"},{include:"#expression"},{include:"#keyword"},{include:"#textual-operator"},{include:"#function-call"},{include:"#tuple"},{include:"#list"},{include:"#binary"},{include:"#parenthesized-expression"},{include:"#character"},{include:"#number"},{include:"#atom"},{include:"#string"},{include:"#symbolic-operator"},{include:"#variable"}],"#expression":[{token:"keyword.control.if.erlang",regex:"\\bif\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.if.erlang"}]},{token:"keyword.control.case.erlang",regex:"\\bcase\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.case.erlang"}]},{token:"keyword.control.receive.erlang",regex:"\\breceive\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.receive.erlang"}]},{token:["keyword.control.fun.erlang","text","entity.name.type.class.module.erlang","text","punctuation.separator.module-function.erlang","text","entity.name.function.erlang","text","punctuation.separator.function-arity.erlang"],regex:"\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)"},{token:"keyword.control.fun.erlang",regex:"\\bfun\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{token:"text",regex:"(?=\\()",push:[{token:"punctuation.separator.clauses.erlang",regex:";|(?=\\bend\\b)",next:"pop"},{include:"#internal-function-parts"}]},{include:"#everything-else"},{defaultToken:"meta.expression.fun.erlang"}]},{token:"keyword.control.try.erlang",regex:"\\btry\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.try.erlang"}]},{token:"keyword.control.begin.erlang",regex:"\\bbegin\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.begin.erlang"}]},{token:"keyword.control.query.erlang",regex:"\\bquery\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.expression.query.erlang"}]}],"#function":[{token:["meta.function.erlang","entity.name.function.definition.erlang","meta.function.erlang"],regex:"^(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(?=\\()",push:[{token:"punctuation.terminator.function.erlang",regex:"\\.",next:"pop"},{token:["text","entity.name.function.erlang","text"],regex:"^(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(?=\\()"},{token:"text",regex:"(?=\\()",push:[{token:"punctuation.separator.clauses.erlang",regex:";|(?=\\.)",next:"pop"},{include:"#parenthesized-expression"},{include:"#internal-function-parts"}]},{include:"#everything-else"},{defaultToken:"meta.function.erlang"}]}],"#function-call":[{token:"meta.function-call.erlang",regex:"(?=(?:[a-z][a-zA-Z\\d@_]*|'[^']*')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|'[^']*')\\s*\\())",push:[{token:"punctuation.definition.parameters.end.erlang",regex:"\\)",next:"pop"},{token:["entity.name.type.class.module.erlang","text","punctuation.separator.module-function.erlang","text","entity.name.function.guard.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()",push:[{token:"text",regex:"(?=\\))",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:["entity.name.type.class.module.erlang","text","punctuation.separator.module-function.erlang","text","entity.name.function.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"(?:([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(\\()",push:[{token:"text",regex:"(?=\\))",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{defaultToken:"meta.function-call.erlang"}]}],"#import-export-directive":[{token:["meta.directive.import.erlang","punctuation.section.directive.begin.erlang","meta.directive.import.erlang","keyword.control.directive.import.erlang","meta.directive.import.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.import.erlang","entity.name.type.class.module.erlang","meta.directive.import.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(,)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.import.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#internal-function-list"},{defaultToken:"meta.directive.import.erlang"}]},{token:["meta.directive.export.erlang","punctuation.section.directive.begin.erlang","meta.directive.export.erlang","keyword.control.directive.export.erlang","meta.directive.export.erlang","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)(export)(\\s*)(\\()",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.export.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#internal-function-list"},{defaultToken:"meta.directive.export.erlang"}]}],"#internal-expression-punctuation":[{token:["punctuation.separator.clause-head-body.erlang","punctuation.separator.clauses.erlang","punctuation.separator.expressions.erlang"],regex:"(->)|(;)|(,)"}],"#internal-function-list":[{token:"punctuation.definition.list.begin.erlang",regex:"\\[",push:[{token:"punctuation.definition.list.end.erlang",regex:"\\]",next:"pop"},{token:["entity.name.function.erlang","text","punctuation.separator.function-arity.erlang"],regex:"([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(/)",push:[{token:"punctuation.separator.list.erlang",regex:",|(?=\\])",next:"pop"},{include:"#everything-else"}]},{include:"#everything-else"},{defaultToken:"meta.structure.list.function.erlang"}]}],"#internal-function-parts":[{token:"text",regex:"(?=\\()",push:[{token:"punctuation.separator.clause-head-body.erlang",regex:"->",next:"pop"},{token:"punctuation.definition.parameters.begin.erlang",regex:"\\(",push:[{token:"punctuation.definition.parameters.end.erlang",regex:"\\)",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:"punctuation.separator.guards.erlang",regex:",|;"},{include:"#everything-else"}]},{token:"punctuation.separator.expressions.erlang",regex:","},{include:"#everything-else"}],"#internal-record-body":[{token:"punctuation.definition.class.record.begin.erlang",regex:"\\{",push:[{token:"meta.structure.record.erlang",regex:"(?=\\})",next:"pop"},{token:["variable.other.field.erlang","variable.language.omitted.field.erlang","text","keyword.operator.assignment.erlang"],regex:"(?:([a-z][a-zA-Z\\d@_]*|'[^']*')|(_))(\\s*)(=|::)",push:[{token:"punctuation.separator.class.record.erlang",regex:",|(?=\\})",next:"pop"},{include:"#everything-else"}]},{token:["variable.other.field.erlang","text","punctuation.separator.class.record.erlang"],regex:"([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)((?:,)?)"},{include:"#everything-else"},{defaultToken:"meta.structure.record.erlang"}]}],"#internal-type-specifiers":[{token:"punctuation.separator.value-type.erlang",regex:"/",push:[{token:"text",regex:"(?=,|:|>>)",next:"pop"},{token:["storage.type.erlang","storage.modifier.signedness.erlang","storage.modifier.endianness.erlang","storage.modifier.unit.erlang","punctuation.separator.type-specifiers.erlang"],regex:"(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)"}]}],"#keyword":[{token:"keyword.control.erlang",regex:"\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b"}],"#list":[{token:"punctuation.definition.list.begin.erlang",regex:"\\[",push:[{token:"punctuation.definition.list.end.erlang",regex:"\\]",next:"pop"},{token:"punctuation.separator.list.erlang",regex:"\\||\\|\\||,"},{include:"#everything-else"},{defaultToken:"meta.structure.list.erlang"}]}],"#macro-directive":[{token:["meta.directive.ifdef.erlang","punctuation.section.directive.begin.erlang","meta.directive.ifdef.erlang","keyword.control.directive.ifdef.erlang","meta.directive.ifdef.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.ifdef.erlang","entity.name.function.macro.erlang","meta.directive.ifdef.erlang","punctuation.definition.parameters.end.erlang","meta.directive.ifdef.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)"},{token:["meta.directive.ifndef.erlang","punctuation.section.directive.begin.erlang","meta.directive.ifndef.erlang","keyword.control.directive.ifndef.erlang","meta.directive.ifndef.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.ifndef.erlang","entity.name.function.macro.erlang","meta.directive.ifndef.erlang","punctuation.definition.parameters.end.erlang","meta.directive.ifndef.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)"},{token:["meta.directive.undef.erlang","punctuation.section.directive.begin.erlang","meta.directive.undef.erlang","keyword.control.directive.undef.erlang","meta.directive.undef.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.undef.erlang","entity.name.function.macro.erlang","meta.directive.undef.erlang","punctuation.definition.parameters.end.erlang","meta.directive.undef.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)"}],"#macro-usage":[{token:["keyword.operator.macro.erlang","meta.macro-usage.erlang","entity.name.function.macro.erlang"],regex:"(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)"}],"#module-directive":[{token:["meta.directive.module.erlang","punctuation.section.directive.begin.erlang","meta.directive.module.erlang","keyword.control.directive.module.erlang","meta.directive.module.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.module.erlang","entity.name.type.class.module.definition.erlang","meta.directive.module.erlang","punctuation.definition.parameters.end.erlang","meta.directive.module.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)"}],"#number":[{token:"text",regex:"(?=\\d)",push:[{token:"text",regex:"(?!\\d)",next:"pop"},{token:["constant.numeric.float.erlang","punctuation.separator.integer-float.erlang","constant.numeric.float.erlang","punctuation.separator.float-exponent.erlang"],regex:"(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)"},{token:["constant.numeric.integer.binary.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.binary.erlang"],regex:"(2)(#)([0-1]+)"},{token:["constant.numeric.integer.base-3.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-3.erlang"],regex:"(3)(#)([0-2]+)"},{token:["constant.numeric.integer.base-4.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-4.erlang"],regex:"(4)(#)([0-3]+)"},{token:["constant.numeric.integer.base-5.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-5.erlang"],regex:"(5)(#)([0-4]+)"},{token:["constant.numeric.integer.base-6.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-6.erlang"],regex:"(6)(#)([0-5]+)"},{token:["constant.numeric.integer.base-7.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-7.erlang"],regex:"(7)(#)([0-6]+)"},{token:["constant.numeric.integer.octal.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.octal.erlang"],regex:"(8)(#)([0-7]+)"},{token:["constant.numeric.integer.base-9.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-9.erlang"],regex:"(9)(#)([0-8]+)"},{token:["constant.numeric.integer.decimal.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.decimal.erlang"],regex:"(10)(#)(\\d+)"},{token:["constant.numeric.integer.base-11.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-11.erlang"],regex:"(11)(#)([\\daA]+)"},{token:["constant.numeric.integer.base-12.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-12.erlang"],regex:"(12)(#)([\\da-bA-B]+)"},{token:["constant.numeric.integer.base-13.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-13.erlang"],regex:"(13)(#)([\\da-cA-C]+)"},{token:["constant.numeric.integer.base-14.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-14.erlang"],regex:"(14)(#)([\\da-dA-D]+)"},{token:["constant.numeric.integer.base-15.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-15.erlang"],regex:"(15)(#)([\\da-eA-E]+)"},{token:["constant.numeric.integer.hexadecimal.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.hexadecimal.erlang"],regex:"(16)(#)([\\da-fA-F]+)"},{token:["constant.numeric.integer.base-17.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-17.erlang"],regex:"(17)(#)([\\da-gA-G]+)"},{token:["constant.numeric.integer.base-18.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-18.erlang"],regex:"(18)(#)([\\da-hA-H]+)"},{token:["constant.numeric.integer.base-19.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-19.erlang"],regex:"(19)(#)([\\da-iA-I]+)"},{token:["constant.numeric.integer.base-20.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-20.erlang"],regex:"(20)(#)([\\da-jA-J]+)"},{token:["constant.numeric.integer.base-21.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-21.erlang"],regex:"(21)(#)([\\da-kA-K]+)"},{token:["constant.numeric.integer.base-22.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-22.erlang"],regex:"(22)(#)([\\da-lA-L]+)"},{token:["constant.numeric.integer.base-23.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-23.erlang"],regex:"(23)(#)([\\da-mA-M]+)"},{token:["constant.numeric.integer.base-24.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-24.erlang"],regex:"(24)(#)([\\da-nA-N]+)"},{token:["constant.numeric.integer.base-25.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-25.erlang"],regex:"(25)(#)([\\da-oA-O]+)"},{token:["constant.numeric.integer.base-26.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-26.erlang"],regex:"(26)(#)([\\da-pA-P]+)"},{token:["constant.numeric.integer.base-27.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-27.erlang"],regex:"(27)(#)([\\da-qA-Q]+)"},{token:["constant.numeric.integer.base-28.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-28.erlang"],regex:"(28)(#)([\\da-rA-R]+)"},{token:["constant.numeric.integer.base-29.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-29.erlang"],regex:"(29)(#)([\\da-sA-S]+)"},{token:["constant.numeric.integer.base-30.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-30.erlang"],regex:"(30)(#)([\\da-tA-T]+)"},{token:["constant.numeric.integer.base-31.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-31.erlang"],regex:"(31)(#)([\\da-uA-U]+)"},{token:["constant.numeric.integer.base-32.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-32.erlang"],regex:"(32)(#)([\\da-vA-V]+)"},{token:["constant.numeric.integer.base-33.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-33.erlang"],regex:"(33)(#)([\\da-wA-W]+)"},{token:["constant.numeric.integer.base-34.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-34.erlang"],regex:"(34)(#)([\\da-xA-X]+)"},{token:["constant.numeric.integer.base-35.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-35.erlang"],regex:"(35)(#)([\\da-yA-Y]+)"},{token:["constant.numeric.integer.base-36.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-36.erlang"],regex:"(36)(#)([\\da-zA-Z]+)"},{token:"invalid.illegal.integer.erlang",regex:"\\d+#[\\da-zA-Z]+"},{token:"constant.numeric.integer.decimal.erlang",regex:"\\d+"}]}],"#parenthesized-expression":[{token:"punctuation.section.expression.begin.erlang",regex:"\\(",push:[{token:"punctuation.section.expression.end.erlang",regex:"\\)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.expression.parenthesized"}]}],"#record-directive":[{token:["meta.directive.record.erlang","punctuation.section.directive.begin.erlang","meta.directive.record.erlang","keyword.control.directive.import.erlang","meta.directive.record.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.record.erlang","entity.name.type.class.record.definition.erlang","meta.directive.record.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(,)",push:[{token:["punctuation.definition.class.record.end.erlang","meta.directive.record.erlang","punctuation.definition.parameters.end.erlang","meta.directive.record.erlang","punctuation.section.directive.end.erlang"],regex:"(\\})(\\s*)(\\))(\\s*)(\\.)",next:"pop"},{include:"#internal-record-body"},{defaultToken:"meta.directive.record.erlang"}]}],"#record-usage":[{token:["keyword.operator.record.erlang","meta.record-usage.erlang","entity.name.type.class.record.erlang","meta.record-usage.erlang","punctuation.separator.record-field.erlang","meta.record-usage.erlang","variable.other.field.erlang"],regex:"(#)(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')"},{token:["keyword.operator.record.erlang","meta.record-usage.erlang","entity.name.type.class.record.erlang"],regex:"(#)(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')",push:[{token:"punctuation.definition.class.record.end.erlang",regex:"\\}",next:"pop"},{include:"#internal-record-body"},{defaultToken:"meta.record-usage.erlang"}]}],"#string":[{token:"punctuation.definition.string.begin.erlang",regex:'"',push:[{token:"punctuation.definition.string.end.erlang",regex:'"',next:"pop"},{token:["punctuation.definition.escape.erlang","constant.character.escape.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","constant.character.escape.erlang"],regex:"(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.string.erlang",regex:"\\\\\\^?.?"},{token:["punctuation.definition.erlang","punctuation.separator.erlang","constant.other.erlang","punctuation.separator.erlang","punctuation.separator.erlang","constant.other.erlang","punctuation.separator.erlang","punctuation.separator.erlang","punctuation.separator.erlang","constant.other.erlang","constant.other.erlang"],regex:"(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])"},{token:["punctuation.definition.erlang","punctuation.separator.erlang","constant.other.erlang","constant.other.erlang"],regex:"(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])"},{token:"invalid.illegal.string.erlang",regex:"~.?"},{defaultToken:"string.quoted.double.erlang"}]}],"#symbolic-operator":[{token:"keyword.operator.symbolic.erlang",regex:"\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::"}],"#textual-operator":[{token:"keyword.operator.textual.erlang",regex:"\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b"}],"#tuple":[{token:"punctuation.definition.tuple.begin.erlang",regex:"\\{",push:[{token:"punctuation.definition.tuple.end.erlang",regex:"\\}",next:"pop"},{token:"punctuation.separator.tuple.erlang",regex:","},{include:"#everything-else"},{defaultToken:"meta.structure.tuple.erlang"}]}],"#variable":[{token:["variable.other.erlang","variable.language.omitted.erlang"],regex:"(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)"}]},this.normalizeRules()};s.metaData={comment:"The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp",fileTypes:["erl","hrl"],keyEquivalent:"^~E",name:"Erlang",scopeName:"source.erlang"},r.inherits(s,i),t.ErlangHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./erlang_highlight_rules").ErlangHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.blockComment=null,this.$id="ace/mode/erlang",this.snippetFileId="ace/snippets/erlang"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/erlang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-flix.js b/mixly/common/modules/web-modules/ace/mode-flix.js new file mode 100644 index 00000000..4425ccb1 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-flix.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/flix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="use|checked_cast|checked_ecast|unchecked_cast|masked_cast|as|discard|from|into|inject|project|solve|query|where|select|force|import|region|red|deref",t="choose|debug|do|for|forA|forM|foreach|yield|if|else|case|match|typematch|try|catch|resume|spawn|par|branch|jumpto",n="not|and|or|fix",r="eff|def|law|enum|case|type|alias|class|instance|mod|let",i="with|without|opaque|lazy|lawful|pub|override|sealed|static",s="Unit|Bool|Char|Float32|Float64|Int8|Int16|Int32|Int64|BigInt|String",o=this.createKeywordMapper({keyword:e,"keyword.control":t,"keyword.operator":n,"storage.type":r,"storage.modifier":i,"support.type":s},"identifier");this.$rules={start:[{token:"comment.line",regex:"\\/\\/.*$"},{token:"comment.block",regex:"\\/\\*",next:"comment"},{token:"string",regex:'"',next:"string"},{token:"string.regexp",regex:'regex"',next:"regex"},{token:"constant.character",regex:"'",next:"char"},{token:"constant.numeric",regex:"0x[a-fA-F0-9](_*[a-fA-F0-9])*(i8|i16|i32|i64|ii)?\\b"},{token:"constant.numeric",regex:"[0-9](_*[0-9])*\\.[0-9](_*[0-9])*(f32|f64)?\\b"},{token:"constant.numeric",regex:"[0-9](_*[0-9])*(i8|i16|i32|i64|ii)?\\b"},{token:"constant.language.boolean",regex:"(true|false)\\b"},{token:"constant.language",regex:"null\\b"},{token:"keyword.operator",regex:"\\->|~>|<\\-|=>"},{token:"storage.modifier",regex:"@(Deprecated|Experimental|Internal|ParallelWhenPure|Parallel|LazyWhenPure|Lazy|Skip|Test)\\b"},{token:"keyword",regex:"(\\?\\?\\?|\\?[a-zA-Z0-9]+)"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment.block",regex:"\\*\\/",next:"start"},{defaultToken:"comment.block"}],string:[{token:"constant.character.escape",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"string",regex:'"',next:"start"},{token:"string",regex:'[^"\\\\]+'}],regex:[{token:"constant.character.escape",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"string.regexp",regex:'"',next:"start"},{token:"string.regexp",regex:'[^"\\\\]+'}],"char":[{token:"constant.character.escape",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"constant.character",regex:"'",next:"start"},{token:"constant.character",regex:"[^'\\\\]+"}]}};r.inherits(s,i),t.FlixHighlightRules=s}),ace.define("ace/mode/flix",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/flix_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./flix_highlight_rules").FlixHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/flix"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/flix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-forth.js b/mixly/common/modules/web-modules/ace/mode-forth.js new file mode 100644 index 00000000..0b2fcec8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-forth.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#forth"}],"#comment":[{token:"comment.line.double-dash.forth",regex:"(?:^|\\s)--\\s.*$",comment:"line comments for iForth"},{token:"comment.line.backslash.forth",regex:"(?:^|\\s)\\\\[\\s\\S]*$",comment:"ANSI line comment"},{token:"comment.line.backslash-g.forth",regex:"(?:^|\\s)\\\\[Gg] .*$",comment:"gForth line comment"},{token:"comment.block.forth",regex:"(?:^|\\s)\\(\\*(?=\\s|$)",push:[{token:"comment.block.forth",regex:"(?:^|\\s)\\*\\)(?=\\s|$)",next:"pop"},{defaultToken:"comment.block.forth"}],comment:"multiline comments for iForth"},{token:"comment.block.documentation.forth",regex:"\\bDOC\\b",caseInsensitive:!0,push:[{token:"comment.block.documentation.forth",regex:"\\bENDDOC\\b",caseInsensitive:!0,next:"pop"},{defaultToken:"comment.block.documentation.forth"}],comment:"documentation comments for iForth"},{token:"comment.line.parentheses.forth",regex:"(?:^|\\s)\\.?\\( [^)]*\\)",comment:"ANSI line comment"}],"#constant":[{token:"constant.language.forth",regex:"(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)",caseInsensitive:!0},{token:"constant.numeric.forth",regex:"(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)"},{token:"constant.character.forth",regex:"(?:^|\\s)(?:[&^]\\S|(?:\"|')\\S(?:\"|'))(?=\\s|$)"}],"#forth":[{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{include:"#word-def"}],"#storage":[{token:"storage.type.forth",regex:"(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)",caseInsensitive:!0}],"#string":[{token:"string.quoted.double.forth",regex:'(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',caseInsensitive:!0},{token:"string.unquoted.forth",regex:"(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)",caseInsensitive:!0}],"#variable":[{token:"variable.language.forth",regex:"\\b(?:I|J)\\b",caseInsensitive:!0}],"#word":[{token:"keyword.control.immediate.forth",regex:"(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.immediate.forth",regex:"(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT'S|])(?=\\s|$)",caseInsensitive:!0},{token:"keyword.control.compile-only.forth",regex:'(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',caseInsensitive:!0},{token:"keyword.other.compile-only.forth",regex:"(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\['\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]||DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.non-immediate.forth",regex:"(?:^|\\s)(?:'|||CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.warning.forth",regex:'(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',caseInsensitive:!0}],"#word-def":[{token:["keyword.other.compile-only.forth","keyword.other.compile-only.forth","meta.block.forth","entity.name.function.forth"],regex:"(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)",caseInsensitive:!0,push:[{token:"keyword.other.compile-only.forth",regex:";(?:CODE)?",caseInsensitive:!0,next:"pop"},{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{defaultToken:"meta.block.forth"}]}]},this.normalizeRules()};s.metaData={fileTypes:["frt","fs","ldr","fth","4th"],foldingStartMarker:"/\\*\\*|\\{\\s*$",foldingStopMarker:"\\*\\*/|^\\s*\\}",keyEquivalent:"^~F",name:"Forth",scopeName:"source.forth"},r.inherits(s,i),t.ForthHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./forth_highlight_rules").ForthHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/forth"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/forth"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-fortran.js b/mixly/common/modules/web-modules/ace/mode-fortran.js new file mode 100644 index 00000000..5cd5bb37 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-fortran.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/fortran_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="call|case|contains|continue|cycle|do|else|elseif|end|enddo|endif|function|if|implicit|in|include|inout|intent|module|none|only|out|print|program|return|select|status|stop|subroutine|return|then|use|while|write|CALL|CASE|CONTAINS|CONTINUE|CYCLE|DO|ELSE|ELSEIF|END|ENDDO|ENDIF|FUNCTION|IF|IMPLICIT|IN|INCLUDE|INOUT|INTENT|MODULE|NONE|ONLY|OUT|PRINT|PROGRAM|RETURN|SELECT|STATUS|STOP|SUBROUTINE|RETURN|THEN|USE|WHILE|WRITE",t="and|or|not|eq|ne|gt|ge|lt|le|AND|OR|NOT|EQ|NE|GT|GE|LT|LE",n="true|false|TRUE|FALSE",r="abs|achar|acos|acosh|adjustl|adjustr|aimag|aint|all|allocate|anint|any|asin|asinh|associated|atan|atan2|atanh|bessel_j0|bessel_j1|bessel_jn|bessel_y0|bessel_y1|bessel_yn|bge|bgt|bit_size|ble|blt|btest|ceiling|char|cmplx|conjg|cos|cosh|count|cpu_time|cshift|date_and_time|dble|deallocate|digits|dim|dot_product|dprod|dshiftl|dshiftr|dsqrt|eoshift|epsilon|erf|erfc|erfc_scaled|exp|float|floor|format|fraction|gamma|input|len|lge|lgt|lle|llt|log|log10|maskl|maskr|matmul|max|maxloc|maxval|merge|min|minloc|minval|mod|modulo|nint|not|norm2|null|nullify|pack|parity|popcnt|poppar|precision|present|product|radix|random_number|random_seed|range|repeat|reshape|round|rrspacing|same_type_as|scale|scan|selected_char_kind|selected_int_kind|selected_real_kind|set_exponent|shape|shifta|shiftl|shiftr|sign|sin|sinh|size|sngl|spacing|spread|sqrt|sum|system_clock|tan|tanh|tiny|trailz|transfer|transpose|trim|ubound|unpack|verify|ABS|ACHAR|ACOS|ACOSH|ADJUSTL|ADJUSTR|AIMAG|AINT|ALL|ALLOCATE|ANINT|ANY|ASIN|ASINH|ASSOCIATED|ATAN|ATAN2|ATANH|BESSEL_J0|BESSEL_J1|BESSEL_JN|BESSEL_Y0|BESSEL_Y1|BESSEL_YN|BGE|BGT|BIT_SIZE|BLE|BLT|BTEST|CEILING|CHAR|CMPLX|CONJG|COS|COSH|COUNT|CPU_TIME|CSHIFT|DATE_AND_TIME|DBLE|DEALLOCATE|DIGITS|DIM|DOT_PRODUCT|DPROD|DSHIFTL|DSHIFTR|DSQRT|EOSHIFT|EPSILON|ERF|ERFC|ERFC_SCALED|EXP|FLOAT|FLOOR|FORMAT|FRACTION|GAMMA|INPUT|LEN|LGE|LGT|LLE|LLT|LOG|LOG10|MASKL|MASKR|MATMUL|MAX|MAXLOC|MAXVAL|MERGE|MIN|MINLOC|MINVAL|MOD|MODULO|NINT|NOT|NORM2|NULL|NULLIFY|PACK|PARITY|POPCNT|POPPAR|PRECISION|PRESENT|PRODUCT|RADIX|RANDOM_NUMBER|RANDOM_SEED|RANGE|REPEAT|RESHAPE|ROUND|RRSPACING|SAME_TYPE_AS|SCALE|SCAN|SELECTED_CHAR_KIND|SELECTED_INT_KIND|SELECTED_REAL_KIND|SET_EXPONENT|SHAPE|SHIFTA|SHIFTL|SHIFTR|SIGN|SIN|SINH|SIZE|SNGL|SPACING|SPREAD|SQRT|SUM|SYSTEM_CLOCK|TAN|TANH|TINY|TRAILZ|TRANSFER|TRANSPOSE|TRIM|UBOUND|UNPACK|VERIFY",i="logical|character|integer|real|type|LOGICAL|CHARACTER|INTEGER|REAL|TYPE",s="allocatable|dimension|intent|parameter|pointer|target|private|public|ALLOCATABLE|DIMENSION|INTENT|PARAMETER|POINTER|TARGET|PRIVATE|PUBLIC",o=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":r,"constant.language":n,keyword:e,"keyword.operator":t,"storage.type":i,"storage.modifier":s},"identifier"),u="(?:r|u|ur|R|U|UR|Ur|uR)?",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"!.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:"keyword",regex:"#\\s*(?:include|import|define|undef|INCLUDE|IMPORT|DEFINE|UNDEF)\\b"},{token:"keyword",regex:"#\\s*(?:endif|ifdef|else|elseif|ifndef|ENDIF|IFDEF|ELSE|ELSEIF|IFNDEF)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.FortranHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/fortran",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fortran_highlight_rules","ace/mode/folding/cstyle","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fortran_highlight_rules").FortranHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="!",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={"return":1,"break":1,"continue":1,RETURN:1,BREAK:1,CONTINUE:1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/fortran"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/fortran"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-fsharp.js b/mixly/common/modules/web-modules/ace/mode-fsharp.js new file mode 100644 index 00000000..643b652d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-fsharp.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/fsharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({variable:"this",keyword:"abstract|assert|base|begin|class|default|delegate|done|downcast|downto|elif|else|exception|extern|false|finally|function|global|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|open|or|override|private|public|rec|return|return!|select|static|struct|then|to|true|try|typeof|upcast|use|use!|val|void|when|while|with|yield|yield!|__SOURCE_DIRECTORY__|as|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile|and|do|end|for|fun|if|in|let|let!|new|not|null|of|endif",constant:"true|false"},"identifier"),t="(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))";this.$rules={start:[{token:"variable.classes",regex:"\\[\\<[.]*\\>\\]"},{token:"comment",regex:"//.*$"},{token:"comment.start",regex:/\(\*(?!\))/,push:"blockComment"},{token:"string",regex:"'.'"},{token:"string",regex:'"""',next:[{token:"constant.language.escape",regex:/\\./,next:"qqstring"},{token:"string",regex:'"""',next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"',next:[{token:"constant.language.escape",regex:/\\./,next:"qqstring"},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}]},{token:["verbatim.string","string"],regex:'(@?)(")',stateName:"qqstring",next:[{token:"constant.language.escape",regex:'""'},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}]},{token:"constant.float",regex:"(?:"+t+"|\\d+)[jJ]\\b"},{token:"constant.float",regex:t},{token:"constant.integer",regex:"(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b"},{token:["keyword.type","variable"],regex:"(type\\s)([a-zA-Z0-9_$-]*\\b)"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|\\(\\*\\)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"}],blockComment:[{regex:/\(\*\)/,token:"comment"},{regex:/\(\*(?!\))/,token:"comment.start",push:"blockComment"},{regex:/\*\)/,token:"comment.end",next:"pop"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.FSharpHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/fsharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsharp_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fsharp_highlight_rules").FSharpHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"(*",end:"*)",nestable:!0},this.$id="ace/mode/fsharp"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/fsharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-fsl.js b/mixly/common/modules/web-modules/ace/mode-fsl.js new file mode 100644 index 00000000..d4dab6f3 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-fsl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/fsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"punctuation.definition.comment.mn",regex:/\/\*/,push:[{token:"punctuation.definition.comment.mn",regex:/\*\//,next:"pop"},{defaultToken:"comment.block.fsl"}]},{token:"comment.line.fsl",regex:/\/\//,push:[{token:"comment.line.fsl",regex:/$/,next:"pop"},{defaultToken:"comment.line.fsl"}]},{token:"entity.name.function",regex:/\${/,push:[{token:"entity.name.function",regex:/}/,next:"pop"},{defaultToken:"keyword.other"}],comment:"js outcalls"},{token:"constant.numeric",regex:/[0-9]*\.[0-9]*\.[0-9]*/,comment:"semver"},{token:"constant.language.fslLanguage",regex:"(?:graph_layout|machine_name|machine_author|machine_license|machine_comment|machine_language|machine_version|machine_reference|npm_name|graph_layout|on_init|on_halt|on_end|on_terminate|on_finalize|on_transition|on_action|on_stochastic_action|on_legal|on_main|on_forced|on_validation|on_validation_failure|on_transition_refused|on_forced_transition_refused|on_action_refused|on_enter|on_exit|start_states|end_states|terminal_states|final_states|fsl_version)\\s*:"},{token:"keyword.control.transition.fslArrow",regex:/<->|<-|->|<=>|=>|<=|<~>|~>|<~|<-=>|<=->|<-~>|<~->|<=~>|<~=>/},{token:"constant.numeric.fslProbability",regex:/[0-9]+%/,comment:"edge probability annotation"},{token:"constant.character.fslAction",regex:/\'[^']*\'/,comment:"action annotation"},{token:"string.quoted.double.fslLabel.doublequoted",regex:/\"[^"]*\"/,comment:"fsl label annotation"},{token:"entity.name.tag.fslLabel.atom",regex:/[a-zA-Z0-9_.+&()#@!?,]/,comment:"fsl label annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["fsl","fsl_state"],name:"FSL",scopeName:"source.fsl"},r.inherits(s,i),t.FSLHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/fsl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsl_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fsl_highlight_rules").FSLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/fsl",this.snippetFileId="ace/snippets/fsl"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/fsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ftl.js b/mixly/common/modules/web-modules/ace/mode-ftl.js new file mode 100644 index 00000000..df468560 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ftl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|upper_case|word_list|xhtml|xml",t="c|round|floor|ceiling",n="iso_[a-z_]+",r="first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk",i="keys|values",s="children|parent|root|ancestors|node_name|node_type|node_namespace",o="byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|eval|has_content|interpret|is_[a-z_]+|namespacenew",u=e+t+n+r+i+s+o,a="default|exists|if_exists|web_safe",f="data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|now|output_encoding|template_name|url_escaping_charset|vars|version",l="gt|gte|lt|lte|as|in|using",c="true|false",h="encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|attributes";this.$rules={start:[{token:"constant.character.entity",regex:/&[^;]+;/},{token:"support.function",regex:"\\?("+u+")"},{token:"support.function.deprecated",regex:"\\?("+a+")"},{token:"language.variable",regex:"\\.(?:"+f+")"},{token:"constant.language",regex:"\\b("+c+")\\b"},{token:"keyword.operator",regex:"\\b(?:"+l+")\\b"},{token:"entity.other.attribute-name",regex:h},{token:"string",regex:/['"]/,next:"qstring"},{token:function(e){return e.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")?"constant.numeric":"variable"},regex:/[\w.+\-]+/},{token:"keyword.operator",regex:"!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qstring:[{token:"constant.character.escape",regex:'\\\\[nrtvef\\\\"$]'},{token:"string",regex:/['"]/,next:"start"},{defaultToken:"string"}]}};r.inherits(o,s);var u=function(){i.call(this);var e="assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|setting|stop|switch|t|visit",t=[{token:"comment",regex:"<#--",next:"ftl-dcomment"},{token:"string.interpolated",regex:"\\${",push:"ftl-start"},{token:"keyword.function",regex:"",next:"pop"},{token:"string.interpolated",regex:"}",next:"pop"}];for(var r in this.$rules)this.$rules[r].unshift.apply(this.$rules[r],t);this.embedRules(o,"ftl-",n,["start"]),this.addRules({"ftl-dcomment":[{token:"comment",regex:"-->",next:"pop"},{defaultToken:"comment"}]}),this.normalizeRules()};r.inherits(u,i),t.FtlHighlightRules=u}),ace.define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ftl_highlight_rules").FtlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/ftl"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/ftl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-gcode.js b/mixly/common/modules/web-modules/ace/mode-gcode.js new file mode 100644 index 00000000..47b84f0b --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-gcode.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",n="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,regex:"[A-Z]"},{token:"keyword.operator",regex:"EQ|LT|GT|NE|GE|LE|OR|XOR"},{token:"paren.lparen",regex:"[\\[]"},{token:"paren.rparen",regex:"[\\]]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.GcodeHighlightRules=s}),ace.define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gcode_highlight_rules").GcodeHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/gcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-gherkin.js b/mixly/common/modules/web-modules/ace/mode-gherkin.js new file mode 100644 index 00000000..3b42badd --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-gherkin.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",o=function(){var e=[{name:"en",labels:"Feature|Background|Scenario(?: Outline)?|Examples",keywords:"Given|When|Then|And|But"}],t=e.map(function(e){return e.labels}).join("|"),n=e.map(function(e){return e.keywords}).join("|");this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"(?:"+t+"):|(?:"+n+")\\b"},{token:"keyword",regex:"\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"text",regex:"^\\s*(?=@[\\w])",next:[{token:"text",regex:"\\s+"},{token:"variable.parameter",regex:"@[\\w]+"},{token:"empty",regex:"",next:"start"}]},{token:"comment",regex:"<[^>]+>"},{token:"comment",regex:"\\|(?=.)",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:s},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"comment",regex:/$/,next:"start"},{token:"comment",regex:/\|/},{token:"string",regex:/\\./},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(o,i),t.GherkinHighlightRules=o}),ace.define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gherkin_highlight_rules").GherkinHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=" ",s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;return t.match("[ ]*\\|")&&(r+="| "),o.length&&o[o.length-1].type=="comment"?r:(e=="start"&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?r+=i:t.match("(Given|Then).+(:)$|Examples:")?r+=i:t.match("\\*.+")&&(r+="* ")),r)}}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/gherkin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-gitignore.js b/mixly/common/modules/web-modules/ace/mode-gitignore.js new file mode 100644 index 00000000..7f322199 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-gitignore.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),ace.define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/gitignore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-glsl.js b/mixly/common/modules/web-modules/ace/mode-glsl.js new file mode 100644 index 00000000..65a889eb --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-glsl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|class|wchar_t|template|char16_t|char32_t",r="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local",s="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=function(){var e="attribute|const|uniform|varying|break|continue|do|for|while|if|else|in|out|inout|float|int|void|bool|true|false|lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|samplerCube|struct",t="radians|degrees|sin|cos|tan|asin|acos|atan|pow|exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|normalize|faceforward|reflect|refract|matrixCompMult|lessThan|lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|texture2DProjLod|textureCube|textureCubeLod|gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|gl_DepthRangeParameters|gl_DepthRange|gl_Position|gl_PointSize|gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules=(new i).$rules,this.$rules.start.forEach(function(e){typeof e.token=="function"&&(e.token=n)})};r.inherits(s,i),t.glslHighlightRules=s}),ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./glsl_highlight_rules").glslHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.$id="ace/mode/glsl"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/glsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-gobstones.js b/mixly/common/modules/web-modules/ace/mode-gobstones.js new file mode 100644 index 00000000..de88ebc2 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-gobstones.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e={standard:"program|procedure|function|interactive|return|let",type:"type|is|variant|record|field|case"},t={commands:{repetitions:"repeat|while|foreach|in",alternatives:"if|elseif|else|switch"},expressions:{alternatives:"choose|when|otherwise|matching|select|on"}},n={colors:"Verde|Rojo|Azul|Negro",cardinals:"Norte|Sur|Este|Oeste",booleans:"True|False",numbers:/([-]?)([0-9]+)\b/,strings:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r={commands:"Poner|Sacar|Mover|IrAlBorde|VaciarTablero|BOOM",expressions:"nroBolitas|hayBolitas|puedeMover|siguiente|previo|opuesto|minBool|maxBool|minDir|maxDir|minColor|maxColor|primero|sinElPrimero|esVac\u00eda|boom",keys:"K_A|K_B|K_C|K_D|K_E|K_F|K_G|K_G|K_H|K_I|K_J|K_K|K_L|K_M|K_N|K_\u00d1|K_O|K_P|K_Q|K_R|K_S|K_T|K_U|K_V|K_W|K_X|K_Y|K_Z|K_0|K_1|K_2|K_3|K_4|K_5|K_6|K_7|K_8|K_9|K_F1|K_F2|K_F3|K_F4|K_F5|K_F6|K_F7|K_F8|K_F9|K_F10|K_F11|K_12|K_UP|K_DOWN|K_LEFT|K_RIGHT|K_RETURN|K_BACKSPACE|K_TAB|K_SPACE|K_ESCAPEK_CTRL_A|K_CTRL_B|K_CTRL_C|K_CTRL_D|K_CTRL_E|K_CTRL_F|K_CTRL_G|K_CTRL_G|K_CTRL_H|K_CTRL_I|K_CTRL_J|K_CTRL_K|K_CTRL_L|K_CTRL_M|K_CTRL_N|K_CTRL_\u00d1|K_CTRL_O|K_CTRL_P|K_CTRL_Q|K_CTRL_R|K_CTRL_S|K_CTRL_T|K_CTRL_U|K_CTRL_V|K_CTRL_W|K_CTRL_X|K_CTRL_Y|K_CTRL_Z|K_CTRL_0|K_CTRL_1|K_CTRL_2|K_CTRL_3|K_CTRL_4|K_CTRL_5|K_CTRL_6|K_CTRL_7|K_CTRL_8|K_CTRL_9|K_CTRL_F1|K_CTRL_F2|K_CTRL_F3|K_CTRL_F4|K_CTRL_F5|K_CTRL_F6|K_CTRL_F7|K_CTRL_F8|K_CTRL_F9|K_CTRL_F10|K_CTRL_F11|K_CTRL_F12|K_CTRL_UP|K_CTRL_DOWN|K_CTRL_LEFT|K_CTRL_RIGHT|K_CTRL_RETURN|K_CTRL_BACKSPACE|K_CTRL_TAB|K_CTRL_SPACE|K_CTRL_ESCAPEK_ALT_A|K_ALT_B|K_ALT_C|K_ALT_D|K_ALT_E|K_ALT_F|K_ALT_G|K_ALT_G|K_ALT_H|K_ALT_I|K_ALT_J|K_ALT_K|K_ALT_L|K_ALT_M|K_ALT_N|K_ALT_\u00d1|K_ALT_O|K_ALT_P|K_ALT_Q|K_ALT_R|K_ALT_S|K_ALT_T|K_ALT_U|K_ALT_V|K_ALT_W|K_ALT_X|K_ALT_Y|K_ALT_Z|K_ALT_0|K_ALT_1|K_ALT_2|K_ALT_3|K_ALT_4|K_ALT_5|K_ALT_6|K_ALT_7|K_ALT_8|K_ALT_9|K_ALT_F1|K_ALT_F2|K_ALT_F3|K_ALT_F4|K_ALT_F5|K_ALT_F6|K_ALT_F7|K_ALT_F8|K_ALT_F9|K_ALT_F10|K_ALT_F11|K_ALT_F12|K_ALT_UP|K_ALT_DOWN|K_ALT_LEFT|K_ALT_RIGHT|K_ALT_RETURN|K_ALT_BACKSPACE|K_ALT_TAB|K_ALT_SPACE|K_ALT_ESCAPEK_SHIFT_A|K_SHIFT_B|K_SHIFT_C|K_SHIFT_D|K_SHIFT_E|K_SHIFT_F|K_SHIFT_G|K_SHIFT_G|K_SHIFT_H|K_SHIFT_I|K_SHIFT_J|K_SHIFT_K|K_SHIFT_L|K_SHIFT_M|K_SHIFT_N|K_SHIFT_\u00d1|K_SHIFT_O|K_SHIFT_P|K_SHIFT_Q|K_SHIFT_R|K_SHIFT_S|K_SHIFT_T|K_SHIFT_U|K_SHIFT_V|K_SHIFT_W|K_SHIFT_X|K_SHIFT_Y|K_SHIFT_Z|K_SHIFT_0|K_SHIFT_1|K_SHIFT_2|K_SHIFT_3|K_SHIFT_4|K_SHIFT_5|K_SHIFT_6|K_SHIFT_7|K_SHIFT_8|K_SHIFT_9|K_SHIFT_F1|K_SHIFT_F2|K_SHIFT_F3|K_SHIFT_F4|K_SHIFT_F5|K_SHIFT_F6|K_SHIFT_F7|K_SHIFT_F8|K_SHIFT_F9|K_SHIFT_F10|K_SHIFT_F11|K_SHIFT_F12|K_SHIFT_UP|K_SHIFT_DOWN|K_SHIFT_LEFT|K_SHIFT_RIGHT|K_SHIFT_RETURN|K_SHIFT_BACKSPACE|K_SHIFT_TAB|K_SHIFT_SPACE|K_SHIFT_ESCAPEK_CTRL_ALT_A|K_CTRL_ALT_B|K_CTRL_ALT_C|K_CTRL_ALT_D|K_CTRL_ALT_E|K_CTRL_ALT_F|K_CTRL_ALT_G|K_CTRL_ALT_G|K_CTRL_ALT_H|K_CTRL_ALT_I|K_CTRL_ALT_J|K_CTRL_ALT_K|K_CTRL_ALT_L|K_CTRL_ALT_M|K_CTRL_ALT_N|K_CTRL_ALT_\u00d1|K_CTRL_ALT_O|K_CTRL_ALT_P|K_CTRL_ALT_Q|K_CTRL_ALT_R|K_CTRL_ALT_S|K_CTRL_ALT_T|K_CTRL_ALT_U|K_CTRL_ALT_V|K_CTRL_ALT_W|K_CTRL_ALT_X|K_CTRL_ALT_Y|K_CTRL_ALT_Z|K_CTRL_ALT_0|K_CTRL_ALT_1|K_CTRL_ALT_2|K_CTRL_ALT_3|K_CTRL_ALT_4|K_CTRL_ALT_5|K_CTRL_ALT_6|K_CTRL_ALT_7|K_CTRL_ALT_8|K_CTRL_ALT_9|K_CTRL_ALT_F1|K_CTRL_ALT_F2|K_CTRL_ALT_F3|K_CTRL_ALT_F4|K_CTRL_ALT_F5|K_CTRL_ALT_F6|K_CTRL_ALT_F7|K_CTRL_ALT_F8|K_CTRL_ALT_F9|K_CTRL_ALT_F10|K_CTRL_ALT_F11|K_CTRL_ALT_F12|K_CTRL_ALT_UP|K_CTRL_ALT_DOWN|K_CTRL_ALT_LEFT|K_CTRL_ALT_RIGHT|K_CTRL_ALT_RETURN|K_CTRL_ALT_BACKSPACE|K_CTRL_ALT_TAB|K_CTRL_ALT_SPACE|K_CTRL_ALT_ESCAPEK_CTRL_SHIFT_A|K_CTRL_SHIFT_B|K_CTRL_SHIFT_C|K_CTRL_SHIFT_D|K_CTRL_SHIFT_E|K_CTRL_SHIFT_F|K_CTRL_SHIFT_G|K_CTRL_SHIFT_G|K_CTRL_SHIFT_H|K_CTRL_SHIFT_I|K_CTRL_SHIFT_J|K_CTRL_SHIFT_K|K_CTRL_SHIFT_L|K_CTRL_SHIFT_M|K_CTRL_SHIFT_N|K_CTRL_SHIFT_\u00d1|K_CTRL_SHIFT_O|K_CTRL_SHIFT_P|K_CTRL_SHIFT_Q|K_CTRL_SHIFT_R|K_CTRL_SHIFT_S|K_CTRL_SHIFT_T|K_CTRL_SHIFT_U|K_CTRL_SHIFT_V|K_CTRL_SHIFT_W|K_CTRL_SHIFT_X|K_CTRL_SHIFT_Y|K_CTRL_SHIFT_Z|K_CTRL_SHIFT_0|K_CTRL_SHIFT_1|K_CTRL_SHIFT_2|K_CTRL_SHIFT_3|K_CTRL_SHIFT_4|K_CTRL_SHIFT_5|K_CTRL_SHIFT_6|K_CTRL_SHIFT_7|K_CTRL_SHIFT_8|K_CTRL_SHIFT_9|K_CTRL_SHIFT_F1|K_CTRL_SHIFT_F2|K_CTRL_SHIFT_F3|K_CTRL_SHIFT_F4|K_CTRL_SHIFT_F5|K_CTRL_SHIFT_F6|K_CTRL_SHIFT_F7|K_CTRL_SHIFT_F8|K_CTRL_SHIFT_9|K_CTRL_SHIFT_10|K_CTRL_SHIFT_11|K_CTRL_SHIFT_12|K_CTRL_SHIFT_UP|K_CTRL_SHIFT_DOWN|K_CTRL_SHIFT_LEFT|K_CTRL_SHIFT_RIGHT|K_CTRL_SHIFT_RETURN|K_CTRL_SHIFT_BACKSPACE|K_CTRL_SHIFT_TAB|K_CTRL_SHIFT_SPACE|K_CTRL_SHIFT_ESCAPEK_ALT_SHIFT_A|K_ALT_SHIFT_B|K_ALT_SHIFT_C|K_ALT_SHIFT_D|K_ALT_SHIFT_E|K_ALT_SHIFT_F|K_ALT_SHIFT_G|K_ALT_SHIFT_G|K_ALT_SHIFT_H|K_ALT_SHIFT_I|K_ALT_SHIFT_J|K_ALT_SHIFT_K|K_ALT_SHIFT_L|K_ALT_SHIFT_M|K_ALT_SHIFT_N|K_ALT_SHIFT_\u00d1|K_ALT_SHIFT_O|K_ALT_SHIFT_P|K_ALT_SHIFT_Q|K_ALT_SHIFT_R|K_ALT_SHIFT_S|K_ALT_SHIFT_T|K_ALT_SHIFT_U|K_ALT_SHIFT_V|K_ALT_SHIFT_W|K_ALT_SHIFT_X|K_ALT_SHIFT_Y|K_ALT_SHIFT_Z|K_ALT_SHIFT_0|K_ALT_SHIFT_1|K_ALT_SHIFT_2|K_ALT_SHIFT_3|K_ALT_SHIFT_4|K_ALT_SHIFT_5|K_ALT_SHIFT_6|K_ALT_SHIFT_7|K_ALT_SHIFT_8|K_ALT_SHIFT_9|K_ALT_SHIFT_F1|K_ALT_SHIFT_F2|K_ALT_SHIFT_F3|K_ALT_SHIFT_F4|K_ALT_SHIFT_F5|K_ALT_SHIFT_F6|K_ALT_SHIFT_F7|K_ALT_SHIFT_F8|K_ALT_SHIFT_9|K_ALT_SHIFT_10|K_ALT_SHIFT_11|K_ALT_SHIFT_12|K_ALT_SHIFT_UP|K_ALT_SHIFT_DOWN|K_ALT_SHIFT_LEFT|K_ALT_SHIFT_RIGHT|K_ALT_SHIFT_RETURN|K_ALT_SHIFT_BACKSPACE|K_ALT_SHIFT_TAB|K_ALT_SHIFT_SPACE|K_ALT_SHIFT_ESCAPEK_CTRL_ALT_SHIFT_A|K_CTRL_ALT_SHIFT_B|K_CTRL_ALT_SHIFT_C|K_CTRL_ALT_SHIFT_D|K_CTRL_ALT_SHIFT_E|K_CTRL_ALT_SHIFT_F|K_CTRL_ALT_SHIFT_G|K_CTRL_ALT_SHIFT_G|K_CTRL_ALT_SHIFT_H|K_CTRL_ALT_SHIFT_I|K_CTRL_ALT_SHIFT_J|K_CTRL_ALT_SHIFT_K|K_CTRL_ALT_SHIFT_L|K_CTRL_ALT_SHIFT_M|K_CTRL_ALT_SHIFT_N|K_CTRL_ALT_SHIFT_\u00d1|K_CTRL_ALT_SHIFT_O|K_CTRL_ALT_SHIFT_P|K_CTRL_ALT_SHIFT_Q|K_CTRL_ALT_SHIFT_R|K_CTRL_ALT_SHIFT_S|K_CTRL_ALT_SHIFT_T|K_CTRL_ALT_SHIFT_U|K_CTRL_ALT_SHIFT_V|K_CTRL_ALT_SHIFT_W|K_CTRL_ALT_SHIFT_X|K_CTRL_ALT_SHIFT_Y|K_CTRL_ALT_SHIFT_Z|K_CTRL_ALT_SHIFT_0|K_CTRL_ALT_SHIFT_1|K_CTRL_ALT_SHIFT_2|K_CTRL_ALT_SHIFT_3|K_CTRL_ALT_SHIFT_4|K_CTRL_ALT_SHIFT_5|K_CTRL_ALT_SHIFT_6|K_CTRL_ALT_SHIFT_7|K_CTRL_ALT_SHIFT_8|K_CTRL_ALT_SHIFT_9|K_CTRL_ALT_SHIFT_F1|K_CTRL_ALT_SHIFT_F2|K_CTRL_ALT_SHIFT_F3|K_CTRL_ALT_SHIFT_F4|K_CTRL_ALT_SHIFT_F5|K_CTRL_ALT_SHIFT_F6|K_CTRL_ALT_SHIFT_F7|K_CTRL_ALT_SHIFT_F8|K_CTRL_ALT_SHIFT_F9|K_CTRL_ALT_SHIFT_F10|K_CTRL_ALT_SHIFT_F11|K_CTRL_ALT_SHIFT_F12|K_CTRL_ALT_SHIFT_UP|K_CTRL_ALT_SHIFT_DOWN|K_CTRL_ALT_SHIFT_LEFT|K_CTRL_ALT_SHIFT_RIGHT|K_CTRL_ALT_SHIFT_RETURN|K_CTRL_ALT_SHIFT_BACKSPACE|K_CTRL_ALT_SHIFT_TAB|K_CTRL_ALT_SHIFT_SPACE|K_CTRL_ALT_SHIFT_ESCAPE"},i={commands:":=",expressions:{numeric:"\\+|\\-|\\*|\\^|div|mod",comparison:">=|<=|==|\\/=|>|<","boolean":"\\|\\||&&|not",other:"\\+\\+|<\\-|\\[|\\]|\\_|\\->"}},s={line:{double_slash:"\\/\\/.*$",double_dash:"\\-\\-.*$",number_sign:"#.*$"},block:{start:"\\/\\*",end:"\\*\\/"},block_alt:{start:"\\{\\-",end:"\\-\\}"}};this.$rules={start:[{token:"comment.line.double-slash.gobstones",regex:s.line.double_slash},{token:"comment.line.double-dash.gobstones",regex:s.line.double_dash},{token:"comment.line.number-sign.gobstones",regex:s.line.number_sign},{token:"comment.block.dash-asterisc.gobstones",regex:s.block.start,next:"block_comment_end"},{token:"comment.block.brace-dash.gobstones",regex:s.block_alt.start,next:"block_comment_alt_end"},{token:"constant.numeric.gobstones",regex:n.numbers},{token:"string.quoted.double.gobstones",regex:n.strings},{token:"keyword.operator.other.gobstones",regex:i.expressions.other},{token:"keyword.operator.numeric.gobstones",regex:i.expressions.numeric},{token:"keyword.operator.compare.gobstones",regex:i.expressions.comparison},{token:"keyword.operator.boolean.gobstones",regex:i.expressions.boolean},{token:this.createKeywordMapper({"storage.type.definitions.gobstones":e.standard,"storage.type.types.gobstones":e.type,"keyword.control.commands.repetitions.gobstones":t.commands.repetitions,"keyword.control.commands.alternatives.gobstones":t.commands.alternatives,"keyword.control.expressions.alternatives.gobstones":t.expressions.alternatives,"constant.language.colors.gobstones":n.colors,"constant.language.cardinals.gobstones":n.cardinals,"constant.language.boolean.gobstones":n.booleans,"support.function.gobstones":r.commands,"support.variable.gobstones":r.expressions,"variable.language.gobstones":r.keys},"identifier.gobstones"),regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"comma.gobstones",regex:","},{token:"semicolon.gobstones",regex:";"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],block_comment_end:[{token:"comment.block.dash-asterisc.gobstones",regex:s.block.end,next:"start"},{defaultToken:"comment.block.dash-asterisc.gobstones"}],block_comment_alt_end:[{token:"comment.block.brace-dash.gobstones",regex:s.block_alt.end,next:"start"},{defaultToken:"comment.block.brace-dash.gobstones"}]}};r.inherits(s,i),t.GobstonesHighlightRules=s}),ace.define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./gobstones_highlight_rules").GobstonesHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(){return null},this.$id="ace/mode/gobstones",this.snippetFileId="ace/snippets/gobstones"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/gobstones"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-golang.js b/mixly/common/modules/web-modules/ace/mode-golang.js new file mode 100644 index 00000000..248415bd --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-golang.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="else|break|case|return|goto|if|const|select|continue|struct|default|switch|for|range|func|import|package|chan|defer|fallthrough|go|interface|map|range|select|type|var",t="string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error",n="new|close|cap|copy|panic|panicln|print|println|len|make|delete|real|recover|imag|append",r="nil|true|false|iota",s=this.createKeywordMapper({keyword:e,"constant.language":r,"support.function":n,"support.type":t},""),o="\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(/\\h/g,"[a-fA-F\\d]");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"string",regex:/"(?:[^"\\]|\\.)*?"/},{token:"string",regex:"`",next:"bqstring"},{token:"constant.numeric",regex:"'(?:[^\\'\ud800-\udbff]|[\ud800-\udbff][\udc00-\udfff]|"+o.replace('"',"")+")'"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword","text","entity.name.function"],regex:"(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b"},{token:function(e){return e[e.length-1]=="("?[{type:s(e.slice(0,-1))||"support.function",value:e.slice(0,-1)},{type:"paren.lparen",value:e.slice(-1)}]:s(e)||"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],bqstring:[{token:"string",regex:"`",next:"start"},{defaultToken:"string"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.GolangHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./golang_highlight_rules").GolangHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/golang"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/golang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-graphqlschema.js b/mixly/common/modules/web-modules/ace/mode-graphqlschema.js new file mode 100644 index 00000000..37ec98fe --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-graphqlschema.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/graphqlschema_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="type|interface|union|enum|schema|input|implements|extends|scalar",t="Int|Float|String|ID|Boolean",n=this.createKeywordMapper({keyword:e,"storage.type":t},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.GraphQLSchemaHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/graphqlschema",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/graphqlschema_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./graphqlschema_highlight_rules").GraphQLSchemaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/graphqlschema",this.snippetFileId="ace/snippets/graphqlschema"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/graphqlschema"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-groovy.js b/mixly/common/modules/web-modules/ace/mode-groovy.js new file mode 100644 index 00000000..b5acbb72 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-groovy.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="assert|with|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|def|float|native|super|while",t="null|Infinity|NaN|undefined",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"qqstring"},{token:"string",regex:"'''",next:"qstring"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"constant.language.escape",regex:/\\(?:u[0-9A-Fa-f]{4}|.|$)/},{token:"constant.language.escape",regex:/\$[\w\d]+/},{token:"constant.language.escape",regex:/\$\{[^"\}]+\}?/},{token:"string",regex:'"{3,5}',next:"start"},{token:"string",regex:".+?"}],qstring:[{token:"constant.language.escape",regex:/\\(?:u[0-9A-Fa-f]{4}|.|$)/},{token:"string",regex:"'{3,5}",next:"start"},{token:"string",regex:".+?"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.GroovyHighlightRules=o}),ace.define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./groovy_highlight_rules").GroovyHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/groovy"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/groovy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-haml.js b/mixly/common/modules/web-modules/ace/mode-haml.js new file mode 100644 index 00000000..2bc70dd2 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-haml.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};r.inherits(d,i),t.RubyHighlightRules=d}),ace.define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./ruby_highlight_rules"),o=s.RubyHighlightRules,u=function(){i.call(this),this.$rules={start:[{token:"comment.block",regex:/^\/$/,next:"comment"},{token:"comment.block",regex:/^\-#$/,next:"comment"},{token:"comment.line",regex:/\/\s*.*/},{token:"comment.line",regex:/-#\s*.*/},{token:"keyword.other.doctype",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},s.qString,s.qqString,s.tString,{token:"meta.tag.haml",regex:/(%[\w:\-]+)/},{token:"keyword.attribute-name.class.haml",regex:/\.[\w-]+/},{token:"keyword.attribute-name.id.haml",regex:/#[\w-]+/,next:"element_class"},s.constantNumericHex,s.constantNumericFloat,s.constantOtherSymbol,{token:"text",regex:/=|-|~/,next:"embedded_ruby"}],element_class:[{token:"keyword.attribute-name.class.haml",regex:/\.[\w-]+/},{token:"punctuation.section",regex:/\{/,next:"element_attributes"},s.constantOtherSymbol,{token:"empty",regex:"$|(?!\\.|#|\\{|\\[|=|-|~|\\/])",next:"start"}],element_attributes:[s.constantOtherSymbol,s.qString,s.qqString,s.tString,s.constantNumericHex,s.constantNumericFloat,{token:"punctuation.section",regex:/$|\}/,next:"start"}],embedded_ruby:[s.constantNumericHex,s.constantNumericFloat,s.instanceVariable,s.qString,s.qqString,s.tString,{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},{token:(new o).getKeywords(),regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:["keyword","text","text"],regex:"(?:do|\\{)(?: \\|[^|]+\\|)?$",next:"start"},{token:["text"],regex:"^$",next:"start"},{token:["text"],regex:"^(?!.*\\|\\s*$)",next:"start"}],comment:[{token:"comment.block",regex:/^$/,next:"start"},{token:"comment.block",regex:/\s+.*/}]},this.normalizeRules()};r.inherits(u,i),t.HamlHighlightRules=u}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function s(e,t){return t.splice(0,3),t.shift()||"start"}var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,o=function(){i.call(this);var e={regex:"(?={{)",push:"handlebars"};for(var t in this.$rules)this.$rules[t].unshift(e);this.$rules.handlebars=[{token:"comment.start",regex:"{{!--",push:[{token:"comment.end",regex:"--}}",next:s},{defaultToken:"comment"}]},{token:"comment.start",regex:"{{!",push:[{token:"comment.end",regex:"}}",next:s},{defaultToken:"comment"}]},{token:"support.function",regex:"{{{",push:[{token:"support.function",regex:"}}}",next:s},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]},{token:"storage.type.start",regex:"{{[#\\^/&]?",push:[{token:"storage.type.end",regex:"}}",next:s},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]}],this.normalizeRules()};r.inherits(o,i),t.HandlebarsHighlightRules=o}),ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=function(){i.call(this)};r.inherits(s,i),t.HtmlBehaviour=s}),ace.define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./handlebars_highlight_rules").HandlebarsHighlightRules,o=e("./behaviour/html").HtmlBehaviour,u=e("./folding/html").FoldMode,a=function(){i.call(this),this.HighlightRules=s,this.$behaviour=new o};r.inherits(a,i),function(){this.blockComment={start:"{{!--",end:"--}}"},this.$id="ace/mode/handlebars"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/handlebars"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-haskell.js b/mixly/common/modules/web-modules/ace/mode-haskell.js new file mode 100644 index 00000000..006665a3 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-haskell.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["punctuation.definition.entity.haskell","keyword.operator.function.infix.haskell","punctuation.definition.entity.haskell"],regex:"(`)([a-zA-Z_']*?)(`)",comment:"In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10])."},{token:"constant.language.unit.haskell",regex:"\\(\\)"},{token:"constant.language.empty-list.haskell",regex:"\\[\\]"},{token:"keyword.other.haskell",regex:"\\b(module|signature)\\b",push:[{token:"keyword.other.haskell",regex:"\\bwhere\\b",next:"pop"},{include:"#module_name"},{include:"#module_exports"},{token:"invalid",regex:"[a-z]+"},{defaultToken:"meta.declaration.module.haskell"}]},{token:"keyword.other.haskell",regex:"\\bclass\\b",push:[{token:"keyword.other.haskell",regex:"\\bwhere\\b",next:"pop"},{token:"support.class.prelude.haskell",regex:"\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b"},{token:"entity.other.inherited-class.haskell",regex:"[A-Z][A-Za-z_']*"},{token:"variable.other.generic-type.haskell",regex:"\\b[a-z][a-zA-Z0-9_']*\\b"},{defaultToken:"meta.declaration.class.haskell"}]},{token:"keyword.other.haskell",regex:"\\binstance\\b",push:[{token:"keyword.other.haskell",regex:"\\bwhere\\b|$",next:"pop"},{include:"#type_signature"},{defaultToken:"meta.declaration.instance.haskell"}]},{token:"keyword.other.haskell",regex:"import",push:[{token:"meta.import.haskell",regex:"$|;|^",next:"pop"},{token:"keyword.other.haskell",regex:"qualified|as|hiding"},{include:"#module_name"},{include:"#module_exports"},{defaultToken:"meta.import.haskell"}]},{token:["keyword.other.haskell","meta.deriving.haskell"],regex:"(deriving)(\\s*\\()",push:[{token:"meta.deriving.haskell",regex:"\\)",next:"pop"},{token:"entity.other.inherited-class.haskell",regex:"\\b[A-Z][a-zA-Z_']*"},{defaultToken:"meta.deriving.haskell"}]},{token:"keyword.other.haskell",regex:"\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b"},{token:"keyword.operator.haskell",regex:"\\binfix[lr]?\\b"},{token:"keyword.control.haskell",regex:"\\b(?:do|if|then|else)\\b"},{token:"constant.numeric.float.haskell",regex:"\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b",comment:"Floats are always decimal"},{token:"constant.numeric.haskell",regex:"\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b"},{token:["meta.preprocessor.c","punctuation.definition.preprocessor.c","meta.preprocessor.c"],regex:"^(\\s*)(#)(\\s*\\w+)",comment:'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.'},{include:"#pragma"},{token:"punctuation.definition.string.begin.haskell",regex:'"',push:[{token:"punctuation.definition.string.end.haskell",regex:'"',next:"pop"},{token:"constant.character.escape.haskell",regex:"\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])"},{token:"constant.character.escape.octal.haskell",regex:"\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+"},{token:"constant.character.escape.control.haskell",regex:"\\^[A-Z@\\[\\]\\\\\\^_]"},{defaultToken:"string.quoted.double.haskell"}]},{token:["punctuation.definition.string.begin.haskell","string.quoted.single.haskell","constant.character.escape.haskell","constant.character.escape.octal.haskell","constant.character.escape.hexadecimal.haskell","constant.character.escape.control.haskell","punctuation.definition.string.end.haskell"],regex:"(')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(')"},{token:["meta.function.type-declaration.haskell","entity.name.function.haskell","meta.function.type-declaration.haskell","keyword.other.double-colon.haskell"],regex:"^(\\s*)([a-z_][a-zA-Z0-9_']*|\\([|!%$+\\-.,=]+\\))(\\s*)(::)",push:[{token:"meta.function.type-declaration.haskell",regex:"$",next:"pop"},{include:"#type_signature"},{defaultToken:"meta.function.type-declaration.haskell"}]},{token:"support.constant.haskell",regex:"\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b"},{token:"constant.other.haskell",regex:"\\b[A-Z]\\w*\\b"},{include:"#comments"},{token:"support.function.prelude.haskell",regex:"\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|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|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)\\b"},{include:"#infix_op"},{token:"keyword.operator.haskell",regex:"[|!%$?~+:\\-.=\\\\]+",comment:"In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*."},{token:"punctuation.separator.comma.haskell",regex:","}],"#block_comment":[{token:"punctuation.definition.comment.haskell",regex:"\\{-(?!#)",push:[{include:"#block_comment"},{token:"punctuation.definition.comment.haskell",regex:"-\\}",next:"pop"},{defaultToken:"comment.block.haskell"}]}],"#comments":[{token:"punctuation.definition.comment.haskell",regex:"--.*",push_:[{token:"comment.line.double-dash.haskell",regex:"$",next:"pop"},{defaultToken:"comment.line.double-dash.haskell"}]},{include:"#block_comment"}],"#infix_op":[{token:"entity.name.function.infix.haskell",regex:"\\([|!%$+:\\-.=]+\\)|\\(,+\\)"}],"#module_exports":[{token:"meta.declaration.exports.haskell",regex:"\\(",push:[{token:"meta.declaration.exports.haskell.end",regex:"\\)",next:"pop"},{token:"entity.name.function.haskell",regex:"\\b[a-z][a-zA-Z_']*"},{token:"storage.type.haskell",regex:"\\b[A-Z][A-Za-z_']*"},{token:"punctuation.separator.comma.haskell",regex:","},{include:"#infix_op"},{token:"meta.other.unknown.haskell",regex:"\\(.*?\\)",comment:"So named because I don't know what to call this."},{defaultToken:"meta.declaration.exports.haskell.end"}]}],"#module_name":[{token:"support.other.module.haskell",regex:"[A-Z][A-Za-z._']*"}],"#pragma":[{token:"meta.preprocessor.haskell",regex:"\\{-#",push:[{token:"meta.preprocessor.haskell",regex:"#-\\}",next:"pop"},{token:"keyword.other.preprocessor.haskell",regex:"\\b(?:LANGUAGE|UNPACK|INLINE)\\b"},{defaultToken:"meta.preprocessor.haskell"}]}],"#type_signature":[{token:["meta.class-constraint.haskell","entity.other.inherited-class.haskell","meta.class-constraint.haskell","variable.other.generic-type.haskell","meta.class-constraint.haskell","keyword.other.big-arrow.haskell"],regex:"(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_']*)(\\)\\s*)(=>)"},{include:"#pragma"},{token:"keyword.other.arrow.haskell",regex:"->"},{token:"keyword.other.big-arrow.haskell",regex:"=>"},{token:"support.type.prelude.haskell",regex:"\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b"},{token:"variable.other.generic-type.haskell",regex:"\\b[a-z][a-zA-Z0-9_']*\\b"},{token:"storage.type.haskell",regex:"\\b[A-Z][a-zA-Z0-9_']*\\b"},{token:"support.constant.unit.haskell",regex:"\\(\\)"},{include:"#comments"}]},this.normalizeRules()};s.metaData={fileTypes:["hs"],keyEquivalent:"^~H",name:"Haskell",scopeName:"source.haskell"},r.inherits(s,i),t.HaskellHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_highlight_rules").HaskellHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell",this.snippetFileId="ace/snippets/haskell"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/haskell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-haskell_cabal.js b/mixly/common/modules/web-modules/ace/mode-haskell_cabal.js new file mode 100644 index 00000000..1c368938 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-haskell_cabal.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"^\\s*--.*$"},{token:["keyword"],regex:/^(\s*\w.*?)(:(?:\s+|$))/},{token:"constant.numeric",regex:/[\d_]+(?:(?:[\.\d_]*)?)/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"markup.heading",regex:/^(\w.*)$/}]}};r.inherits(s,i),t.CabalHighlightRules=s}),ace.define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.isHeading=function(e,t){var n="markup.heading",r=e.getTokens(t)[0];return t==0||r&&r.type.lastIndexOf(n,0)===0},this.getFoldWidget=function(e,t,n){if(this.isHeading(e,n))return"start";if(t==="markbeginend"&&!/^\s*$/.test(e.getLine(n))){var r=e.getLength();while(++nu)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var f=e.getLine(a).length;return new s(u,i,a,f)}}else if(this.getFoldWidget(e,t,n)==="end"){var a=n,f=e.getLine(a).length;while(--n>=0)if(this.isHeading(e,n))break;var r=e.getLine(n),i=r.length;return new s(n,i,a,f)}}}.call(o.prototype)}),ace.define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_cabal_highlight_rules").CabalHighlightRules,o=e("./folding/haskell_cabal").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell_cabal"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/haskell_cabal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-haxe.js b/mixly/common/modules/web-modules/ace/mode-haxe.js new file mode 100644 index 00000000..52e53d3a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-haxe.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std",t="null|true|false",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.HaxeHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haxe_highlight_rules").HaxeHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/haxe"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/haxe"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-hjson.js b/mixly/common/modules/web-modules/ace/mode-hjson.js new file mode 100644 index 00000000..ff158f9f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-hjson.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/hjson_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#comments"},{include:"#rootObject"},{include:"#value"}],"#array":[{token:"paren.lparen",regex:/\[/,push:[{token:"paren.rparen",regex:/\]/,next:"pop"},{include:"#value"},{include:"#comments"},{token:"text",regex:/,|$/},{token:"invalid.illegal",regex:/[^\s\]]/},{defaultToken:"array"}]}],"#comments":[{token:["comment.punctuation","comment.line"],regex:/(#)(.*$)/},{token:"comment.punctuation",regex:/\/\*/,push:[{token:"comment.punctuation",regex:/\*\//,next:"pop"},{defaultToken:"comment.block"}]},{token:["comment.punctuation","comment.line"],regex:/(\/\/)(.*$)/}],"#constant":[{token:"constant",regex:/\b(?:true|false|null)\b/}],"#keyname":[{token:"keyword",regex:/(?:[^,\{\[\}\]\s]+|"(?:[^"\\]|\\.)*")\s*(?=:)/}],"#mstring":[{token:"string",regex:/'''/,push:[{token:"string",regex:/'''/,next:"pop"},{defaultToken:"string"}]}],"#number":[{token:"constant.numeric",regex:/-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/,comment:"handles integer and decimal numbers"}],"#object":[{token:"paren.lparen",regex:/\{/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{include:"#keyname"},{include:"#value"},{token:"text",regex:/:/},{token:"text",regex:/,/},{defaultToken:"paren"}]}],"#rootObject":[{token:"paren",regex:/(?=\s*(?:[^,\{\[\}\]\s]+|"(?:[^"\\]|\\.)*")\s*:)/,push:[{token:"paren.rparen",regex:/---none---/,next:"pop"},{include:"#keyname"},{include:"#value"},{token:"text",regex:/:/},{token:"text",regex:/,/},{defaultToken:"paren"}]}],"#string":[{token:"string",regex:/"/,push:[{token:"string",regex:/"/,next:"pop"},{token:"constant.language.escape",regex:/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/},{token:"invalid.illegal",regex:/\\./},{defaultToken:"string"}]}],"#ustring":[{token:"string",regex:/\b[^:,0-9\-\{\[\}\]\s].*$/}],"#value":[{include:"#constant"},{include:"#number"},{include:"#string"},{include:"#array"},{include:"#object"},{include:"#comments"},{include:"#mstring"},{include:"#ustring"}]},this.normalizeRules()};s.metaData={fileTypes:["hjson"],foldingStartMarker:"(?x: # turn on extended mode\n ^ # a line beginning with\n \\s* # some optional space\n [{\\[] # the start of an object or array\n (?! # but not followed by\n .* # whatever\n [}\\]] # and the close of an object or array\n ,? # an optional comma\n \\s* # some optional space\n $ # at the end of the line\n )\n | # ...or...\n [{\\[] # the start of an object or array\n \\s* # some optional space\n $ # at the end of the line\n )",foldingStopMarker:"(?x: # turn on extended mode\n ^ # a line beginning with\n \\s* # some optional space\n [}\\]] # and the close of an object or array\n )",keyEquivalent:"^~J",name:"Hjson",scopeName:"source.hjson"},r.inherits(s,i),t.HjsonHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/hjson",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/hjson_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./hjson_highlight_rules").HjsonHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/hjson"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/hjson"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-html.js b/mixly/common/modules/web-modules/ace/mode-html.js new file mode 100644 index 00000000..7dd773c2 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-html.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}); (function() { + ace.require(["ace/mode/html"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-html_elixir.js b/mixly/common/modules/web-modules/ace/mode-html_elixir.js new file mode 100644 index 00000000..0a52a6be --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-html_elixir.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["meta.module.elixir","keyword.control.module.elixir","meta.module.elixir","entity.name.type.module.elixir"],regex:"^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)"},{token:"comment.documentation.heredoc",regex:'@(?:module|type)?doc (?:~[a-z])?"""',push:[{token:"comment.documentation.heredoc",regex:'\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:'@(?:module|type)?doc ~[A-Z]"""',push:[{token:"comment.documentation.heredoc",regex:'\\s*"""',next:"pop"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:"@(?:module|type)?doc (?:~[a-z])?'''",push:[{token:"comment.documentation.heredoc",regex:"\\s*'''",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:"@(?:module|type)?doc ~[A-Z]'''",push:[{token:"comment.documentation.heredoc",regex:"\\s*'''",next:"pop"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.false",regex:"@(?:module|type)?doc false",comment:"@doc false is treated as documentation"},{token:"comment.documentation.string",regex:'@(?:module|type)?doc "',push:[{token:"comment.documentation.string",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.string"}],comment:"@doc with string is treated as documentation"},{token:"keyword.control.elixir",regex:"\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b"},{token:"punctuation.definition.constant.elixir",regex:":'",push:[{token:"punctuation.definition.constant.elixir",regex:"'",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"constant.other.symbol.single-quoted.elixir"}]},{token:"punctuation.definition.constant.elixir",regex:':"',push:[{token:"punctuation.definition.constant.elixir",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"constant.other.symbol.double-quoted.elixir"}]},{token:"punctuation.definition.string.begin.elixir",regex:"(?:''')",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?>''')",push:[{token:"punctuation.definition.string.end.elixir",regex:"^\\s*'''",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"support.function.variable.quoted.single.heredoc.elixir"}],comment:"Single-quoted heredocs"},{token:"punctuation.definition.string.begin.elixir",regex:"'",push:[{token:"punctuation.definition.string.end.elixir",regex:"'",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"support.function.variable.quoted.single.elixir"}],comment:"single quoted string (allows for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'(?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'(?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.heredoc.elixir"}],comment:"Double-quoted heredocs"},{token:"punctuation.definition.string.begin.elixir",regex:'"',push:[{token:"punctuation.definition.string.end.elixir",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.elixir"}],comment:"double quoted string (allows for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'~[a-z](?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'~[a-z](?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.heredoc.elixir"}],comment:"Double-quoted heredocs sigils"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\{",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\}[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\[",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\][a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\<",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\>[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\(",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\)[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z][^\\w]",push:[{token:"punctuation.definition.string.end.elixir",regex:"[^\\w][a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'~[A-Z](?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'~[A-Z](?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"Double-quoted heredocs sigils"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\{",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\}[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\[",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\][a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\<",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\>[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\(",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\)[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z][^\\w]",push:[{token:"punctuation.definition.string.end.elixir",regex:"[^\\w][a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:["punctuation.definition.constant.elixir","constant.other.symbol.elixir"],regex:"(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)",comment:"symbols"},{token:"punctuation.definition.constant.elixir",regex:"(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)",comment:"symbols"},{token:["punctuation.definition.comment.elixir","comment.line.number-sign.elixir"],regex:"(#)(.*)"},{token:"constant.numeric.elixir",regex:"\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?=?"},{token:"keyword.operator.bitwise.elixir",regex:"\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}"},{token:"keyword.operator.logical.elixir",regex:"!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b",originalRegex:"(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b"},{token:"keyword.operator.arithmetic.elixir",regex:"\\*|\\+|\\-|/"},{token:"keyword.operator.other.elixir",regex:"\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>"},{token:"keyword.operator.assignment.elixir",regex:"="},{token:"punctuation.separator.other.elixir",regex:":"},{token:"punctuation.separator.statement.elixir",regex:"\\;"},{token:"punctuation.separator.object.elixir",regex:","},{token:"punctuation.separator.method.elixir",regex:"\\."},{token:"punctuation.section.scope.elixir",regex:"\\{|\\}"},{token:"punctuation.section.array.elixir",regex:"\\[|\\]"},{token:"punctuation.section.function.elixir",regex:"\\(|\\)"}],"#escaped_char":[{token:"constant.character.escape.elixir",regex:"\\\\(?:x[\\da-fA-F]{1,2}|.)"}],"#interpolated_elixir":[{token:["source.elixir.embedded.source","source.elixir.embedded.source.empty"],regex:"(#\\{)(\\})"},{todo:{token:"punctuation.section.embedded.elixir",regex:"#\\{",push:[{token:"punctuation.section.embedded.elixir",regex:"\\}",next:"pop"},{include:"#nest_curly_and_self"},{include:"$self"},{defaultToken:"source.elixir.embedded.source"}]}}],"#nest_curly_and_self":[{token:"punctuation.section.scope.elixir",regex:"\\{",push:[{token:"punctuation.section.scope.elixir",regex:"\\}",next:"pop"},{include:"#nest_curly_and_self"}]},{include:"$self"}],"#regex_sub":[{include:"#interpolated_elixir"},{include:"#escaped_char"},{token:["punctuation.definition.arbitrary-repitition.elixir","string.regexp.arbitrary-repitition.elixir","string.regexp.arbitrary-repitition.elixir","punctuation.definition.arbitrary-repitition.elixir"],regex:"(\\{)(\\d+)((?:,\\d+)?)(\\})"},{token:"punctuation.definition.character-class.elixir",regex:"\\[(?:\\^?\\])?",push:[{token:"punctuation.definition.character-class.elixir",regex:"\\]",next:"pop"},{include:"#escaped_char"},{defaultToken:"string.regexp.character-class.elixir"}]},{token:"punctuation.definition.group.elixir",regex:"\\(",push:[{token:"punctuation.definition.group.elixir",regex:"\\)",next:"pop"},{include:"#regex_sub"},{defaultToken:"string.regexp.group.elixir"}]},{token:["punctuation.definition.comment.elixir","comment.line.number-sign.elixir"],regex:"(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)",originalRegex:"(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$",comment:"We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags."}]},this.normalizeRules()};s.metaData={comment:"Textmate bundle for Elixir Programming Language.",fileTypes:["ex","exs"],firstLineMatch:"^#!/.*\\belixir",foldingStartMarker:"(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$",foldingStopMarker:"^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)",keyEquivalent:"^~E",name:"Elixir",scopeName:"source.elixir"},r.inherits(s,i),t.ElixirHighlightRules=s}),ace.define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./elixir_highlight_rules").ElixirHighlightRules,o=function(){i.call(this);var e=[{regex:"<%%|%%>",token:"constant.language.escape"},{token:"comment.start.eex",regex:"<%#",push:[{token:"comment.end.eex",regex:"%>",next:"pop",defaultToken:"comment"}]},{token:"support.elixir_tag",regex:"<%+(?!>)[-=]?",push:"elixir-start"}],t=[{token:"support.elixir_tag",regex:"%>",next:"pop"},{token:"comment",regex:"#(?:[^%]|%[^>])*"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(s,"elixir-",t,["start"]),this.normalizeRules()};r.inherits(o,i),t.HtmlElixirHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};r.inherits(d,i),t.RubyHighlightRules=d}),ace.define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./ruby_highlight_rules").RubyHighlightRules,o=function(){i.call(this);var e=[{regex:"<%%|%%>",token:"constant.language.escape"},{token:"comment.start.erb",regex:"<%#",push:[{token:"comment.end.erb",regex:"%>",next:"pop",defaultToken:"comment"}]},{token:"support.ruby_tag",regex:"<%+(?!>)[-=]?",push:"ruby-start"}],t=[{token:"support.ruby_tag",regex:"%>",next:"pop"},{token:"comment",regex:"#(?:[^%]|%[^>])*"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(s,"ruby-",t,["start"]),this.normalizeRules()};r.inherits(o,i),t.HtmlRubyHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={"class":1,def:1,module:1,"do":1,unless:1,"if":1,"while":1,"for":1,until:1,begin:1,"else":0,elsif:0,rescue:0,ensure:0,when:0,end:-1,"case":1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/html_ruby",["require","exports","module","ace/lib/oop","ace/mode/html_ruby_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_ruby_highlight_rules").HtmlRubyHighlightRules,s=e("./html").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./ruby").Mode,f=function(){s.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":o,"css-":u,"ruby-":a})};r.inherits(f,s),function(){this.$id="ace/mode/html_ruby"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/html_ruby"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ini.js b/mixly/common/modules/web-modules/ace/mode-ini.js new file mode 100644 index 00000000..0a429cbf --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ini.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",o=function(){this.$rules={start:[{token:"punctuation.definition.comment.ini",regex:"#.*",push_:[{token:"comment.line.number-sign.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.number-sign.ini"}]},{token:"punctuation.definition.comment.ini",regex:";.*",push_:[{token:"comment.line.semicolon.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.semicolon.ini"}]},{token:["keyword.other.definition.ini","text","punctuation.separator.key-value.ini"],regex:"\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)"},{token:["punctuation.definition.entity.ini","constant.section.group-title.ini","punctuation.definition.entity.ini"],regex:"^(\\[)(.*?)(\\])"},{token:"punctuation.definition.string.begin.ini",regex:"'",push:[{token:"punctuation.definition.string.end.ini",regex:"'",next:"pop"},{token:"constant.language.escape",regex:s},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:s},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};o.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},r.inherits(o,i),t.IniHighlightRules=o}),ace.define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),ace.define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ini_highlight_rules").IniHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment=null,this.$id="ace/mode/ini"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/ini"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-io.js b/mixly/common/modules/web-modules/ace/mode-io.js new file mode 100644 index 00000000..cf97b3bb --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-io.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/io_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.control.io",regex:"\\b(?:if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\\b"},{token:"punctuation.definition.comment.io",regex:"/\\*",push:[{token:"punctuation.definition.comment.io",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.io"}]},{token:"punctuation.definition.comment.io",regex:"//",push:[{token:"comment.line.double-slash.io",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.io"}]},{token:"punctuation.definition.comment.io",regex:"#",push:[{token:"comment.line.number-sign.io",regex:"$",next:"pop"},{defaultToken:"comment.line.number-sign.io"}]},{token:"variable.language.io",regex:"\\b(?:self|sender|target|proto|protos|parent)\\b",comment:"I wonder if some of this isn't variable.other.language? --Allan; scoping this as variable.language to match Objective-C's handling of 'self', which is inconsistent with C++'s handling of 'this' but perhaps intentionally so -- Rob"},{token:"keyword.operator.io",regex:"<=|>=|=|:=|\\*|\\||\\|\\||\\+|-|/|&|&&|>|<|\\?|@|@@|\\b(?:and|or)\\b"},{token:"constant.other.io",regex:"\\bGL[\\w_]+\\b"},{token:"support.class.io",regex:"\\b[A-Z](?:\\w+)?\\b"},{token:"support.function.io",regex:"\\b(?:clone|call|init|method|list|vector|block|\\w+(?=\\s*\\())\\b"},{token:"support.function.open-gl.io",regex:"\\bgl(?:u|ut)?[A-Z]\\w+\\b"},{token:"punctuation.definition.string.begin.io",regex:'"""',push:[{token:"punctuation.definition.string.end.io",regex:'"""',next:"pop"},{token:"constant.character.escape.io",regex:"\\\\."},{defaultToken:"string.quoted.triple.io"}]},{token:"punctuation.definition.string.begin.io",regex:'"',push:[{token:"punctuation.definition.string.end.io",regex:'"',next:"pop"},{token:"constant.character.escape.io",regex:"\\\\."},{defaultToken:"string.quoted.double.io"}]},{token:"constant.numeric.io",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"variable.other.global.io",regex:"Lobby\\b"},{token:"constant.language.io",regex:"\\b(?:TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\\b"}]},this.normalizeRules()};s.metaData={fileTypes:["io"],keyEquivalent:"^~I",name:"Io",scopeName:"source.io"},r.inherits(s,i),t.IoHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./io_highlight_rules").IoHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/io",this.snippetFileId="ace/snippets/io"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/io"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ion.js b/mixly/common/modules/web-modules/ace/mode-ion.js new file mode 100644 index 00000000..521beece --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ion.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="TRUE|FALSE",t=e,n="NULL.NULL|NULL.BOOL|NULL.INT|NULL.FLOAT|NULL.DECIMAL|NULL.TIMESTAMP|NULL.STRING|NULL.SYMBOL|NULL.BLOB|NULL.CLOB|NULL.STRUCT|NULL.LIST|NULL.SEXP|NULL",r=n,i=this.createKeywordMapper({"constant.language.bool.ion":t,"constant.language.null.ion":r},"constant.other.symbol.identifier.ion",!0),s={token:i,regex:"\\b\\w+(?:\\.\\w+)?\\b"};this.$rules={start:[{include:"value"}],value:[{include:"whitespace"},{include:"comment"},{include:"annotation"},{include:"string"},{include:"number"},{include:"keywords"},{include:"symbol"},{include:"clob"},{include:"blob"},{include:"struct"},{include:"list"},{include:"sexp"}],sexp:[{token:"punctuation.definition.sexp.begin.ion",regex:"\\(",push:[{token:"punctuation.definition.sexp.end.ion",regex:"\\)",next:"pop"},{include:"comment"},{include:"value"},{token:"storage.type.symbol.operator.ion",regex:"[\\!\\#\\%\\&\\*\\+\\-\\./\\;\\<\\=\\>\\?\\@\\^\\`\\|\\~]+"}]}],comment:[{token:"comment.line.ion",regex:"//[^\\n]*"},{token:"comment.block.ion",regex:"/\\*",push:[{token:"comment.block.ion",regex:"[*]/",next:"pop"},{token:"comment.block.ion",regex:"[^*/]+"},{token:"comment.block.ion",regex:"[*/]+"}]}],list:[{token:"punctuation.definition.list.begin.ion",regex:"\\[",push:[{token:"punctuation.definition.list.end.ion",regex:"\\]",next:"pop"},{include:"comment"},{include:"value"},{token:"punctuation.definition.list.separator.ion",regex:","}]}],struct:[{token:"punctuation.definition.struct.begin.ion",regex:"\\{",push:[{token:"punctuation.definition.struct.end.ion",regex:"\\}",next:"pop"},{include:"comment"},{include:"value"},{token:"punctuation.definition.struct.separator.ion",regex:",|:"}]}],blob:[{token:["punctuation.definition.blob.begin.ion","string.other.blob.ion","punctuation.definition.blob.end.ion"],regex:'(\\{\\{)([^"]*)(\\}\\})'}],clob:[{token:["punctuation.definition.clob.begin.ion","string.other.clob.ion","punctuation.definition.clob.end.ion"],regex:'(\\{\\{)("[^"]*")(\\}\\})'}],symbol:[{token:"storage.type.symbol.quoted.ion",regex:"(['])((?:(?:\\\\')|(?:[^']))*?)(['])"},{token:"storage.type.symbol.identifier.ion",regex:"[\\$_a-zA-Z][\\$_a-zA-Z0-9]*"}],number:[{token:"constant.numeric.timestamp.ion",regex:"\\d{4}(?:-\\d{2})?(?:-\\d{2})?T(?:\\d{2}:\\d{2})(?::\\d{2})?(?:\\.\\d+)?(?:Z|[-+]\\d{2}:\\d{2})?"},{token:"constant.numeric.timestamp.ion",regex:"\\d{4}-\\d{2}-\\d{2}T?"},{token:"constant.numeric.integer.binary.ion",regex:"-?0[bB][01](?:_?[01])*"},{token:"constant.numeric.integer.hex.ion",regex:"-?0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*"},{token:"constant.numeric.float.ion",regex:"-?(?:0|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?(?:[eE][+-]?\\d+)"},{token:"constant.numeric.float.ion",regex:"(?:[-+]inf)|(?:nan)"},{token:"constant.numeric.decimal.ion",regex:"-?(?:0|[1-9](?:_?\\d)*)(?:(?:(?:\\.(?:\\d(?:_?\\d)*)?)(?:[dD][+-]?\\d+)|\\.(?:\\d(?:_?\\d)*)?)|(?:[dD][+-]?\\d+))"},{token:"constant.numeric.integer.ion",regex:"-?(?:0|[1-9](?:_?\\d)*)"}],string:[{token:["punctuation.definition.string.begin.ion","string.quoted.double.ion","punctuation.definition.string.end.ion"],regex:'(["])((?:(?:\\\\")|(?:[^"]))*?)(["])'},{token:"punctuation.definition.string.begin.ion",regex:"'{3}",push:[{token:"punctuation.definition.string.end.ion",regex:"'{3}",next:"pop"},{token:"string.quoted.triple.ion",regex:"(?:\\\\'|[^'])+"},{token:"string.quoted.triple.ion",regex:"'"}]}],annotation:[{token:["variable.language.annotation.ion","punctuation.definition.annotation.ion"],regex:/('(?:[^'\\]|\\.)*')\s*(::)/},{token:["variable.language.annotation.ion","punctuation.definition.annotation.ion"],regex:"([\\$_a-zA-Z][\\$_a-zA-Z0-9]*)\\s*(::)"}],whitespace:[{token:"text.ion",regex:"\\s+"}]},this.$rules.keywords=[s],this.normalizeRules()};r.inherits(s,i),t.IonHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/ion",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ion_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ion_highlight_rules").IonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/ion"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/ion"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-jack.js b/mixly/common/modules/web-modules/ace/mode-jack.js new file mode 100644 index 00000000..59606236 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-jack.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"string",regex:'"',next:"string2"},{token:"string",regex:"'",next:"string1"},{token:"constant.numeric",regex:"-?0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"(?:0|[-+]?[1-9][0-9]*)\\b"},{token:"constant.binary",regex:"<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"constant.language.null",regex:"null\\b"},{token:"storage.type",regex:"(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b"},{token:"keyword",regex:"(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b"},{token:"language.builtin",regex:"(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b"},{token:"comment",regex:"--.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"storage.form",regex:"@[a-z]+"},{token:"constant.other.symbol",regex:":+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?"},{token:"variable",regex:"[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?"},{token:"keyword.operator",regex:"\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!"},{token:"text",regex:"\\s+"}],string1:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"'",next:"start"},{token:"string",regex:"",next:"start"}],string2:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};r.inherits(s,i),t.JackHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./jack_highlight_rules").JackHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/jack"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/jack"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-jade.js b/mixly/common/modules/web-modules/ace/mode-jade.js new file mode 100644 index 00000000..85d9d570 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-jade.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unquote".split("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),u=i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|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|legend|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|tt|u|ul|var|video|wbr|xmp".split("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z_][a-z0-9-_]*"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|=|!=|-|%|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes|yield|export|import|default",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift()||"";if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";function l(e,t){return{token:"entity.name.function.jade",regex:"^\\s*\\:"+e,next:t+"start"}}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./markdown_highlight_rules").MarkdownHighlightRules,o=e("./scss_highlight_rules").ScssHighlightRules,u=e("./less_highlight_rules").LessHighlightRules,a=e("./coffee_highlight_rules").CoffeeHighlightRules,f=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"keyword.control.import.include.jade",regex:"\\s*\\binclude\\b"},{token:"keyword.other.doctype.jade",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},{onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/^\s*\/\//,next:"comment_block"},l("markdown","markdown-"),l("sass","sass-"),l("less","less-"),l("coffee","coffee-"),{token:["storage.type.function.jade","entity.name.function.jade","punctuation.definition.parameters.begin.jade","variable.parameter.function.jade","punctuation.definition.parameters.end.jade"],regex:"^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"},{token:["storage.type.function.jade","entity.name.function.jade"],regex:"^(\\s*mixin)( [\\w\\-]+)"},{token:"source.js.embedded.jade",regex:"^\\s*(?:-|=|!=)",next:"js-start"},{token:"string.interpolated.jade",regex:"[#!]\\{[^\\}]+\\}"},{token:"meta.tag.any.jade",regex:/^\s*(?!\w+:)(?:[\w-]+|(?=\.|#)])/,next:"tag_single"},{token:"suport.type.attribute.id.jade",regex:"#\\w+"},{token:"suport.type.attribute.class.jade",regex:"\\.\\w+"},{token:"punctuation",regex:"\\s*(?:\\()",next:"tag_attributes"}],comment_block:[{regex:/^\s*(?:\/\/)?/,onMatch:function(e,t,n){return e.length<=n[1]?e.slice(-1)=="/"?(n[1]=e.length-2,this.next="","comment"):(n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}],tag_single:[{token:"entity.other.attribute-name.class.jade",regex:"\\.[\\w-]+"},{token:"entity.other.attribute-name.id.jade",regex:"#[\\w-]+"},{token:["text","punctuation"],regex:"($)|((?!\\.|#|=|-))",next:"start"}],tag_attributes:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:["entity.other.attribute-name.jade","punctuation"],regex:"([a-zA-Z:\\.-]+)(=)?",next:"attribute_strings"},{token:"punctuation",regex:"\\)",next:"start"}],attribute_strings:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"string",regex:"(?=\\S)",next:"tag_attributes"}],qqstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"tag_attributes"}],qstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"tag_attributes"}]},this.embedRules(f,"js-",[{token:"text",regex:".$",next:"start"}])};r.inherits(c,i),t.JadeHighlightRules=c}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[a-zA-Z_$][a-zA-Z0-9_$]*",t="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|var|exports|opens|requires|uses|yield|module|permits|(?:non\\-)?sealed|var|provides|to|when|open|record|transitive|with",n="null|Infinity|NaN|undefined",r="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",s=this.createKeywordMapper({"variable.language":"this","constant.language":n,"support.function":r},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",next:[{regex:"}",token:"paren.rparen",next:"start"},{regex:"\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",token:"keyword"}]},{token:"text",regex:"\\s+"},{token:"identifier",regex:"\\w+"},{token:"punctuation.operator",regex:"."},{token:"text",regex:"\\s+"},{regex:"",next:"start"}]},{include:"statements"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],strings:[{token:["punctuation","string"],regex:/(\.)(")/,push:[{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"string",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}],"multiline-strings":[{token:["punctuation","string"],regex:/(\.)(""")/,push:[{token:"string",regex:'"""',next:"pop"},{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:'"""',push:[{token:"string",regex:'"""',next:"pop"},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]}],constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+e+")\\b"},{token:"keyword",regex:"(?:"+t+")\\b"},{token:"storage.type.annotation",regex:"@"+e+"\\b"},{token:"entity.name.function",regex:e+"(?=\\()"},{token:s,regex:e+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.JavaHighlightRules=o}),ace.define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.importRegex=/^import /,this.getCStyleFoldWidget=this.getFoldWidget,this.getFoldWidget=function(e,t,n){if(t==="markbegin"){var r=e.getLine(n);if(this.importRegex.test(r))if(n==0||!this.importRegex.test(e.getLine(n-1)))return"start"}return this.getCStyleFoldWidget(e,t,n)},this.getCstyleFoldWidgetRange=this.getFoldWidgetRange,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n),o=i.match(this.importRegex);if(!o||t!=="markbegin")return this.getCstyleFoldWidgetRange(e,t,n,r);var u=o[0].length,a=e.getLength(),f=n,l=n;while(++nf){var c=e.getLine(l).length;return new s(f,u,l,c)}}}.call(o.prototype)}),ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./java_highlight_rules").JavaHighlightRules,o=e("./folding/java").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/java",this.snippetFileId="ace/snippets/java"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/java"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-javascript.js b/mixly/common/modules/web-modules/ace/mode-javascript.js new file mode 100644 index 00000000..de132a4a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-javascript.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/javascript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-jexl.js b/mixly/common/modules/web-modules/ace/mode-jexl.js new file mode 100644 index 00000000..27b859d0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-jexl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jexl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="return|var|function|and|or|not|if|for|while|do|continue|break",t="null",n="empty|size|new",r=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier"),i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}||.)";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"##.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:["comment","text"],regex:"(#pragma)(\\s.*$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"`",push:[{token:"constant.language.escape",regex:i},{token:"string",regex:"`",next:"pop"},{token:"lparen",regex:"\\${",push:[{token:"rparen",regex:"}",next:"pop"},{include:"start"}]},{defaultToken:"string"}]},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"string.regexp",regex:"~/",push:[{token:"constant.language.escape",regex:"\\\\/"},{token:"string.regexp",regex:"$|/",next:"pop"},{defaultToken:"string.regexp"}]},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&&|\\|\\||!|&|\\||\\^|~|\\?|:|\\?\\?|==|!=|<|<=|>|>=|=~|!~|=\\^|=\\$|!\\$|\\+|\\-|\\*|%|\\/|="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{token:"punctuation",regex:"[,.]"},{token:"storage.type.annotation",regex:"@[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.JexlHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/jexl",["require","exports","module","ace/lib/oop","ace/mode/jexl_highlight_rules","ace/mode/text","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./jexl_highlight_rules").JexlHighlightRules,s=e("./text").Mode,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(u,s),function(){this.lineCommentStart=["//","##"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/jexl"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/jexl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-json.js b/mixly/common/modules/web-modules/ace/mode-json.js new file mode 100644 index 00000000..a1338c79 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-json.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(f,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/json"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-json5.js b/mixly/common/modules/web-modules/ace/mode-json5.js new file mode 100644 index 00000000..85399357 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-json5.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),ace.define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./json_highlight_rules").JsonHighlightRules,s=function(){i.call(this);var e=[{token:"variable",regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:"variable",regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:"constant.language.boolean",regex:/(?:null)\b/},{token:"string",regex:/'/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/'|$/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:/"(?![^"]*":)/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/"|$/,next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(s,i),t.Json5HighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/json5",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json5_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json5_highlight_rules").Json5HighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/json5"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/json5"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-jsoniq.js b/mixly/common/modules/web-modules/ace/mode-jsoniq.js new file mode 100644 index 00000000..afb83815 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-jsoniq.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function o(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[u]={exports:{}};t[u][0].call(c.exports,function(e){var n=t[u][1][e];return o(n?n:e)},c,c.exports,r,t,n,i)}return n[u].exports}var s=typeof e=="function"&&e;for(var u=0;ux?x:w),m=b,g=w,y=0):d(b,w,0,y,e)}function l(){g!=b&&(m=g,g=b,E.whitespace(m,g))}function c(e){var t;for(;;){t=C(e);if(t!=30)break}return t}function h(e){y==0&&(y=c(e),b=T,w=N)}function p(e){y==0&&(y=C(e),b=T,w=N)}function d(e,t,r,i,s){throw new n.ParseException(e,t,r,i,s)}function C(e){var t=!1;T=N;var n=N,r=i.INITIAL[e],s=0;for(var o=r&4095;o!=0;){var u,a=n>4;u=i.MAP1[(a&15)+i.MAP1[(f&31)+i.MAP1[f>>5]]]}else{if(a<56320){var f=n=56320&&f<57344&&(++n,a=((a&1023)<<10)+(f&1023)+65536,t=!0)}var l=0,c=5;for(var h=3;;h=c+l>>1){if(i.MAP2[h]>a)c=h-1;else{if(!(i.MAP2[6+h]c){u=0;break}}}s=o;var p=(u<<12)+o-1;o=i.TRANSITION[(p&15)+i.TRANSITION[p>>4]],o>4095&&(r=o,o&=4095,N=n)}r>>=12;if(r==0){N=n-1;var f=N=56320&&f<57344&&--N,d(T,N,s,-1,-1)}if(t)for(var v=r>>9;v>0;--v){--N;var f=N=56320&&f<57344&&--N}else N-=r>>9;return(r&511)-1}r(e,t);var n=this;this.ParseException=function(e,t,n,r,i){var s=e,o=t,u=n,a=r,f=i;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return u},this.getExpected=function(){return f},this.getOffending=function(){return a},this.getMessage=function(){return a<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return S},this.getOffendingToken=function(e){var t=e.getOffending();return t>=0?i.TOKEN[t]:null},this.getExpectedTokenSet=function(e){var t;return e.getExpected()<0?t=i.getTokenSet(-e.getState()):t=[i.TOKEN[e.getExpected()]],t},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),r=S.substring(0,e.getBegin()),i=r.split("\n"),s=i.length,o=i[s-1].length+1,u=e.getEnd()-e.getBegin();return e.getMessage()+(n==null?"":", found "+n)+"\nwhile expecting "+(t.length==1?t[0]:"["+t.join(", ")+"]")+"\n"+(u==0||n!=null?"":"after successfully scanning "+u+" characters beginning ")+"at line "+s+", column "+o+":\n..."+S.substring(e.getBegin(),Math.min(S.length,e.getBegin()+64))+"..."},this.parse_start=function(){E.startNonterminal("start",g),h(14);switch(y){case 58:f(58);break;case 57:f(57);break;case 59:f(59);break;case 43:f(43);break;case 45:f(45);break;case 44:f(44);break;case 37:f(37);break;case 41:f(41);break;case 277:f(277);break;case 274:f(274);break;case 42:f(42);break;case 46:f(46);break;case 52:f(52);break;case 65:f(65);break;case 66:f(66);break;case 49:f(49);break;case 51:f(51);break;case 56:f(56);break;case 54:f(54);break;case 36:f(36);break;case 276:f(276);break;case 40:f(40);break;case 5:f(5);break;case 4:f(4);break;case 6:f(6);break;case 15:f(15);break;case 16:f(16);break;case 18:f(18);break;case 19:f(19);break;case 20:f(20);break;case 8:f(8);break;case 9:f(9);break;case 7:f(7);break;case 35:f(35);break;default:o()}E.endNonterminal("start",g)},this.parse_StartTag=function(){E.startNonterminal("StartTag",g),h(8);switch(y){case 61:f(61);break;case 53:f(53);break;case 29:f(29);break;case 60:f(60);break;case 37:f(37);break;case 41:f(41);break;default:f(35)}E.endNonterminal("StartTag",g)},this.parse_TagContent=function(){E.startNonterminal("TagContent",g),p(11);switch(y){case 25:f(25);break;case 9:f(9);break;case 10:f(10);break;case 58:f(58);break;case 57:f(57);break;case 21:f(21);break;case 31:f(31);break;case 275:f(275);break;case 278:f(278);break;case 274:f(274);break;default:f(35)}E.endNonterminal("TagContent",g)},this.parse_AposAttr=function(){E.startNonterminal("AposAttr",g),p(10);switch(y){case 23:f(23);break;case 27:f(27);break;case 21:f(21);break;case 31:f(31);break;case 275:f(275);break;case 278:f(278);break;case 274:f(274);break;case 41:f(41);break;default:f(35)}E.endNonterminal("AposAttr",g)},this.parse_QuotAttr=function(){E.startNonterminal("QuotAttr",g),p(9);switch(y){case 22:f(22);break;case 26:f(26);break;case 21:f(21);break;case 31:f(31);break;case 275:f(275);break;case 278:f(278);break;case 274:f(274);break;case 37:f(37);break;default:f(35)}E.endNonterminal("QuotAttr",g)},this.parse_CData=function(){E.startNonterminal("CData",g),p(1);switch(y){case 14:f(14);break;case 67:f(67);break;default:f(35)}E.endNonterminal("CData",g)},this.parse_XMLComment=function(){E.startNonterminal("XMLComment",g),p(0);switch(y){case 12:f(12);break;case 50:f(50);break;default:f(35)}E.endNonterminal("XMLComment",g)},this.parse_PI=function(){E.startNonterminal("PI",g),p(3);switch(y){case 13:f(13);break;case 62:f(62);break;case 63:f(63);break;default:f(35)}E.endNonterminal("PI",g)},this.parse_Pragma=function(){E.startNonterminal("Pragma",g),p(2);switch(y){case 11:f(11);break;case 38:f(38);break;case 39:f(39);break;default:f(35)}E.endNonterminal("Pragma",g)},this.parse_Comment=function(){E.startNonterminal("Comment",g),p(4);switch(y){case 55:f(55);break;case 44:f(44);break;case 32:f(32);break;default:f(35)}E.endNonterminal("Comment",g)},this.parse_CommentDoc=function(){E.startNonterminal("CommentDoc",g),p(6);switch(y){case 33:f(33);break;case 34:f(34);break;case 55:f(55);break;case 44:f(44);break;default:f(35)}E.endNonterminal("CommentDoc",g)},this.parse_QuotString=function(){E.startNonterminal("QuotString",g),p(5);switch(y){case 3:f(3);break;case 2:f(2);break;case 1:f(1);break;case 37:f(37);break;default:f(35)}E.endNonterminal("QuotString",g)},this.parse_AposString=function(){E.startNonterminal("AposString",g),p(7);switch(y){case 21:f(21);break;case 31:f(31);break;case 23:f(23);break;case 24:f(24);break;case 41:f(41);break;default:f(35)}E.endNonterminal("AposString",g)},this.parse_Prefix=function(){E.startNonterminal("Prefix",g),h(13),l(),a(),E.endNonterminal("Prefix",g)},this.parse__EQName=function(){E.startNonterminal("_EQName",g),h(12),l(),o(),E.endNonterminal("_EQName",g)};var v,m,g,y,b,w,E,S,x,T,N};r.getTokenSet=function(e){var t=[],n=e<0?-e:INITIAL[e]&4095;for(var i=0;i<279;i+=32){var s=i,o=(i>>5)*2066+n-1,u=o>>2,a=u>>2,f=r.EXPECTED[(o&3)+r.EXPECTED[(u&3)+r.EXPECTED[(a&3)+r.EXPECTED[a>>2]]]];for(;f!=0;f>>>=1,++s)(f&1)!=0&&t.push(r.TOKEN[s])}return t},r.MAP0=[67,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,37,31,37,38,39,40,41,42,43,44,45,46,31,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,31,62,63,64,65,37],r.MAP1=[108,124,214,214,214,214,214,214,214,214,214,214,214,214,214,214,156,181,181,181,181,181,214,215,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,247,261,277,293,309,347,363,379,416,416,416,408,331,323,331,323,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,433,433,433,433,433,433,433,316,331,331,331,331,331,331,331,331,394,416,416,417,415,416,416,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,330,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,67,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,31,31,31,31,37,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,37,31,37,38,39,40,41,42,43,44,45,46,31,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,31,62,63,64,65,37,37,37,37,37,37,37,37,37,37,37,37,31,31,37,37,37,37,37,37,37,66,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66],r.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,37,31,37,31,31,37],r.INITIAL=[1,2,49155,57348,5,6,7,8,9,10,11,12,13,14,15],r.TRANSITION=[19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,17408,19288,17439,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,22126,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17672,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,19469,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,36919,18234,18262,18278,18294,18320,18336,18361,18397,18419,18432,18304,18448,18485,18523,18553,18583,18599,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,18825,18841,18871,18906,18944,18960,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19074,36169,17439,36866,17466,36890,36866,22314,19105,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,22126,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17672,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,19469,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,36919,18234,18262,18278,18294,18320,18336,18361,18397,18419,18432,18304,18448,18485,18523,18553,18583,18599,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,18825,18841,18871,18906,18944,18960,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22182,19288,19121,36866,17466,18345,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19273,19552,19304,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19332,17423,19363,36866,17466,17537,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,18614,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,19391,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,19427,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36154,19288,19457,36866,17466,17740,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22780,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22375,22197,18469,36866,17466,36890,36866,21991,24018,22987,17556,17575,22288,17486,17509,17525,18373,21331,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,19485,19501,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19537,22390,19568,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19596,19611,19457,36866,17466,36890,36866,18246,19627,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22242,20553,19457,36866,17466,36890,36866,18648,30477,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36472,19288,19457,36866,17466,17809,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,21770,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,19643,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,19672,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,20538,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,17975,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22345,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19726,19742,21529,24035,23112,26225,23511,27749,27397,24035,34360,24035,24036,23114,35166,23114,23114,19758,23511,35247,23511,23511,28447,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,24254,19821,23511,23511,23511,23511,23512,19441,36539,24035,24035,24035,24035,19846,19869,23114,23114,23114,28618,32187,19892,23511,23511,23511,34585,20402,36647,24035,24035,24036,23114,33757,23114,23114,23029,20271,23511,27070,23511,23511,30562,24035,24035,29274,26576,23114,23114,31118,23036,29695,23511,23511,32431,23634,30821,24035,23110,19913,23114,23467,31261,23261,34299,19932,24035,32609,19965,35389,19984,27689,19830,29391,29337,20041,22643,35619,33728,20062,20121,20166,35100,26145,20211,23008,19876,20208,20227,25670,20132,26578,27685,20141,20243,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36094,19288,19457,36866,17466,21724,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22735,19552,20287,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22750,19288,21529,24035,23112,28056,23511,29483,28756,24035,24035,24035,24036,23114,23114,23114,23114,20327,23511,23511,23511,23511,31156,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,24254,20371,23511,23511,23511,23511,27443,20395,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,29457,29700,23511,23511,23511,23511,33444,20402,24035,24035,24035,24036,23114,23114,23114,23114,28350,20421,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,20447,20475,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,20523,22257,20569,20783,21715,17603,20699,20837,20614,20630,21149,20670,21405,17486,17509,17525,18373,19179,20695,20716,20732,20755,19194,18042,21641,20592,20779,20598,21412,17470,17591,20896,17468,17619,20799,20700,21031,20744,20699,20828,18075,21259,20581,20853,18048,20868,20884,17756,17784,17800,17825,17854,21171,21200,20931,20947,21378,20955,20971,18086,20645,21002,20986,18178,17960,18012,18381,18064,29176,21044,21438,21018,21122,21393,21060,21844,21094,20654,17493,18150,18166,18214,25967,20763,21799,21110,21830,21138,21246,21301,18336,18361,21165,21187,20812,21216,21232,21287,21317,18553,21347,21363,21428,21454,21271,21483,21499,21515,21575,21467,18712,21591,21633,21078,18189,18198,20679,21657,21701,21074,21687,21740,21756,21786,21815,21860,21876,21892,21946,21962,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36457,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,36813,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,21981,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,22151,22007,18884,17900,17922,17944,18178,17960,18012,18381,18064,27898,17884,18890,17906,17928,22042,25022,18130,36931,36963,17493,18150,18166,22070,22112,25026,18134,36935,18262,18278,18294,18320,18336,18361,22142,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36109,19288,18469,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22167,19288,19457,36866,17466,17768,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22227,36487,22273,36866,17466,36890,36866,19316,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18749,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,22304,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,19580,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22330,19089,19457,36866,17466,18721,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22765,19347,19457,36866,17466,36890,36866,18114,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34541,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,22540,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29908,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22561,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,23837,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22584,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36442,19288,21605,24035,23112,28137,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,31568,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22690,19288,19457,36866,17466,36890,36866,21991,27584,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,22659,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22360,19552,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22675,22811,19457,36866,17466,36890,36866,19133,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,22827,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36139,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36064,19288,22865,22881,32031,22897,22913,22956,29939,24035,24035,24035,23003,23114,23114,23114,23024,22420,23511,23511,23511,23052,29116,23073,29268,24035,25563,26915,23106,23131,23114,23114,23159,23181,23197,23248,23511,23511,23282,23305,22493,32364,24035,33472,30138,26325,31770,33508,27345,33667,23114,23321,23473,23351,35793,36576,23511,23375,22500,24145,24035,29197,20192,24533,23440,23114,19017,23459,22839,23489,23510,23511,33563,23528,32076,25389,24035,26576,23561,23583,23114,32683,22516,23622,23655,23511,23634,35456,37144,23110,23683,34153,20499,32513,25824,23705,24035,24035,23111,23114,19874,27078,33263,19830,24035,23112,19872,27741,23266,24036,23114,30243,20507,32241,20150,31862,27464,35108,23727,23007,35895,34953,26578,27685,20141,24569,31691,19787,33967,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36427,19552,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,27027,26576,23114,23114,23114,31471,23756,22468,23511,23511,23511,34687,23772,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,23788,24035,24035,24035,21559,23828,23114,23114,23114,25086,22839,23853,23511,23511,23511,23876,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,31761,23909,23953,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36049,19288,21605,30825,23112,23987,23511,24003,31001,27617,24034,24035,24036,24052,24089,23114,23114,22420,24109,24168,23511,23511,29116,24188,27609,20017,29516,24035,26576,24222,19968,23114,24252,33811,22468,24270,33587,23511,24320,27443,22493,24035,24035,24035,24035,24339,23113,23114,23114,23114,28128,28618,29700,23511,23511,23511,28276,34564,20402,24035,24035,32929,24036,23114,23114,23114,24357,23029,22839,23511,23511,23511,24377,25645,24035,34112,24035,26576,23114,26643,23114,32683,22516,23511,25638,23511,23711,24035,24395,27809,23114,24414,20499,24432,30917,23628,24035,30680,23111,23114,30233,27078,25748,24452,24035,23112,19872,27741,23266,24036,23114,24475,19829,26577,26597,26154,24519,24556,24596,23007,20046,20132,26578,24634,20141,24569,31691,24679,24727,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36412,19288,21605,19943,34861,32618,26027,29483,32016,32050,36233,24776,35574,24801,24819,32671,31289,22420,24868,24886,20087,26849,29116,19803,24035,24035,24035,36228,26576,23114,23114,23114,24981,33811,22468,23511,23511,23511,29028,27443,22493,24923,27965,24035,24035,32797,24946,23443,23114,23114,29636,24997,22849,28252,23511,23511,23511,25042,25110,24035,24035,34085,24036,25133,23114,23114,25152,23029,22839,25169,23511,36764,23511,25645,30403,24035,25186,26576,31806,24093,25212,32683,22516,32713,26245,34293,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,32406,23111,23114,28676,30944,27689,25234,24035,23112,19872,37063,23266,24036,23114,30243,20379,26100,29218,20211,30105,25257,25284,23007,20046,20132,26578,27685,20141,24569,24834,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36034,19288,21671,25314,25072,25330,25346,25362,29939,29951,35288,29984,23812,27216,25405,25424,30456,22584,26292,25461,25480,31592,29116,25516,34963,25545,27007,25579,33937,25614,25661,25686,34872,25702,25718,25734,25769,25795,25811,25840,22493,26533,25856,24035,25876,30763,27481,25909,23114,28987,25936,25954,29700,25983,23511,31412,26043,26063,22568,29241,29592,26116,31216,35383,26170,34783,26194,26221,22839,26241,26261,22477,26283,26308,27306,31035,24655,26576,29854,33386,26341,32683,22516,32153,30926,26361,19996,26381,35463,26397,26424,34646,26478,35605,31386,26494,35567,31964,22940,23689,25218,30309,32289,19830,33605,23112,32109,27733,27084,24496,35886,35221,26525,36602,26549,26558,26574,26594,26613,26629,26666,26700,26578,27685,23740,24285,31691,26733,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36397,19552,18991,25887,28117,32618,26776,29483,29939,26802,24035,24035,24036,28664,23114,23114,23114,22420,30297,23511,23511,23511,29116,19803,24035,24035,24035,25559,26576,23114,23114,23114,30525,33811,22468,23511,23511,23511,28725,27443,22493,24035,24035,27249,24035,24035,23113,23114,23114,26827,23114,28618,29700,23511,23511,26845,23511,34564,20402,24035,24035,26979,24036,23114,23114,23114,24974,23029,22839,23511,23511,23511,26865,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,33305,24035,25598,23114,19874,34253,27689,19830,24035,23112,19872,27741,23266,24036,23114,26886,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,26931,24569,26439,26947,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36019,19288,26995,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,27043,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,27061,23511,23511,23511,23511,23512,24694,24035,24035,29978,24035,24035,23113,23114,33114,23114,23114,30010,29700,23511,35913,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,27155,26576,23114,23114,30447,23036,29695,23511,23511,30935,20099,24152,25529,27100,34461,27121,22625,29156,26009,27137,30422,31903,31655,28870,27171,32439,31731,19830,27232,22612,27265,26786,25494,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,20342,27288,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,27322,27339,28020,27361,27382,29939,24035,24035,32581,24036,23114,23114,23114,27425,22420,23511,23511,23511,27442,28306,19803,24035,24035,24035,24035,26710,23114,23114,23114,23114,32261,22468,23511,23511,23511,23511,35719,24694,29510,24035,24035,24035,24035,26717,23114,23114,23114,23114,28618,32217,23511,23511,23511,23511,34585,20402,24035,24035,24035,27459,23114,23114,23114,36252,23029,20271,23511,23511,23511,28840,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,27480,34483,28401,29761,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36382,19288,21605,27497,27517,28504,28898,27569,29939,29401,27600,27323,27633,19025,27662,23114,27705,22420,20483,27721,23511,27765,28306,19803,23540,24035,24610,27781,27805,26650,23114,28573,32990,25920,22468,26870,23511,26684,34262,34737,25057,34622,24035,24035,23971,24206,27825,27847,23114,23114,27865,27885,35766,27914,23511,23511,32766,32844,27934,28795,26909,27955,26092,27988,25445,28005,28036,28052,21965,23511,32196,19897,28072,28102,36534,21541,23801,28153,28180,28197,28221,23036,32695,28251,28268,28292,23667,34825,23930,24580,28322,28344,31627,28366,25996,23628,24035,24035,23111,23114,19874,27078,27689,35625,33477,33359,27674,28393,33992,24036,23114,30243,19829,28417,28433,28463,23008,19876,20208,23007,20046,20132,28489,28520,20141,24569,31691,19787,28550,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,28589,24035,24035,24035,24035,28608,23114,23114,23114,23114,28618,20431,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36004,19288,28634,31951,28565,28702,28718,28741,32544,20175,28792,32086,20105,28811,29059,29862,28856,22420,28886,30354,23359,28922,28306,28952,23888,26320,36506,24035,29331,28968,36609,23114,29003,31661,27061,30649,27366,23511,29023,27918,24694,24035,24035,23893,33094,30867,23113,23114,23114,29044,34184,30010,29700,23511,23511,29081,29102,34585,20402,27789,24035,24035,24036,23114,29132,23114,23114,23029,20271,23511,29153,23511,23511,30562,30174,24035,24035,27409,25438,23114,23114,29172,36668,31332,23511,23511,29192,30144,24035,23110,30203,23114,23467,31544,23261,23628,24035,22545,23111,23114,29213,27078,27689,29234,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,29257,23008,19876,20208,28768,29290,29320,34776,29353,20141,22435,29378,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36367,19288,21605,34616,19006,32618,31497,31507,36216,20184,24035,34393,29424,34668,23114,34900,29447,22420,30360,23511,37089,29473,28306,19803,29499,24398,24035,24035,26576,31799,29532,29550,23114,33811,22468,32298,29571,31184,23511,23512,37127,36628,29589,24035,24135,24035,23113,29608,23114,27831,29634,28618,29652,30037,23511,24172,29671,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,29555,29690,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,29719,24035,23110,29738,23114,23467,34035,29756,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,29777,34364,28181,30243,29799,31920,27272,27185,23008,31126,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29828,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35989,19552,19687,35139,28649,29878,29894,29924,29939,23224,23085,31969,24036,35173,24752,24803,23114,22420,31190,30318,24870,23511,28306,29967,23967,24035,24035,24035,26576,3e4,23114,23114,23114,33811,22468,30026,23511,23511,23511,23512,26078,24035,24035,24035,30053,37137,30071,23114,23114,33368,25136,28618,30723,23511,23511,37096,31356,34585,20402,30092,30127,30160,24036,35740,30219,24960,30259,23029,20271,34042,30285,30342,30376,23289,30055,30400,30419,30438,32640,33532,33514,30472,18792,26267,24323,23057,30493,23639,20008,30196,33188,30517,20075,23511,30541,23628,30578,33928,28776,30594,19874,30610,30637,19830,30677,27646,19872,25779,23266,23232,35016,30243,30696,29812,30712,30746,27206,30779,30807,23007,33395,20132,26578,27685,31703,22928,31691,19787,31079,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36352,19288,23335,30841,26131,30888,30904,30986,29939,24035,24704,31017,20025,23114,26178,31051,31095,22420,23511,22524,31142,31172,28534,31206,35497,25196,24035,28592,24503,23114,31239,31285,23114,31305,31321,31355,31372,31407,23511,30556,24694,24035,27501,19805,24035,24035,23113,23114,31428,24066,23114,28618,29700,23511,31837,18809,23511,34585,31448,24035,24035,24035,23090,23114,23114,23114,23114,31619,35038,23511,23511,23511,23511,33714,24035,33085,24035,29431,23114,31467,23114,23143,31487,23511,31523,23511,35195,36783,24035,30111,23567,23114,23467,31543,31560,23628,24035,24035,23111,23114,19874,30953,31584,34508,24035,31608,26345,37055,23266,31643,31677,31719,31747,31786,31822,26898,23008,19876,31859,23007,20046,20132,26578,27685,20141,24569,31691,31878,31936,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35974,19288,21605,27972,35663,31985,29655,32001,36715,24785,25893,23545,31912,19853,19916,25938,24540,22420,31843,29674,29573,32735,28936,19803,24035,24035,32047,24035,26576,23114,23114,27544,23114,33811,22468,23511,23511,32161,23511,23512,32066,24035,33313,24035,24035,24035,23113,27426,32102,23114,23114,28618,32125,23511,32144,23511,23511,33569,20402,24035,27045,24035,24036,23114,23114,28328,23114,30076,32177,23511,23511,30384,23511,30562,24035,24035,24035,26576,23114,23114,23114,23595,32212,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,22635,25753,32233,32257,32277,19829,26577,26597,20211,23008,19876,32322,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,32352,35285,32380,34196,33016,30661,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,32404,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,32422,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,30269,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,19949,24035,23111,32455,19874,31269,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36337,19552,19209,21617,26509,32475,32491,32529,29939,24035,32578,25241,32597,23114,32634,29007,32656,22420,23511,32729,26365,32751,28306,32788,32882,24035,24035,32813,36727,23114,33182,23114,27553,33235,32829,23511,32706,23511,28906,28377,26962,32881,32904,32898,32920,24035,32953,23114,32977,26408,23114,28164,33006,23511,33039,35774,23511,32306,20402,33076,30872,24035,24036,25408,33110,28979,23114,23029,20271,35835,33130,33054,23511,30562,33148,24035,24035,33167,23114,23114,33775,23036,20459,23511,23511,25464,24646,24035,24035,22446,23114,23114,25627,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,31391,33204,33220,33251,33287,26577,26597,20211,33329,19876,33345,23007,20046,20132,26578,27685,28473,22599,31691,33411,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35959,19288,21907,27243,29843,32618,33427,31507,29939,33460,34090,24035,24036,33493,24416,33530,23114,22420,33548,24379,33585,23511,28306,19803,33603,24202,24035,24035,25593,33749,28205,23114,23114,32388,22468,33853,33060,23511,23511,31339,33621,24035,24035,34397,24618,30757,33663,23114,23114,33683,35684,28618,26678,23511,23511,32506,33699,34585,20402,24035,32562,26973,24036,23114,23114,33377,33773,23029,20271,23511,23511,30621,23511,23860,24035,33791,21553,26576,36558,23114,33809,23036,32857,26047,23511,33827,23634,24035,24035,23110,23114,23114,31252,23511,33845,23628,24035,24459,23111,23114,33869,27078,30791,29783,24035,24742,19872,33895,23266,26462,19710,33879,33919,26577,26597,24123,24930,21930,20208,30501,33953,25268,20252,33983,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36322,19552,23390,33634,35154,34008,34024,34058,35544,34106,34128,26811,33151,34144,34169,34212,23114,34228,34244,34278,34315,23511,34331,34347,34380,34413,24035,24663,26576,34429,34453,34477,29534,33811,22468,34499,34524,34557,25170,34580,35436,23937,34601,24035,24341,26453,23113,34638,34662,23114,24236,28618,34684,34703,34729,23511,35352,34753,34799,24035,34815,32558,34848,34888,35814,34923,23165,29137,23606,30326,30730,34939,33023,30562,36848,34979,24035,24847,34996,23114,23114,35032,29695,35054,23511,23511,35091,33296,35124,24296,28235,24361,36276,32772,35067,35189,27301,30855,24852,22452,35211,35237,35316,25500,35270,23405,24304,35304,29362,24036,23114,35332,19829,26577,26597,20211,23008,19876,20208,35368,28823,23920,32336,35405,20141,24569,31691,35421,35479,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35944,22795,21605,33647,35877,35513,30962,35529,34073,35557,24035,24035,20405,31107,23114,23114,23114,35590,34713,23511,23511,23511,35641,19803,29408,32937,25298,24035,35657,23115,27849,24760,35679,26205,22468,23511,35700,24907,24901,35075,31893,34980,24035,24035,24035,24035,23113,35009,23114,23114,23114,28618,35716,30970,23511,23511,23511,34585,23215,24035,24035,24035,24036,35735,23114,23114,23114,27105,35756,35790,23511,23511,23511,35254,35446,24035,24035,31223,35809,23114,23114,23036,36825,35830,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,31031,20355,19872,33903,23266,24036,23114,28686,19829,26577,26597,20211,23008,23424,20208,24711,31065,24486,26578,27685,20141,19773,35851,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36307,19288,21605,35494,19702,32618,33437,31507,29939,25117,24035,27939,24036,27869,23114,26829,23114,22420,23494,23511,33132,23511,28306,19803,24035,34832,24035,24035,26576,23114,25153,23114,23114,33811,22468,23511,23511,35911,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35929,19288,21605,25860,23112,36185,23511,36201,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,26748,24035,24035,24035,24035,24035,36249,23114,23114,23114,23114,28618,28835,23511,23511,23511,23511,34585,20402,24035,27151,24035,26760,23114,27989,23114,23114,36268,20271,23511,24436,23511,29703,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36292,19288,21605,36503,21922,32618,34534,31507,36522,24035,33793,24035,35864,23114,23114,36555,23417,22420,23511,23511,36574,26020,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,36592,24035,24035,36625,24035,24035,23113,23114,32961,23114,23114,29618,29700,23511,29086,23511,23511,34585,20402,36644,24035,24035,24036,29740,23114,23114,23114,29065,36663,31527,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,31451,23112,36684,23511,36700,29939,24035,24035,24035,30185,23114,23114,23114,27526,22420,23511,23511,23511,32865,28306,19803,36743,24035,27017,24035,26576,27535,23114,31432,23114,33811,22468,33271,23511,32128,23511,23512,24694,24035,27196,24035,24035,24035,23113,32459,23114,23114,23114,28618,29700,33829,36762,23511,23511,34585,20402,24035,36746,24035,29722,23114,23114,34437,23114,34907,20271,23511,23511,18801,23511,23206,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,36837,24035,24035,33739,23114,23114,25094,23511,23261,23628,24035,36780,23111,24073,19874,27078,35344,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22720,19288,36799,36866,17466,36890,36864,21991,22211,22987,17556,17575,22288,17486,17509,17525,18373,17631,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,36883,36906,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22705,19288,19457,36866,17466,36890,36866,19375,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36124,19288,36951,36866,17466,36890,36866,21991,22404,22987,17556,17575,22288,17486,17509,17525,18373,18567,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,36979,36995,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36139,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18027,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36139,19288,21529,24035,23112,23033,23511,31507,25377,24035,24035,24035,24036,23114,23114,23114,23114,37040,23511,23511,23511,23511,28086,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,24254,37079,23511,23511,23511,23511,23512,34766,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,37112,37160,18469,36866,17466,36890,36866,17656,37174,22987,17556,17575,22288,17486,17509,17525,18373,18537,22984,17553,17572,22285,18780,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,36883,36906,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,53264,18,49172,57366,24,8192,28,102432,127011,110630,114730,106539,127011,127011,127011,53264,18,18,0,0,57366,0,24,24,24,0,28,28,28,28,102432,0,0,127011,0,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,0,0,0,2170880,2170880,2170880,3002368,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2576384,2215936,2215936,2215936,2416640,2424832,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2543616,2215936,2215936,2215936,2215936,2215936,2629632,2215936,2617344,2215936,2215936,2215936,2215936,2215936,2215936,2691072,2215936,2707456,2215936,2715648,2215936,2723840,2764800,2215936,2215936,2797568,2215936,2822144,2215936,2215936,2854912,2215936,2215936,2215936,2912256,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,180224,0,0,2174976,0,0,2170880,2617344,2170880,2170880,2170880,2170880,2170880,2170880,2691072,2170880,2707456,2170880,2715648,2170880,2723840,2764800,2170880,2170880,2797568,2170880,2170880,2797568,2170880,2822144,2170880,2170880,2854912,2170880,2170880,2170880,2912256,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2609152,2215936,2215936,2215936,2215936,2215936,2215936,2654208,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,184599,280,0,2174976,0,0,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,544,0,546,0,0,2179072,0,0,0,552,0,0,2170880,2170880,2170880,3117056,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,0,0,0,2158592,2158592,2232320,2232320,0,2240512,2240512,0,0,0,644,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,3129344,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2400256,2215936,2215936,2215936,2215936,2711552,2170880,2170880,2170880,2170880,2170880,2760704,2768896,2789376,2813952,2170880,2170880,2170880,2875392,2904064,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2453504,2457600,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,167936,0,0,0,0,2174976,0,0,2215936,2215936,2514944,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2592768,2215936,2215936,2215936,2215936,2215936,2215936,2215936,32768,0,0,0,0,0,2174976,32768,0,2633728,2215936,2215936,2215936,2215936,2215936,2215936,2711552,2215936,2215936,2215936,2215936,2215936,2760704,2768896,2789376,2813952,2215936,2215936,2215936,2875392,2904064,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,0,65819,2215936,2215936,3031040,2215936,3055616,2215936,2215936,2215936,2215936,3092480,2215936,2215936,3125248,2215936,2215936,2215936,2215936,2215936,2215936,3002368,2215936,2215936,2170880,2170880,2494464,2170880,2170880,0,0,2215936,2215936,2215936,2215936,2215936,2215936,3198976,2215936,0,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,0,0,2379776,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2445312,2170880,2465792,2473984,2170880,2170880,2170880,2170880,2170880,2170880,2523136,2170880,2170880,2641920,2170880,2170880,2170880,2699264,2170880,2727936,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2879488,2170880,2916352,2170880,2170880,2170880,2879488,2170880,2916352,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3026944,2170880,2170880,3063808,2170880,2170880,3112960,2170880,2170880,3133440,2170880,2170880,3112960,2170880,2170880,3133440,2170880,2170880,2170880,3162112,2170880,2170880,3182592,3186688,2170880,2379776,2215936,2523136,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2596864,2215936,2621440,2215936,2215936,2641920,2215936,2215936,0,0,0,0,0,0,2179072,548,0,0,0,0,287,2170880,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3117056,2170880,2170880,2170880,2170880,2215936,2215936,2699264,2215936,2727936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2879488,2215936,2916352,2215936,2215936,0,0,0,0,188416,0,2179072,0,0,0,0,0,287,2170880,0,2171019,2171019,2171019,2400395,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3031179,2171019,3055755,2171019,2171019,2215936,3133440,2215936,2215936,2215936,3162112,2215936,2215936,3182592,3186688,2215936,0,0,0,0,0,0,0,0,0,0,2171019,2171019,2171019,2171019,2171019,2171019,2523275,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2597003,2171019,2621579,2170880,2170880,2170880,3162112,2170880,2170880,3182592,3186688,2170880,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,24,0,4337664,28,2170880,2170880,2170880,2629632,2170880,2170880,2170880,2170880,2719744,2744320,2170880,2170880,2170880,2834432,2838528,2170880,2908160,2170880,2170880,2936832,2215936,2215936,2215936,2215936,2719744,2744320,2215936,2215936,2215936,2834432,2838528,2215936,2908160,2215936,2215936,2936832,2215936,2215936,2985984,2215936,2994176,2215936,2215936,3014656,2215936,3059712,3076096,3088384,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2445312,2215936,2465792,2473984,2215936,2215936,2215936,2215936,2215936,2215936,2171166,2171166,2171166,2171166,2171166,0,0,0,2171166,2171166,2171166,2171166,2171166,2171166,2171019,2171019,2494603,2171019,2171019,2215936,2215936,2215936,3215360,0,0,0,0,0,0,0,0,0,0,0,0,0,2379776,2170880,2170880,2170880,2170880,2985984,2170880,2994176,2170880,2170880,3016168,2170880,3059712,3076096,3088384,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,124,124,0,128,128,2170880,2170880,2170880,3215360,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2486272,2170880,2170880,2506752,2170880,2170880,2170880,2535424,2539520,2170880,2170880,2588672,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2920448,2170880,2170880,2170880,2990080,2170880,2170880,2170880,2170880,3051520,2170880,2170880,2170880,2170880,2170880,2170880,3170304,0,2387968,2392064,2170880,2170880,2433024,2170880,2170880,2170880,3170304,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2486272,2215936,2215936,2506752,2215936,2215936,2215936,2535424,2539520,2215936,2215936,2588672,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,136,0,2215936,2215936,2920448,2215936,2215936,2215936,2990080,2215936,2215936,2215936,2215936,3051520,2215936,2215936,2215936,2215936,2215936,2215936,2215936,3108864,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,3026944,2215936,2215936,3063808,2215936,2215936,3112960,2215936,2215936,2215936,3170304,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2453504,2457600,2170880,2170880,2170880,2486272,2170880,2170880,2506752,2170880,2170880,2170880,2537049,2539520,2170880,2170880,2588672,2170880,2170880,2170880,1508,2170880,2170880,2170880,1512,2170880,2920448,2170880,2170880,2170880,2990080,2170880,2170880,2170880,2461696,2170880,2170880,2170880,2510848,2170880,2170880,2170880,2170880,2580480,2170880,2605056,2637824,2170880,2170880,18,0,0,0,0,0,0,0,0,2220032,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2686976,2748416,2170880,2170880,2170880,2924544,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3121152,2170880,2170880,3145728,3158016,3166208,2170880,2420736,2428928,2170880,2478080,2170880,2170880,2170880,2170880,0,0,2170880,2170880,2170880,2170880,2646016,2670592,0,0,3145728,3158016,3166208,2387968,2392064,2215936,2215936,2433024,2215936,2461696,2215936,2215936,2215936,2510848,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,0,2170880,2215936,2215936,2580480,2215936,2605056,2637824,2215936,2215936,2686976,2748416,2215936,2215936,2215936,2924544,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,286,2170880,2215936,2215936,2215936,2215936,2215936,3121152,2215936,2215936,3145728,3158016,3166208,2387968,2392064,2170880,2170880,2433024,2170880,2461696,2170880,2170880,2170880,2510848,2170880,2170880,1625,2170880,2170880,2580480,2170880,2605056,2637824,2170880,647,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2576384,2170880,2170880,2170880,2170880,2170880,2609152,2170880,2170880,2686976,0,0,2748416,2170880,2170880,0,2170880,2924544,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,0,0,28,28,2170880,3141632,2215936,2420736,2428928,2215936,2478080,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2646016,2670592,2752512,2756608,2846720,2961408,2215936,2998272,2215936,3010560,2215936,2215936,2215936,3141632,2170880,2420736,2428928,2752512,2756608,0,2846720,2961408,2170880,2998272,2170880,3010560,2170880,2170880,2170880,3141632,2170880,2170880,2490368,2215936,2490368,2215936,2215936,2215936,2547712,2555904,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,245760,0,3129344,2170880,2170880,2490368,2170880,2170880,2170880,0,0,2547712,2555904,2170880,2170880,2170880,0,0,0,0,0,0,0,0,0,2220032,0,0,45056,0,2584576,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,2170880,0,0,0,2170880,2170880,2158592,0,0,0,0,0,0,0,0,2220032,0,0,0,0,0,0,0,0,1482,97,97,97,97,97,97,97,1354,97,97,97,97,97,97,97,97,1148,97,97,97,97,97,97,97,2584576,2170880,2170880,1512,0,2170880,2170880,2170880,2170880,2170880,2170880,2441216,2170880,2527232,2170880,2600960,2170880,2850816,2170880,2170880,2170880,3022848,2215936,2441216,2215936,2527232,2215936,2600960,2215936,2850816,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,287,2170880,2215936,3022848,2170880,2441216,2170880,2527232,0,0,2170880,2600960,2170880,0,2850816,2170880,2170880,2170880,2170880,2170880,2523136,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2596864,2170880,2621440,2170880,2170880,2641920,2170880,2170880,2170880,3022848,2170880,2519040,2170880,2170880,2170880,2170880,2170880,2215936,2519040,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,2453504,2457600,2170880,2170880,2170880,2170880,2170880,2170880,2514944,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2592768,2170880,2170880,2519040,0,2024,2170880,2170880,0,2170880,2170880,2170880,2396160,2170880,2170880,2170880,2170880,3018752,2396160,2215936,2215936,2215936,2215936,3018752,2396160,0,2024,2170880,2170880,2170880,2170880,3018752,2170880,2650112,2965504,2170880,2215936,2650112,2965504,2215936,0,0,2170880,2650112,2965504,2170880,2551808,2170880,2551808,2215936,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,141,45,45,67,67,67,67,67,224,67,67,238,67,67,67,67,67,67,67,1288,67,67,67,67,67,67,67,67,67,469,67,67,67,67,67,67,0,2551808,2170880,2170880,2215936,0,2170880,2170880,2215936,0,2170880,2170880,2215936,0,2170880,2977792,2977792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53264,18,49172,57366,24,8192,29,102432,127011,110630,114730,106539,127011,127011,127011,53264,18,18,49172,0,0,0,24,24,24,0,28,28,28,28,102432,127,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,0,0,0,0,2220032,110630,0,0,0,114730,106539,136,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,4256099,4256099,24,24,0,28,28,2170880,2461696,2170880,2170880,2170880,2510848,2170880,2170880,0,2170880,2170880,2580480,2170880,2605056,2637824,2170880,2170880,2170880,2547712,2555904,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3129344,2215936,2215936,543,543,545,545,0,0,2179072,0,550,551,551,0,287,2171166,2171166,18,0,0,0,0,0,0,0,0,2220032,0,0,645,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,149,2584576,2170880,2170880,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2441216,2170880,2527232,2170880,2600960,2519040,0,0,2170880,2170880,0,2170880,2170880,2170880,2396160,2170880,2170880,2170880,2170880,3018752,2396160,2215936,2215936,2215936,2215936,3018752,2396160,0,0,2170880,2170880,2170880,2170880,3018752,2170880,2650112,2965504,53264,18,49172,57366,24,155648,28,102432,155648,155687,114730,106539,0,0,155648,53264,18,18,49172,0,57366,0,24,24,24,0,28,28,28,28,102432,0,0,0,0,2220032,0,94208,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,208896,18,278528,24,24,0,28,28,53264,18,159765,57366,24,8192,28,102432,0,110630,114730,106539,0,0,0,53264,18,18,49172,0,57366,0,24,24,24,0,28,139394,28,28,102432,131,0,0,0,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,32768,53264,0,18,18,24,24,0,28,28,0,546,0,0,2183168,0,0,552,832,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2170880,2609152,2170880,2170880,2170880,2170880,2170880,2170880,2654208,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,3198976,2215936,0,1084,0,1088,0,1092,0,0,0,0,0,41606,0,0,0,0,45,45,45,45,45,937,0,0,0,0,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,644,0,0,0,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,826,0,828,0,0,2183168,0,0,830,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2592768,2170880,2170880,2170880,2170880,2633728,2170880,2170880,2170880,2170880,2170880,2170880,2711552,2170880,2170880,2170880,2170880,2170880,2760704,53264,18,49172,57366,24,8192,28,172066,172032,110630,172066,106539,0,0,172032,53264,18,18,49172,0,57366,0,24,24,24,16384,28,28,28,28,102432,0,98304,0,0,2220032,110630,0,0,0,0,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,45056,0,0,0,53264,18,49172,57366,25,8192,30,102432,0,110630,114730,106539,0,0,176219,53264,18,18,49172,0,57366,0,124,124,124,0,128,128,128,128,102432,128,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,0,546,0,0,2183168,0,65536,552,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2646016,2670592,2752512,2756608,2846720,2961408,2170880,2998272,2170880,3010560,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,3198976,2215936,0,0,0,0,0,0,65536,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,143,45,45,67,67,67,67,67,227,67,67,67,67,67,67,67,67,67,1824,67,1826,67,67,67,67,17,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,32768,120,121,18,18,49172,0,57366,0,24,24,24,0,28,28,28,28,102432,67,67,37139,37139,24853,24853,0,0,2179072,548,0,65820,65820,0,287,97,0,0,97,97,0,97,97,97,45,45,45,45,2033,45,67,67,67,67,0,0,97,97,97,97,45,45,67,67,0,369,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,978,0,546,70179,0,2183168,0,0,552,0,97,97,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,1013,67,67,67,67,67,67,67,67,67,67,473,67,67,67,67,483,67,67,1025,67,67,67,67,67,67,67,67,67,67,67,67,67,97,97,97,97,97,0,0,97,97,97,97,1119,97,97,97,97,97,97,97,97,97,97,97,97,1359,97,97,97,67,67,1584,67,67,67,67,67,67,67,67,67,67,67,67,67,497,67,67,1659,45,45,45,45,45,45,45,45,45,1667,45,45,45,45,45,169,45,45,45,45,45,45,45,45,45,45,45,1668,45,45,45,45,67,67,1694,67,67,67,67,67,67,67,67,67,67,67,67,67,774,67,67,1713,97,97,97,97,97,97,97,0,97,97,1723,97,97,97,97,0,45,45,45,45,45,45,1538,45,45,45,45,45,1559,45,45,1561,45,45,45,45,45,45,45,687,45,45,45,45,45,45,45,45,448,45,45,45,45,45,45,67,67,67,67,1771,1772,67,67,67,67,67,67,67,67,97,97,97,97,0,0,0,97,67,67,67,67,67,1821,67,67,67,67,67,67,1827,67,67,67,0,0,0,0,0,0,97,97,1614,97,97,97,97,97,603,97,97,605,97,97,608,97,97,97,97,0,1532,45,45,45,45,45,45,45,45,45,45,450,45,45,45,45,67,67,97,97,97,97,97,97,0,0,1839,97,97,97,97,0,0,97,97,97,97,97,45,45,45,45,45,45,45,67,67,67,67,67,67,67,97,1883,97,1885,97,0,1888,0,97,97,0,97,97,1848,97,97,97,97,1852,45,45,45,45,45,45,45,384,391,45,45,45,45,45,45,45,385,45,45,45,45,45,45,45,45,1237,45,45,45,45,45,45,67,0,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,45,45,45,1951,45,45,45,45,45,45,45,45,67,67,67,67,1963,97,2023,0,97,97,0,97,97,97,45,45,45,45,45,45,67,67,1994,67,1995,67,67,67,67,67,67,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,97,97,0,0,0,0,2220032,110630,0,0,0,114730,106539,137,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2793472,2805760,2170880,2830336,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3031040,2170880,3055616,2170880,2170880,67,67,37139,37139,24853,24853,0,0,281,549,0,65820,65820,0,287,97,0,0,97,97,0,97,97,97,45,45,2031,2032,45,45,67,67,67,67,67,67,67,67,67,67,67,67,1769,67,0,546,70179,549,549,0,0,552,0,97,97,97,97,97,97,97,45,45,45,45,45,45,1858,45,641,0,0,0,0,41606,926,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,456,67,0,0,0,1313,0,0,0,1096,1319,0,0,0,0,97,97,97,97,97,97,97,97,1110,97,97,97,97,67,67,67,67,1301,1476,0,0,0,0,1307,1478,0,0,0,0,0,0,0,0,97,97,97,97,1486,97,1487,97,1313,1480,0,0,0,0,1319,0,97,97,97,97,97,97,97,97,97,566,97,97,97,97,97,97,67,67,67,1476,0,1478,0,1480,0,97,97,97,97,97,97,97,45,1853,45,1855,45,45,45,45,53264,18,49172,57366,26,8192,31,102432,0,110630,114730,106539,0,0,225368,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,32768,53264,18,18,49172,163840,57366,0,24,24,229376,0,28,28,28,229376,102432,0,0,0,0,2220167,110630,0,0,0,114730,106539,0,2171019,2171019,2171019,2171019,2592907,2171019,2171019,2171019,2171019,2633867,2171019,2171019,2171019,2171019,2171019,2171019,2654347,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3117195,2171019,2171019,2171019,2171019,2240641,0,0,0,0,0,0,0,0,368,0,140,2171019,2171019,2171019,2416779,2424971,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2617483,2171019,2171019,2642059,2171019,2171019,2171019,2699403,2171019,2728075,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3215499,2215936,2215936,2215936,2215936,2215936,2437120,2215936,2215936,2171019,2822283,2171019,2171019,2855051,2171019,2171019,2171019,2912395,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3002507,2171019,2171019,2215936,2215936,2494464,2215936,2215936,2215936,2171166,2171166,2416926,2425118,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2576670,2171166,2617630,2171166,2171166,2171166,2171166,2171166,2171166,2691358,2171166,2707742,2171166,2715934,2171166,2724126,2765086,2171166,2171166,2797854,2171166,2822430,2171166,2171166,2855198,2171166,2171166,2171166,2912542,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2793758,2806046,2171166,2830622,2171166,2171166,2171166,2171166,2171166,2171166,2171166,3109150,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2543902,2171166,2171166,2171166,2171166,2171166,2629918,2793611,2805899,2171019,2830475,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,0,546,0,0,2183168,0,0,552,0,2171166,2171166,2171166,2400542,2171166,2171166,2171166,0,2171166,2171166,2171166,0,2171166,2920734,2171166,2171166,2171166,2990366,2171166,2171166,2171166,2171166,3117342,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,0,53264,0,18,18,4329472,2232445,0,2240641,4337664,2711691,2171019,2171019,2171019,2171019,2171019,2760843,2769035,2789515,2814091,2171019,2171019,2171019,2875531,2904203,2171019,2171019,3092619,2171019,2171019,3125387,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3199115,2171019,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2453504,2457600,2215936,2215936,2215936,2215936,2215936,2215936,2793472,2805760,2215936,2830336,2215936,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,2170880,2170880,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2494464,2170880,2170880,2171166,2171166,2634014,2171166,2171166,2171166,2171166,2171166,2171166,2711838,2171166,2171166,2171166,2171166,2171166,2760990,2769182,2789662,2814238,2171166,2171166,2171166,2875678,2904350,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,3199262,2171166,0,0,0,0,0,0,0,0,0,2379915,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2445451,2171019,2465931,2474123,2171019,2171019,3113099,2171019,2171019,3133579,2171019,2171019,2171019,3162251,2171019,2171019,3182731,3186827,2171019,2379776,2879627,2171019,2916491,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3027083,2171019,2171019,3063947,2699550,2171166,2728222,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2879774,2171166,2916638,2171166,2171166,2171166,2171166,2171166,2609438,2171166,2171166,2171166,2171166,2171166,2171166,2654494,2171166,2171166,2171166,2171166,2171166,2445598,2171166,2466078,2474270,2171166,2171166,2171166,2171166,2171166,2171166,2523422,2171019,2437259,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2543755,2171019,2171019,2171019,2584715,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2908299,2171019,2171019,2936971,2171019,2171019,2986123,2171019,2994315,2171019,2171019,3014795,2171019,3059851,3076235,3088523,2171166,2171166,2986270,2171166,2994462,2171166,2171166,3014942,2171166,3059998,3076382,3088670,2171166,2171166,2171166,2171166,2171166,2171166,3027230,2171166,2171166,3064094,2171166,2171166,3113246,2171166,2171166,3133726,2506891,2171019,2171019,2171019,2535563,2539659,2171019,2171019,2588811,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2691211,2171019,2707595,2171019,2715787,2171019,2723979,2764939,2171019,2171019,2797707,2215936,2215936,3170304,0,0,0,0,0,0,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2453790,2457886,2171166,2171166,2171166,2486558,2171166,2171166,2507038,2171166,2171166,2171166,2535710,2539806,2171166,2171166,2588958,2171166,2171166,2171166,2171166,2515230,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2593054,2171166,2171166,2171166,2171166,3051806,2171166,2171166,2171166,2171166,2171166,2171166,3170590,0,2388107,2392203,2171019,2171019,2433163,2171019,2461835,2171019,2171019,2171019,2510987,2171019,2171019,2171019,2171019,2580619,2171019,2605195,2637963,2171019,2171019,2171019,2920587,2171019,2171019,2171019,2990219,2171019,2171019,2171019,2171019,3051659,2171019,2171019,2171019,2453643,2457739,2171019,2171019,2171019,2171019,2171019,2171019,2515083,2171019,2171019,2171019,2171019,2646155,2670731,2752651,2756747,2846859,2961547,2171019,2998411,2171019,3010699,2171019,2171019,2687115,2748555,2171019,2171019,2171019,2924683,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3121291,2171019,2171019,2171019,3170443,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2486272,2215936,2215936,2506752,3145867,3158155,3166347,2387968,2392064,2215936,2215936,2433024,2215936,2461696,2215936,2215936,2215936,2510848,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,553,2170880,2215936,2215936,2215936,2215936,2215936,3121152,2215936,2215936,3145728,3158016,3166208,2388254,2392350,2171166,2171166,2433310,2171166,2461982,2171166,2171166,2171166,2511134,2171166,2171166,0,2171166,2171166,2580766,2171166,2605342,2638110,2171166,2171166,2171166,2171166,3031326,2171166,3055902,2171166,2171166,2171166,2171166,3092766,2171166,2171166,3125534,2171166,2171166,2171166,3162398,2171166,2171166,3182878,3186974,2171166,0,0,0,2171019,2171019,2171019,2171019,3109003,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2215936,2215936,2215936,2400256,2215936,2215936,2215936,2215936,2171166,2687262,0,0,2748702,2171166,2171166,0,2171166,2924830,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2597150,2171166,2621726,2171166,2171166,2642206,2171166,2171166,2171166,2171166,3121438,2171166,2171166,3146014,3158302,3166494,2171019,2420875,2429067,2171019,2478219,2171019,2171019,2171019,2171019,2547851,2556043,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3129483,2215936,2171019,3141771,2215936,2420736,2428928,2215936,2478080,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2646016,2670592,2752512,2756608,2846720,2961408,2215936,2998272,2215936,3010560,2215936,2215936,2215936,3141632,2171166,2421022,2429214,2171166,2478366,2171166,2171166,2171166,2171166,0,0,2171166,2171166,2171166,2171166,2646302,2670878,0,0,0,0,37,110630,0,0,0,114730,106539,0,45,45,45,45,45,1405,1406,45,45,45,45,1409,45,45,45,45,45,1415,45,45,45,45,45,45,45,45,45,45,1238,45,45,45,45,67,2752798,2756894,0,2847006,2961694,2171166,2998558,2171166,3010846,2171166,2171166,2171166,3141918,2171019,2171019,2490507,3129344,2171166,2171166,2490654,2171166,2171166,2171166,0,0,2547998,2556190,2171166,2171166,2171166,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,45,167,45,45,45,45,185,187,45,45,198,45,45,0,2171166,2171166,2171166,2171166,2171166,2171166,3129630,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2576523,2171019,2171019,2171019,2171019,2171019,2609291,2171019,2215936,2215936,2215936,2215936,2215936,2215936,3002368,2215936,2215936,2171166,2171166,2494750,2171166,2171166,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,147,2584576,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2171166,2171166,2171166,2171166,0,0,0,2171166,2171166,2171166,2171166,0,0,0,2171166,2171166,2171166,3002654,2171166,2171166,2171019,2171019,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2175257,0,0,2584862,2171166,2171166,0,0,2171166,2171166,2171166,2171166,2171166,2171019,2441355,2171019,2527371,2171019,2601099,2171019,2850955,2171019,2171019,2171019,3022987,2215936,2441216,2215936,2527232,2215936,2600960,2215936,2850816,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,69632,287,2170880,2215936,3022848,2171166,2441502,2171166,2527518,0,0,2171166,2601246,2171166,0,2851102,2171166,2171166,2171166,2171166,2720030,2744606,2171166,2171166,2171166,2834718,2838814,2171166,2908446,2171166,2171166,2937118,3023134,2171019,2519179,2171019,2171019,2171019,2171019,2171019,2215936,2519040,2215936,2215936,2215936,2215936,2215936,2171166,2171166,2171166,3215646,0,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2486411,2171019,2171019,2171019,2629771,2171019,2171019,2171019,2171019,2719883,2744459,2171019,2171019,2171019,2834571,2838667,2171019,2519326,0,0,2171166,2171166,0,2171166,2171166,2171166,2396299,2171019,2171019,2171019,2171019,3018891,2396160,2215936,2215936,2215936,2215936,3018752,2396446,0,0,2171166,2171166,2171166,2171166,3019038,2171019,2650251,2965643,2171019,2215936,2650112,2965504,2215936,0,0,2171166,2650398,2965790,2171166,2551947,2171019,2551808,2215936,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,144,45,45,67,67,67,67,67,228,67,67,67,67,67,67,67,67,67,1929,97,97,97,97,0,0,0,2552094,2171166,2171019,2215936,0,2171166,2171019,2215936,0,2171166,2171019,2215936,0,2171166,2977931,2977792,2978078,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,1321,97,131072,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,24,0,28,28,0,140,0,2379776,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2445312,2170880,2465792,2473984,2170880,2170880,2170880,2584576,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,3162112,2170880,2170880,3182592,3186688,2170880,0,140,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3002368,2170880,2170880,2215936,2215936,2494464,2215936,2215936,2215936,2215936,2215936,2215936,3215360,544,0,0,0,544,0,546,0,0,0,546,0,0,2183168,0,0,552,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,0,2170880,2170880,2170880,0,2170880,2920448,2170880,2170880,2170880,2990080,2170880,2170880,552,0,0,0,552,0,287,0,2170880,2170880,2170880,2170880,2170880,2437120,2170880,2170880,18,0,0,0,0,0,0,0,0,2220032,0,0,644,0,2215936,2215936,3170304,544,0,546,0,552,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,0,140,0,0,53264,18,49172,57366,24,8192,28,102432,249856,110630,114730,106539,0,0,32768,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,151640,53264,18,18,49172,0,57366,0,24,24,24,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2416640,53264,18,49172,57366,24,8192,28,102432,253952,110630,114730,106539,0,0,32856,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,192512,53264,18,18,49172,0,57366,0,2232445,184320,2232445,0,2240641,2240641,184320,2240641,102432,0,0,0,221184,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3108864,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,0,0,0,45056,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,24,0,127,127,53264,18,49172,258071,24,8192,28,102432,0,110630,114730,106539,0,0,32768,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,204800,53264,18,49172,57366,24,27,28,102432,0,110630,114730,106539,0,0,0,53264,18,49172,57366,24,8192,28,33,0,33,33,33,0,0,0,53264,18,18,49172,0,57366,0,24,24,24,16384,28,28,28,28,0,0,0,0,0,0,0,0,0,0,139,2170880,2170880,2170880,2416640,67,67,37139,37139,24853,24853,0,70179,0,0,0,65820,65820,369,287,97,0,0,97,97,0,97,97,97,45,2030,45,45,45,45,67,1573,67,67,67,67,67,67,67,67,67,67,67,1699,67,67,67,67,25403,546,70179,0,0,66365,66365,552,0,97,97,97,97,97,97,97,97,1355,97,97,97,1358,97,97,97,641,0,0,0,925,41606,0,0,0,0,45,45,45,45,45,45,45,1187,45,45,45,45,45,0,1480,0,0,0,0,1319,0,97,97,97,97,97,97,97,97,97,592,97,97,97,97,97,97,97,97,97,97,1531,45,45,45,45,45,45,45,45,45,45,45,45,1680,45,45,45,641,0,924,0,925,41606,0,0,0,0,45,45,45,45,45,45,1186,45,45,45,45,45,45,67,67,37139,37139,24853,24853,0,70179,282,0,0,65820,65820,369,287,97,0,0,97,97,0,97,2028,97,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1767,67,67,67,0,0,0,0,0,0,1612,97,97,97,97,97,97,0,1785,97,97,97,97,97,97,0,0,97,97,97,97,1790,97,0,0,2170880,2170880,3051520,2170880,2170880,2170880,2170880,2170880,2170880,3170304,241664,2387968,2392064,2170880,2170880,2433024,53264,19,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,274432,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,270336,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,1134711,53264,18,49172,57366,24,8192,28,102432,0,1126440,1126440,1126440,0,0,1126400,53264,18,49172,57366,24,8192,28,102432,36,110630,114730,106539,0,0,217088,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,94,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,96,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,24666,53264,18,18,49172,0,57366,0,24,24,24,126,28,28,28,28,102432,53264,122,123,49172,0,57366,0,24,24,24,0,28,28,28,28,102432,2170880,2170880,4256099,0,0,0,0,0,0,0,0,2220032,0,0,0,0,0,0,0,0,1319,0,0,0,0,97,97,97,97,97,97,97,1109,97,97,97,97,1113,132,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,146,150,45,45,45,45,45,175,45,180,45,186,45,189,45,45,203,67,256,67,67,270,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,97,293,297,97,97,97,97,97,322,97,327,97,333,97,0,0,97,2026,0,2027,97,97,45,45,45,45,45,45,67,67,67,1685,67,67,67,67,67,67,67,1690,67,336,97,97,350,97,97,0,53264,0,18,18,24,24,356,28,28,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,2424832,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2617344,2170880,45,439,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,525,67,67,67,67,67,67,67,67,67,67,67,0,0,0,0,0,0,0,0,0,0,0,0,97,97,97,97,622,97,97,97,97,97,97,97,97,97,97,97,97,1524,97,97,1527,369,648,45,45,45,45,45,45,45,45,45,659,45,45,45,45,408,45,45,45,45,45,45,45,45,45,45,45,1239,45,45,45,67,729,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,762,67,746,67,67,67,67,67,67,67,67,67,759,67,67,67,67,0,0,0,1477,0,1086,0,0,0,1479,0,1090,67,67,796,67,67,799,67,67,67,67,67,67,67,67,67,67,67,67,1291,67,67,67,811,67,67,67,67,67,816,67,67,67,67,67,67,67,37689,544,25403,546,70179,0,0,66365,66365,552,833,97,97,97,97,97,97,97,97,1380,0,0,0,45,45,45,45,45,1185,45,45,45,45,45,45,45,386,45,45,45,45,45,45,45,45,1810,45,45,45,45,45,45,67,97,97,844,97,97,97,97,97,97,97,97,97,857,97,97,97,0,97,97,97,0,97,97,97,97,97,97,97,97,97,97,45,45,45,97,97,97,894,97,97,897,97,97,97,97,97,97,97,97,97,0,0,0,1382,45,45,45,97,909,97,97,97,97,97,914,97,97,97,97,97,97,97,923,67,67,1079,67,67,67,67,67,37689,1085,25403,1089,66365,1093,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,148,1114,97,97,97,97,97,97,1122,97,97,97,97,97,97,97,97,97,606,97,97,97,97,97,97,97,97,97,97,1173,97,97,97,97,97,12288,0,925,0,1179,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,145,45,45,67,67,67,67,67,1762,67,67,67,1766,67,67,67,67,67,67,528,67,67,67,67,67,67,67,67,67,97,97,97,97,97,0,1934,67,67,1255,67,67,67,67,67,67,67,67,67,67,67,67,67,1035,67,67,67,67,67,67,1297,67,67,67,67,67,67,0,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,1111,97,97,97,97,97,97,1327,97,97,97,97,97,97,97,97,97,97,97,97,33344,97,97,97,1335,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,0,97,97,1377,97,97,97,97,97,97,0,1179,0,45,45,45,45,670,45,45,45,45,45,45,45,45,45,45,45,430,45,45,45,45,67,67,1438,67,67,1442,67,67,67,67,67,67,67,67,67,67,67,67,1592,67,67,67,1451,67,67,67,67,67,67,67,67,67,67,1458,67,67,67,67,0,0,1305,0,0,0,0,0,1311,0,0,0,1317,0,0,0,0,0,0,0,97,97,1322,97,97,1491,97,97,1495,97,97,97,97,97,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,45,45,45,1551,45,1553,45,1504,97,97,97,97,97,97,97,97,97,97,1513,97,97,97,97,0,45,45,45,45,1536,45,45,45,45,1540,45,67,67,67,67,67,1585,67,67,67,67,67,67,67,67,67,67,67,67,1700,67,67,67,97,1648,97,97,97,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,45,1541,0,97,97,97,97,0,1940,0,97,97,97,97,97,97,45,45,2011,45,45,45,2015,67,67,2017,67,67,67,2021,97,67,67,812,67,67,67,67,67,67,67,67,67,67,67,37689,544,97,97,97,910,97,97,97,97,97,97,97,97,97,97,97,923,0,0,0,45,45,45,45,1184,45,45,45,45,1188,45,45,45,45,1414,45,45,45,1417,45,1419,45,45,45,45,45,443,45,45,45,45,45,45,453,45,45,67,67,67,67,1244,67,67,67,67,1248,67,67,67,67,67,67,67,0,37139,24853,0,0,0,282,41098,65820,97,1324,97,97,97,97,1328,97,97,97,97,97,97,97,97,97,0,0,930,45,45,45,45,97,97,97,97,1378,97,97,97,97,0,1179,0,45,45,45,45,671,45,45,45,45,45,45,45,45,45,45,45,975,45,45,45,45,67,67,1923,67,1925,67,67,1927,67,97,97,97,97,97,0,0,97,97,97,97,1985,45,45,45,45,45,45,1560,45,45,45,45,45,45,45,45,45,946,45,45,950,45,45,45,0,97,97,97,1939,0,0,0,97,1943,97,97,1945,97,45,45,45,669,45,45,45,45,45,45,45,45,45,45,45,45,990,45,45,45,67,257,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,337,97,97,97,97,97,0,53264,0,18,18,24,24,356,28,28,0,0,0,0,0,0,0,0,0,0,370,2170880,2170880,2170880,2416640,401,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,459,461,67,67,67,67,67,67,67,67,475,67,480,67,67,67,67,67,67,1054,67,67,67,67,67,67,67,67,67,67,1698,67,67,67,67,67,484,67,67,487,67,67,67,67,67,67,67,67,67,67,67,67,67,1459,67,67,97,556,558,97,97,97,97,97,97,97,97,572,97,577,97,97,0,0,1896,97,97,97,97,97,97,1903,45,45,45,45,983,45,45,45,45,988,45,45,45,45,45,45,1195,45,45,45,45,45,45,45,45,45,45,1549,45,45,45,45,45,581,97,97,584,97,97,97,97,97,97,97,97,97,97,97,97,97,1153,97,97,369,0,45,45,45,45,45,45,45,45,45,45,45,662,45,45,45,684,45,45,45,45,45,45,45,45,45,45,45,45,1004,45,45,45,67,67,67,749,67,67,67,67,67,67,67,67,67,761,67,67,67,67,67,67,1068,67,67,67,1071,67,67,67,67,1076,794,795,67,67,67,67,67,67,67,67,67,67,67,67,67,67,0,544,97,97,97,97,847,97,97,97,97,97,97,97,97,97,859,97,0,0,2025,97,20480,97,97,2029,45,45,45,45,45,45,67,67,67,1575,67,67,67,67,67,67,67,67,67,1775,67,67,67,97,97,97,97,892,893,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1515,97,993,994,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,992,67,67,67,1284,67,67,67,67,67,67,67,67,67,67,67,67,67,1607,67,67,97,1364,97,97,97,97,97,97,97,97,97,97,97,97,97,97,596,97,45,1556,1557,45,45,45,45,45,45,45,45,45,45,45,45,45,45,696,45,1596,1597,67,67,67,67,67,67,67,67,67,67,67,67,67,67,499,67,97,97,97,1621,97,97,97,97,97,97,97,97,97,97,97,97,97,1346,97,97,97,97,1740,97,97,97,97,45,45,45,45,45,45,45,45,45,45,1678,45,45,45,45,45,67,97,97,97,97,97,97,1836,0,97,97,97,97,97,0,0,97,97,97,1984,97,45,45,45,45,45,45,1808,45,45,45,45,45,45,45,45,67,739,67,67,67,67,67,744,45,45,1909,45,45,45,45,45,45,45,67,1917,67,1918,67,67,67,67,67,67,1247,67,67,67,67,67,67,67,67,67,67,532,67,67,67,67,67,67,1922,67,67,67,67,67,67,67,97,1930,97,1931,97,0,0,97,97,0,97,97,97,45,45,45,45,45,45,67,67,67,67,1576,67,67,67,67,1580,67,67,0,97,97,1938,97,0,0,0,97,97,97,97,97,97,45,45,45,699,45,45,45,704,45,45,45,45,45,45,45,45,987,45,45,45,45,45,45,45,67,67,97,97,97,97,0,0,97,97,97,2006,97,97,97,97,0,45,1533,45,45,45,45,45,45,45,45,45,1416,45,45,45,45,45,45,45,45,722,723,45,45,45,45,45,45,2045,67,67,67,2047,0,0,97,97,97,2051,45,45,67,67,0,0,0,0,925,41606,0,0,0,0,45,45,45,45,45,45,409,45,45,45,45,45,45,45,45,45,1957,45,67,67,67,67,67,1836,97,97,45,67,0,97,45,67,0,97,45,67,0,97,45,45,67,67,67,1761,67,67,67,1764,67,67,67,67,67,67,67,494,67,67,67,67,67,67,67,67,67,787,67,67,67,67,67,67,45,45,420,45,45,422,45,45,425,45,45,45,45,45,45,45,387,45,45,45,45,397,45,45,45,67,460,67,67,67,67,67,67,67,67,67,67,67,67,67,67,515,67,485,67,67,67,67,67,67,67,67,67,67,67,67,67,498,67,67,67,67,67,97,0,2039,97,97,97,97,97,45,45,45,45,1426,45,45,45,67,67,67,67,67,67,67,67,67,1689,67,67,67,97,557,97,97,97,97,97,97,97,97,97,97,97,97,97,97,612,97,582,97,97,97,97,97,97,97,97,97,97,97,97,97,595,97,97,97,97,97,896,97,97,97,97,97,97,97,97,97,97,885,97,97,97,97,97,45,939,45,45,45,45,943,45,45,45,45,45,45,45,45,45,45,1916,67,67,67,67,67,45,67,67,67,67,67,67,67,1015,67,67,67,67,1019,67,67,67,67,67,67,1271,67,67,67,67,67,67,1277,67,67,67,67,67,67,1287,67,67,67,67,67,67,67,67,67,67,804,67,67,67,67,67,1077,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2437120,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2543616,2170880,2170880,2170880,2170880,2170880,2629632,1169,97,1171,97,97,97,97,97,97,97,12288,0,925,0,1179,0,0,0,0,925,41606,0,0,0,0,45,45,45,45,936,45,45,67,67,214,67,220,67,67,233,67,243,67,248,67,67,67,67,67,67,1298,67,67,67,67,0,0,0,0,0,0,97,97,97,97,97,1617,97,0,0,0,45,45,45,1183,45,45,45,45,45,45,45,45,45,393,45,45,45,45,45,45,67,67,1243,67,67,67,67,67,67,67,67,67,67,67,67,67,1074,67,67,1281,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,776,1323,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,907,45,1412,45,45,45,45,45,45,45,1418,45,45,45,45,45,45,686,45,45,45,690,45,45,695,45,45,67,67,67,67,67,1465,67,67,67,67,67,67,67,67,67,67,67,97,97,97,1712,97,97,97,97,1741,97,97,97,45,45,45,45,45,45,45,45,45,426,45,45,45,45,45,45,67,67,67,1924,67,67,67,67,67,97,97,97,97,97,0,0,97,97,1983,97,97,45,45,1987,45,1988,45,0,97,97,97,97,0,0,0,1942,97,97,97,97,97,45,45,45,700,45,45,45,45,45,45,45,45,45,45,711,45,45,153,45,45,166,45,176,45,181,45,45,188,191,196,45,204,255,258,263,67,271,67,67,0,37139,24853,0,0,0,282,41098,65820,97,97,97,294,97,300,97,97,313,97,323,97,328,97,97,335,338,343,97,351,97,97,0,53264,0,18,18,24,24,356,28,28,0,0,0,0,0,0,0,0,41098,0,140,45,45,45,45,1404,45,45,45,45,45,45,45,45,45,45,1411,67,67,486,67,67,67,67,67,67,67,67,67,67,67,67,67,1251,67,67,501,67,67,67,67,67,67,67,67,67,67,67,67,513,67,67,67,67,67,67,1443,67,67,67,67,67,67,67,67,67,67,1263,67,67,67,67,67,97,97,583,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1526,97,598,97,97,97,97,97,97,97,97,97,97,97,97,610,97,97,0,97,97,1796,97,97,97,97,97,97,97,45,45,45,45,45,1744,45,45,45,369,0,651,45,653,45,654,45,656,45,45,45,660,45,45,45,45,1558,45,45,45,45,45,45,45,45,1566,45,45,681,45,683,45,45,45,45,45,45,45,45,691,692,694,45,45,45,716,45,45,45,45,45,45,45,45,45,45,45,45,709,45,45,712,45,714,45,45,45,718,45,45,45,45,45,45,45,726,45,45,45,733,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,1691,67,67,747,67,67,67,67,67,67,67,67,67,760,67,67,67,0,0,0,0,0,0,97,1613,97,97,97,97,97,97,1509,97,97,97,97,97,97,97,97,97,0,1179,0,45,45,45,45,67,764,67,67,67,67,768,67,770,67,67,67,67,67,67,67,67,97,97,97,97,0,0,0,1977,67,778,779,781,67,67,67,67,67,67,788,789,67,67,792,793,67,67,67,813,67,67,67,67,67,67,67,67,67,824,37689,544,25403,546,70179,0,0,66365,66365,552,0,836,97,838,97,839,97,841,97,97,97,845,97,97,97,97,97,97,97,97,97,858,97,97,0,1728,97,97,97,0,97,97,97,97,97,97,97,97,97,97,45,1802,45,97,97,862,97,97,97,97,866,97,868,97,97,97,97,97,97,0,0,97,97,1788,97,97,97,0,0,97,97,876,877,879,97,97,97,97,97,97,886,887,97,97,890,891,97,97,97,97,97,97,97,899,97,97,97,903,97,97,97,0,97,97,97,0,97,97,97,97,97,97,97,1646,97,97,97,97,911,97,97,97,97,97,97,97,97,97,922,923,45,955,45,957,45,45,45,45,45,45,45,45,45,45,45,45,195,45,45,45,45,45,981,982,45,45,45,45,45,45,989,45,45,45,45,45,170,45,45,45,45,45,45,45,45,45,45,411,45,45,45,45,45,67,1023,67,67,67,67,67,67,1031,67,1033,67,67,67,67,67,67,67,817,819,67,67,67,67,67,37689,544,67,1065,67,67,67,67,67,67,67,67,67,67,67,67,67,67,516,67,67,1078,67,67,1081,1082,67,67,37689,0,25403,0,66365,0,0,0,0,0,0,0,0,2171166,2171166,2171166,2171166,2171166,2437406,2171166,2171166,97,1115,97,1117,97,97,97,97,97,97,1125,97,1127,97,97,97,0,97,97,97,0,97,97,97,97,1644,97,97,97,0,97,97,97,0,97,97,1642,97,97,97,97,97,97,625,97,97,97,97,97,97,97,97,97,316,97,97,97,97,97,97,97,97,97,1159,97,97,97,97,97,97,97,97,97,97,97,97,97,1502,97,97,97,97,97,1172,97,97,1175,1176,97,97,12288,0,925,0,1179,0,0,0,0,925,41606,0,0,0,0,45,45,45,935,45,45,45,1233,45,45,45,1236,45,45,45,45,45,45,45,67,67,67,67,67,67,1873,67,67,45,45,1218,45,45,45,1223,45,45,45,45,45,45,45,1230,45,45,67,67,215,219,222,67,230,67,67,244,246,249,67,67,67,67,67,67,1882,97,97,97,97,0,0,0,97,97,97,97,97,97,45,1904,45,1905,45,67,67,67,67,67,1258,67,1260,67,67,67,67,67,67,67,67,67,495,67,67,67,67,67,67,67,67,1283,67,67,67,67,67,67,67,1290,67,67,67,67,67,67,67,818,67,67,67,67,67,67,37689,544,67,67,1295,67,67,67,67,67,67,67,67,0,0,0,0,0,0,2174976,0,0,97,97,97,1326,97,97,97,97,97,97,97,97,97,97,97,97,97,1514,97,97,97,97,97,1338,97,1340,97,97,97,97,97,97,97,97,97,97,97,1500,97,97,1503,97,1363,97,97,97,97,97,97,97,1370,97,97,97,97,97,97,97,563,97,97,97,97,97,97,578,97,1375,97,97,97,97,97,97,97,97,0,1179,0,45,45,45,45,685,45,45,45,45,45,45,45,45,45,45,45,1003,45,45,45,45,67,67,67,1463,67,67,67,67,67,67,67,67,67,67,67,67,67,1778,97,97,97,97,97,1518,97,97,97,97,97,97,97,97,97,97,97,97,609,97,97,97,45,1542,45,45,45,45,45,45,45,1548,45,45,45,45,45,1554,45,1570,1571,45,67,67,67,67,67,67,1578,67,67,67,67,67,67,67,1055,67,67,67,67,67,1061,67,67,1582,67,67,67,67,67,67,67,1588,67,67,67,67,67,1594,67,67,67,67,67,97,2038,0,97,97,97,97,97,2044,45,45,45,995,45,45,45,45,1e3,45,45,45,45,45,45,45,1809,45,1811,45,45,45,45,45,67,1610,1611,67,1476,0,1478,0,1480,0,97,97,97,97,97,97,1618,1647,1649,97,97,97,1652,97,1654,1655,97,0,45,45,45,1658,45,45,67,67,216,67,67,67,67,234,67,67,67,67,252,254,1845,97,97,97,97,97,97,97,45,45,45,45,45,45,45,45,945,45,947,45,45,45,45,45,67,67,67,67,67,1881,97,97,97,97,97,0,0,0,97,97,97,97,97,1902,45,45,45,45,45,45,1908,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1921,67,67,67,67,67,67,67,67,97,97,97,97,97,0,0,0,97,97,0,97,1937,97,97,1940,0,0,97,97,97,97,97,97,1947,1948,1949,45,45,45,1952,45,1954,45,45,45,45,1959,1960,1961,67,67,67,67,67,67,1455,67,67,67,67,67,67,67,67,67,67,757,67,67,67,67,67,67,1964,67,1966,67,67,67,67,1971,1972,1973,97,0,0,0,97,97,1104,97,97,97,97,97,97,97,97,97,97,884,97,97,97,889,97,97,1978,97,0,0,1981,97,97,97,97,45,45,45,45,45,45,736,45,67,67,67,67,67,67,67,67,67,67,67,1018,67,67,67,45,67,67,67,67,0,2049,97,97,97,97,45,45,67,67,0,0,0,0,925,41606,0,0,0,0,45,933,45,45,45,45,1234,45,45,45,45,45,45,45,45,45,45,67,97,97,288,97,97,97,97,97,97,317,97,97,97,97,97,97,0,0,97,1787,97,97,97,97,0,0,45,45,378,45,45,45,45,45,390,45,45,45,45,45,45,45,424,45,45,45,431,433,45,45,45,67,1050,67,67,67,67,67,67,67,67,67,67,67,67,67,67,518,67,97,97,97,1144,97,97,97,97,97,97,97,97,97,97,97,97,632,97,97,97,97,97,97,97,1367,97,97,97,97,97,97,97,97,97,97,97,855,97,97,97,97,67,97,97,97,97,97,97,1837,0,97,97,97,97,97,0,0,0,1897,97,97,97,97,97,45,45,45,45,45,1208,45,45,45,45,45,45,45,45,45,45,724,45,45,45,45,45,97,2010,45,45,45,45,45,45,2016,67,67,67,67,67,67,2022,45,2046,67,67,67,0,0,2050,97,97,97,45,45,67,67,0,0,0,0,925,41606,0,0,0,0,932,45,45,45,45,45,1222,45,45,45,45,45,45,45,45,45,45,1227,45,45,45,45,45,133,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,45,701,702,45,45,705,706,45,45,45,45,45,45,703,45,45,45,45,45,45,45,45,45,719,45,45,45,45,45,725,45,45,45,369,649,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1216,25403,546,70179,0,0,66365,66365,552,834,97,97,97,97,97,97,97,1342,97,97,97,97,97,97,97,97,0,97,97,97,97,97,97,97,1799,97,97,45,45,45,1569,45,45,45,1572,67,67,67,67,67,67,67,67,67,67,67,0,0,0,1306,0,67,67,67,1598,67,67,67,67,67,67,67,67,1606,67,67,1609,97,97,97,1650,97,97,1653,97,97,97,0,45,45,1657,45,45,45,1206,45,45,45,45,45,45,45,45,45,45,45,45,1421,45,45,45,1703,67,67,67,67,67,67,67,67,67,67,97,97,1711,97,97,0,1895,0,97,97,97,97,97,97,45,45,45,45,45,958,45,960,45,45,45,45,45,45,45,45,1913,45,45,1915,67,67,67,67,67,67,67,466,67,67,67,67,67,67,481,67,45,1749,45,45,45,45,45,45,45,45,1755,45,45,45,45,45,173,45,45,45,45,45,45,45,45,45,45,974,45,45,45,45,45,67,67,67,67,67,1773,67,67,67,67,67,67,67,97,97,97,97,1886,0,0,0,97,97,67,2035,2036,67,67,97,0,0,97,2041,2042,97,97,45,45,45,45,1662,45,45,45,45,45,45,45,45,45,45,45,1397,45,45,45,45,151,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,437,205,45,67,67,67,218,67,67,67,67,67,67,67,67,67,67,67,1047,67,67,67,67,97,97,97,97,298,97,97,97,97,97,97,97,97,97,97,97,870,97,97,97,97,97,97,97,97,352,97,0,53264,0,18,18,24,24,0,28,28,0,0,0,0,0,0,365,0,41098,0,140,45,45,45,45,45,1427,45,45,67,67,67,67,67,67,67,1435,520,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1037,617,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,923,45,1232,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,1919,67,1759,45,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1021,45,154,45,162,45,45,45,45,45,45,45,45,45,45,45,45,964,45,45,45,206,45,67,67,67,67,221,67,229,67,67,67,67,67,67,67,67,530,67,67,67,67,67,67,67,67,755,67,67,67,67,67,67,67,67,785,67,67,67,67,67,67,67,67,802,67,67,67,807,67,67,67,97,97,97,97,353,97,0,53264,0,18,18,24,24,0,28,28,0,0,0,0,0,0,366,0,0,0,140,2170880,2170880,2170880,2416640,402,45,45,45,45,45,45,45,410,45,45,45,45,45,45,45,674,45,45,45,45,45,45,45,45,389,45,394,45,45,398,45,45,45,45,441,45,45,45,45,45,447,45,45,45,454,45,45,67,67,67,67,67,67,67,67,67,67,67,1768,67,67,67,67,67,488,67,67,67,67,67,67,67,496,67,67,67,67,67,67,67,1774,67,67,67,67,67,97,97,97,97,0,0,97,97,97,0,97,97,97,97,97,97,97,97,67,67,523,67,67,527,67,67,67,67,67,533,67,67,67,540,97,97,97,585,97,97,97,97,97,97,97,593,97,97,97,97,97,97,1784,0,97,97,97,97,97,97,0,0,97,97,97,97,97,97,0,0,0,18,18,24,24,0,28,28,97,97,620,97,97,624,97,97,97,97,97,630,97,97,97,637,713,45,45,45,45,45,45,721,45,45,45,45,45,45,45,45,1197,45,45,45,45,45,45,45,45,730,732,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1581,67,45,67,67,67,67,1012,67,67,67,67,67,67,67,67,67,67,67,1059,67,67,67,67,67,1024,67,67,67,67,67,67,67,67,67,67,67,67,67,67,775,67,67,67,67,1066,67,67,67,67,67,67,67,67,67,67,67,67,479,67,67,67,67,67,67,1080,67,67,67,67,37689,0,25403,0,66365,0,0,0,0,0,0,0,287,0,0,0,287,0,2379776,2170880,2170880,97,97,97,1118,97,97,97,97,97,97,97,97,97,97,97,97,920,97,97,0,0,0,0,45,1181,45,45,45,45,45,45,45,45,45,45,45,432,45,45,45,45,45,45,1219,45,45,45,45,45,45,1226,45,45,45,45,45,45,959,45,45,45,45,45,45,45,45,45,184,45,45,45,45,202,45,1241,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1266,67,1268,67,67,67,67,67,67,67,67,67,67,67,67,1279,67,67,67,67,67,272,67,0,37139,24853,0,0,0,0,41098,65820,67,67,67,67,67,1286,67,67,67,67,67,67,67,67,67,1293,67,67,67,1296,67,67,67,67,67,67,67,0,0,0,0,0,281,94,0,0,97,97,97,1366,97,97,97,97,97,97,97,97,97,1373,97,97,18,0,139621,0,0,0,0,0,0,364,0,0,367,0,97,1376,97,97,97,97,97,97,97,0,0,0,45,45,1384,45,45,67,208,67,67,67,67,67,67,237,67,67,67,67,67,67,67,1069,1070,67,67,67,67,67,67,67,0,37140,24854,0,0,0,0,41098,65821,45,1423,45,45,45,45,45,45,67,67,1431,67,67,67,67,67,67,67,1083,37689,0,25403,0,66365,0,0,0,1436,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1830,67,1452,1453,67,67,67,67,1456,67,67,67,67,67,67,67,67,67,771,67,67,67,67,67,67,1461,67,67,67,1464,67,1466,67,67,67,67,67,67,1470,67,67,67,67,67,67,1587,67,67,67,67,67,67,67,67,1595,1489,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1129,97,1505,1506,97,97,97,97,1510,97,97,97,97,97,97,97,97,97,1163,1164,97,97,97,97,97,1516,97,97,97,1519,97,1521,97,97,97,97,97,97,1525,97,97,18,0,139621,0,0,0,0,0,0,364,0,0,367,41606,67,67,67,67,67,1586,67,67,67,67,67,67,67,67,67,67,67,1276,67,67,67,67,67,67,67,67,67,1600,67,67,67,67,67,67,67,67,67,67,67,1301,0,0,0,1307,97,97,1620,97,97,97,97,97,97,97,1627,97,97,97,97,97,97,913,97,97,97,97,919,97,97,97,0,97,97,97,1781,97,97,0,0,97,97,97,97,97,97,0,0,97,97,97,97,97,97,0,1792,1860,45,1862,1863,45,1865,45,67,67,67,67,67,67,67,67,1875,67,1877,1878,67,1880,67,97,97,97,97,97,1887,0,1889,97,97,18,0,139621,0,0,0,0,0,0,364,237568,0,367,0,97,1893,0,0,0,97,1898,1899,97,1901,97,45,45,45,45,45,2014,45,67,67,67,67,67,2020,67,97,1989,45,1990,45,45,45,67,67,67,67,67,67,1996,67,1997,67,67,67,67,67,273,67,0,37139,24853,0,0,0,0,41098,65820,67,67,97,97,97,97,0,0,97,97,2005,0,97,2007,97,97,18,0,139621,0,0,0,642,0,133,364,0,0,367,41606,0,97,97,2056,2057,0,2059,45,67,0,97,45,67,0,97,45,45,67,209,67,67,67,223,67,67,67,67,67,67,67,67,67,786,67,67,67,791,67,67,45,45,940,45,45,45,45,45,45,45,45,45,45,45,45,45,45,727,45,45,67,67,67,67,67,67,67,67,1016,67,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,0,133,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,142,45,45,67,210,67,67,67,225,67,67,239,67,67,67,250,67,67,67,67,67,464,67,67,67,67,67,476,67,67,67,67,67,67,67,1709,67,67,67,97,97,97,97,97,97,0,0,97,97,97,97,97,1843,0,67,259,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,289,97,97,97,303,97,97,97,97,97,97,97,97,97,97,901,97,97,97,97,97,339,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,0,358,0,0,0,0,0,0,41098,0,140,45,45,45,45,45,1953,45,1955,45,45,45,67,67,67,67,67,67,67,1687,1688,67,67,67,67,45,45,405,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1203,45,458,67,67,67,67,67,67,67,67,67,470,477,67,67,67,67,67,67,67,1970,97,97,97,1974,0,0,0,97,1103,97,97,97,97,97,97,97,97,97,97,97,1372,97,97,97,97,67,522,67,67,67,67,67,67,67,67,67,67,67,536,67,67,67,67,67,67,1696,67,67,67,67,67,67,67,1701,67,555,97,97,97,97,97,97,97,97,97,567,574,97,97,97,97,97,301,97,309,97,97,97,97,97,97,97,97,97,900,97,97,97,905,97,97,97,619,97,97,97,97,97,97,97,97,97,97,97,633,97,97,18,0,139621,0,0,362,0,0,0,364,0,0,367,41606,369,649,45,45,45,45,45,45,45,45,45,45,45,45,663,664,67,67,67,67,750,751,67,67,67,67,758,67,67,67,67,67,67,67,1272,67,67,67,67,67,67,67,67,67,1057,1058,67,67,67,67,67,67,67,67,797,67,67,67,67,67,67,67,67,67,67,67,67,512,67,67,67,97,97,97,97,895,97,97,97,97,97,97,97,97,97,97,97,902,97,97,97,97,67,67,1051,67,67,67,67,67,67,67,67,67,67,67,1062,67,67,67,67,67,491,67,67,67,67,67,67,67,67,67,67,67,1302,0,0,0,1308,97,97,97,97,1145,97,97,97,97,97,97,97,97,97,97,97,1139,97,97,97,97,1156,97,97,97,97,97,97,1161,97,97,97,97,97,1166,97,97,18,640,139621,0,641,0,0,0,0,364,0,0,367,41606,67,67,67,67,1257,67,67,67,67,67,67,67,67,67,67,67,0,0,1305,0,0,97,97,1337,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1630,97,67,1474,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,2380062,2171166,2171166,97,1529,97,97,0,45,45,45,45,45,45,45,45,45,45,45,1228,45,45,45,45,67,67,67,67,1707,67,67,67,67,67,67,97,97,97,97,97,0,0,0,97,1891,1739,97,97,97,97,97,97,45,45,45,45,45,45,45,45,45,1198,45,1200,45,45,45,45,97,97,1894,0,0,97,97,97,97,97,97,45,45,45,45,45,672,45,45,45,45,45,45,45,45,45,45,45,1420,45,45,45,45,67,67,1965,67,1967,67,67,67,97,97,97,97,0,1976,0,97,97,45,67,0,97,45,67,0,97,45,67,0,97,45,97,97,1979,0,0,97,1982,97,97,97,1986,45,45,45,45,45,735,45,45,67,67,67,67,67,67,67,67,67,67,67,67,67,1770,67,67,2e3,97,97,97,2002,0,97,97,97,0,97,97,97,97,97,97,1798,97,97,97,45,45,45,2034,67,67,67,67,97,0,0,2040,97,97,97,97,45,45,45,45,1752,45,45,45,1753,1754,45,45,45,45,45,45,383,45,45,45,45,45,45,45,45,45,675,45,45,45,45,45,45,438,45,45,45,45,45,445,45,45,45,45,45,45,45,45,67,1430,67,67,67,67,67,67,67,67,67,524,67,67,67,67,67,531,67,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,1096,97,97,97,621,97,97,97,97,97,628,97,97,97,97,97,97,0,53264,0,18,18,24,24,356,28,28,665,45,45,45,45,45,45,45,45,45,676,45,45,45,45,45,942,45,45,45,45,45,45,45,45,45,45,707,708,45,45,45,45,763,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,809,810,67,67,67,67,783,67,67,67,67,67,67,67,67,67,67,67,0,1303,0,0,0,97,861,97,97,97,97,97,97,97,97,97,97,97,97,97,97,613,97,45,45,956,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1215,45,67,67,67,67,1027,67,67,67,67,1032,67,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,1097,1064,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1075,67,1098,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,331,97,97,97,97,1158,97,97,97,97,97,97,97,97,97,97,97,97,97,594,97,97,1309,0,0,0,1315,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1374,97,45,45,1543,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1240,67,67,1583,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1252,67,97,97,97,1635,97,97,97,0,97,97,97,97,97,97,97,97,1800,97,45,45,45,97,97,1793,97,97,97,97,97,97,97,97,97,97,45,45,45,1743,45,45,45,1746,45,0,97,97,97,97,97,1851,97,45,45,45,45,1856,45,45,45,45,1864,45,45,67,67,1869,67,67,67,67,1874,67,0,97,97,45,67,2058,97,45,67,0,97,45,67,0,97,45,45,67,211,67,67,67,67,67,67,240,67,67,67,67,67,67,67,1444,67,67,67,67,67,67,67,67,67,509,67,67,67,67,67,67,67,67,67,268,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,290,97,97,97,305,97,97,319,97,97,97,330,97,97,18,640,139621,0,641,0,0,0,0,364,0,643,367,41606,97,97,348,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,45,45,45,380,45,45,45,45,45,45,395,45,45,45,400,369,0,45,45,45,45,45,45,45,45,658,45,45,45,45,45,972,45,45,45,45,45,45,45,45,45,45,427,45,45,45,45,45,745,67,67,67,67,67,67,67,67,756,67,67,67,67,67,67,67,67,37689,1086,25403,1090,66365,1094,0,0,97,843,97,97,97,97,97,97,97,97,854,97,97,97,97,97,97,1121,97,97,97,97,1126,97,97,97,97,45,980,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1400,45,67,67,67,1011,67,67,67,67,67,67,67,67,67,67,67,0,1304,0,0,0,1190,45,45,1193,1194,45,45,45,45,45,1199,45,1201,45,45,45,45,1911,45,45,45,45,45,67,67,67,67,67,67,67,1579,67,67,67,67,45,1205,45,45,45,45,45,45,45,45,1211,45,45,45,45,45,984,45,45,45,45,45,45,45,45,45,45,45,1550,45,45,45,45,45,1217,45,45,45,45,45,45,1225,45,45,45,45,1229,45,45,45,1388,45,45,45,45,45,45,1396,45,45,45,45,45,444,45,45,45,45,45,45,45,45,45,67,67,1574,67,67,67,67,67,67,67,67,67,67,1590,67,67,67,67,67,1254,67,67,67,67,67,1259,67,1261,67,67,67,67,1265,67,67,67,67,67,67,1708,67,67,67,67,97,97,97,97,97,97,0,0,97,97,97,97,97,0,0,67,67,67,67,1285,67,67,67,67,1289,67,67,67,67,67,67,67,67,37689,1087,25403,1091,66365,1095,0,0,97,97,97,97,1339,97,1341,97,97,97,97,1345,97,97,97,97,97,561,97,97,97,97,97,573,97,97,97,97,97,97,1717,97,0,97,97,97,97,97,97,97,591,97,97,97,97,97,97,97,97,97,1329,97,97,97,97,97,97,97,97,97,97,1351,97,97,97,97,97,97,1357,97,97,97,97,97,588,97,97,97,97,97,97,97,97,97,97,568,97,97,97,97,97,97,97,1365,97,97,97,97,1369,97,97,97,97,97,97,97,97,97,1356,97,97,97,97,97,97,45,45,1403,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1399,45,45,45,1413,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1669,45,1422,45,45,1425,45,45,1428,45,1429,67,67,67,67,67,67,67,67,1468,67,67,67,67,67,67,67,67,529,67,67,67,67,67,67,539,67,67,1475,67,0,0,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,97,97,1530,97,0,45,45,1534,45,45,45,45,45,45,45,45,1956,45,45,67,67,67,67,67,67,67,67,67,1599,67,67,1601,67,67,67,67,67,67,67,67,67,803,67,67,67,67,67,67,1632,97,1634,0,97,97,97,1640,97,97,97,1643,97,97,1645,97,97,97,97,97,912,97,97,97,97,97,97,97,97,97,0,0,0,45,45,45,45,45,45,1660,1661,45,45,45,45,1665,1666,45,45,45,45,45,1670,1692,1693,67,67,67,67,67,1697,67,67,67,67,67,67,67,1702,97,97,1714,1715,97,97,97,97,0,1721,1722,97,97,97,97,97,97,1353,97,97,97,97,97,97,97,97,1362,1726,97,0,0,97,97,97,0,97,97,97,1734,97,97,97,97,97,848,849,97,97,97,97,856,97,97,97,97,97,354,0,53264,0,18,18,24,24,0,28,28,45,45,1750,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1681,45,0,1846,97,97,97,97,97,97,45,45,1854,45,45,45,45,1859,67,67,67,1879,67,67,97,97,1884,97,97,0,0,0,97,97,97,1105,97,97,97,97,97,97,97,97,97,97,1344,97,97,97,1347,97,1892,97,0,0,0,97,97,97,1900,97,97,45,45,45,45,45,997,45,45,45,45,45,45,45,45,45,45,1002,45,45,1005,1006,45,67,67,67,67,67,1926,67,67,1928,97,97,97,97,97,0,0,97,97,97,0,97,97,97,97,97,97,1737,97,0,97,97,97,97,0,0,0,97,97,1944,97,97,1946,45,45,45,1544,45,45,45,45,45,45,45,45,45,45,45,45,190,45,45,45,152,155,45,163,45,45,177,179,182,45,45,45,193,197,45,45,45,1672,45,45,45,45,45,1677,45,1679,45,45,45,45,996,45,45,45,45,45,45,45,45,45,45,45,1212,45,45,45,45,67,260,264,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,97,295,299,302,97,310,97,97,324,326,329,97,97,97,0,97,97,1639,0,1641,97,97,97,97,97,97,97,97,1511,97,97,97,97,97,97,97,97,1523,97,97,97,97,97,97,97,97,1719,97,97,97,97,97,97,97,97,1720,97,97,97,97,97,97,97,312,97,97,97,97,97,97,97,97,1123,97,97,97,97,97,97,97,340,344,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,45,373,375,419,45,45,45,45,45,45,45,45,45,428,45,45,435,45,45,45,1751,45,45,45,45,45,45,45,45,45,45,45,45,1410,45,45,45,67,67,67,505,67,67,67,67,67,67,67,67,67,514,67,67,67,67,67,67,1969,67,97,97,97,97,0,0,0,97,97,45,67,0,97,45,67,0,97,2064,2065,0,2066,45,521,67,67,67,67,67,67,67,67,67,67,534,67,67,67,67,67,67,465,67,67,67,474,67,67,67,67,67,67,67,1467,67,67,67,67,67,67,67,67,67,97,97,97,97,97,1933,0,97,97,97,602,97,97,97,97,97,97,97,97,97,611,97,97,18,640,139621,358,641,0,0,0,0,364,0,0,367,0,618,97,97,97,97,97,97,97,97,97,97,631,97,97,97,97,97,881,97,97,97,97,97,97,97,97,97,97,569,97,97,97,97,97,369,0,45,652,45,45,45,45,45,657,45,45,45,45,45,45,1235,45,45,45,45,45,45,45,45,67,67,67,1432,67,67,67,67,67,67,67,766,67,67,67,67,67,67,67,67,773,67,67,67,0,1305,0,1311,0,1317,97,97,97,97,97,97,97,1624,97,97,97,97,97,97,97,97,0,97,97,97,1724,97,97,97,777,67,67,782,67,67,67,67,67,67,67,67,67,67,67,67,535,67,67,67,67,67,67,67,814,67,67,67,67,67,67,67,67,67,37689,544,25403,546,70179,0,0,66365,66365,552,0,97,837,97,97,97,97,97,97,1496,97,97,97,97,97,97,97,97,97,97,918,97,97,97,97,0,842,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1168,97,97,97,97,864,97,97,97,97,97,97,97,97,871,97,97,97,0,1637,97,97,0,97,97,97,97,97,97,97,97,97,97,1801,45,45,97,875,97,97,880,97,97,97,97,97,97,97,97,97,97,97,1151,1152,97,97,97,67,67,67,1040,67,67,67,67,67,67,67,67,67,67,67,67,790,67,67,67,1180,0,649,45,45,45,45,45,45,45,45,45,45,45,45,45,200,45,45,67,67,67,1454,67,67,67,67,67,67,67,67,67,67,67,67,806,67,67,67,0,0,0,1481,0,1094,0,0,97,1483,97,97,97,97,97,97,304,97,97,318,97,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,97,97,97,1507,97,97,97,97,97,97,97,97,97,97,97,97,1332,97,97,97,1619,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1631,97,1633,97,0,97,97,97,0,97,97,97,97,97,97,97,97,97,1381,0,0,45,45,45,45,97,97,1727,0,97,97,97,0,97,97,97,97,97,97,97,97,626,97,97,97,97,97,97,636,45,45,1760,67,67,67,67,67,67,67,1765,67,67,67,67,67,67,67,1299,67,67,67,0,0,0,0,0,0,97,97,97,97,1616,97,97,1803,45,45,45,45,1807,45,45,45,45,45,1813,45,45,45,67,67,1684,67,67,67,67,67,67,67,67,67,67,67,822,67,67,37689,544,67,67,1818,67,67,67,67,1822,67,67,67,67,67,1828,67,67,67,67,67,97,0,0,97,97,97,97,97,45,45,45,2012,2013,45,45,67,67,67,2018,2019,67,67,97,67,97,97,97,1833,97,97,0,0,97,97,1840,97,97,0,0,97,97,97,0,97,97,1733,97,1735,97,97,97,0,97,97,97,1849,97,97,97,45,45,45,45,45,1857,45,45,45,1910,45,1912,45,45,1914,45,67,67,67,67,67,67,67,67,67,67,1017,67,67,1020,67,45,1861,45,45,45,45,45,67,67,67,67,67,1872,67,67,67,67,67,67,752,67,67,67,67,67,67,67,67,67,67,1446,67,67,67,67,67,1876,67,67,67,67,67,97,97,97,97,97,0,0,0,1890,97,97,97,97,97,1134,97,97,97,97,97,97,97,97,97,97,570,97,97,97,97,580,1935,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,1906,45,67,67,67,67,2048,0,97,97,97,97,45,45,67,67,0,0,0,0,925,41606,0,0,0,931,45,45,45,45,45,45,1674,45,1676,45,45,45,45,45,45,45,446,45,45,45,45,45,45,45,67,67,67,67,1871,67,67,67,67,0,97,97,45,67,0,97,2060,2061,0,2063,45,67,0,97,45,45,156,45,45,45,45,45,45,45,45,45,192,45,45,45,45,1673,45,45,45,45,45,45,45,45,45,45,45,429,45,45,45,45,67,67,67,269,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,349,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,45,374,45,45,67,67,213,217,67,67,67,67,67,242,67,247,67,253,45,45,698,45,45,45,45,45,45,45,45,45,45,45,45,45,399,45,45,0,0,0,0,925,41606,0,929,0,0,45,45,45,45,45,45,1391,45,45,1395,45,45,45,45,45,45,423,45,45,45,45,45,45,45,436,45,67,67,67,67,1041,67,1043,67,67,67,67,67,67,67,67,67,67,1776,67,67,97,97,97,1099,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,888,97,97,97,1131,97,97,97,97,1135,97,1137,97,97,97,97,97,97,97,1497,97,97,97,97,97,97,97,97,97,883,97,97,97,97,97,97,1310,0,0,0,1316,0,0,0,0,1100,0,0,0,97,97,97,97,97,1107,97,97,97,97,97,97,97,97,1343,97,97,97,97,97,97,1348,0,0,1317,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,97,1112,97,45,1804,45,45,45,45,45,45,45,45,45,45,45,45,45,67,1868,67,1870,67,67,67,67,67,1817,67,67,1819,67,67,67,67,67,67,67,67,67,67,67,67,823,67,37689,544,67,97,1832,97,97,1834,97,0,0,97,97,97,97,97,0,0,97,97,97,0,1732,97,97,97,97,97,97,97,850,97,97,97,97,97,97,97,97,97,1177,0,0,925,0,0,0,0,97,97,97,97,0,0,1941,97,97,97,97,97,97,45,45,45,1991,1992,45,67,67,67,67,67,67,67,67,67,1998,134,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,45,941,45,45,944,45,45,45,45,45,45,952,45,45,207,67,67,67,67,67,226,67,67,67,67,67,67,67,67,67,820,67,67,67,67,37689,544,369,650,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1682,25403,546,70179,0,0,66365,66365,552,835,97,97,97,97,97,97,97,1522,97,97,97,97,97,97,97,97,0,97,97,97,97,97,97,1725,67,67,67,1695,67,67,67,67,67,67,67,67,67,67,67,67,1034,67,1036,67,67,67,265,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,97,296,97,97,97,97,314,97,97,97,97,332,334,97,97,97,97,97,1146,1147,97,97,97,97,97,97,97,97,97,97,1626,97,97,97,97,97,97,345,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,372,45,45,45,1220,45,45,45,45,45,45,45,45,45,45,45,45,1213,45,45,45,45,404,406,45,45,45,45,45,45,45,45,45,45,45,45,45,434,45,45,45,440,45,45,45,45,45,45,45,45,451,452,45,45,45,67,1683,67,67,67,1686,67,67,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,67,67,67,67,490,492,67,67,67,67,67,67,67,67,67,67,67,1447,67,67,1450,67,67,67,67,67,526,67,67,67,67,67,67,67,67,537,538,67,67,67,67,67,506,67,67,508,67,67,511,67,67,67,67,0,1476,0,0,0,0,0,1478,0,0,0,0,0,0,0,0,97,97,1484,97,97,97,97,97,97,865,97,97,97,97,97,97,97,97,97,97,1499,97,97,97,97,97,97,97,97,97,587,589,97,97,97,97,97,97,97,97,97,97,629,97,97,97,97,97,97,97,97,97,623,97,97,97,97,97,97,97,97,634,635,97,97,97,97,97,1160,97,97,97,97,97,97,97,97,97,97,97,1628,97,97,97,97,369,0,45,45,45,45,45,655,45,45,45,45,45,45,45,45,999,45,1001,45,45,45,45,45,45,45,45,715,45,45,45,720,45,45,45,45,45,45,45,45,728,25403,546,70179,0,0,66365,66365,552,0,97,97,97,97,97,840,97,97,97,97,97,1174,97,97,97,97,0,0,925,0,0,0,0,0,0,0,1100,97,97,97,97,97,97,97,97,627,97,97,97,97,97,97,97,938,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,680,45,968,45,970,45,973,45,45,45,45,45,45,45,45,45,45,962,45,45,45,45,45,979,45,45,45,45,45,985,45,45,45,45,45,45,45,45,45,1224,45,45,45,45,45,45,45,45,688,45,45,45,45,45,45,45,1007,1008,67,67,67,67,67,1014,67,67,67,67,67,67,67,67,67,1045,67,67,67,67,67,67,67,1038,67,67,67,67,67,67,1044,67,1046,67,1049,67,67,67,67,67,67,800,67,67,67,67,67,67,808,67,67,0,0,0,1102,97,97,97,97,97,1108,97,97,97,97,97,97,306,97,97,97,97,97,97,97,97,97,97,1371,97,97,97,97,97,97,97,97,1132,97,97,97,97,97,97,1138,97,1140,97,1143,97,97,97,97,97,1352,97,97,97,97,97,97,97,97,97,97,869,97,97,97,97,97,45,1191,45,45,45,45,45,1196,45,45,45,45,45,45,45,45,1407,45,45,45,45,45,45,45,45,986,45,45,45,45,45,45,991,45,67,67,67,1256,67,67,67,67,67,67,67,67,67,67,67,67,1048,67,67,67,97,1336,97,97,97,97,97,97,97,97,97,97,97,97,97,97,615,97,1386,45,1387,45,45,45,45,45,45,45,45,45,45,45,45,45,455,45,457,45,45,1424,45,45,45,45,45,67,67,67,67,1433,67,1434,67,67,67,67,67,767,67,67,67,67,67,67,67,67,67,67,67,1591,67,1593,67,67,45,45,1805,45,45,45,45,45,45,45,45,45,1814,45,45,1816,67,67,67,67,1820,67,67,67,67,67,67,67,67,67,1829,67,67,67,67,67,815,67,67,67,67,821,67,67,67,37689,544,67,1831,97,97,97,97,1835,0,0,97,97,97,97,97,0,0,97,97,97,1731,97,97,97,97,97,97,97,97,97,853,97,97,97,97,97,97,0,97,97,97,97,1850,97,97,45,45,45,45,45,45,45,45,1547,45,45,45,45,45,45,45,45,1664,45,45,45,45,45,45,45,45,961,45,45,45,45,965,45,967,1907,45,45,45,45,45,45,45,45,45,67,67,67,67,67,1920,0,1936,97,97,97,0,0,0,97,97,97,97,97,97,45,45,67,67,67,67,67,67,1763,67,67,67,67,67,67,67,67,1056,67,67,67,67,67,67,67,67,1273,67,67,67,67,67,67,67,67,1457,67,67,67,67,67,67,67,67,97,97,97,97,0,0,28672,97,45,67,67,67,67,0,0,97,97,97,97,45,45,67,67,2054,97,97,291,97,97,97,97,97,97,320,97,97,97,97,97,97,307,97,97,97,97,97,97,97,97,97,97,12288,0,925,926,1179,0,45,377,45,45,45,381,45,45,392,45,45,396,45,45,45,45,971,45,45,45,45,45,45,45,45,45,45,45,45,1756,45,45,45,67,67,67,67,463,67,67,67,467,67,67,478,67,67,482,67,67,67,67,67,1028,67,67,67,67,67,67,67,67,67,67,67,67,1469,67,67,1472,67,502,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1460,67,97,97,97,97,560,97,97,97,564,97,97,575,97,97,579,97,97,97,97,97,1368,97,97,97,97,97,97,97,97,97,97,0,0,925,0,0,930,97,599,97,97,97,97,97,97,97,97,97,97,97,97,97,97,872,97,45,666,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1758,0,362,0,0,925,41606,0,0,0,0,45,45,934,45,45,45,164,168,174,178,45,45,45,45,45,194,45,45,45,165,45,45,45,45,45,45,45,45,45,199,45,45,45,67,67,1010,67,67,67,67,67,67,67,67,67,67,67,67,1060,67,67,67,67,67,67,1052,1053,67,67,67,67,67,67,67,67,67,67,1063,97,1157,97,97,97,97,97,97,97,97,97,97,97,97,1167,97,97,97,97,97,1379,97,97,97,0,0,0,45,1383,45,45,45,1806,45,45,45,45,45,45,1812,45,45,45,45,67,67,67,67,67,1577,67,67,67,67,67,67,67,753,67,67,67,67,67,67,67,67,67,1262,67,67,67,67,67,67,67,1282,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1471,67,45,1402,45,45,45,45,45,45,45,45,45,45,45,45,45,45,417,45,67,1462,67,67,67,67,67,67,67,67,67,67,67,67,67,67,37689,544,97,1517,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1128,97,97,97,97,1636,97,97,97,0,97,97,97,97,97,97,97,97,851,97,97,97,97,97,97,97,67,67,1705,67,67,67,67,67,67,67,67,97,97,97,97,97,97,0,0,97,97,97,97,1842,0,0,1779,97,97,97,1782,97,0,0,97,97,97,97,97,97,0,0,97,97,97,1789,97,97,0,0,0,97,1847,97,97,97,97,97,45,45,45,45,45,45,45,45,1675,45,45,45,45,45,45,45,45,737,738,67,740,67,741,67,743,67,67,67,67,67,67,1968,67,67,97,97,97,97,0,0,0,97,97,45,67,0,97,45,67,2062,97,45,67,0,97,45,67,67,97,97,2001,97,0,0,2004,97,97,0,97,97,97,97,1797,97,97,97,97,97,45,45,45,67,261,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,292,97,97,97,97,311,315,321,325,97,97,97,97,97,97,1623,97,97,97,97,97,97,97,97,97,97,1330,97,97,1333,1334,97,341,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,363,364,0,367,41098,369,140,45,45,45,45,1221,45,45,45,45,45,45,45,45,45,45,45,413,45,45,416,45,376,45,45,45,45,382,45,45,45,45,45,45,45,45,45,45,1408,45,45,45,45,45,403,45,45,45,45,45,45,45,45,45,45,414,45,45,45,418,67,67,67,462,67,67,67,67,468,67,67,67,67,67,67,67,67,1602,67,1604,67,67,67,67,67,67,67,67,489,67,67,67,67,67,67,67,67,67,67,500,67,67,67,67,67,1067,67,67,67,67,67,1072,67,67,67,67,67,67,274,0,37139,24853,0,0,0,0,41098,65820,67,67,504,67,67,67,67,67,67,67,510,67,67,67,517,519,541,67,37139,37139,24853,24853,0,70179,0,0,0,65820,65820,369,287,554,97,97,97,559,97,97,97,97,565,97,97,97,97,97,97,97,1718,0,97,97,97,97,97,97,97,898,97,97,97,97,97,97,906,97,97,97,97,586,97,97,97,97,97,97,97,97,97,97,597,97,97,97,97,97,1520,97,97,97,97,97,97,97,97,97,97,0,45,1656,45,45,45,97,97,601,97,97,97,97,97,97,97,607,97,97,97,614,616,638,97,18,0,139621,0,0,0,0,0,0,364,0,0,367,41606,369,0,45,45,45,45,45,45,45,45,45,45,661,45,45,45,407,45,45,45,45,45,45,45,45,45,45,45,45,45,1815,45,67,45,667,45,45,45,45,45,45,45,45,45,45,678,45,45,45,421,45,45,45,45,45,45,45,45,45,45,45,45,976,977,45,45,45,682,45,45,45,45,45,45,45,45,45,45,693,45,45,697,67,67,748,67,67,67,67,754,67,67,67,67,67,67,67,67,67,1274,67,67,67,67,67,67,67,67,765,67,67,67,67,769,67,67,67,67,67,67,67,67,67,1589,67,67,67,67,67,67,67,67,780,67,67,784,67,67,67,67,67,67,67,67,67,67,67,1777,67,97,97,97,97,97,97,846,97,97,97,97,852,97,97,97,97,97,97,97,1742,45,45,45,45,45,45,45,1747,97,97,97,863,97,97,97,97,867,97,97,97,97,97,97,97,308,97,97,97,97,97,97,97,97,97,97,12288,1178,925,0,1179,0,97,97,97,878,97,97,882,97,97,97,97,97,97,97,97,97,97,12288,0,925,0,1179,0,908,97,97,97,97,97,97,97,97,97,97,97,97,97,97,0,0,925,0,0,0,954,45,45,45,45,45,45,45,45,45,45,963,45,45,966,45,45,157,45,45,171,45,45,45,45,45,45,45,45,45,45,948,45,45,45,45,45,1022,67,67,1026,67,67,67,1030,67,67,67,67,67,67,67,67,67,1603,1605,67,67,67,1608,67,67,67,1039,67,67,1042,67,67,67,67,67,67,67,67,67,67,471,67,67,67,67,67,0,1100,0,97,97,97,97,97,97,97,97,97,97,97,97,97,904,97,97,97,97,1116,97,97,1120,97,97,97,1124,97,97,97,97,97,97,562,97,97,97,571,97,97,97,97,97,97,97,97,97,1133,97,97,1136,97,97,97,97,97,97,97,97,915,917,97,97,97,97,97,0,97,1170,97,97,97,97,97,97,97,97,0,0,925,0,0,0,0,0,41606,0,0,0,0,45,45,45,45,45,45,1993,67,67,67,67,67,67,67,67,67,67,1275,67,67,67,1278,67,0,0,0,45,45,1182,45,45,45,45,45,45,45,45,45,1189,1204,45,45,45,1207,45,45,1209,45,1210,45,45,45,45,45,45,1546,45,45,45,45,45,45,45,45,45,689,45,45,45,45,45,45,1231,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,236,67,67,67,67,67,67,67,801,67,67,67,805,67,67,67,67,67,1242,67,67,67,67,67,67,67,67,67,1249,67,67,67,67,67,67,507,67,67,67,67,67,67,67,67,67,67,1300,0,0,0,0,0,1267,67,67,1269,67,1270,67,67,67,67,67,67,67,67,67,1280,97,1349,97,1350,97,97,97,97,97,97,97,97,97,1360,97,97,97,0,1980,97,97,97,97,97,45,45,45,45,45,45,673,45,45,45,45,677,45,45,45,45,1401,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,953,67,1437,67,1440,67,67,67,67,1445,67,67,67,1448,67,67,67,67,67,67,1029,67,67,67,67,67,67,67,67,67,67,1825,67,67,67,67,67,1473,67,67,67,0,0,0,0,0,0,0,0,0,0,0,0,1320,0,834,97,97,97,97,1490,97,1493,97,97,97,97,1498,97,97,97,1501,97,97,97,0,97,1638,97,0,97,97,97,97,97,97,97,97,916,97,97,97,97,97,97,0,1528,97,97,97,0,45,45,45,1535,45,45,45,45,45,45,45,1867,67,67,67,67,67,67,67,67,67,97,97,97,97,1932,0,0,1555,45,45,45,45,45,45,45,45,45,45,45,45,45,1567,45,45,158,45,45,172,45,45,45,183,45,45,45,45,201,45,45,67,212,67,67,67,67,231,235,241,245,67,67,67,67,67,67,493,67,67,67,67,67,67,67,67,67,67,472,67,67,67,67,67,97,97,97,97,1651,97,97,97,97,97,0,45,45,45,45,45,45,45,1539,45,45,45,67,1704,67,1706,67,67,67,67,67,67,67,97,97,97,97,97,97,0,0,97,97,97,1841,97,0,1844,97,97,97,97,1716,97,97,97,0,97,97,97,97,97,97,97,590,97,97,97,97,97,97,97,97,97,0,0,0,45,45,45,1385,1748,45,45,45,45,45,45,45,45,45,45,45,45,45,1757,45,45,159,45,45,45,45,45,45,45,45,45,45,45,45,45,415,45,45,97,97,1780,97,97,97,0,0,1786,97,97,97,97,97,0,0,97,97,1730,0,97,97,97,97,97,1736,97,1738,67,97,97,97,97,97,97,0,1838,97,97,97,97,97,0,0,97,1729,97,0,97,97,97,97,97,97,97,97,1162,97,97,97,1165,97,97,97,45,1950,45,45,45,45,45,45,45,45,1958,67,67,67,1962,67,67,67,67,67,1246,67,67,67,67,67,67,67,67,67,67,67,97,1710,97,97,97,1999,67,97,97,97,97,0,2003,97,97,97,0,97,97,2008,2009,45,67,67,67,67,0,0,97,97,97,97,45,2052,67,2053,0,0,0,0,925,41606,0,0,930,0,45,45,45,45,45,45,1392,45,1394,45,45,45,45,45,45,45,1545,45,45,45,45,45,45,45,45,45,45,1563,1565,45,45,45,1568,0,97,2055,45,67,0,97,45,67,0,97,45,67,28672,97,45,45,160,45,45,45,45,45,45,45,45,45,45,45,45,45,679,45,45,67,67,266,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,346,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,362,0,364,0,367,41098,369,140,371,45,45,45,379,45,45,45,388,45,45,45,45,45,45,45,45,1663,45,45,45,45,45,45,45,45,45,449,45,45,45,45,45,67,67,542,37139,37139,24853,24853,0,70179,0,0,0,65820,65820,369,287,97,97,97,97,97,1622,97,97,97,97,97,97,97,1629,97,97,0,1794,1795,97,97,97,97,97,97,97,97,45,45,45,45,45,45,1745,45,45,97,639,18,0,139621,0,0,0,0,0,0,364,0,0,367,41606,45,731,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,251,67,67,67,67,67,798,67,67,67,67,67,67,67,67,67,67,67,67,1073,67,67,67,860,97,97,97,97,97,97,97,97,97,97,97,97,97,97,873,0,0,1101,97,97,97,97,97,97,97,97,97,97,97,97,97,921,97,0,67,67,67,67,1245,67,67,67,67,67,67,67,67,67,67,67,67,1250,67,67,1253,0,0,1312,0,0,0,1318,0,0,0,0,0,0,97,97,97,97,1106,97,97,97,97,97,97,97,97,97,1149,97,97,97,97,97,1155,97,97,1325,97,97,97,97,97,97,97,97,97,97,97,97,97,1141,97,97,67,67,1439,67,1441,67,67,67,67,67,67,67,67,67,67,67,67,1264,67,67,67,97,97,1492,97,1494,97,97,97,97,97,97,97,97,97,97,97,1331,97,97,97,97,67,67,67,2037,67,97,0,0,97,97,97,2043,97,45,45,45,442,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,232,67,67,67,67,67,67,67,67,1823,67,67,67,67,67,67,67,67,97,97,97,97,1975,0,0,97,874,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1142,97,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,65,86,117,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,63,84,115,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,61,82,113,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,59,80,111,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,57,78,109,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,55,76,107,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,53,74,105,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,51,72,103,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,49,70,101,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,47,68,99,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,45,67,97,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,213085,53264,18,49172,57366,24,8192,28,102432,0,0,0,44,0,0,32863,53264,18,49172,57366,24,8192,28,102432,0,41,41,41,0,0,1138688,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,0,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,89,53264,18,18,49172,0,57366,0,24,24,24,0,127,127,127,127,102432,67,262,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,342,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,360,0,0,364,0,367,41098,369,140,45,45,45,45,717,45,45,45,45,45,45,45,45,45,45,45,412,45,45,45,45,45,67,1009,67,67,67,67,67,67,67,67,67,67,67,67,67,1292,67,67,1294,67,67,67,67,67,67,67,67,67,67,0,0,0,0,0,0,97,97,97,1615,97,97,97,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,66,87,118,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,64,85,116,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,62,83,114,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,60,81,112,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,58,79,110,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,56,77,108,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,54,75,106,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,52,73,104,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,50,71,102,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,48,69,100,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,46,67,98,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,233472,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,69724,53264,18,18,49172,0,57366,262144,24,24,24,0,28,28,28,28,102432,45,45,161,45,45,45,45,45,45,45,45,45,45,45,45,45,710,45,45,28,139621,359,0,0,0,364,0,367,41098,369,140,45,45,45,45,1389,45,45,45,45,45,45,45,45,45,45,45,949,45,45,45,45,67,503,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1449,67,67,97,600,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1154,97,0,0,0,0,925,41606,927,0,0,0,45,45,45,45,45,45,1866,67,67,67,67,67,67,67,67,67,67,772,67,67,67,67,67,45,45,969,45,45,45,45,45,45,45,45,45,45,45,45,45,951,45,45,45,45,1192,45,45,45,45,45,45,45,45,45,45,45,45,45,1202,45,45,0,0,0,1314,0,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,1488,67,67,267,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,347,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,361,0,0,364,0,367,41098,369,140,45,45,45,45,734,45,45,45,67,67,67,67,67,742,67,67,45,45,668,45,45,45,45,45,45,45,45,45,45,45,45,45,1214,45,45,1130,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1361,97,45,45,1671,45,45,45,45,45,45,45,45,45,45,45,45,45,1552,45,45,0,0,0,0,2220032,0,0,1130496,0,0,0,0,2170880,2171020,2170880,2170880,18,0,0,131072,0,0,0,90112,0,2220032,0,0,0,0,0,0,0,0,97,97,97,1485,97,97,97,97,0,45,45,45,45,45,1537,45,45,45,45,45,1390,45,1393,45,45,45,45,1398,45,45,45,2170880,2171167,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2576384,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,0,0,0,0,0,0,2183168,0,0,0,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2721252,2744320,2170880,2170880,2170880,2834432,2840040,2170880,2908160,2170880,2170880,2936832,2170880,2170880,2985984,2170880,2994176,2170880,2170880,3014656,2170880,3059712,3076096,3088384,2170880,2170880,2170880,2170880,0,0,0,0,2220032,0,0,0,1142784,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3215360,2215936,2215936,2215936,2215936,2215936,2437120,2215936,2215936,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,543,0,545,0,0,2183168,0,0,831,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,3031040,2170880,3055616,2170880,2170880,2170880,2170880,3092480,2170880,2170880,3125248,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,0,0,0,0,67,67,37139,37139,24853,24853,0,0,0,0,0,65820,65820,0,287,97,97,97,97,97,1783,0,0,97,97,97,97,97,97,0,0,97,97,97,97,97,97,1791,0,0,546,70179,0,0,0,0,552,0,97,97,97,97,97,97,97,604,97,97,97,97,97,97,97,97,97,97,1150,97,97,97,97,97,147456,147456,147456,147456,147456,147456,147456,147456,147456,147456,147456,147456,0,0,147456,0,0,0,0,925,41606,0,928,0,0,45,45,45,45,45,45,998,45,45,45,45,45,45,45,45,45,1562,45,1564,45,45,45,45,0,2158592,2158592,0,0,0,0,2232320,2232320,2232320,0,2240512,2240512,2240512,2240512,0,0,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2416640],r.EXPECTED=[291,300,304,341,315,309,305,295,319,323,327,329,296,333,337,339,342,346,350,294,356,360,312,367,352,371,363,375,379,383,387,391,395,726,399,405,518,684,405,405,405,405,808,405,405,405,512,405,405,405,431,405,405,406,405,405,404,405,405,405,405,405,405,405,908,631,410,415,405,414,419,608,405,429,602,405,435,443,405,441,641,478,405,447,451,450,456,643,461,460,762,679,465,469,741,473,477,482,486,492,932,931,523,498,504,720,405,510,596,405,516,941,580,522,929,527,590,589,897,939,534,538,547,551,555,559,563,567,571,969,575,708,690,689,579,584,634,405,594,731,405,600,882,405,606,895,786,452,612,405,615,620,876,624,628,638,647,651,655,659,663,667,676,683,688,695,694,791,405,699,437,405,706,714,405,712,825,870,405,718,724,769,768,823,730,735,745,751,422,755,759,425,766,902,810,587,775,888,887,405,773,992,405,779,962,405,785,781,986,790,795,797,506,500,499,801,805,814,820,829,833,837,841,845,849,853,857,861,616,865,869,868,488,405,874,816,405,880,738,405,886,892,543,405,901,906,913,912,918,494,541,922,926,936,945,949,953,957,530,966,973,960,702,701,405,979,981,405,985,747,405,990,998,914,405,996,1004,672,975,974,1014,1002,1008,670,1012,405,405,405,405,405,401,1018,1022,1026,1106,1071,1111,1111,1111,1082,1145,1030,1101,1034,1038,1106,1106,1106,1106,1046,1206,1052,1106,1072,1111,1111,1042,1134,1065,1111,1112,1056,1160,1207,1062,1204,1208,1069,1106,1106,1106,1076,1111,1207,1161,1122,1205,1064,1094,1106,1106,1107,1111,1111,1111,1078,1086,1207,1092,1098,1046,1058,1106,1106,1110,1111,1111,1116,1120,1161,1126,1202,1104,1106,1145,1146,1129,1138,1088,1151,1048,1157,1153,1132,1141,1165,1107,1111,1172,1179,1109,1183,1175,1143,1147,1187,1108,1191,1195,1144,1199,1168,1212,1216,1220,1224,1228,1232,1236,1557,1247,1241,1241,1038,1434,1241,1241,1241,1241,1254,1275,1617,1241,1280,1287,1241,1241,1241,1287,1241,2114,1291,1241,1243,1241,2049,1824,2094,2095,1520,1309,1241,1241,1302,1241,1321,1311,1241,1241,1313,1778,1325,1336,1241,1241,1325,1330,1353,1241,1241,1695,1354,1241,1241,1241,1294,1686,1331,1241,1696,1368,1241,1338,1370,1241,1392,1399,1364,2017,1406,2016,1405,1716,1406,1407,1422,1417,1421,1241,1241,1241,1349,1426,1241,1774,1756,1241,1773,1241,1241,1345,1964,1812,1432,1241,1241,1345,1993,1459,1241,1241,1241,1395,1848,1767,1465,1241,1241,1394,1847,1242,1477,1241,1241,1428,1241,1445,1492,1241,1241,1438,1241,1499,1241,1241,1241,1455,1241,1818,1448,1241,1250,1241,2026,1623,1449,1241,1612,1616,1241,1614,1241,1257,1241,1241,1985,1292,1586,1512,1241,1517,2050,1526,1674,1519,1524,1647,2051,1532,1537,1551,1544,1550,1555,1561,1571,1578,1584,1590,1591,1653,1595,1602,1606,1610,1634,1628,1640,1633,1645,1241,1241,1241,1469,1241,1970,1651,1241,1270,1241,1241,1819,1449,1241,1293,1664,1241,1241,1481,1485,1574,1672,1241,1241,1513,1317,1487,1684,1241,1241,1533,1299,1694,1241,1241,1295,1241,1241,1241,1546,1700,1241,1241,1707,1241,1713,1241,1849,1715,1241,1720,1241,1276,1267,1241,1241,2107,1657,1864,1241,1881,1241,1326,1292,1241,1685,1358,1724,1338,1241,1363,1362,1342,1340,1361,1339,1833,1372,1360,1833,1833,1342,1343,1835,1341,1731,1738,1344,1241,1745,1241,1379,1241,1241,2092,1241,1388,1761,1754,1241,1386,1241,1400,1760,1241,1241,1241,1598,1734,1241,1241,1241,1635,1645,1241,1780,1766,1241,1241,1332,1771,1241,1241,1629,2079,1241,1242,1784,1241,1241,1680,1639,2063,1790,1241,1241,1741,1241,1241,1800,1241,1241,1762,1473,1241,1806,1241,1241,1786,1240,1709,1241,1241,1241,1668,1811,1241,1940,1241,1401,1974,1241,1408,1413,1382,1241,1816,1241,1241,1802,2086,1811,1241,1817,1945,1823,2095,2095,2047,2094,2046,2080,1241,1409,1312,1376,2096,2048,1241,1241,1807,1241,1241,1241,2035,1241,1241,1828,1241,2057,2061,1241,1241,1843,1241,2059,1241,1241,1241,1690,1847,1241,1241,1241,1703,2102,1848,1241,1241,1853,1292,1848,1241,2016,1857,1241,2002,1868,1241,1436,1241,1241,1271,1305,1241,1874,1241,1241,1884,2037,1892,1241,1890,1241,1461,1241,1241,1795,1241,1241,1891,1241,1878,1241,1888,1241,1888,1905,1896,2087,1912,1903,1241,1911,1906,1916,1905,2027,1863,1925,2088,1859,1861,1922,1927,1931,1935,1494,1241,1241,1918,1907,1939,1917,1944,1949,1241,1241,1451,1955,1241,1241,1241,1796,1727,2061,1241,1241,1899,1241,1660,1968,1241,1241,1951,1678,1978,1241,1241,1241,1839,1241,1241,1984,1982,1241,1488,1241,1241,1624,1450,1989,1241,1241,1241,1870,1995,1292,1241,1241,1958,1261,1241,1996,1241,1241,1241,2039,2008,1241,1241,1750,2e3,1241,1256,2001,1960,1241,1564,1241,1504,1241,1241,1442,1241,1241,1564,1528,1263,1241,1508,1241,1241,1468,1498,2006,1540,2015,1539,2014,1748,2013,1539,1831,2014,2012,1500,1567,2022,2021,1241,1580,1241,1241,2033,2037,1791,2045,2031,1241,1621,1241,1641,2044,1241,1241,1241,2093,1241,1241,2055,1241,1241,2067,1241,1283,1241,1241,1241,2101,2071,1241,1241,1241,2073,1848,2040,1241,1241,1241,2077,1241,1241,2106,1241,1241,2084,1241,2111,1241,1241,1381,1380,1241,1241,1241,2100,1241,2129,2118,2122,2126,2197,2133,3010,2825,2145,2698,2156,2226,2160,2161,2165,2174,2293,2194,2630,2201,2203,2152,3019,2226,2263,2209,2213,2218,2269,2292,2269,2269,2184,2226,2238,2148,2151,3017,2245,2214,2269,2269,2185,2226,2292,2269,2291,2269,2269,2269,2292,2205,3019,2226,2226,2160,2160,2160,2261,2160,2160,2160,2262,2276,2160,2160,2277,2216,2283,2216,2269,2269,2268,2269,2267,2269,2269,2269,2271,2568,2292,2269,2293,2269,2182,2190,2269,2186,2226,2226,2226,2226,2227,2160,2160,2160,2160,2263,2160,2275,2277,2282,2215,2217,2269,2269,2291,2269,2269,2293,2291,2269,2220,2269,2295,2294,2269,2269,2305,2233,2262,2278,2218,2269,2234,2226,2226,2228,2160,2160,2160,2289,2220,2294,2294,2269,2269,2304,2269,2160,2160,2287,2269,2269,2305,2269,2269,2312,2269,2269,2225,2226,2160,2287,2289,2219,2304,2295,2314,2234,2226,2314,2269,2226,2226,2160,2288,2219,2222,2304,2296,2269,2224,2160,2160,2269,2302,2294,2314,2224,2226,2288,2220,2294,2269,2290,2269,2269,2293,2269,2269,2269,2269,2270,2221,2313,2225,2227,2160,2300,2269,2225,2261,2309,2234,2229,2223,2318,2318,2318,2328,2336,2340,2344,2350,2637,2712,2358,2362,2372,2135,2378,2398,2135,2135,2135,2135,2136,2417,2241,2135,2378,2135,2135,2980,2984,2135,3006,2135,2135,2135,2945,2931,2425,2400,2135,2135,2135,2954,2135,2481,2433,2135,2135,2988,2824,2135,2135,2482,2434,2135,2135,2440,2445,2452,2135,2135,2998,3002,2961,2441,2446,2453,2463,2974,2135,2135,2135,2140,2642,2709,2459,2470,2465,2135,2135,3005,2135,2135,2987,2823,2458,2469,2464,2975,2135,2135,2135,2353,2488,2447,2324,2974,2135,2409,2459,2448,2135,2961,2487,2446,2476,2323,2973,2135,2135,2135,2354,2476,2974,2135,2135,2135,2957,2135,2135,2960,2135,2135,2135,2363,2409,2459,2474,2465,2487,2571,2973,2135,2135,2168,2973,2135,2135,2135,2959,2135,2135,2135,2506,2135,2957,2488,2170,2135,2135,2135,2960,2135,2818,2493,2135,2135,3033,2135,2135,2135,2934,2819,2494,2135,2135,2135,2976,2780,2499,2135,2135,2135,3e3,2968,2135,2935,2135,2135,2135,2364,2507,2135,2135,2934,2135,2135,2780,2492,2507,2135,2135,2506,2780,2135,2135,2782,2780,2135,2782,2135,2783,2374,2514,2135,2135,2135,3007,2530,2974,2135,2135,2135,3008,2135,2135,2134,2135,2526,2531,2975,2135,2135,3042,2581,2575,2956,2135,2135,2135,2394,2135,2508,2535,2840,2844,2495,2135,2135,2136,2684,2537,2842,2846,2135,2136,2561,2581,2551,2536,2841,2845,2975,3043,2582,2843,2555,2135,3040,3044,2538,2844,2975,2135,2135,2253,2644,2672,2542,2554,2135,2135,2346,2873,2551,2555,2135,2135,2135,2381,2559,2565,2538,2553,2135,2560,2914,2576,2590,2135,2135,2135,2408,2136,2596,2624,2135,2135,2135,2409,2135,2618,2597,3008,2135,2135,2380,2956,2601,2135,2135,2135,2410,2620,2624,2135,2136,2383,2135,2135,2783,2623,2135,2135,2393,2888,2136,2621,3008,2135,2618,2618,2622,2135,2135,2405,2414,2619,2384,2624,2135,2136,2950,2135,2138,2135,2139,2135,2604,2623,2135,2140,2878,2665,2957,2622,2135,2135,2428,2762,2606,2612,2135,2135,2501,2586,2604,3038,2135,2604,3036,2387,2958,2386,2135,2141,2135,2421,2387,2385,2135,2385,2384,2384,2135,2386,2628,2384,2135,2135,2501,2596,2591,2135,2135,2135,2400,2135,2634,2135,2135,2559,2580,2575,2648,2135,2135,2135,2429,2649,2135,2135,2135,2435,2654,2658,2135,2135,2135,2436,2649,2178,2659,2135,2135,2595,2601,2669,2677,2135,2135,2616,2957,2879,2665,2691,2135,2363,2367,2900,2878,2664,2690,2975,2877,2643,2670,2974,2671,2975,2135,2135,2619,2608,2669,2673,2135,2135,2653,2177,2672,2135,2135,2135,2486,2168,2251,2255,2695,2974,2709,2135,2135,2135,2487,2169,2399,2716,2975,2135,2363,2770,2776,2640,2717,2135,2135,2729,2135,2135,2641,2718,2135,2135,2135,2505,2135,2640,2257,2974,2135,2727,2975,2135,2365,2332,2895,2957,2135,2959,2135,2365,2749,2754,2959,2958,2958,2135,2380,2793,2799,2135,2735,2738,2135,2381,2135,2135,2940,2974,2135,2744,2135,2135,2739,2519,2976,2745,2135,2135,2135,2509,2755,2135,2135,2135,2510,2772,2778,2135,2135,2740,2520,2135,2771,2777,2135,2135,2759,2750,2792,2798,2135,2135,2781,2392,2779,2135,2135,2135,2521,2135,2679,2248,2135,2135,2681,2480,2135,2135,2786,3e3,2135,2679,2683,2135,2135,2416,2135,2135,2135,2525,2135,2730,2135,2135,2135,2560,2581,2135,2805,2135,2135,2804,2962,2832,2974,2135,2382,2135,2135,2958,2135,2135,2960,2135,2829,2833,2975,2961,2965,2969,2973,2968,2972,2135,2135,2135,2641,2135,2515,2966,2970,2851,2478,2135,2135,2808,2135,2809,2135,2135,2135,2722,2852,2479,2135,2135,2815,2135,2135,2766,2853,2480,2135,2857,2479,2135,2388,2723,2135,2364,2331,2894,2858,2480,2135,2135,2850,2478,2135,2135,2135,2806,2864,2135,2399,2256,2974,2865,2135,2135,2862,2135,2135,2135,2685,2807,2865,2135,2135,2807,2863,2135,2135,2135,2686,2884,2807,2135,2809,2807,2135,2135,2807,2806,2705,2810,2808,2700,2869,2702,2702,2702,2704,2883,2135,2135,2135,2730,2884,2135,2135,2135,2731,2321,2546,2135,2135,2876,2255,2889,2322,2547,2135,2401,2135,2135,2135,2949,2367,2893,2544,2973,2906,2973,2135,2135,2877,2663,2368,2901,2907,2974,2366,2899,2905,2972,2920,2974,2135,2135,2911,2900,2920,2363,2913,2918,2465,2941,2975,2135,2135,2924,2928,2974,2945,2931,2135,2135,2135,2765,2136,2955,2135,2135,2939,2931,2380,2135,2135,2380,2135,2135,2135,2780,2507,2137,2135,2137,2135,2139,2135,2806,2810,2135,2135,2135,2992,2135,2135,2962,2966,2970,2974,2135,2135,2787,3014,2135,2521,2993,2135,2135,2135,2803,2135,2135,2135,2618,2607,2997,3001,2135,2135,2963,2967,2971,2975,2135,2135,2791,2797,2135,3009,2999,3003,2787,3001,2135,2135,2964,2968,2785,2999,3003,2135,2135,2135,2804,2785,2999,3004,2135,2135,2135,2807,2135,2135,3023,2135,2135,2135,2811,2135,2135,3027,2135,2135,2135,2837,2968,3028,2135,2135,2135,2875,2135,2784,3029,2135,2408,2457,2446,0,14,0,-2120220672,1610612736,-2074083328,-2002780160,-2111830528,1073872896,1342177280,1075807216,4096,16384,2048,8192,0,8192,0,0,0,0,1,0,0,0,2,0,-2145386496,8388608,1073741824,0,2147483648,2147483648,2097152,2097152,2097152,536870912,0,0,134217728,33554432,1536,268435456,268435456,268435456,268435456,128,256,32,0,65536,131072,524288,16777216,268435456,2147483648,1572864,1835008,640,32768,65536,262144,1048576,2097152,196608,196800,196608,196608,0,131072,131072,131072,196608,196624,196608,196624,196608,196608,128,4096,16384,16384,2048,0,4,0,0,2147483648,2097152,0,1024,32,32,0,65536,1572864,1048576,32768,32768,32768,32768,196608,196608,196608,64,64,196608,196608,131072,131072,131072,131072,268435456,268435456,64,196736,196608,196608,196608,131072,196608,196608,16384,4,4,4,2,32,32,65536,1048576,12582912,1073741824,0,0,2,8,16,96,2048,32768,0,0,131072,268435456,268435456,268435456,256,256,196608,196672,196608,196608,196608,196608,4,0,256,256,256,256,32,32,32768,32,32,32,32,32768,268435456,268435456,268435456,196608,196608,196608,196624,196608,196608,196608,16,16,16,268435456,196608,64,64,64,196608,196608,196608,196672,268435456,64,64,196608,196608,16,196608,196608,196608,268435456,64,196608,131072,262144,4194304,25165824,33554432,134217728,268435456,268435456,196608,262152,8,256,512,3072,16384,200,-1073741816,8392713,40,8392718,520,807404072,40,520,100663304,0,0,-540651761,-540651761,257589048,0,262144,0,0,3,8,256,0,4,6,4100,8388612,0,0,0,3,4,8,256,512,1024,0,2097152,0,0,-537854471,-537854471,0,100663296,0,0,1,2,0,0,0,16384,0,0,0,96,14336,0,0,0,7,8,234881024,0,0,0,8,0,0,0,0,262144,0,0,16,64,384,512,0,1,1,0,12582912,0,0,0,0,33554432,67108864,-606084144,-606084144,-606084138,0,0,28,32,768,1966080,-608174080,0,0,0,14,35056,16,64,896,24576,98304,98304,131072,262144,524288,1048576,4194304,25165824,1048576,62914560,134217728,-805306368,0,384,512,16384,65536,131072,262144,29360128,33554432,134217728,268435456,1073741824,2147483648,262144,524288,1048576,29360128,33554432,524288,1048576,16777216,33554432,134217728,268435456,1073741824,0,0,0,123856,1966080,0,64,384,16384,65536,131072,16384,65536,524288,268435456,2147483648,0,0,524288,2147483648,0,0,1,16,0,256,524288,0,0,0,25,96,128,-537854471,0,0,0,32,7404800,-545259520,0,0,0,60,0,249,64768,1048576,6291456,6291456,25165824,100663296,402653184,1073741824,96,128,1280,2048,4096,57344,6291456,57344,6291456,8388608,16777216,33554432,201326592,1342177280,2147483648,0,57344,6291456,8388608,100663296,134217728,2147483648,0,0,0,1,8,16,64,128,64,128,256,1024,131072,131072,131072,262144,524288,16777216,57344,6291456,8388608,67108864,134217728,64,256,1024,2048,4096,57344,64,256,0,24576,32768,6291456,67108864,134217728,0,1,64,256,24576,32768,4194304,32768,4194304,67108864,0,0,64,256,0,0,24576,32768,0,16384,4194304,67108864,64,16384,0,0,1,64,256,16384,4194304,67108864,0,0,0,16384,0,16384,16384,0,-470447874,-470447874,-470447874,0,0,128,0,0,8,96,2048,32768,262144,8388608,35056,1376256,-471859200,0,0,14,16,224,2048,32768,2097152,4194304,8388608,-486539264,0,96,128,2048,32768,262144,2097152,262144,2097152,8388608,33554432,536870912,1073741824,2147483648,0,1610612736,2147483648,0,0,1,524288,1048576,12582912,0,0,0,151311,264503296,2097152,8388608,33554432,1610612736,2147483648,262144,8388608,33554432,536870912,67108864,4194304,0,4194304,0,4194304,4194304,0,0,524288,8388608,536870912,1073741824,2147483648,1,4097,8388609,96,2048,32768,1073741824,2147483648,0,96,2048,2147483648,0,0,96,2048,0,0,1,12582912,0,0,0,0,1641895695,1641895695,0,0,0,249,7404800,15,87808,1835008,1639972864,0,768,5120,16384,65536,1835008,1835008,12582912,16777216,1610612736,0,3,4,8,768,4096,65536,0,0,256,512,786432,8,256,512,4096,16384,1835008,16384,1835008,12582912,1610612736,0,0,0,256,0,0,0,4,8,16,32,1,2,8,256,16384,524288,16384,524288,1048576,12582912,1610612736,0,0,0,8388608,0,0,0,524288,4194304,0,0,0,8388608,-548662288,-548662288,-548662288,0,0,256,16384,65536,520093696,-1073741824,0,0,0,16777216,0,16,32,960,4096,4980736,520093696,1073741824,0,32,896,4096,57344,1048576,6291456,8388608,16777216,100663296,134217728,268435456,2147483648,0,512,786432,4194304,33554432,134217728,268435456,0,786432,4194304,134217728,268435456,0,524288,4194304,268435456,0,0,0,0,0,4194304,4194304,-540651761,0,0,0,2,4,8,16,96,128,264503296,-805306368,0,0,0,8,256,512,19456,131072,3072,16384,131072,262144,8388608,16777216,512,1024,2048,16384,131072,262144,131072,262144,8388608,33554432,201326592,268435456,0,3,4,256,1024,2048,57344,16384,131072,8388608,33554432,134217728,268435456,0,3,256,1024,16384,131072,33554432,134217728,1073741824,2147483648,0,0,256,524288,2147483648,0,3,256,33554432,134217728,1073741824,0,1,2,33554432,1,2,134217728,1073741824,0,1,2,134217728,0,0,0,64,0,0,0,16,32,896,4096,786432,4194304,16777216,33554432,201326592,268435456,1073741824,2147483648,0,0,0,15,0,4980736,4980736,4980736,70460,70460,3478332,0,0,1008,4984832,520093696,60,4864,65536,0,0,0,12,16,32,256,512,4096,65536,0,0,0,67108864,0,0,0,12,0,256,512,65536,0,0,1024,512,131072,131072,4,16,32,65536,0,4,16,32,0,0,0,4,16,0,0,16384,67108864,0,0,1,24,96,128,256,1024],r.TOKEN=["(0)","JSONChar","JSONCharRef","JSONPredefinedCharRef","ModuleDecl","Annotation","OptionDecl","Operator","Variable","Tag","EndTag","PragmaContents","DirCommentContents","DirPIContents","CDataSectionContents","AttrTest","Wildcard","EQName","IntegerLiteral","DecimalLiteral","DoubleLiteral","PredefinedEntityRef","'\"\"'","EscapeApos","AposChar","ElementContentChar","QuotAttrContentChar","AposAttrContentChar","NCName","QName","S","CharRef","CommentContents","DocTag","DocCommentContents","EOF","'!'","'\"'","'#'","'#)'","'$$'","''''","'('","'(#'","'(:'","'(:~'","')'","'*'","'*'","','","'-->'","'.'","'/'","'/>'","':'","':)'","';'","'"),token:l,next:function(e){e.pop()}}],CData:[{name:"CDataSectionContents",token:a},{name:p("]]>"),token:a,next:function(e){e.pop()}}],PI:[{name:"DirPIContents",token:c},{name:p("?"),token:c},{name:p("?>"),token:c,next:function(e){e.pop()}}],AposString:[{name:p("''"),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeApos",token:"constant.language.escape"},{name:"AposChar",token:"string"}],QuotString:[{name:p('"'),token:"string",next:function(e){e.pop()}},{name:"JSONPredefinedCharRef",token:"constant.language.escape"},{name:"JSONCharRef",token:"constant.language.escape"},{name:"JSONChar",token:"string"}]};n.JSONiqLexer=function(){return new i(r,d)}},{"./JSONiqTokenizer":"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}],"/node_modules/xqlint/lib/lexers/lexer.js":[function(e,t,n){"use strict";var r=function(e){var t=e;this.tokens=[],this.reset=function(){t=t,this.tokens=[]},this.startNonterminal=function(){},this.endNonterminal=function(){},this.terminal=function(e,n,r){this.tokens.push({name:e,value:t.substring(n,r)})},this.whitespace=function(e,n){this.tokens.push({name:"WS",value:t.substring(e,n)})}};n.Lexer=function(e,t){this.tokens=[],this.getLineTokens=function(n,i){i=i==="start"||!i?'["start"]':i;var s=JSON.parse(i),o=new r(n),u=new e(n,o),a=[];for(;;){var f=s[s.length-1];try{o.tokens=[],u["parse_"+f]();var l=null;o.tokens.length>1&&o.tokens[0].name==="WS"&&(a.push({type:"text",value:o.tokens[0].value}),o.tokens.splice(0,1));var c=o.tokens[0],h=t[f];for(var p=0;p-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var s=n.getCursorPosition(),o=new u(r,s.row,s.column),f=o.getCurrentToken(),l=!1,e=JSON.parse(e).pop();if(f&&f.value===">"||e!=="StartTag")return;if(!f||!a(f,"meta.tag")&&(!a(f,"text")||!f.value.match("/"))){do f=o.stepBackward();while(f&&(a(f,"string")||a(f,"keyword.operator")||a(f,"entity.attribute-name")||a(f,"text")))}else l=!0;var c=o.stepBackward();if(!f||!a(f,"meta.tag")||c!==null&&c.value.match("/"))return;var h=f.value.substring(1);if(l)var h=h.substring(0,s.column-f.start);return{text:">",selection:[1,1]}}})};r.inherits(f,i),t.XQueryBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"],function(e,t,n){"use strict";var r=e("../worker/worker_client").WorkerClient,i=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,u=e("./xquery/jsoniq_lexer").JSONiqLexer,a=e("../range").Range,f=e("./behaviour/xquery").XQueryBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../anchor").Anchor,h=function(){this.$tokenizer=new u,this.$behaviour=new f,this.foldingRules=new l,this.$highlightRules=new o};i.inherits(h,s),function(){this.completer={getCompletions:function(e,t,n,r,i){if(!t.$worker)return i();t.$worker.emit("complete",{data:{pos:n,prefix:r}}),t.$worker.on("complete",function(e){i(null,e.data)})}},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return/^\s+$/.test(t)?/^\s*[\}\)]/.test(n):!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^(\s*[\}\)])/);if(!i)return 0;var s=i[1].length,o=t.findMatchingBracket({row:n,column:s});if(!o||o.row==n)return 0;var u=this.$getIndent(t.getLine(o.row));t.replace(new a(n,0,n,s-1),u)},this.toggleCommentLines=function(e,t,n,r){var i,s,o=!0,u=/^\s*\(:(.*):\)/;for(i=n;i<=r;i++)if(!u.test(t.getLine(i))){o=!1;break}var f=new a(0,0,0,0);for(i=n;i<=r;i++)s=t.getLine(i),f.start.row=i,f.end.row=i,f.end.column=s.length,t.replace(f,o?s.match(u)[1]:"(:"+s+":)")},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/xquery_worker","XQueryWorker"),n=this;return t.attachToDocument(e.getDocument()),t.on("ok",function(t){e.clearAnnotations()}),t.on("markers",function(t){e.clearAnnotations(),n.addMarkers(t.data,e)}),t},this.removeMarkers=function(e){var t=e.getMarkers(!1);for(var n in t)t[n].clazz.indexOf("language_highlight_")===0&&e.removeMarker(n);for(var r=0;r))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[a-zA-Z_$][a-zA-Z0-9_$]*",t="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|var|exports|opens|requires|uses|yield|module|permits|(?:non\\-)?sealed|var|provides|to|when|open|record|transitive|with",n="null|Infinity|NaN|undefined",r="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",s=this.createKeywordMapper({"variable.language":"this","constant.language":n,"support.function":r},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",next:[{regex:"}",token:"paren.rparen",next:"start"},{regex:"\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",token:"keyword"}]},{token:"text",regex:"\\s+"},{token:"identifier",regex:"\\w+"},{token:"punctuation.operator",regex:"."},{token:"text",regex:"\\s+"},{regex:"",next:"start"}]},{include:"statements"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],strings:[{token:["punctuation","string"],regex:/(\.)(")/,push:[{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"string",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}],"multiline-strings":[{token:["punctuation","string"],regex:/(\.)(""")/,push:[{token:"string",regex:'"""',next:"pop"},{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:'"""',push:[{token:"string",regex:'"""',next:"pop"},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]}],constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+e+")\\b"},{token:"keyword",regex:"(?:"+t+")\\b"},{token:"storage.type.annotation",regex:"@"+e+"\\b"},{token:"entity.name.function",regex:e+"(?=\\()"},{token:s,regex:e+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.JavaHighlightRules=o}),ace.define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./java_highlight_rules").JavaHighlightRules,o=function(){i.call(this);var e="request|response|out|session|application|config|pageContext|page|Exception",t="page|include|taglib",n=[{token:"comment",regex:"<%--",push:"jsp-dcomment"},{token:"meta.tag",regex:"<%@?|<%=?|<%!?|]+>",push:"jsp-start"}],r=[{token:"meta.tag",regex:"%>|<\\/jsp:[^>]+>",next:"pop"},{token:"variable.language",regex:e},{token:"keyword",regex:t}];for(var o in this.$rules)this.$rules[o].unshift.apply(this.$rules[o],n);this.embedRules(s,"jsp-",r,["start"]),this.addRules({"jsp-dcomment":[{token:"comment",regex:".*?--%>",next:"pop"}]}),this.normalizeRules()};r.inherits(o,i),t.JspHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./jsp_highlight_rules").JspHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.$id="ace/mode/jsp",this.snippetFileId="ace/snippets/jsp"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/jsp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-jssm.js b/mixly/common/modules/web-modules/ace/mode-jssm.js new file mode 100644 index 00000000..a6faa1ce --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-jssm.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jssm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"punctuation.definition.comment.mn",regex:/\/\*/,push:[{token:"punctuation.definition.comment.mn",regex:/\*\//,next:"pop"},{defaultToken:"comment.block.jssm"}],comment:"block comment"},{token:"comment.line.jssm",regex:/\/\//,push:[{token:"comment.line.jssm",regex:/$/,next:"pop"},{defaultToken:"comment.line.jssm"}],comment:"block comment"},{token:"entity.name.function",regex:/\${/,push:[{token:"entity.name.function",regex:/}/,next:"pop"},{defaultToken:"keyword.other"}],comment:"js outcalls"},{token:"constant.numeric",regex:/[0-9]*\.[0-9]*\.[0-9]*/,comment:"semver"},{token:"constant.language.jssmLanguage",regex:/graph_layout\s*:/,comment:"jssm language tokens"},{token:"constant.language.jssmLanguage",regex:/machine_name\s*:/,comment:"jssm language tokens"},{token:"constant.language.jssmLanguage",regex:/machine_version\s*:/,comment:"jssm language tokens"},{token:"constant.language.jssmLanguage",regex:/jssm_version\s*:/,comment:"jssm language tokens"},{token:"keyword.control.transition.jssmArrow.legal_legal",regex:/<->/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.legal_none",regex:/<-/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.none_legal",regex:/->/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.main_main",regex:/<=>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.none_main",regex:/=>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.main_none",regex:/<=/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.forced_forced",regex:/<~>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.none_forced",regex:/~>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.forced_none",regex:/<~/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.legal_main",regex:/<-=>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.main_legal",regex:/<=->/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.legal_forced",regex:/<-~>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.forced_legal",regex:/<~->/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.main_forced",regex:/<=~>/,comment:"transitions"},{token:"keyword.control.transition.jssmArrow.forced_main",regex:/<~=>/,comment:"transitions"},{token:"constant.numeric.jssmProbability",regex:/[0-9]+%/,comment:"edge probability annotation"},{token:"constant.character.jssmAction",regex:/\'[^']*\'/,comment:"action annotation"},{token:"entity.name.tag.jssmLabel.doublequoted",regex:/\"[^"]*\"/,comment:"jssm label annotation"},{token:"entity.name.tag.jssmLabel.atom",regex:/[a-zA-Z0-9_.+&()#@!?,]/,comment:"jssm label annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["jssm","jssm_state"],name:"JSSM",scopeName:"source.jssm"},r.inherits(s,i),t.JSSMHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/jssm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jssm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./jssm_highlight_rules").JSSMHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/jssm"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/jssm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-jsx.js b/mixly/common/modules/web-modules/ace/mode-jsx.js new file mode 100644 index 00000000..d2982846 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-jsx.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/javascript"],function(e,t,n){"use strict";function s(){i.call(this),this.$highlightRuleConfig={jsx:!0}}var r=e("../lib/oop"),i=e("./javascript").Mode;r.inherits(s,i),function(){this.createWorker=function(){return null},this.$id="ace/mode/jsx"}.call(s.prototype),t.Mode=s}); (function() { + ace.require(["ace/mode/jsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-julia.js b/mixly/common/modules/web-modules/ace/mode-julia.js new file mode 100644 index 00000000..448d34c3 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-julia.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#function_decl"},{include:"#function_call"},{include:"#type_decl"},{include:"#keyword"},{include:"#operator"},{include:"#number"},{include:"#string"},{include:"#comment"}],"#bracket":[{token:"keyword.bracket.julia",regex:"\\(|\\)|\\[|\\]|\\{|\\}|,"}],"#comment":[{token:["punctuation.definition.comment.julia","comment.line.number-sign.julia"],regex:"(#)(?!\\{)(.*$)"}],"#function_call":[{token:["support.function.julia","text"],regex:"([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()"}],"#function_decl":[{token:["keyword.other.julia","meta.function.julia","entity.name.function.julia","meta.function.julia","text"],regex:"(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])"}],"#keyword":[{token:"keyword.other.julia",regex:"\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b"},{token:"keyword.control.julia",regex:"\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b"},{token:"storage.modifier.variable.julia",regex:"\\b(?:global|local|const|export|import|importall|using)\\b"},{token:"variable.macro.julia",regex:"@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"}],"#number":[{token:"constant.numeric.julia",regex:"\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b"}],"#operator":[{token:"keyword.operator.update.julia",regex:"=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>="},{token:"keyword.operator.ternary.julia",regex:"\\?|:"},{token:"keyword.operator.boolean.julia",regex:"\\|\\||&&|!"},{token:"keyword.operator.arrow.julia",regex:"->|<-|-->"},{token:"keyword.operator.relation.julia",regex:">|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>"},{token:"keyword.operator.range.julia",regex:":"},{token:"keyword.operator.shift.julia",regex:"<<|>>"},{token:"keyword.operator.bitwise.julia",regex:"\\||\\&|~"},{token:"keyword.operator.arithmetic.julia",regex:"\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^"},{token:"keyword.operator.isa.julia",regex:"::"},{token:"keyword.operator.dots.julia",regex:"\\.(?=[a-zA-Z])|\\.\\.+"},{token:"keyword.operator.interpolation.julia",regex:"\\$#?(?=.)"},{token:["variable","keyword.operator.transposed-variable.julia"],regex:"([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:'|\\.')*\\.?')"},{token:"text",regex:"\\[|\\("},{token:["text","keyword.operator.transposed-matrix.julia"],regex:"([\\]\\)])((?:'|\\.')*\\.?')"}],"#string":[{token:"punctuation.definition.string.begin.julia",regex:"'",push:[{token:"punctuation.definition.string.end.julia",regex:"'",next:"pop"},{include:"#string_escaped_char"},{defaultToken:"string.quoted.single.julia"}]},{token:"punctuation.definition.string.begin.julia",regex:'"',push:[{token:"punctuation.definition.string.end.julia",regex:'"',next:"pop"},{include:"#string_escaped_char"},{defaultToken:"string.quoted.double.julia"}]},{token:"punctuation.definition.string.begin.julia",regex:'\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"',push:[{token:"punctuation.definition.string.end.julia",regex:'"[\\w\\xff-\\u218e\\u2455-\\uffff]*',next:"pop"},{include:"#string_custom_escaped_char"},{defaultToken:"string.quoted.custom-double.julia"}]},{token:"punctuation.definition.string.begin.julia",regex:"`",push:[{token:"punctuation.definition.string.end.julia",regex:"`",next:"pop"},{include:"#string_escaped_char"},{defaultToken:"string.quoted.backtick.julia"}]}],"#string_custom_escaped_char":[{token:"constant.character.escape.julia",regex:'\\\\"'}],"#string_escaped_char":[{token:"constant.character.escape.julia",regex:"\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)"}],"#type_decl":[{token:["keyword.control.type.julia","meta.type.julia","entity.name.type.julia","entity.other.inherited-class.julia","punctuation.separator.inheritance.julia","entity.other.inherited-class.julia"],regex:"(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?"},{token:["other.typed-variable.julia","support.type.julia"],regex:"([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)"}]},this.normalizeRules()};s.metaData={fileTypes:["jl"],firstLineMatch:"^#!.*\\bjulia\\s*$",foldingStartMarker:"^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$",foldingStopMarker:"^\\s*(?:end)\\b.*$",name:"Julia",scopeName:"source.julia"},r.inherits(s,i),t.JuliaHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./julia_highlight_rules").JuliaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.blockComment="",this.$id="ace/mode/julia"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/julia"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-kotlin.js b/mixly/common/modules/web-modules/ace/mode-kotlin.js new file mode 100644 index 00000000..6a5f03e6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-kotlin.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/kotlin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.$keywords=this.createKeywordMapper({"storage.modifier.kotlin":"var|val|public|private|protected|abstract|final|enum|open|attribute|annotation|override|inline|var|val|vararg|lazy|in|out|internal|data|tailrec|operator|infix|const|yield|typealias|typeof|sealed|inner|value|lateinit|external|suspend|noinline|crossinline|reified|expect|actual",keyword:"companion|class|object|interface|namespace|type|fun|constructor|if|else|while|for|do|return|when|where|break|continue|try|catch|finally|throw|in|is|as|assert|constructor","constant.language.kotlin":"true|false|null|this|super","entity.name.function.kotlin":"get|set"},"identifier");this.$rules={start:[{include:"#comments"},{token:["text","keyword.other.kotlin","text","entity.name.package.kotlin","text"],regex:/^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*))?/},{token:"comment",regex:/^\s*#!.*$/},{include:"#imports"},{include:"#expressions"},{token:"string",regex:/@[a-zA-Z][a-zA-Z:]*\b/},{token:["keyword.other.kotlin","text","entity.name.variable.kotlin"],regex:/\b(var|val)(\s+)([a-zA-Z_][\w]*)\b/},{token:["keyword.other.kotlin","text","entity.name.variable.kotlin","paren.lparen"],regex:/(fun)(\s+)(\w+)(\()/,push:[{token:["variable.parameter.function.kotlin","text","keyword.operator"],regex:/(\w+)(\s*)(:)/},{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"#comments"},{include:"#types"},{include:"#expressions"}]},{token:["text","keyword","text","identifier"],regex:/^(\s*)(class)(\s*)([a-zA-Z]+)/,next:"#classes"},{token:["identifier","punctuaction"],regex:/([a-zA-Z_][\w]*)(<)/,push:[{include:"#generics"},{include:"#defaultTypes"},{token:"punctuation",regex:/>/,next:"pop"}]},{token:e,regex:/[a-zA-Z_][\w]*\b/},{token:"paren.lparen",regex:/[{(\[]/},{token:"paren.rparen",regex:/[})\]]/}],"#comments":[{token:"comment",regex:/\/\*/,push:[{token:"comment",regex:/\*\//,next:"pop"},{defaultToken:"comment"}]},{token:["text","comment"],regex:/(\s*)(\/\/.*$)/}],"#constants":[{token:"constant.numeric.kotlin",regex:/\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\b/},{token:"constant.other.kotlin",regex:/\b[A-Z][A-Z0-9_]+\b/}],"#expressions":[{include:"#strings"},{include:"#constants"},{include:"#keywords"}],"#imports":[{token:["text","keyword.other.kotlin","text","keyword.other.kotlin"],regex:/^(\s*)(import)(\s+[^ $]+\s+)((?:as)?)/}],"#generics":[{token:"punctuation",regex://,next:"pop"},{token:"storage.type.generic.kotlin",regex:/\w+/},{token:"keyword.operator",regex:/:/},{token:"punctuation",regex:/,/},{include:"#generics"}]}],"#classes":[{include:"#generics"},{token:"keyword",regex:/public|private|constructor/},{token:"string",regex:/@[a-zA-Z][a-zA-Z:]*\b/},{token:"text",regex:/(?=$|\(|{)/,next:"start"}],"#keywords":[{token:"keyword.operator.kotlin",regex:/==|!=|===|!==|<=|>=|<|>|=>|->|::|\?:/},{token:"keyword.operator.assignment.kotlin",regex:/=/},{token:"keyword.operator.declaration.kotlin",regex:/:/,push:[{token:"text",regex:/(?=$|{|=|,)/,next:"pop"},{include:"#types"}]},{token:"keyword.operator.dot.kotlin",regex:/\./},{token:"keyword.operator.increment-decrement.kotlin",regex:/\-\-|\+\+/},{token:"keyword.operator.arithmetic.kotlin",regex:/\-|\+|\*|\/|%/},{token:"keyword.operator.arithmetic.assign.kotlin",regex:/\+=|\-=|\*=|\/=/},{token:"keyword.operator.logical.kotlin",regex:/!|&&|\|\|/},{token:"keyword.operator.range.kotlin",regex:/\.\./},{token:"punctuation.kotlin",regex:/[;,]/}],"#types":[{include:"#defaultTypes"},{token:"paren.lparen",regex:/\(/,push:[{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"#defaultTypes"},{token:"punctuation",regex:/,/}]},{include:"#generics"},{token:"keyword.operator.declaration.kotlin",regex:/->/},{token:"paren.rparen",regex:/\)/},{token:"keyword.operator.declaration.kotlin",regex:/:/,push:[{token:"text",regex:/(?=$|{|=|,)/,next:"pop"},{include:"#types"}]}],"#defaultTypes":[{token:"storage.type.buildin.kotlin",regex:/\b(Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic|IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray|Array|List|Map|Nothing|Enum|Throwable|Comparable)\b/}],"#strings":[{token:"string",regex:/"""/,push:[{token:"string",regex:/"""/,next:"pop"},{token:"variable.parameter.template.kotlin",regex:/\$\w+|\${[^}]+}/},{token:"constant.character.escape.kotlin",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:/"/,push:[{token:"string",regex:/"/,next:"pop"},{token:"variable.parameter.template.kotlin",regex:/\$\w+|\$\{[^\}]+\}/},{token:"constant.character.escape.kotlin",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:/'/,push:[{token:"string",regex:/'/,next:"pop"},{token:"constant.character.escape.kotlin",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:/`/,push:[{token:"string",regex:/`/,next:"pop"},{defaultToken:"string"}]}]},this.normalizeRules()};s.metaData={fileTypes:["kt","kts"],name:"Kotlin",scopeName:"source.Kotlin"},r.inherits(s,i),t.KotlinHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./kotlin_highlight_rules").KotlinHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/kotlin"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/kotlin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-latex.js b/mixly/common/modules/web-modules/ace/mode-latex.js new file mode 100644 index 00000000..22c36091 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-latex.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(verbatim)(})",next:"verbatim"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(lstlisting)(})",next:"lstlisting"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)([\\w*]*)(})"},{token:"storage.type",regex:/\\verb\b\*?/,next:[{token:["keyword.operator","string","keyword.operator"],regex:"(.)(.*?)(\\1|$)|",next:"start"}]},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}],verbatim:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(verbatim)(})",next:"start"},{defaultToken:"text"}],lstlisting:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(lstlisting)(})",next:"start"},{defaultToken:"text"}]},this.normalizeRules()};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u={"\\subparagraph":1,"\\paragraph":2,"\\subsubsubsection":3,"\\subsubsection":4,"\\subsection":5,"\\section":6,"\\chapter":7,"\\part":8,"\\begin":9,"\\end":10},a=t.FoldMode=function(){};r.inherits(a,i),function(){this.foldingStartMarker=/^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.latexBlock=function(e,t,n,r){var i={"\\begin":1,"\\end":-1},u=new o(e,t,n),a=u.getCurrentToken();if(!a||a.type!="storage.type"&&a.type!="constant.character.escape")return;var f=a.value,l=i[f],c=function(){var e=u.stepForward(),t=e&&e.type=="lparen"?u.stepForward().value:"";return l===-1&&(u.stepBackward(),t&&u.stepBackward()),t},h=[c()],p=l===-1?u.getCurrentTokenColumn():e.getLine(t).length,d=t;u.step=l===-1?u.stepBackward:u.stepForward;while(a=u.step()){if(!a||a.type!="storage.type"&&a.type!="constant.character.escape")continue;var v=i[a.value];if(!v)continue;var m=c();if(v===l)h.unshift(m);else if(h.shift()!==m||!h.length)break}if(h.length)return;l==1&&(u.stepBackward(),u.stepBackward());if(r)return u.getCurrentTokenRange();var t=u.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,d,p):new s(d,p,t,u.getCurrentTokenColumn())},this.latexSection=function(e,t,n){var r=new o(e,t,n),i=r.getCurrentToken();if(!i||i.type!="storage.type")return;var a=u[i.value]||0,f=0,l=t;while(i=r.stepForward()){if(i.type!=="storage.type")continue;var c=u[i.value]||0;if(c>=9){f||(l=r.getCurrentTokenRow()-1),f+=c==9?1:-1;if(f<0)break}else if(c>=a)break}f||(l=r.getCurrentTokenRow()-1);while(l>t&&!/\S/.test(e.getLine(l)))l--;return new s(t,e.getLine(t).length,l,e.getLine(l).length)}}.call(a.prototype)}),ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/latex"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./latex_highlight_rules").LatexHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/latex").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=new o({braces:!0})};r.inherits(a,i),function(){this.type="text",this.lineCommentStart="%",this.$id="ace/mode/latex",this.getMatching=function(e,t,n){t==undefined&&(t=e.selection.lead),typeof t=="object"&&(n=t.column,t=t.row);var r=e.getTokenAt(t,n);if(!r)return;if(r.value=="\\begin"||r.value=="\\end")return this.foldingRules.latexBlock(e,t,n,!0)}}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/latex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-latte.js b/mixly/common/modules/web-modules/ace/mode-latte.js new file mode 100644 index 00000000..e968b0e7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-latte.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/latte_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){i.call(this);for(var e in this.$rules)this.$rules[e].unshift({token:"comment.start.latte",regex:"\\{\\*",push:[{token:"comment.end.latte",regex:".*\\*\\}",next:"pop"},{defaultToken:"comment"}]},{token:"meta.tag.punctuation.tag-open.latte",regex:"\\{(?![\\s'\"{}]|$)/?",push:[{token:"meta.tag.latte",regex:"(?:_|=|[a-z]\\w*(?:[.:-]\\w+)*)?",next:[{token:"meta.tag.punctuation.tag-close.latte",regex:"\\}",next:"pop"},{include:"latte-content"}]}]});this.$rules.tag_stuff.unshift({token:"meta.attribute.latte",regex:"n:[\\w-]+",next:[{include:"tag_whitespace"},{token:"keyword.operator.attribute-equals.xml",regex:"=",next:[{token:"string.attribute-value.xml",regex:"'",next:[{token:"string.attribute-value.xml",regex:"'",next:"tag_stuff"},{include:"latte-content"}]},{token:"string.attribute-value.xml",regex:'"',next:[{token:"string.attribute-value.xml",regex:'"',next:"tag_stuff"},{include:"latte-content"}]},{token:"text.tag-whitespace.xml",regex:"\\s",next:"tag_stuff"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"tag_stuff"},{include:"latte-content"}]},{token:"empty",regex:"",next:"tag_stuff"}]}),this.$rules["latte-content"]=[{token:"comment.start.latte",regex:"\\/\\*",push:[{token:"comment.end.latte",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:'\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},{token:"variable",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable",regex:/\$\{[^"\}]+\}?/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:"'",push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:"'",next:"pop"},{defaultToken:"string"}]},{token:"keyword.control",regex:"\\b(?:INF|NAN|and|or|xor|AND|OR|XOR|clone|new|instanceof|return|continue|break|as)\\b"},{token:"constant.language",regex:"\\b(?:true|false|null|TRUE|FALSE|NULL)\\b"},{token:"variable",regex:/\$\w+/},{token:"constant.numeric",regex:"[+-]?[0-9]+(?:\\.[0-9]+)?(?:e[0-9]+)?"},{token:["support.class","keyword.operator"],regex:"\\b(\\w+)(::)"},{token:"constant.language",regex:"\\b(?:[A-Z0-9_]+)\\b"},{token:"string.unquoted",regex:"\\w+(?:-+\\w+)*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"::|=>|->|\\?->|\\?\\?->|\\+\\+|--|<<|>>|<=>|<=|>=|===|!==|==|!=|<>|&&|\\|\\||\\?\\?|\\?>|\\*\\*|\\.\\.\\.|[^'\"]"}],this.normalizeRules()};r.inherits(o,s),t.LatteHighlightRules=o}),ace.define("ace/mode/latte",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/latte_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./latte_highlight_rules").LatteHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){i.call(this),this.HighlightRules=s,this.$outdent=new o};r.inherits(u,i),function(){this.blockComment={start:"{*",end:"*}"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*\{(?:if|else|elseif|ifset|elseifset|ifchanged|switch|case|foreach|iterateWhile|for|while|first|last|sep|try|capture|spaceless|snippet|block|define|embed|snippetArea)\b[^{]*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return/^\s+\{\/$/.test(t+n)},this.autoOutdent=function(e,t,n){},this.$id="ace/mode/latte"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/latte"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-less.js b/mixly/common/modules/web-modules/ace/mode-less.js new file mode 100644 index 00000000..1fa6b520 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-less.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z_][a-z0-9-_]*"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|=|!=|-|%|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./less_highlight_rules").LessHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./css_completions").CssCompletions,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions("ruleset",t,n,r)},this.$id="ace/mode/less"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/less"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-liquid.js b/mixly/common/modules/web-modules/ace/mode-liquid.js new file mode 100644 index 00000000..11013d39 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-liquid.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(f,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules","ace/mode/html_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules").CssHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=e("./json_highlight_rules").JsonHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=function(){function e(e){var t=e.length;return function(n){var r=n.indexOf(e),i=[{type:"meta.tag.punctuation.tag-open",value:"{%"},{type:"text",value:n.slice(2,r)},{type:"keyword.tag"+e+".tag-name",value:n.slice(r,r+t)},{type:"text",value:n.slice(r+t,n.indexOf("%}"))},{type:"meta.tag.punctuation.tag-close",value:"%}"}];return i}}o.call(this);for(var t in this.$rules)this.$rules[t].unshift({token:"comment.block",regex:/{%-?\s*comment\s*-?%}/,next:[{token:"comment.block",regex:/{%-?\s*endcomment\s*-?%}/,next:"pop"},{defaultToken:"comment",caseInsensitive:!1}]},{token:"comment.line",regex:/{%-?\s*#/,next:[{token:"comment.line",regex:/-?%}/,next:"pop"},{defaultToken:"comment",caseInsensitive:!1}]},{token:"style.embedded.start",regex:/({%-?\s*\bstyle\b\s*-?%})/,next:"style-start",onMatch:e("style")},{regex:/({%-?\s*\bstylesheet\b\s*-?%})/,next:"stylesheet-start",onMatch:e("stylesheet")},{regex:/({%-?\s*\bschema\b\s*-?%})/,next:"schema-start",onMatch:e("schema")},{regex:/({%-?\s*\bjavascript\b\s*-?%})/,next:"javascript-start",onMatch:e("javascript")},{token:"meta.tag.punctuation.tag-open",regex:/({%)/,next:[{token:"keyword.block",regex:/-?\s*[a-zA-Z_$][a-zA-Z0-9_$]+\b/,next:"liquid-start"},{token:"meta.tag.punctuation.tag-close",regex:/(-?)(%})/,next:"pop"}]},{token:"meta.tag.punctuation.ouput-open",regex:/({{)/,push:"liquid-start"});this.embedRules(u,"schema-",[{token:"schema-start",next:"pop",regex:/({%-?\s*\bendschema\b\s*-?%})/,onMatch:e("endschema")}]),this.embedRules(a,"javascript-",[{token:"javascript-start",next:"pop",regex:/({%-?\s*\bendjavascript\b\s*-?%})/,onMatch:e("endjavascript")}]),this.embedRules(s,"style-",[{token:"style-start",next:"pop",regex:/({%-?\s*\bendstyle\b\s*-?%})/,onMatch:e("endstyle")}]),this.embedRules(s,"stylesheet-",[{token:"stylesheet-start",next:"pop",regex:/({%-?\s*\bendstylesheet\b\s*-?%})/,onMatch:e("endstylesheet")}]),this.addRules({"liquid-start":[{token:"meta.tag.punctuation.ouput-close",regex:/}}/,next:"pop"},{token:"meta.tag.punctuation.tag-close",regex:/%}/,next:"pop"},{token:"string",regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']/},{token:"string",regex:/["](?:(?:\\.)|(?:[^'\\]))*?["]/},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:"keyword.operator",regex:/\*|\-|\+|=|!=|\?\|\:/},{token:"constant.language.boolean",regex:/(?:true|false|nil|empty)\b/},{token:"keyword.operator",regex:/\s+(?:and|contains|in|with)\b\s+/},{token:["keyword.operator","support.function"],regex:/(\|\s*)([a-zA-Z_]+)/},{token:"support.function",regex:/\s*([a-zA-Z_]+\b)(?=:)/},{token:"keyword.operator",regex:/(:)\s*(?=[a-zA-Z_])/},{token:["support.class","keyword.operator","support.object","keyword.operator","variable.parameter"],regex:/(\w+)(\.)(\w+)(\.)?(\w+)?/},{token:"variable.parameter",regex:/\.([a-zA-Z_$][a-zA-Z0-9_$]*\b)$/},{token:"support.class",regex:/(?:additional_checkout_buttons|content_for_additional_checkout_buttons)\b/},{token:"paren.lparen",regex:/[\[\({]/},{token:"paren.rparen",regex:/[\])}]/},{token:"text",regex:/\s+/}]}),this.normalizeRules()};r.inherits(f,i),t.LiquidHighlightRules=f}),ace.define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/html","ace/mode/javascript","ace/mode/json","ace/mode/css","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./html").Mode,o=e("./javascript").Mode,u=e("./json").Mode,a=e("./css").Mode,f=e("./liquid_highlight_rules").LiquidHighlightRules,l=e("./matching_brace_outdent").MatchingBraceOutdent,c=e("./folding/cstyle").FoldMode,h=function(){u.call(this),s.call(this),a.call(this),o.call(this),this.HighlightRules=f,this.foldingRules=new c};r.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=(new s).voidElements,this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/liquid",this.snippetFileId="ace/snippets/liquid"}.call(h.prototype),t.Mode=h}); (function() { + ace.require(["ace/mode/liquid"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-lisp.js b/mixly/common/modules/web-modules/ace/mode-lisp.js new file mode 100644 index 00000000..1d1e197f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-lisp.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};r.inherits(s,i),t.LispHighlightRules=s}),ace.define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lisp_highlight_rules").LispHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/lisp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-livescript.js b/mixly/common/modules/web-modules/ace/mode-livescript.js new file mode 100644 index 00000000..3009be48 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-livescript.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/text"],function(e,t,n){function u(e,t){function n(){}return n.prototype=(e.superclass=t).prototype,(e.prototype=new n).constructor=e,typeof t.extended=="function"&&t.extended(e),e}function a(e,t){var n={}.hasOwnProperty;for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}var r,i,s,o;r="(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*",t.Mode=i=function(t){function o(){var t;this.$tokenizer=new(e("../tokenizer").Tokenizer)(o.Rules);if(t=e("../mode/matching_brace_outdent"))this.$outdent=new t.MatchingBraceOutdent;this.$id="ace/mode/livescript",this.$behaviour=new(e("./behaviour/cstyle").CstyleBehaviour)}var n,i=u((a(o,t).displayName="LiveScriptMode",o),t).prototype,s=o;return n=RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+r+")?))\\s*$"),i.getNextLineIndent=function(e,t,r){var i,s;return i=this.$getIndent(t),s=this.$tokenizer.getLineTokens(t,e).tokens,(!s.length||s[s.length-1].type!=="comment")&&e==="start"&&n.test(t)&&(i+=r),i},i.lineCommentStart="#",i.blockComment={start:"###",end:"###"},i.checkOutdent=function(e,t,n){var r;return(r=this.$outdent)!=null?r.checkOutdent(t,n):void 8},i.autoOutdent=function(e,t,n){var r;return(r=this.$outdent)!=null?r.autoOutdent(t,n):void 8},o}(e("../mode/text").Mode),s="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",o={defaultToken:"string"},i.Rules={start:[{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)"+s},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+s},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+s},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+s},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+s},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+s},{token:"identifier",regex:r+"\\s*:(?![:=])"},{token:"variable",regex:r},{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:"comment.doc",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{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:"[\\^!|&%+\\-]+"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"string.regex",regex:"\\s*#{"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{defaultToken:"string.regex"}],key:[{token:"keyword.operator",regex:"[.?@!]+"},{token:"identifier",regex:r,next:"start"},{token:"text",regex:"",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{defaultToken:"comment.doc"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},o],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},o],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},o],words:[{token:"string",regex:".*?\\]>",next:"key"},o]}}); (function() { + ace.require(["ace/mode/livescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-logiql.js b/mixly/common/modules/web-modules/ace/mode-logiql.js new file mode 100644 index 00000000..5c874066 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-logiql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.block",regex:"/\\*",push:[{token:"comment.block",regex:"\\*/",next:"pop"},{defaultToken:"comment.block"}]},{token:"comment.single",regex:"//.*"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?"},{token:"string",regex:'"',push:[{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"constant.language",regex:"\\b(true|false)\\b"},{token:"entity.name.type.logicblox",regex:"`[a-zA-Z_:]+(\\d|\\a)*\\b"},{token:"keyword.start",regex:"->",comment:"Constraint"},{token:"keyword.start",regex:"-->",comment:"Level 1 Constraint"},{token:"keyword.start",regex:"<-",comment:"Rule"},{token:"keyword.start",regex:"<--",comment:"Level 1 Rule"},{token:"keyword.end",regex:"\\.",comment:"Terminator"},{token:"keyword.other",regex:"!",comment:"Negation"},{token:"keyword.other",regex:",",comment:"Conjunction"},{token:"keyword.other",regex:";",comment:"Disjunction"},{token:"keyword.operator",regex:"<=|>=|!=|<|>",comment:"Equality"},{token:"keyword.other",regex:"@",comment:"Equality"},{token:"keyword.operator",regex:"\\+|-|\\*|/",comment:"Arithmetic operations"},{token:"keyword",regex:"::",comment:"Colon colon"},{token:"support.function",regex:"\\b(agg\\s*<<)",push:[{include:"$self"},{token:"support.function",regex:">>",next:"pop"}]},{token:"storage.modifier",regex:"\\b(lang:[\\w:]*)"},{token:["storage.type","text"],regex:"(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)"},{token:"entity.name",regex:"[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))"},{token:"variable.parameter",regex:"([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))"}]},this.normalizeRules()};r.inherits(s,i),t.LogiQLHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|<--|<-|->|{)\s*$/.test(t)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)?!0:n!=="\n"&&n!=="\r\n"?!1:/^\s+/.test(t)?!0:!1},this.autoOutdent=function(e,t,n){if(this.$outdent.autoOutdent(t,n))return;var r=t.getLine(n),i=r.match(/^\s+/),s=r.lastIndexOf(".")+1;if(!i||!n||!s)return 0;var o=t.getLine(n+1),u=this.getMatching(t,{row:n,column:s});if(!u||u.start.row==n)return 0;s=i[0].length;var f=this.$getIndent(t.getLine(u.start.row));t.replace(new a(n+1,0,n+1,s),f)},this.getMatching=function(e,t,n){t==undefined&&(t=e.selection.lead),typeof t=="object"&&(n=t.column,t=t.row);var r=e.getTokenAt(t,n),i="keyword.start",s="keyword.end",o;if(!r)return;if(r.type==i){var f=new u(e,t,n);f.step=f.stepForward}else{if(r.type!=s)return;var f=new u(e,t,n);f.step=f.stepBackward}while(o=f.step())if(o.type==i||o.type==s)break;if(!o||o.type==r.type)return;var l=f.getCurrentTokenColumn(),t=f.getCurrentTokenRow();return new a(t,l,t,l+o.value.length)},this.$id="ace/mode/logiql"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/logiql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-logtalk.js b/mixly/common/modules/web-modules/ace/mode-logtalk.js new file mode 100644 index 00000000..709fefab --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-logtalk.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/logtalk_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"punctuation.definition.comment.logtalk",regex:"/\\*",push:[{token:"punctuation.definition.comment.logtalk",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.logtalk"}]},{todo:"fix grouping",token:["comment.line.percentage.logtalk","punctuation.definition.comment.logtalk"],regex:"%.*$\\n?"},{todo:"fix grouping",token:["storage.type.opening.logtalk","punctuation.definition.storage.type.logtalk"],regex:":-\\s(?:object|protocol|category|module)(?=[(])"},{todo:"fix grouping",token:["storage.type.closing.logtalk","punctuation.definition.storage.type.logtalk"],regex:":-\\send_(?:object|protocol|category)(?=[.])"},{caseInsensitive:!1,token:"storage.type.relations.logtalk",regex:"\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])"},{caseInsensitive:!1,todo:"fix grouping",token:["storage.modifier.others.logtalk","punctuation.definition.storage.modifier.logtalk"],regex:":-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])"},{caseInsensitive:!1,todo:"fix grouping",token:["storage.modifier.others.logtalk","punctuation.definition.storage.modifier.logtalk"],regex:":-\\s(?:c(?:alls|oinductive)|e(?:lif|n(?:coding|sure_loaded)|xport)|i(?:f|n(?:clude|itialization|fo))|reexport|set_(?:logtalk|prolog)_flag|uses)(?=[(])"},{caseInsensitive:!1,todo:"fix grouping",token:["storage.modifier.others.logtalk","punctuation.definition.storage.modifier.logtalk"],regex:":-\\s(?:alias|info|d(?:ynamic|iscontiguous)|m(?:eta_(?:non_terminal|predicate)|ode|ultifile)|p(?:ublic|r(?:otected|ivate))|op|use(?:s|_module)|synchronized)(?=[(])"},{token:"keyword.operator.message-sending.logtalk",regex:"(:|::|\\^\\^)"},{token:"keyword.operator.external-call.logtalk",regex:"([{}])"},{token:"keyword.operator.mode.logtalk",regex:"(\\?|@)"},{token:"keyword.operator.comparison.term.logtalk",regex:"(@=<|@<|@>|@>=|==|\\\\==)"},{token:"keyword.operator.comparison.arithmetic.logtalk",regex:"(=<|<|>|>=|=:=|=\\\\=)"},{token:"keyword.operator.bitwise.logtalk",regex:"(<<|>>|/\\\\|\\\\/|\\\\)"},{token:"keyword.operator.evaluable.logtalk",regex:"\\b(?:e|pi|div|mod|rem)\\b(?![-!(^~])"},{token:"keyword.operator.evaluable.logtalk",regex:"(\\*\\*|\\+|-|\\*|/|//)"},{token:"keyword.operator.misc.logtalk",regex:"(:-|!|\\\\+|,|;|-->|->|=|\\=|\\.|=\\.\\.|\\^|\\bas\\b|\\bis\\b)"},{caseInsensitive:!1,token:"support.function.evaluable.logtalk",regex:"\\b(a(bs|cos|sin|tan|tan2)|c(eiling|os)|div|exp|flo(at(_(integer|fractional)_part)?|or)|log|m(ax|in|od)|r(em|ound)|s(i(n|gn)|qrt)|t(an|runcate)|xor)(?=[(])"},{token:"support.function.control.logtalk",regex:"\\b(?:true|fa(?:il|lse)|repeat|(?:instantiation|system)_error)\\b(?![-!(^~])"},{token:"support.function.control.logtalk",regex:"\\b((?:uninstantiation|type|domain|existence|permission|representation|evaluation|resource|syntax)_error)(?=[(])"},{token:"support.function.control.logtalk",regex:"\\b(?:ca(?:ll|tch)|ignore|throw|once)(?=[(])"},{token:"support.function.chars-and-bytes-io.logtalk",regex:"\\b(?:(?:get|p(?:eek|ut))_(c(?:har|ode)|byte)|nl)(?=[(])"},{token:"support.function.chars-and-bytes-io.logtalk",regex:"\\bnl\\b"},{token:"support.function.atom-term-processing.logtalk",regex:"\\b(?:atom_(?:length|c(?:hars|o(?:ncat|des)))|sub_atom|char_code|number_c(?:har|ode)s)(?=[(])"},{caseInsensitive:!1,token:"support.function.term-testing.logtalk",regex:"\\b(?:var|atom(ic)?|integer|float|c(?:allable|ompound)|n(?:onvar|umber)|ground|acyclic_term)(?=[(])"},{token:"support.function.term-comparison.logtalk",regex:"\\b(compare)(?=[(])"},{token:"support.function.term-io.logtalk",regex:"\\b(?:read(_term)?|write(?:q|_(?:canonical|term))?|(current_)?(?:char_conversion|op))(?=[(])"},{caseInsensitive:!1,token:"support.function.term-creation-and-decomposition.logtalk",regex:"\\b(arg|copy_term|functor|numbervars|term_variables)(?=[(])"},{caseInsensitive:!1,token:"support.function.term-unification.logtalk",regex:"\\b(subsumes_term|unify_with_occurs_check)(?=[(])"},{caseInsensitive:!1,token:"support.function.stream-selection-and-control.logtalk",regex:"\\b(?:(?:se|curren)t_(?:in|out)put|open|close|flush_output|stream_property|at_end_of_stream|set_stream_position)(?=[(])"},{token:"support.function.stream-selection-and-control.logtalk",regex:"\\b(?:flush_output|at_end_of_stream)\\b"},{token:"support.function.prolog-flags.logtalk",regex:"\\b((?:se|curren)t_prolog_flag)(?=[(])"},{token:"support.function.compiling-and-loading.logtalk",regex:"\\b(logtalk_(?:compile|l(?:ibrary_path|oad|oad_context)|make(_target_action)?))(?=[(])"},{token:"support.function.compiling-and-loading.logtalk",regex:"\\b(logtalk_make)\\b"},{caseInsensitive:!1,token:"support.function.event-handling.logtalk",regex:"\\b(?:(?:abolish|define)_events|current_event)(?=[(])"},{token:"support.function.implementation-defined-hooks.logtalk",regex:"\\b(?:(?:create|current|set)_logtalk_flag|halt)(?=[(])"},{token:"support.function.implementation-defined-hooks.logtalk",regex:"\\b(halt)\\b"},{token:"support.function.sorting.logtalk",regex:"\\b((key)?(sort))(?=[(])"},{caseInsensitive:!1,token:"support.function.entity-creation-and-abolishing.logtalk",regex:"\\b((c(?:reate|urrent)|abolish)_(?:object|protocol|category))(?=[(])"},{caseInsensitive:!1,token:"support.function.reflection.logtalk",regex:"\\b((object|protocol|category)_property|co(mplements_object|nforms_to_protocol)|extends_(object|protocol|category)|imp(orts_category|lements_protocol)|(instantiat|specializ)es_class)(?=[(])"},{token:"support.function.logtalk",regex:"\\b((?:for|retract)all)(?=[(])"},{caseInsensitive:!1,token:"support.function.execution-context.logtalk",regex:"\\b(?:context|parameter|se(?:lf|nder)|this)(?=[(])"},{token:"support.function.database.logtalk",regex:"\\b(?:a(?:bolish|ssert(?:a|z))|clause|retract(all)?)(?=[(])"},{token:"support.function.all-solutions.logtalk",regex:"\\b((?:bag|set)of|f(?:ind|or)all)(?=[(])"},{caseInsensitive:!1,token:"support.function.multi-threading.logtalk",regex:"\\b(threaded(_(ca(?:ll|ncel)|once|ignore|exit|peek|wait|notify))?)(?=[(])"},{caseInsensitive:!1,token:"support.function.engines.logtalk",regex:"\\b(threaded_engine(_(create|destroy|self|next(?:_reified)?|yield|post|fetch))?)(?=[(])"},{caseInsensitive:!1,token:"support.function.reflection.logtalk",regex:"\\b(?:current_predicate|predicate_property)(?=[(])"},{token:"support.function.event-handler.logtalk",regex:"\\b(?:before|after)(?=[(])"},{token:"support.function.message-forwarding-handler.logtalk",regex:"\\b(forward)(?=[(])"},{token:"support.function.grammar-rule.logtalk",regex:"\\b(?:expand_(?:goal|term)|(?:goal|term)_expansion|phrase)(?=[(])"},{token:"punctuation.definition.string.begin.logtalk",regex:"'",push:[{token:"constant.character.escape.logtalk",regex:"\\\\([\\\\abfnrtv\"']|(x[a-fA-F0-9]+|[0-7]+)\\\\)"},{token:"punctuation.definition.string.end.logtalk",regex:"'",next:"pop"},{defaultToken:"string.quoted.single.logtalk"}]},{token:"punctuation.definition.string.begin.logtalk",regex:'"',push:[{token:"constant.character.escape.logtalk",regex:"\\\\([\\\\abfnrtv\"']|(x[a-fA-F0-9]+|[0-7]+)\\\\)"},{token:"punctuation.definition.string.end.logtalk",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.logtalk"}]},{token:"constant.numeric.logtalk",regex:"\\b(0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+)\\b"},{token:"constant.numeric.logtalk",regex:"\\b(0'\\\\.|0'.|0''|0'\")"},{token:"constant.numeric.logtalk",regex:"\\b(\\d+\\.?\\d*((e|E)(\\+|-)?\\d+)?)\\b"},{token:"variable.other.logtalk",regex:"\\b([A-Z_][A-Za-z0-9_]*)\\b"}]},this.normalizeRules()};r.inherits(s,i),t.LogtalkHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/logtalk",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/logtalk_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./logtalk_highlight_rules").LogtalkHighlightRules,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/logtalk"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/logtalk"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-lsl.js b/mixly/common/modules/web-modules/ace/mode-lsl.js new file mode 100644 index 00000000..adc29256 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-lsl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e=this.createKeywordMapper({"constant.language.float.lsl":"DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI","constant.language.integer.lsl":"ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_BODY_SHAPE_TYPE|OBJECT_CHARACTER_TIME|OBJECT_CLICK_ACTION|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_HOVER_HEIGHT|OBJECT_LAST_OWNER_ID|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASS_ALWAYS|PASS_IF_NOT_HANDLED|PASS_NEVER|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR","constant.language.integer.boolean.lsl":"FALSE|TRUE","constant.language.quaternion.lsl":"ZERO_ROTATION","constant.language.string.lsl":"EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED","constant.language.vector.lsl":"TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR","invalid.broken.lsl":"LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH","invalid.deprecated.lsl":"ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect","invalid.illegal.lsl":"event","invalid.unimplemented.lsl":"CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_EXPERIENCE|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera","reserved.godmode.lsl":"llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask","reserved.log.lsl":"print","keyword.control.lsl":"do|else|for|if|jump|return|while","storage.type.lsl":"float|integer|key|list|quaternion|rotation|string|vector","support.function.lsl":"llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetAttachedList|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64","support.function.event.lsl":"at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"},"identifier");this.$rules={start:[{token:"comment.line.double-slash.lsl",regex:"\\/\\/.*$"},{token:"comment.block.begin.lsl",regex:"\\/\\*",next:"comment"},{token:"string.quoted.double.lsl",start:'"',end:'"',next:[{token:"constant.character.escape.lsl",regex:/\\[tn"\\]/}]},{token:"constant.numeric.lsl",regex:"(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"},{token:"entity.name.state.lsl",regex:"\\b((state)\\s+[A-Za-z_]\\w*|default)\\b"},{token:e,regex:"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"support.function.user-defined.lsl",regex:/\b([a-zA-Z_]\w*)(?=\(.*?\))/},{token:"keyword.operator.lsl",regex:"\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"},{token:"invalid.illegal.keyword.operator.lsl",regex:":=?"},{token:"punctuation.operator.lsl",regex:"\\,|\\;"},{token:"paren.lparen.lsl",regex:"[\\[\\(\\{]"},{token:"paren.rparen.lsl",regex:"[\\]\\)\\}]"},{token:"text.lsl",regex:"\\s+"}],comment:[{token:"comment.block.end.lsl",regex:"\\*\\/",next:"start"},{defaultToken:"comment.block.lsl"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.LSLHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/text","ace/mode/folding/cstyle","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./lsl_highlight_rules").LSLHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./text").Mode,o=e("./folding/cstyle").FoldMode,u=e("../lib/oop"),a=function(){this.HighlightRules=r,this.$outdent=new i,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};u.inherits(a,s),function(){this.lineCommentStart=["//"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type==="comment.block.lsl")return r;if(e==="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/lsl",this.snippetFileId="ace/snippets/lsl"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/lsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-lua.js b/mixly/common/modules/web-modules/ace/mode-lua.js new file mode 100644 index 00000000..f655b22c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-lua.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",r="string|package|os|io|math|debug|table|coroutine",i="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:e,"support.function":n,"keyword.deprecated":i,"constant.library":r,"constant.language":t,"variable.language":"self"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:"+o+"|"+u+")",f="(?:\\.\\d+)",l="(?:\\d+)",c="(?:(?:"+l+"?"+f+")|(?:"+l+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment.body"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};r.inherits(s,i),t.LuaHighlightRules=s}),ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]=="then"&&/\belseif\b/.test(r))return;if(o[1]){if(e.getTokenAt(n,o.index+1).type==="keyword")return"start"}else{if(!o[2])return"start";var u=e.bgTokenizer.getState(n)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[0]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(o[0][0]!=="]")return"end";var u=e.bgTokenizer.getState(n-1)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.luaBlock(e,n,i.index+1):i[2]?e.getCommentFoldRange(n,i.index+1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[0]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.luaBlock(e,n,i.index+1):i[0][0]==="]"?e.getCommentFoldRange(n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.luaBlock=function(e,t,n,r){var i=new o(e,t,n),u={"function":1,"do":1,then:1,elseif:-1,end:-1,repeat:1,until:-1},a=i.getCurrentToken();if(!a||a.type!="keyword")return;var f=a.value,l=[f],c=u[f];if(!c)return;var h=c===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=c===-1?i.stepBackward:i.stepForward;while(a=i.step()){if(a.type!=="keyword")continue;var d=c*u[a.value];if(d>0)l.unshift(a.value);else if(d<=0){l.shift();if(!l.length&&a.value!="elseif")break;d===0&&l.unshift(a.value)}}if(!a)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return c===-1?new s(t,e.getLine(t).length,p,h):new s(p,h,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lua_highlight_rules").LuaHighlightRules,o=e("./folding/lua").FoldMode,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){function n(t){var n=0;for(var r=0;r0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[[",end:"--]]"};var e={"function":1,then:1,"do":1,"else":1,elseif:1,repeat:1,end:-1,until:-1},t=["else","elseif","end","until"];this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=0,o=this.getTokenizer().getLineTokens(t,e),u=o.tokens;return e=="start"&&(s=n(u)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,t,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(e,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;if(n.match(/^\s*[\)\}\]]$/))return!0;var i=this.getTokenizer().getLineTokens(n.trim(),e).tokens;return!i||!i.length?!1:i[0].type=="keyword"&&t.indexOf(i[0].value)!=-1},this.getMatching=function(t,n,r){if(n==undefined){var i=t.selection.lead;r=i.column,n=i.row}var s=t.getTokenAt(n,r);if(s&&s.value in e)return this.foldingRules.luaBlock(t,n,r,!0)},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^\s*/)[0].length;if(!i||!n)return;var s=this.getMatching(t,n,i+1);if(!s||s.start.row==n)return;var o=this.$getIndent(t.getLine(s.start.row));o.length!=i&&(t.replace(new u(n,0,n,i),o),t.outdentRows(new u(n+1,0,n+1,0)))},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/lua_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/lua",this.snippetFileId="ace/snippets/lua"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/lua"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-luapage.js b/mixly/common/modules/web-modules/ace/mode-luapage.js new file mode 100644 index 00000000..a7032b4d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-luapage.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",r="string|package|os|io|math|debug|table|coroutine",i="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:e,"support.function":n,"keyword.deprecated":i,"constant.library":r,"constant.language":t,"variable.language":"self"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:"+o+"|"+u+")",f="(?:\\.\\d+)",l="(?:\\d+)",c="(?:(?:"+l+"?"+f+")|(?:"+l+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment.body"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};r.inherits(s,i),t.LuaHighlightRules=s}),ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]=="then"&&/\belseif\b/.test(r))return;if(o[1]){if(e.getTokenAt(n,o.index+1).type==="keyword")return"start"}else{if(!o[2])return"start";var u=e.bgTokenizer.getState(n)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[0]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(o[0][0]!=="]")return"end";var u=e.bgTokenizer.getState(n-1)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.luaBlock(e,n,i.index+1):i[2]?e.getCommentFoldRange(n,i.index+1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[0]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.luaBlock(e,n,i.index+1):i[0][0]==="]"?e.getCommentFoldRange(n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.luaBlock=function(e,t,n,r){var i=new o(e,t,n),u={"function":1,"do":1,then:1,elseif:-1,end:-1,repeat:1,until:-1},a=i.getCurrentToken();if(!a||a.type!="keyword")return;var f=a.value,l=[f],c=u[f];if(!c)return;var h=c===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=c===-1?i.stepBackward:i.stepForward;while(a=i.step()){if(a.type!=="keyword")continue;var d=c*u[a.value];if(d>0)l.unshift(a.value);else if(d<=0){l.shift();if(!l.length&&a.value!="elseif")break;d===0&&l.unshift(a.value)}}if(!a)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return c===-1?new s(t,e.getLine(t).length,p,h):new s(p,h,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lua_highlight_rules").LuaHighlightRules,o=e("./folding/lua").FoldMode,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){function n(t){var n=0;for(var r=0;r0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[[",end:"--]]"};var e={"function":1,then:1,"do":1,"else":1,elseif:1,repeat:1,end:-1,until:-1},t=["else","elseif","end","until"];this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=0,o=this.getTokenizer().getLineTokens(t,e),u=o.tokens;return e=="start"&&(s=n(u)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,t,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(e,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;if(n.match(/^\s*[\)\}\]]$/))return!0;var i=this.getTokenizer().getLineTokens(n.trim(),e).tokens;return!i||!i.length?!1:i[0].type=="keyword"&&t.indexOf(i[0].value)!=-1},this.getMatching=function(t,n,r){if(n==undefined){var i=t.selection.lead;r=i.column,n=i.row}var s=t.getTokenAt(n,r);if(s&&s.value in e)return this.foldingRules.luaBlock(t,n,r,!0)},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^\s*/)[0].length;if(!i||!n)return;var s=this.getMatching(t,n,i+1);if(!s||s.start.row==n)return;var o=this.$getIndent(t.getLine(s.start.row));o.length!=i&&(t.replace(new u(n,0,n,i),o),t.outdentRows(new u(n+1,0,n+1,0)))},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/lua_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/lua",this.snippetFileId="ace/snippets/lua"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./lua_highlight_rules").LuaHighlightRules,o=function(){i.call(this);var e=[{token:"keyword",regex:"<\\%\\=?",push:"lua-start"},{token:"keyword",regex:"<\\?lua\\=?",push:"lua-start"}],t=[{token:"keyword",regex:"\\%>",next:"pop"},{token:"keyword",regex:"\\?>",next:"pop"}];this.embedRules(s,"lua-",t,["start"]);for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.normalizeRules()};r.inherits(o,i),t.LuaPageHighlightRules=o}),ace.define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./lua").Mode,o=e("./luapage_highlight_rules").LuaPageHighlightRules,u=function(){i.call(this),this.HighlightRules=o,this.createModeDelegates({"lua-":s})};r.inherits(u,i),function(){this.$id="ace/mode/luapage"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/luapage"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-lucene.js b/mixly/common/modules/web-modules/ace/mode-lucene.js new file mode 100644 index 00000000..2d569cc8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-lucene.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"constant.language.escape",regex:/\\[\-+&|!(){}\[\]^"~*?:\\]/},{token:"constant.character.negation",regex:"\\-"},{token:"constant.character.interro",regex:"\\?"},{token:"constant.character.required",regex:"\\+"},{token:"constant.character.asterisk",regex:"\\*"},{token:"constant.character.proximity",regex:"~(?:0\\.[0-9]+|[0-9]+)?"},{token:"keyword.operator",regex:"(AND|OR|NOT|TO)\\b"},{token:"paren.lparen",regex:"[\\(\\{\\[]"},{token:"paren.rparen",regex:"[\\)\\}\\]]"},{token:"keyword.operator",regex:/[><=^]/},{token:"constant.numeric",regex:/\d[\d.-]*/},{token:"string",regex:/"(?:\\"|[^"])*"/},{token:"keyword",regex:/(?:\\.|[^\s\-+&|!(){}\[\]^"~*?:\\])+:/,next:"maybeRegex"},{token:"term",regex:/\w+/},{token:"text",regex:/\s+/}],maybeRegex:[{token:"text",regex:/\s+/},{token:"string.regexp.start",regex:"/",next:"regex"},{regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.end",regex:"/[sxngimy]*",next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.escape",regex:"|[~&@]"},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"start"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"start"},{defaultToken:"string.regexp.characterclass"}]}};r.inherits(s,i),t.LuceneHighlightRules=s}),ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lucene_highlight_rules").LuceneHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/lucene"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/lucene"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-makefile.js b/mixly/common/modules/web-modules/ace/mode-makefile.js new file mode 100644 index 00000000..2d6018ef --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-makefile.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};r.inherits(u,i),t.ShHighlightRules=u}),ace.define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./sh_highlight_rules"),o=function(){var e=this.createKeywordMapper({keyword:s.reservedKeywords,"support.function.builtin":s.languageConstructs,"invalid.deprecated":"debugger"},"string");this.$rules={start:[{token:"string.interpolated.backtick.makefile",regex:"`",next:"shell-start"},{token:"punctuation.definition.comment.makefile",regex:/#(?=.)/,next:"comment"},{token:["keyword.control.makefile"],regex:"^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"},{token:["entity.name.function.makefile","text"],regex:"^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"}],comment:[{token:"punctuation.definition.comment.makefile",regex:/.+\\/},{token:"punctuation.definition.comment.makefile",regex:".+",next:"start"}],"shell-start":[{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:"\\w+"},{token:"string.interpolated.backtick.makefile",regex:"`",next:"start"}]}};r.inherits(o,i),t.MakefileHighlightRules=o}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="`"?e.bgTokenizer.getState(n)=="start"?"end":"start":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type.lastIndexOf(c,0)===0}function h(){var e=f.value[0];return e=="="?6:e=="-"?5:7-f.value.search(/[^#]|$/)}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;if(r[0]=="`"){if(e.bgTokenizer.getState(n)!=="start"){while(++n0){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(n,r.length,u,0)}var f,c="markup.heading";if(l(n)){var p=h();while(++n=p)break}a=n-(!f||["=","-"].indexOf(f.value[0])==-1?1:2);if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var v=e.getLine(a).length;return new s(u,i,a,v)}}}}.call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};r.inherits(u,i),t.ShHighlightRules=u}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(l,s),function(){this.voidElements=i.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./behaviour/cstyle").CstyleBehaviour,s=e("./text").Mode,o=e("./markdown_highlight_rules").MarkdownHighlightRules,u=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new u,this.$behaviour=new i({braces:!0})};r.inherits(a,s),function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!r)return"";var i=r[2];return i||(i=parseInt(r[3],10)+1+"."),r[1]+i+r[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/markdown"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mask.js b/mixly/common/modules/web-modules/ace/mode-mask.js new file mode 100644 index 00000000..5a0575bb --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mask.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),ace.define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function N(){function t(e,t,n){var r="js-"+e+"-",i=e==="block"?["start"]:["start","no_regex"];s(o,r,t,i,n)}function n(){s(u,"css-block-",/\}/)}function r(){s(a,"md-multiline-",/("""|''')/,[])}function i(){s(f,"html-multiline-",/("""|''')/)}function s(t,n,r,i,s){var o="pop",u=i||["start"];u.length===0&&(u=null),/block|multiline/.test(n)&&(o=n+"end",e.$rules[o]=[k("empty","","start")]),e.embedRules(t,n,[k(s||w,r,o)],u,u==null?!0:!1)}this.$rules={start:[k("comment","\\/\\/.*$"),k("comment","\\/\\*",[k("comment",".*?\\*\\/","start"),k("comment",".+")]),C.string("'''"),C.string('"""'),C.string('"'),C.string("'"),C.syntax(/(markdown|md)\b/,"md-multiline","multiline"),C.syntax(/html\b/,"html-multiline","multiline"),C.syntax(/(slot|event)\b/,"js-block","block"),C.syntax(/style\b/,"css-block","block"),C.syntax(/var\b/,"js-statement","attr"),C.tag(),k(b,"[[({>]"),k(w,"[\\])};]","start"),{caseInsensitive:!0}]};var e=this;t("interpolation",/\]/,w+"."+g),t("statement",/\)|}|;/),t("block",/\}/),n(),r(),i(),this.normalizeRules()}function k(e,t,n){var r,i,s;return arguments.length===4?(r=n,i=arguments[3]):typeof n=="string"?i=n:r=n,typeof e=="function"&&(s=e,e="empty"),{token:e,regex:t,push:r,next:i,onMatch:s}}t.MaskHighlightRules=N;var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./css_highlight_rules").CssHighlightRules,a=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./html_highlight_rules").HtmlHighlightRules,l="keyword.support.constant.language",c="support.function.markup.bold",h="keyword",p="constant.language",d="keyword.control.markup.italic",v="support.variable.class",m="keyword.operator",g="markup.italic",y="markup.bold",b="paren.lparen",w="paren.rparen",E,S,x,T;(function(){E=i.arrayToMap("log".split("|")),x=i.arrayToMap(":dualbind|:bind|:import|slot|event|style|html|markdown|md".split("|")),S=i.arrayToMap("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import".split("|")),T=i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|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|legend|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|tt|u|ul|var|video|wbr|xmp".split("|"))})(),r.inherits(N,s);var C={string:function(e,t){var n=k("string.start",e,[k(b+"."+g,/~\[/,C.interpolation()),k("string.end",e,"pop"),{defaultToken:"string"}],t);if(e.length===1){var r=k("string.escape","\\\\"+e);n.push.unshift(r)}return n},interpolation:function(){return[k(d,/\s*\w*\s*:/),"js-interpolation-start"]},tagHead:function(e){return k(v,e,[k(v,/[\w\-_]+/),k(b+"."+g,/~\[/,C.interpolation()),C.goUp()])},tag:function(){return{token:"tag",onMatch:function(e){return void 0!==S[e]?h:void 0!==x[e]?p:void 0!==E[e]?"support.function":void 0!==T[e.toLowerCase()]?l:c},regex:/([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/,push:[C.tagHead(/\./),C.tagHead(/#/),C.expression(),C.attribute(),k(b,/[;>{]/,"pop")]}},syntax:function(e,t,n){return{token:p,regex:e,push:{attr:[t+"-start",k(m,/;/,"start")],multiline:[C.tagHead(/\./),C.tagHead(/#/),C.attribute(),C.expression(),k(b,/[>\{]/),k(m,/;/,"start"),k(b,/'''|"""/,[t+"-start"])],block:[C.tagHead(/\./),C.tagHead(/#/),C.attribute(),C.expression(),k(b,/\{/,[t+"-start"])]}[n]}},attribute:function(){return k(function(e){return/^x\-/.test(e)?v+"."+y:v},/[\w_-]+/,[k(m,/\s*=\s*/,[C.string('"'),C.string("'"),C.word(),C.goUp()]),C.goUp()])},expression:function(){return k(b,/\(/,["js-statement-start"])},word:function(){return k("string",/[\w-_]+/)},goUp:function(){return k("text","","pop")},goStart:function(){return k("text","","start")}}}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mask_highlight_rules").MaskHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/mask"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/mask"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-matlab.js b/mixly/common/modules/web-modules/ace/mode-matlab.js new file mode 100644 index 00000000..87d29160 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-matlab.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while",t="true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout",n="abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:.(?:close|closeVar|computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab.io.MatFile|matlab.mixin.(?:Copyable|Heterogeneous(?:.getDefaultScalarElement)?)|matlabrc|matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta.(?:class(?:.fromName)?|DynamicProperty|EnumeratedValue|event|MetaData|method|package(?:.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|ncwriteschema|ndgrid|ndims|ne|NET(?:.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|NetException|setStaticProperty))?|netcdf.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:.(?:create|getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:.isPlatformSupported)?|VideoWriter(?:.getProfiles)?|view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|cholcov|Classification(?:BaggedEnsemble|Discriminant(?:.(?:fit|make|template))?|Ensemble|KNN(?:.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:.fit)?|geo(?:cdf|inv|mean|pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|LinearModel(?:.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:.fit)?|nan(?:cov|max|mean|median|min|std|sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|regstats|relieff|ridge|robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztestadapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|reflect|regionprops|registration.metric.(?:MattesMutualInformation|MeanSquares)|registration.optimizer.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog",r="cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse",i=this.createKeywordMapper({"storage.type":r,"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"string",regex:"'",stateName:"qstring",next:[{token:"constant.language.escape",regex:"''"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]},{token:"text",regex:"\\s+"},{regex:"",next:"noQstring"}],noQstring:[{regex:"^\\s*%{\\s*$",token:"comment.start",push:"blockComment"},{token:"comment",regex:"%[^\r\n]*"},{token:"string",regex:'"',stateName:"qqstring",next:[{token:"constant.language.escape",regex:/\\./},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=",next:"start"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"start"},{token:"paren.lparen",regex:"[({\\[]",next:"start"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"},{token:"text",regex:"$",next:"start"}],blockComment:[{regex:"^\\s*%{\\s*$",token:"comment.start",push:"blockComment"},{regex:"^\\s*%}\\s*$",token:"comment.end",next:"pop"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.MatlabHighlightRules=s}),ace.define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./matlab_highlight_rules").MatlabHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="%",this.blockComment={start:"%{",end:"%}"},this.$id="ace/mode/matlab"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/matlab"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-maze.js b/mixly/common/modules/web-modules/ace/mode-maze.js new file mode 100644 index 00000000..317890e9 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-maze.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/maze_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.control",regex:/##|``/,comment:"Wall"},{token:"entity.name.tag",regex:/\.\./,comment:"Path"},{token:"keyword.control",regex:/<>/,comment:"Splitter"},{token:"entity.name.tag",regex:/\*[\*A-Za-z0-9]/,comment:"Signal"},{token:"constant.numeric",regex:/[0-9]{2}/,comment:"Pause"},{token:"keyword.control",regex:/\^\^/,comment:"Start"},{token:"keyword.control",regex:/\(\)/,comment:"Hole"},{token:"support.function",regex:/>>/,comment:"Out"},{token:"support.function",regex:/>\//,comment:"Ln Out"},{token:"support.function",regex:/< *)(?:([-+*\/]=)( *)((?:-)?)([0-9]+)|(=)( *)(?:((?:-)?)([0-9]+)|("[^"]*")|('[^']*')))/,comment:"Assignment function"},{token:["entity.name.function","keyword.other","keyword.control","keyword.other","keyword.operator","keyword.other","keyword.operator","constant.numeric","entity.name.tag","keyword.other","keyword.control","keyword.other","constant.language","keyword.other","keyword.control","keyword.other","constant.language"],regex:/([A-Za-z][A-Za-z0-9])( *-> *)(IF|if)( *)(?:([<>]=?|==)( *)((?:-)?)([0-9]+)|(\*[\*A-Za-z0-9]))( *)(THEN|then)( *)(%[LRUDNlrudn])(?:( *)(ELSE|else)( *)(%[LRUDNlrudn]))?/,comment:"Equality Function"},{token:"entity.name.function",regex:/[A-Za-z][A-Za-z0-9]/,comment:"Function cell"},{token:"comment.line.double-slash",regex:/ *\/\/.*/,comment:"Comment"}]},this.normalizeRules()};s.metaData={fileTypes:["mz"],name:"Maze",scopeName:"source.maze"},r.inherits(s,i),t.MazeHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/maze",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/maze_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./maze_highlight_rules").MazeHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/maze",this.snippetFileId="ace/snippets/maze"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/maze"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mediawiki.js b/mixly/common/modules/web-modules/ace/mode-mediawiki.js new file mode 100644 index 00000000..2427c655 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mediawiki.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/mediawiki_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#switch"},{include:"#redirect"},{include:"#variable"},{include:"#comment"},{include:"#entity"},{include:"#emphasis"},{include:"#tag"},{include:"#table"},{include:"#hr"},{include:"#heading"},{include:"#link"},{include:"#list"},{include:"#template"}],"#hr":[{token:"markup.bold",regex:/^[-]{4,}/}],"#switch":[{token:"constant.language",regex:/(__NOTOC__|__FORCETOC__|__TOC__|__NOEDITSECTION__|__NEWSECTIONLINK__|__NONEWSECTIONLINK__|__NOWYSIWYG__|__NOGALLERY__|__HIDDENCAT__|__EXPECTUNUSEDCATEGORY__|__NOCONTENTCONVERT__|__NOCC__|__NOTITLECONVERT__|__NOTC__|__START__|__END__|__INDEX__|__NOINDEX__|__STATICREDIRECT__|__NOGLOBAL__|__DISAMBIG__)/}],"#redirect":[{token:["keyword.control.redirect","meta.keyword.control"],regex:/(^#REDIRECT|^#redirect|^#Redirect)(\s+)/}],"#variable":[{token:"storage.type.variable",regex:/{{{/,push:[{token:"storage.type.variable",regex:/}}}/,next:"pop"},{token:["text","variable.other","text","keyword.operator"],regex:/(\s*)(\w+)(\s*)((?:\|)?)/},{defaultToken:"storage.type.variable"}]}],"#entity":[{token:"constant.character.entity",regex:/&\w+;/}],"#list":[{token:"markup.bold",regex:/^[#*;:]+/,push:[{token:"markup.list",regex:/$/,next:"pop"},{include:"$self"},{defaultToken:"markup.list"}]}],"#template":[{token:["storage.type.function","meta.template","entity.name.function","meta.template"],regex:/({{)(\s*)([#\w: ]+)(\s*)/,push:[{token:"storage.type.function",regex:/}}/,next:"pop"},{token:["storage","meta.structure.dictionary","support.type.property-name","meta.structure.dictionary","punctuation.separator.dictionary.key-value","meta.structure.dictionary","meta.structure.dictionary.value"],regex:/(\|)(\s*)([a-zA-Z-]*)(\s*)(=)(\s*)([^|}]*)/,push:[{token:"meta.structure.dictionary",regex:/(?=}}|[|])/,next:"pop"},{defaultToken:"meta.structure.dictionary"}]},{token:["storage","meta.template.value"],regex:/(\|)(.*?)/,push:[{token:[],regex:/(?=}}|[|])/,next:"pop"},{include:"$self"},{defaultToken:"meta.template.value"}]},{defaultToken:"meta.template"}]}],"#link":[{token:["punctuation.definition.tag.begin","meta.tag.link.internal","entity.name.tag","meta.tag.link.internal","string.other.link.title","meta.tag.link.internal","punctuation.definition.tag"],regex:/(\[\[)(\s*)((?:Category|Wikipedia)?)(:?)([^\]\]\|]+)(\s*)((?:\|)*)/,push:[{token:"punctuation.definition.tag.end",regex:/\]\]/,next:"pop"},{include:"$self"},{defaultToken:"meta.tag.link.internal"}]},{token:["punctuation.definition.tag.begin","meta.tag.link.external","meta.tag.link.external","string.unquoted","punctuation.definition.tag.end"],regex:/(\[)(.*?)([\s]+)(.*?)(\])/}],"#comment":[{token:"punctuation.definition.comment.html",regex://,next:"pop"},{defaultToken:"comment.block.html"}]}],"#emphasis":[{token:["punctuation.definition.tag.begin","markup.italic.bold","punctuation.definition.tag.end"],regex:/(''''')(?!')(.*?)('''''|$)/},{token:["punctuation.definition.tag.begin","markup.bold","punctuation.definition.tag.end"],regex:/(''')(?!')(.*?)('''|$)/},{token:["punctuation.definition.tag.begin","markup.italic","punctuation.definition.tag.end"],regex:/('')(?!')(.*?)(''|$)/}],"#heading":[{token:["punctuation.definition.heading","entity.name.section","punctuation.definition.heading"],regex:/(={1,6})(.+?)(\1)(?!=)/}],"#tag":[{token:["punctuation.definition.tag.begin","entity.name.tag","meta.tag.block.ref","punctuation.definition.tag.end"],regex:/(<)(ref)((?:\s+.*?)?)(>)/,caseInsensitive:!0,push:[{token:["punctuation.definition.tag.begin","entity.name.tag","meta.tag.block.ref","punctuation.definition.tag.end"],regex:/(<\/)(ref)(\s*)(>)/,caseInsensitive:!0,next:"pop"},{include:"$self"},{defaultToken:"meta.tag.block.ref"}]},{token:["punctuation.definition.tag.begin","entity.name.tag","meta.tag.block.nowiki","punctuation.definition.tag.end"],regex:/(<)(nowiki)((?:\s+.*?)?)(>)/,caseInsensitive:!0,push:[{token:["punctuation.definition.tag.begin","entity.name.tag","meta.tag.block.nowiki","punctuation.definition.tag.end"],regex:/(<\/)(nowiki)(\s*)(>)/,caseInsensitive:!0,next:"pop"},{defaultToken:"meta.tag.block.nowiki"}]},{token:["punctuation.definition.tag.begin","entity.name.tag"],regex:/(<\/?)(noinclude|includeonly|onlyinclude)(?=\W)/,caseInsensitive:!0,push:[{token:["invalid.illegal","punctuation.definition.tag.end"],regex:/((?:\/)?)(>)/,next:"pop"},{include:"#attribute"},{defaultToken:"meta.tag.block.any"}]},{token:["punctuation.definition.tag.begin","entity.name.tag"],regex:/(<)(br|wbr|hr|meta|link)(?=\W)/,caseInsensitive:!0,push:[{token:"punctuation.definition.tag.end",regex:/\/?>/,next:"pop"},{include:"#attribute"},{defaultToken:"meta.tag.other"}]},{token:["punctuation.definition.tag.begin","entity.name.tag"],regex:/(<\/?)(div|center|span|h1|h2|h3|h4|h5|h6|bdo|em|strong|cite|dfn|code|samp|kbd|var|abbr|blockquote|q|sub|sup|p|pre|ins|del|ul|ol|li|dl|dd|dt|table|caption|thead|tfoot|tbody|colgroup|col|tr|td|th|a|img|video|source|track|tt|b|i|big|small|strike|s|u|font|ruby|rb|rp|rt|rtc|math|figure|figcaption|bdi|data|time|mark|html)(?=\W)/,caseInsensitive:!0,push:[{token:["invalid.illegal","punctuation.definition.tag.end"],regex:/((?:\/)?)(>)/,next:"pop"},{include:"#attribute"},{defaultToken:"meta.tag.block"}]},{token:["punctuation.definition.tag.begin","invalid.illegal"],regex:/(<\/)(br|wbr|hr|meta|link)(?=\W)/,caseInsensitive:!0,push:[{token:"punctuation.definition.tag.end",regex:/\/?>/,next:"pop"},{include:"#attribute"},{defaultToken:"meta.tag.other"}]}],"#caption":[{token:["meta.tag.block.table-caption","punctuation.definition.tag.begin"],regex:/^(\s*)(\|\+)/,push:[{token:"meta.tag.block.table-caption",regex:/$/,next:"pop"},{defaultToken:"meta.tag.block.table-caption"}]}],"#tr":[{token:["meta.tag.block.tr","punctuation.definition.tag.begin","meta.tag.block.tr","invalid.illegal"],regex:/^(\s*)(\|\-)([\s]*)(.*)/}],"#th":[{token:["meta.tag.block.th.heading","punctuation.definition.tag.begin","meta.tag.block.th.heading","punctuation.definition.tag","markup.bold"],regex:/^(\s*)(!)(?:(.*?)(\|))?(.*?)(?=!!|$)/,push:[{token:"meta.tag.block.th.heading",regex:/$/,next:"pop"},{token:["punctuation.definition.tag.begin","meta.tag.block.th.inline","punctuation.definition.tag","markup.bold"],regex:/(!!)(?:(.*?)(\|))?(.*?)(?=!!|$)/},{include:"$self"},{defaultToken:"meta.tag.block.th.heading"}]}],"#td":[{token:["meta.tag.block.td","punctuation.definition.tag.begin"],regex:/^(\s*)(\|)/,push:[{token:"meta.tag.block.td",regex:/$/,next:"pop"},{include:"$self"},{defaultToken:"meta.tag.block.td"}]}],"#table":[{patterns:[{name:"meta.tag.block.table",begin:"^\\s*({\\|)(.*?)$",end:"^\\s*\\|}",beginCaptures:{1:{name:"punctuation.definition.tag.begin"},2:{patterns:[{include:"#attribute"}]},3:{name:"invalid.illegal"}},endCaptures:{0:{name:"punctuation.definition.tag.end"}},patterns:[{include:"#comment"},{include:"#template"},{include:"#caption"},{include:"#tr"},{include:"#th"},{include:"#td"}]}],repository:{caption:{name:"meta.tag.block.table-caption",begin:"^\\s*(\\|\\+)",end:"$",beginCaptures:{1:{name:"punctuation.definition.tag.begin"}}},tr:{name:"meta.tag.block.tr",match:"^\\s*(\\|\\-)[\\s]*(.*)",captures:{1:{name:"punctuation.definition.tag.begin"},2:{name:"invalid.illegal"}}},th:{name:"meta.tag.block.th.heading",begin:"^\\s*(!)((.*?)(\\|))?(.*?)(?=(!!)|$)",end:"$",beginCaptures:{1:{name:"punctuation.definition.tag.begin"},3:{patterns:[{include:"#attribute"}]},4:{name:"punctuation.definition.tag"},5:{name:"markup.bold"}},patterns:[{name:"meta.tag.block.th.inline",match:"(!!)((.*?)(\\|))?(.*?)(?=(!!)|$)",captures:{1:{name:"punctuation.definition.tag.begin"},3:{patterns:[{include:"#attribute"}]},4:{name:"punctuation.definition.tag"},5:{name:"markup.bold"}}},{include:"$self"}]},td:{name:"meta.tag.block.td",begin:"^\\s*(\\|)",end:"$",beginCaptures:{1:{name:"punctuation.definition.tag.begin"},2:{patterns:[{include:"#attribute"}]},3:{name:"punctuation.definition.tag"}},patterns:[{include:"$self"}]}}}],"#attribute":[{include:"#string"},{token:"entity.other.attribute-name",regex:/\w+/}],"#string":[{token:"string.quoted.double",regex:/\"/,push:[{token:"string.quoted.double",regex:/\"/,next:"pop"},{defaultToken:"string.quoted.double"}]},{token:"string.quoted.single",regex:/\'/,push:[{token:"string.quoted.single",regex:/\'/,next:"pop"},{defaultToken:"string.quoted.single"}]}],"#url":[{token:"markup.underline.link",regex:/(?:http(?:s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:\/?#\[\]@!\$&'\(\)\*\+,;=.]+/},{token:"invalid.illegal",regex:/.*/}]},this.normalizeRules()};s.metaData={name:"MediaWiki",scopeName:"text.html.mediawiki",fileTypes:["mediawiki","wiki"]},r.inherits(s,i),t.MediaWikiHighlightRules=s}),ace.define("ace/mode/mediawiki",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mediawiki_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mediawiki_highlight_rules").MediaWikiHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.type="text",this.blockComment={start:""},this.$id="ace/mode/mediawiki"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/mediawiki"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mel.js b/mixly/common/modules/web-modules/ace/mode-mel.js new file mode 100644 index 00000000..635f16e9 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mel.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{caseInsensitive:!0,token:"storage.type.mel",regex:"\\b(matrix|string|vector|float|int|void)\\b"},{caseInsensitive:!0,token:"support.function.mel",regex:"\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b"},{caseInsensitive:!0,token:"support.constant.mel",regex:"\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b"},{caseInsensitive:!0,token:"keyword.control.mel",regex:"\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b"},{token:"keyword.other.mel",regex:"\\b(global)\\b"},{caseInsensitive:!0,token:"constant.language.mel",regex:"\\b(null|undefined)\\b"},{token:"constant.numeric.mel",regex:"\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b"},{token:"punctuation.definition.string.begin.mel",regex:'"',push:[{token:"constant.character.escape.mel",regex:"\\\\."},{token:"punctuation.definition.string.end.mel",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.mel"}]},{token:["variable.other.mel","punctuation.definition.variable.mel"],regex:"(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)"},{token:"punctuation.definition.string.begin.mel",regex:"'",push:[{token:"constant.character.escape.mel",regex:"\\\\."},{token:"punctuation.definition.string.end.mel",regex:"'",next:"pop"},{defaultToken:"string.quoted.single.mel"}]},{token:"constant.language.mel",regex:"\\b(false|true|yes|no|on|off)\\b"},{token:"punctuation.definition.comment.mel",regex:"/\\*",push:[{token:"punctuation.definition.comment.mel",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.mel"}]},{token:["comment.line.double-slash.mel","punctuation.definition.comment.mel"],regex:"(//)(.*$\\n?)"},{caseInsensitive:!0,token:"keyword.operator.mel",regex:"\\b(instanceof)\\b"},{token:"keyword.operator.symbolic.mel",regex:"[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]"},{token:["meta.preprocessor.mel","punctuation.definition.preprocessor.mel"],regex:"(^[ \\t]*)((?:#)[a-zA-Z]+)"},{token:["meta.function.mel","keyword.other.mel","storage.type.mel","entity.name.function.mel","punctuation.section.function.mel"],regex:"(global\\s*)?(proc\\s*)(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*\\()",push:[{include:"$self"},{token:"punctuation.section.function.mel",regex:"\\)",next:"pop"},{defaultToken:"meta.function.mel"}]}]},this.normalizeRules()};r.inherits(s,i),t.MELHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mel_highlight_rules").MELHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/mel"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/mel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mips.js b/mixly/common/modules/web-modules/ace/mode-mips.js new file mode 100644 index 00000000..05ce86a7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mips.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/mips_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;this.$rules={start:[{token:"storage.modifier.mips",regex:/\.\b(?:align|ascii|asciiz|byte|double|extern|float|globl|space|word)\b/,comment:"Assembler directives for data storage"},{token:"entity.name.section.mips",regex:/\.\b(?:data|text|kdata|ktext|)\b/,comment:"Segements: .data .text"},{token:"variable.parameter.mips",regex:/\$(?:(?:3[01]|[12]?[0-9]|[0-9])|zero|at|v[01]|a[0-3]|s[0-7]|t[0-9]|k[01]|gp|sp|fp|ra)/,comment:"Registers by id $1, $2, ..."},{token:"variable.parameter.mips",regex:/\$f(?:[0-9]|[1-2][0-9]|3[0-1])/,comment:"Floating point registers"},{token:"support.function.source.mips",regex:/\b(?:(?:add|sub|div|l|mov|mult|neg|s|c\.eq|c\.le|c\.lt)\.[ds]|cvt\.s\.[dw]|cvt\.d\.[sw]|cvt\.w\.[ds]|bc1[tf])\b/,comment:"The MIPS floating-point instruction set"},{token:"support.function.source.mips",regex:/\b(?:add|addu|addi|addiu|sub|subu|and|andi|or|not|ori|nor|xor|xori|slt|sltu|slti|sltiu|sll|sllv|rol|srl|sra|srlv|ror|j|jr|jal|beq|bne|lw|sw|lb|sb|lui|move|mfhi|mflo|mthi|mtlo)\b/,comment:"Just the hardcoded instructions provided by the MIPS assembly language"},{token:"support.function.other.mips",regex:/\b(?:abs|b|beqz|bge|bgt|bgtu|ble|bleu|blt|bltu|bnez|div|divu|la|li|move|mul|neg|not|rem|remu|seq|sge|sgt|sle|sne)\b/,comment:"Pseudo instructions"},{token:"entity.name.function.mips",regex:/\bsyscall\b/,comment:"Other"},{token:"string",regex:"(?:'\")(?:"+e+"|.)?(?:'\")"},{token:"string.start",regex:"'",stateName:"qstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:e},{token:"string.end",regex:"'|$",next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:e},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric.mips",regex:/\b(?:\d+|0(?:x|X)[a-fA-F0-9]+)\b/,comment:"Numbers like +12, -3, 55, 0x3F"},{token:"entity.name.tag.mips",regex:/\b[\w]+\b:/,comment:"Labels at line start: begin_repeat: add ..."},{token:"comment.assembly",regex:/#.*$/,comment:"Single line comments"}]},this.normalizeRules()};s.metaData={fileTypes:["s","asm"],name:"MIPS",scopeName:"source.mips"},r.inherits(s,i),t.MIPSHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/mips",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mips_highlight_rules").MIPSHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart=["#"],this.$id="ace/mode/mips"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/mips"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mixal.js b/mixly/common/modules/web-modules/ace/mode-mixal.js new file mode 100644 index 00000000..b389fbed --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mixal.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/mixal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=function(e){return e&&e.search(/^[A-Z\u0394\u03a0\u03a30-9]{1,10}$/)>-1&&e.search(/[A-Z\u0394\u03a0\u03a3]/)>-1},t=function(e){return e&&["NOP","ADD","FADD","SUB","FSUB","MUL","FMUL","DIV","FDIV","NUM","CHAR","HLT","SLA","SRA","SLAX","SRAX","SLC","SRC","MOVE","LDA","LD1","LD2","LD3","LD4","LD5","LD6","LDX","LDAN","LD1N","LD2N","LD3N","LD4N","LD5N","LD6N","LDXN","STA","ST1","ST2","ST3","ST4","ST5","ST6","STX","STJ","STZ","JBUS","IOC","IN","OUT","JRED","JMP","JSJ","JOV","JNOV","JL","JE","JG","JGE","JNE","JLE","JAN","JAZ","JAP","JANN","JANZ","JANP","J1N","J1Z","J1P","J1NN","J1NZ","J1NP","J2N","J2Z","J2P","J2NN","J2NZ","J2NP","J3N","J3Z","J3P","J3NN","J3NZ","J3NP","J4N","J4Z","J4P","J4NN","J4NZ","J4NP","J5N","J5Z","J5P","J5NN","J5NZ","J5NP","J6N","J6Z","J6P","J6NN","J6NZ","J6NP","JXN","JXZ","JXP","JXNN","JXNZ","JXNP","INCA","DECA","ENTA","ENNA","INC1","DEC1","ENT1","ENN1","INC2","DEC2","ENT2","ENN2","INC3","DEC3","ENT3","ENN3","INC4","DEC4","ENT4","ENN4","INC5","DEC5","ENT5","ENN5","INC6","DEC6","ENT6","ENN6","INCX","DECX","ENTX","ENNX","CMPA","FCMP","CMP1","CMP2","CMP3","CMP4","CMP5","CMP6","CMPX","EQU","ORIG","CON","ALF","END"].indexOf(e)>-1},n=function(e){return e&&e.search(/[^ A-Z\u0394\u03a0\u03a30-9.,()+*/=$<>@;:'-]/)==-1};this.$rules={start:[{token:"comment.line.character",regex:/^ *\*.*$/},{token:function(t,r,i,s,o,u){return[e(t)?"variable.other":"invalid.illegal","text","keyword.control","text",n(o)?"text":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(ALF)( )(.{5})(\s+.*)?$/},{token:function(t,r,i,s,o,u){return[e(t)?"variable.other":"invalid.illegal","text","keyword.control","text",n(o)?"text":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(ALF)( )(\S.{4})(\s+.*)?$/},{token:function(n,r,i,s){return[e(n)?"variable.other":"invalid.illegal","text",t(i)?"keyword.control":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(\S+)(?:\s*)$/},{token:function(r,i,s,o,u,a){return[e(r)?"variable.other":"invalid.illegal","text",t(s)?"keyword.control":"invalid.illegal","text",n(u)?"text":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(\S+)( +)(\S+)(\s+.*)?$/},{defaultToken:"text"}]}};r.inherits(s,i),t.MixalHighlightRules=s}),ace.define("ace/mode/mixal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mixal_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mixal_highlight_rules").MixalHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/mixal",this.lineCommentStart="*"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/mixal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mushcode.js b/mixly/common/modules/web-modules/ace/mode-mushcode.js new file mode 100644 index 00000000..5a3968f8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mushcode.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="@if|@ifelse|@switch|@halt|@dolist|@create|@scent|@sound|@touch|@ataste|@osound|@ahear|@aahear|@amhear|@otouch|@otaste|@drop|@odrop|@adrop|@dropfail|@odropfail|@smell|@oemit|@emit|@pemit|@parent|@clone|@taste|whisper|page|say|pose|semipose|teach|touch|taste|smell|listen|look|move|go|home|follow|unfollow|desert|dismiss|@tel",t="=#0",n="default|edefault|eval|get_eval|get|grep|grepi|hasattr|hasattrp|hasattrval|hasattrpval|lattr|nattr|poss|udefault|ufun|u|v|uldefault|xget|zfun|band|bnand|bnot|bor|bxor|shl|shr|and|cand|cor|eq|gt|gte|lt|lte|nand|neq|nor|not|or|t|xor|con|entrances|exit|followers|home|lcon|lexits|loc|locate|lparent|lsearch|next|num|owner|parent|pmatch|rloc|rnum|room|where|zone|worn|held|carried|acos|asin|atan|ceil|cos|e|exp|fdiv|fmod|floor|log|ln|pi|power|round|sin|sqrt|tan|aposs|andflags|conn|commandssent|controls|doing|elock|findable|flags|fullname|hasflag|haspower|hastype|hidden|idle|isbaker|lock|lstats|money|who|name|nearby|obj|objflags|photo|poll|powers|pendingtext|receivedtext|restarts|restarttime|subj|shortestpath|tmoney|type|visible|cat|element|elements|extract|filter|filterbool|first|foreach|fold|grab|graball|index|insert|itemize|items|iter|last|ldelete|map|match|matchall|member|mix|munge|pick|remove|replace|rest|revwords|setdiff|setinter|setunion|shuffle|sort|sortby|splice|step|wordpos|words|add|lmath|max|mean|median|min|mul|percent|sign|stddev|sub|val|bound|abs|inc|dec|dist2d|dist3d|div|floordiv|mod|modulo|remainder|vadd|vdim|vdot|vmag|vmax|vmin|vmul|vsub|vunit|regedit|regeditall|regeditalli|regediti|regmatch|regmatchi|regrab|regraball|regraballi|regrabi|regrep|regrepi|after|alphamin|alphamax|art|before|brackets|capstr|case|caseall|center|containsfansi|comp|decompose|decrypt|delete|edit|encrypt|escape|if|ifelse|lcstr|left|lit|ljust|merge|mid|ostrlen|pos|repeat|reverse|right|rjust|scramble|secure|space|spellnum|squish|strcat|strmatch|strinsert|stripansi|stripfansi|strlen|switch|switchall|table|tr|trim|ucstr|unsafe|wrap|ctitle|cwho|channels|clock|cflags|ilev|itext|inum|convsecs|convutcsecs|convtime|ctime|etimefmt|isdaylight|mtime|secs|msecs|starttime|time|timefmt|timestring|utctime|atrlock|clone|create|cook|dig|emit|lemit|link|oemit|open|pemit|remit|set|tel|wipe|zemit|fbcreate|fbdestroy|fbwrite|fbclear|fbcopy|fbcopyto|fbclip|fbdump|fbflush|fbhset|fblist|fbstats|qentries|qentry|play|ansi|break|c|asc|die|isdbref|isint|isnum|isletters|linecoords|localize|lnum|nameshort|null|objeval|r|rand|s|setq|setr|soundex|soundslike|valid|vchart|vchart2|vlabel|@@|bakerdays|bodybuild|box|capall|catalog|children|ctrailer|darttime|debt|detailbar|exploredroom|fansitoansi|fansitoxansi|fullbar|halfbar|isdarted|isnewbie|isword|lambda|lobjects|lplayers|lthings|lvexits|lvobjects|lvplayers|lvthings|newswrap|numsuffix|playerson|playersthisweek|randomad|randword|realrandword|replacechr|second|splitamount|strlenall|text|third|tofansi|totalac|unique|getaddressroom|listpropertycomm|listpropertyres|lotowner|lotrating|lotratingcount|lotvalue|boughtproduct|companyabb|companyicon|companylist|companyname|companyowners|companyvalue|employees|invested|productlist|productname|productowners|productrating|productratingcount|productsoldat|producttype|ratedproduct|soldproduct|topproducts|totalspentonproduct|totalstock|transfermoney|uniquebuyercount|uniqueproductsbought|validcompany|deletepicture|fbsave|getpicturesecurity|haspicture|listpictures|picturesize|replacecolor|rgbtocolor|savepicture|setpicturesecurity|showpicture|piechart|piechartlabel|createmaze|drawmaze|drawwireframe",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")";this.$rules={start:[{token:"variable",regex:"%[0-9]{1}"},{token:"variable",regex:"%q[0-9A-Za-z]{1}"},{token:"variable",regex:"%[a-zA-Z]{1}"},{token:"variable.language",regex:"%[a-z0-9-_]+"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.MushCodeRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mushcode_highlight_rules").MushCodeRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/mushcode"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/mushcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-mysql.js b/mixly/common/modules/web-modules/ace/mode-mysql.js new file mode 100644 index 00000000..515665f9 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-mysql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){function l(e){var t=e.start,n=e.escape;return{token:"string.start",regex:t,next:[{token:"constant.language.escape",regex:n},{token:"string.end",next:"start",regex:t},{defaultToken:"string"}]}}var e="alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|lateral|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|intersect|except|update|values|where|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|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|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|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|global|grant|grants|group|by|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",t="rank|coalesce|ifnull|isnull|nvl",n="charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee",r="adddate|addtime|convert_tz|curdate|current_date|current_time|current_timestamp|curtime|date|date_add|date_format|date_sub|datediff|day|dayname|dayofmonth|dayofweek|dayofyear|extract|from_days|from_unixtime|get_format|hour|last_day|localtime|localtimestamp|makedate|maketime|microsecond|minute|month|monthname|now|period_add|period_diff|quarter|sec_to_time|second|str_to_date|subdate|subtime|sysdate|time|time_format|time_to_sec|timediff|timestamp|timestampadd|timestampdiff|to_days|to_seconds|unix_timestamp|utc_date|utc_time|utc_timestamp|week|weekday|weekofyear|year|yearweek",i="aes_decrypt|aes_encrypt|compress|md|random_bytes|sha|sha|statement_digest|statement_digest_text|uncompress|uncompressed_length|validate_password_strength",o="abs|acos|asin|atan|atan|ceil|ceiling|conv|cos|cot|crc|degrees|div|exp|floor|ln|log|log10|log2|mod|pi|pow|power|radians|rand|round|sign|sin|sqrt|tan|truncate",u="ascii|bin|bit_length|char|char_length|character_length|concat|concat_ws|elt|export_set|field|find_in_set|format|from_base|hex|insert|instr|lcase|left|length|like|load_file|locate|lower|lpad|ltrim|make_set|match|mid|not|not|oct|octet_length|ord|position|quote|regexp|regexp_instr|regexp_like|regexp_replace|regexp_substr|repeat|replace|reverse|right|rlike|rpad|rtrim|soundex|sounds|space|strcmp|substr|substring|substring_index|to_base|trim|ucase|unhex|upper|weight_string",a="bool|boolean|bit|blob|decimal|double|enum|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",f=this.createKeywordMapper({"support.function":[t,r,i,o,u].join("|"),keyword:e,"storage.type":a,constant:"false|true|null|unknown|ODBCdotTable|zerolessFloat","variable.language":n},"identifier",!0);this.$rules={start:[{token:"comment",regex:"(?:-- |#).*$"},l({start:'"',escape:/\\[0'"bnrtZ\\%_]?/}),l({start:"'",escape:/\\[0'"bnrtZ\\%_]?/}),s.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:f,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.class",regex:"@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.buildin",regex:"`[^`]*`"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(u,o),t.MysqlHighlightRules=u}),ace.define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./mysql_highlight_rules").MysqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart=["--","#"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/mysql"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/mysql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-nasal.js b/mixly/common/modules/web-modules/ace/mode-nasal.js new file mode 100644 index 00000000..f3e7ac2c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-nasal.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/nasal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"constant.other.allcaps.nasal",regex:/\b[[:upper:]_][[:upper:][:digit:]_]*\b(?![\.\(\'\"])/,comment:"Match identifiers in ALL_CAPS as constants, except when followed by `.`, `(`, `'`, or `\"`."},{todo:{token:["support.class.nasal","meta.function.nasal","entity.name.function.nasal","meta.function.nasal","keyword.operator.nasal","meta.function.nasal","storage.type.function.nasal","meta.function.nasal","punctuation.definition.parameters.begin.nasal"],regex:/([a-zA-Z_?.$][\w?.$]*)(\.)([a-zA-Z_?.$][\w?.$]*)(\s*)(=)(\s*)(func)(\s*)(\()/,push:[{token:"punctuation.definition.parameters.end.nasal",regex:/\)/,next:"pop"},{include:"$self"},{token:"variable.parameter.nasal",regex:/\w/},{defaultToken:"meta.function.nasal"}]},comment:"match stuff like: Sound.play = func() { \u2026 }"},{todo:{token:["entity.name.function.nasal","meta.function.nasal","keyword.operator.nasal","meta.function.nasal","storage.type.function.nasal","meta.function.nasal","punctuation.definition.parameters.begin.nasal"],regex:/([a-zA-Z_?$][\w?$]*)(\s*)(=)(\s*)(func)(\s*)(\()/,push:[{token:"punctuation.definition.parameters.end.nasal",regex:/\)/,next:"pop"},{include:"$self"},{token:"variable.parameter.nasal",regex:/\w/},{defaultToken:"meta.function.nasal"}]},comment:"match stuff like: play = func() { \u2026 }"},{todo:{token:["entity.name.function.nasal","meta.function.nasal","keyword.operator.nasal","meta.function.nasal","storage.type.function.nasal","meta.function.nasal","punctuation.definition.parameters.begin.nasal"],regex:/([a-zA-Z_?$][\w?$]*)(\s*)(=)(\s*\(\s*)(func)(\s*)(\()/,push:[{token:"punctuation.definition.parameters.end.nasal",regex:/\)/,next:"pop"},{include:"$self"},{token:"variable.parameter.nasal",regex:/\w/},{defaultToken:"meta.function.nasal"}]},comment:"match stuff like: play = (func() { \u2026 }"},{todo:{token:["entity.name.function.nasal","meta.function.hash.nasal","storage.type.function.nasal","meta.function.hash.nasal","punctuation.definition.parameters.begin.nasal"],regex:/\b([a-zA-Z_?.$][\w?.$]*)(\s*:\s*\b)(func)(\s*)(\()/,push:[{token:"punctuation.definition.parameters.end.nasal",regex:/\)/,next:"pop"},{include:"$self"},{token:"variable.parameter.nasal",regex:/\w/},{defaultToken:"meta.function.hash.nasal"}]},comment:"match stuff like: foobar: func() { \u2026 }"},{todo:{token:["storage.type.function.nasal","meta.function.nasal","punctuation.definition.parameters.begin.nasal"],regex:/\b(func)(\s*)(\()/,push:[{token:"punctuation.definition.parameters.end.nasal",regex:/\)/,next:"pop"},{include:"$self"},{token:"variable.parameter.nasal",regex:/\w/},{defaultToken:"meta.function.nasal"}]},comment:"match stuff like: func() { \u2026 }"},{token:["keyword.operator.new.nasal","meta.class.instance.constructor","entity.name.type.instance.nasal"],regex:/(new)(\s+)(\w+(?:\.\w*)?)/},{token:"keyword.control.nasal",regex:/\b(?:if|else|elsif|while|for|foreach|forindex)\b/},{token:"keyword.control.nasal",regex:/\b(?:break(?:\s+[A-Z]{2,16})?(?=\s*(?:;|\}))|continue(?:\s+[A-Z]{2,16})?(?=\s*(?:;|\}))|[A-Z]{2,16}(?=\s*;(?:[^\)#;]*?;){0,2}[^\)#;]*?\)))\b/},{token:"keyword.operator.nasal",regex:/!|\*|\-|\+|~|\/|==|=|!=|<=|>=|<|>|!|\?|\:|\*=|\/=|\+=|\-=|~=|\.\.\.|\b(?:and|or)\b/},{token:"variable.language.nasal",regex:/\b(?:me|arg|parents|obj)\b/},{token:"storage.type.nasal",regex:/\b(?:return|var)\b/},{token:"constant.language.nil.nasal",regex:/\bnil\b/},{token:"punctuation.definition.string.begin.nasal",regex:/'/,push:[{token:"punctuation.definition.string.end.nasal",regex:/'/,next:"pop"},{token:"constant.character.escape.nasal",regex:/\\'/},{defaultToken:"string.quoted.single.nasal"}],comment:"Single quoted strings"},{token:"punctuation.definition.string.begin.nasal",regex:/"/,push:[{token:"punctuation.definition.string.end.nasal",regex:/"/,next:"pop"},{token:"constant.character.escape.nasal",regex:/\\(?:x[\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|r|n|t|\\|")/},{token:"constant.character.escape.nasal",regex:/%(?:%|(?:\d+\$)?[+-]?(?:[ 0]|'.{1})?-?\d*(?:\.\d+)?[bcdeEufFgGosxX])/},{defaultToken:"string.quoted.double.nasal"}],comment:"Double quoted strings"},{token:["punctuation.definition.string.begin.nasal","string.other","punctuation.definition.string.end.nasal"],regex:/(`)(.)(`)/,comment:"Single-byte ASCII character constants"},{token:["punctuation.definition.comment.nasal","comment.line.hash.nasal"],regex:/(#)(.*$)/,comment:"Comments"},{token:"constant.numeric.nasal",regex:/(?:(?:\b[0-9]+)?\.)?\b[0-9]+(?:[eE][-+]?[0-9]+)?\b/,comment:"Integers, floats, and scientific format"},{token:"constant.numeric.nasal",regex:/0[x|X][0-9a-fA-F]+/,comment:"Hex codes"},{token:"punctuation.terminator.statement.nasal",regex:/\;/},{token:["punctuation.section.scope.begin.nasal","punctuation.section.scope.end.nasal"],regex:/(\[)(\])/},{todo:{token:"punctuation.section.scope.begin.nasal",regex:/\{/,push:[{token:"punctuation.section.scope.end.nasal",regex:/\}/,next:"pop"},{include:"$self"}]}},{todo:{token:"punctuation.section.scope.begin.nasal",regex:/\(/,push:[{token:"punctuation.section.scope.end.nasal",regex:/\)/,next:"pop"},{include:"$self"}]}},{token:"invalid.illegal",regex:/%|\$|@|&|\^|\||\\|`/,comment:"Illegal characters"},{todo:{comment:"TODO: Symbols in hash keys"},comment:"TODO: Symbols in hash keys"},{token:"variable.language.nasal",regex:/\b(?:append|bind|call|caller|chr|closure|cmp|compile|contains|delete|die|find|ghosttype|id|int|keys|left|num|pop|right|setsize|size|sort|split|sprintf|streq|substr|subvec|typeof|readline)\b/,comment:"Core functions"},{token:"variable.language.nasal",regex:/\b(?:abort|abs|aircraftToCart|addcommand|airportinfo|airwaysRoute|assert|carttogeod|cmdarg|courseAndDistance|createDiscontinuity|createViaTo|createWP|createWPFrom|defined|directory|fgcommand|findAirportsByICAO|findAirportsWithinRange|findFixesByID|findNavaidByFrequency|findNavaidsByFrequency|findNavaidsByID|findNavaidsWithinRange|finddata|flightplan|geodinfo|geodtocart|get_cart_ground_intersection|getprop|greatCircleMove|interpolate|isa|logprint|magvar|maketimer|start|stop|restart|maketimestamp|md5|navinfo|parse_markdown|parsexml|print|printf|printlog|rand|registerFlightPlanDelegate|removecommand|removelistener|resolvepath|setlistener|_setlistener|setprop|srand|systime|thisfunc|tileIndex|tilePath|values)\b/,comment:"FG ext core functions"},{token:"variable.language.nasal",regex:/\b(?:singleShot|isRunning|simulatedTime)\b/,comment:"FG ext core functions"},{token:"constant.language.nasal",regex:/\b(?:D2R|FPS2KT|FT2M|GAL2L|IN2M|KG2LB|KT2FPS|KT2MPS|LG2GAL|LB2KG|M2FT|M2IN|M2NM|MPS2KT|NM2M|R2D)\b/,comment:"FG ext core constants"},{token:"support.function.nasal",regex:/\b(?:addChild|addChildren|alias|clearValue|equals|getAliasTarget|getAttribute|getBoolValue|getChild|getChildren|getIndex|getName|getNode|getParent|getPath|getType|getValue|getValues|initNode|remove|removeAllChildren|removeChild|removeChildren|setAttribute|setBoolValue|setDoubleValue|setIntValue|setValue|setValues|unalias|compileCondition|condition|copy|dump|getNode|nodeList|runBinding|setAll|wrap|wrapNode)\b/,comment:"FG func props"},{token:"support.class.nasal",regex:/\bNode\b/,comment:"FG node class"},{token:"variable.language.nasal",regex:/\b(?:props|globals)\b/,comment:"FG func props variables"},{todo:{token:["support.function.nasal","punctuation.definition.arguments.begin.nasal"],regex:/\b([a-zA-Z_?$][\w?$]*)(\()/,push:[{token:"punctuation.definition.arguments.end.nasal",regex:/\)/,next:"pop"},{include:"$self"},{defaultToken:"meta.function-call.nasal"}]},comment:"function call"}]},this.normalizeRules()};s.metaData={fileTypes:["nas"],name:"Nasal",scopeName:"source.nasal"},r.inherits(s,i),t.NasalHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/nasal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nasal_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nasal_highlight_rules").NasalHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/nasal"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/nasal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-nginx.js b/mixly/common/modules/web-modules/ace/mode-nginx.js new file mode 100644 index 00000000..f68c4587 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-nginx.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/nginx_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="include|index|absolute_redirect|aio|output_buffers|directio|sendfile|aio_write|alias|root|chunked_transfer_encoding|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|default_type|disable_symlinks|directio_alignment|error_page|etag|if_modified_since|ignore_invalid_headers|internal|keepalive_requests|keepalive_disable|keepalive_timeout|limit_except|large_client_header_buffers|limit_rate|limit_rate_after|lingering_close|lingering_time|lingering_timeout|listen|log_not_found|log_subrequest|max_ranges|merge_slashes|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|output_buffers|port_in_redirect|postpone_output|read_ahead|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|satisfy|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|subrequest_output_buffer_size|tcp_nodelay|tcp_nopush|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|variables_hash_bucket_size|variables_hash_max_size|accept_mutex|accept_mutex_delay|debug_connection|error_log|daemon|debug_points|env|load_module|lock_file|master_process|multi_accept|pcre_jit|pid|ssl_engine|thread_pool|timer_resolution|use|user|worker_aio_requests|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_shutdown_timeout|working_directory|allow|deny|add_before_body|add_after_body|addition_types|api|status_zone|auth_basic|auth_basic_user_file|auth_jwt|auth_jwt|auth_jwt_claim_set|auth_jwt_header_set|auth_jwt_key_file|auth_jwt_key_request|auth_jwt_leeway|auth_request|auth_request_set|autoindex|autoindex_exact_size|autoindex_format|autoindex_localtime|ancient_browser|ancient_browser_value|modern_browser|modern_browser_value|charset|charset_map|charset_types|override_charset|source_charset|create_full_put_path|dav_access|dav_methods|min_delete_depth|empty_gif|f4f|f4f_buffer_size|fastcgi_bind|fastcgi_buffer_size|fastcgi_buffering|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_background_update|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_age|fastcgi_cache_lock_timeout|fastcgi_cache_max_range_offset|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_revalidate|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_catch_stderr|fastcgi_connect_timeout|fastcgi_force_ranges|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_limit_rate|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_next_upstream_timeout|fastcgi_next_upstream_tries|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_pass_request_body|fastcgi_pass_request_headers|fastcgi_read_timeout|fastcgi_request_buffering|fastcgi_send_lowat|fastcgi_send_timeout|fastcgi_socket_keepalive|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geoip_country|geoip_city|geoip_org|geoip_proxy|geoip_proxy_recursive|grpc_bind|grpc_buffer_size|grpc_connect_timeout|grpc_hide_header|grpc_ignore_headers|grpc_intercept_errors|grpc_next_upstream|grpc_next_upstream_timeout|grpc_next_upstream_tries|grpc_pass|grpc_pass_header|grpc_read_timeout|grpc_send_timeout|grpc_set_header|grpc_socket_keepalive|grpc_ssl_certificate|grpc_ssl_certificate_key|grpc_ssl_ciphers|grpc_ssl_crl|grpc_ssl_name|grpc_ssl_password_file|grpc_ssl_protocols|grpc_ssl_server_name|grpc_ssl_session_reuse|grpc_ssl_trusted_certificate|grpc_ssl_verify|grpc_ssl_verify_depth|gunzip|gunzip_buffers|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_types|gzip_vary|gzip_static|add_header|add_trailer|expires|hlshls_buffers|hls_forward_args|hls_fragment|hls_mp4_buffer_size|hls_mp4_max_buffer_size|image_filter|image_filter_buffer|image_filter_interlace|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|image_filter_webp_quality|js_content|js_include|js_set|keyval|keyval_zone|limit_conn|limit_conn_log_level|limit_conn_status|limit_conn_zone|limit_zone|limit_req|limit_req_log_level|limit_req_status|limit_req_zone|access_log|log_format|open_log_file_cache|map_hash_bucket_size|map_hash_max_size|memcached_bind|memcached_buffer_size|memcached_connect_timeout|memcached_force_ranges|memcached_gzip_flag|memcached_next_upstream|memcached_next_upstream_timeout|memcached_next_upstream_tries|memcached_pass|memcached_read_timeout|memcached_send_timeout|memcached_socket_keepalive|mirror|mirror_request_body|mp4|mp4_buffer_size|mp4_max_buffer_size|mp4_limit_rate|mp4_limit_rate_after|perl_modules|perl_require|perl_set|proxy_bind|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_background_update|proxy_cache_bypass|proxy_cache_convert_head|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_age|proxy_cache_lock_timeout|proxy_cache_max_range_offset|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_purge|proxy_cache_revalidate|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_force_ranges|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_limit_rate|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_next_upstream_timeout|proxy_next_upstream_tries|proxy_no_cache|proxy_pass|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_socket_keepalive|proxy_ssl_certificate|proxy_ssl_certificate_key|proxy_ssl_ciphers|proxy_ssl_crl|proxy_ssl_name|proxy_ssl_password_file|proxy_ssl_protocols|proxy_ssl_server_name|proxy_ssl_session_reuse|proxy_ssl_trusted_certificate|proxy_ssl_verify|proxy_ssl_verify_depth|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|set_real_ip_from|real_ip_header|real_ip_recursive|referer_hash_bucket_size|referer_hash_max_size|valid_referers|break|return|rewrite_log|set|uninitialized_variable_warn|scgi_bind|scgi_buffer_size|scgi_buffering|scgi_buffers|scgi_busy_buffers_size|scgi_cache|scgi_cache_background_update|scgi_cache_key|scgi_cache_lock|scgi_cache_lock_age|scgi_cache_lock_timeout|scgi_cache_max_range_offset|scgi_cache_methods|scgi_cache_min_uses|scgi_cache_path|scgi_cache_purge|scgi_cache_revalidate|scgi_cache_use_stale|scgi_cache_valid|scgi_connect_timeout|scgi_force_ranges|scgi_hide_header|scgi_ignore_client_abort|scgi_ignore_headers|scgi_intercept_errors|scgi_limit_rate|scgi_max_temp_file_size|scgi_next_upstream|scgi_next_upstream_timeout|scgi_next_upstream_tries|scgi_no_cache|scgi_param|scgi_pass|scgi_pass_header|scgi_pass_request_body|scgi_pass_request_headers|scgi_read_timeout|scgi_request_buffering|scgi_send_timeout|scgi_socket_keepalive|scgi_store|scgi_store_access|scgi_temp_file_write_size|scgi_temp_path|secure_link|secure_link_md5|secure_link_secret|session_log|session_log_format|session_log_zone|slice|spdy_chunk_size|spdy_headers_comp|ssi|ssi_last_modified|ssi_min_file_chunk|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_buffer_size|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_early_data|ssl_ecdh_curve|ssl_password_file|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_ticket_key|ssl_session_tickets|ssl_session_timeout|ssl_stapling|ssl_stapling_file|ssl_stapling_responder|ssl_stapling_verify|ssl_trusted_certificate|ssl_verify_client|ssl_verify_depth|status|status_format|status_zone|stub_status|sub_filter|sub_filter_last_modified|sub_filter_once|sub_filter_types|server|zone|state|hash|ip_hash|keepalive|keepalive_requests|keepalive_timeout|ntlm|least_conn|least_time|queue|random|sticky|sticky_cookie_insert|upstream_conf|health_check|userid|userid_domain|userid_expires|userid_mark|userid_name|userid_p3p|userid_path|userid_service|uwsgi_bind|uwsgi_buffer_size|uwsgi_buffering|uwsgi_buffers|uwsgi_busy_buffers_size|uwsgi_cache|uwsgi_cache_background_update|uwsgi_cache_bypass|uwsgi_cache_key|uwsgi_cache_lock|uwsgi_cache_lock_age|uwsgi_cache_lock_timeout|uwsgi_cache_max_range_offset|uwsgi_cache_methods|uwsgi_cache_min_uses|uwsgi_cache_path|uwsgi_cache_purge|uwsgi_cache_revalidate|uwsgi_cache_use_stale|uwsgi_cache_valid|uwsgi_connect_timeout|uwsgi_force_ranges|uwsgi_hide_header|uwsgi_ignore_client_abort|uwsgi_ignore_headers|uwsgi_intercept_errors|uwsgi_limit_rate|uwsgi_max_temp_file_size|uwsgi_modifier1|uwsgi_modifier2|uwsgi_next_upstream|uwsgi_next_upstream_timeout|uwsgi_next_upstream_tries|uwsgi_no_cache|uwsgi_param|uwsgi_pass|uwsgi_pass_header|uwsgi_pass_request_body|uwsgi_pass_request_headers|uwsgi_read_timeout|uwsgi_request_buffering|uwsgi_send_timeout|uwsgi_socket_keepalive|uwsgi_ssl_certificate|uwsgi_ssl_certificate_key|uwsgi_ssl_ciphers|uwsgi_ssl_crl|uwsgi_ssl_name|uwsgi_ssl_password_file|uwsgi_ssl_protocols|uwsgi_ssl_server_name|uwsgi_ssl_session_reuse|uwsgi_ssl_trusted_certificate|uwsgi_ssl_verify|uwsgi_ssl_verify_depth|uwsgi_store|uwsgi_store_access|uwsgi_temp_file_write_size|uwsgi_temp_path|http2_body_preread_size|http2_chunk_size|http2_idle_timeout|http2_max_concurrent_pushes|http2_max_concurrent_streams|http2_max_field_size|http2_max_header_size|http2_max_requests|http2_push|http2_push_preload|http2_recv_buffer_size|http2_recv_timeout|xml_entities|xslt_last_modified|xslt_param|xslt_string_param|xslt_stylesheet|xslt_types|listen|protocol|resolver|resolver_timeout|timeout|auth_http|auth_http_header|auth_http_pass_client_cert|auth_http_timeout|proxy_buffer|proxy_pass_error_message|proxy_timeout|xclient|starttls|imap_auth|imap_capabilities|imap_client_buffer|pop3_auth|pop3_capabilities|smtp_auth|smtp_capabilities|smtp_client_buffer|smtp_greeting_delay|preread_buffer_size|preread_timeout|proxy_protocol_timeout|js_access|js_filter|js_preread|proxy_download_rate|proxy_requests|proxy_responses|proxy_upload_rate|ssl_handshake_timeout|ssl_preread|health_check_timeout|zone_sync|zone_sync_buffers|zone_sync_connect_retry_interval|zone_sync_connect_timeout|zone_sync_interval|zone_sync_recv_buffer_size|zone_sync_server|zone_sync_ssl|zone_sync_ssl_certificate|zone_sync_ssl_certificate_key|zone_sync_ssl_ciphers|zone_sync_ssl_crl|zone_sync_ssl_name|zone_sync_ssl_password_file|zone_sync_ssl_protocols|zone_sync_ssl_server_name|zone_sync_ssl_trusted_certificate|zone_sync_ssl_verify_depth|zone_sync_timeout|google_perftools_profiles|proxy|perl";this.$rules={start:[{token:["storage.type","text","string.regexp","paren.lparen"],regex:"\\b(location)(\\s+)([\\^]?~[\\*]?\\s+.*?)({)"},{token:["storage.type","text","text","paren.lparen"],regex:"\\b(location|match|upstream)(\\s+)(.*?)({)"},{token:["storage.type","text","string","text","variable","text","paren.lparen"],regex:'\\b(split_clients|map)(\\s+)(\\".*\\")(\\s+)(\\$[\\w_]+)(\\s*)({)'},{token:["storage.type","text","paren.lparen"],regex:"\\b(http|events|server|mail|stream)(\\s*)({)"},{token:["storage.type","text","variable","text","variable","text","paren.lparen"],regex:"\\b(geo|map)(\\s+)(\\$[\\w_]+)?(\\s*)(\\$[\\w_]+)(\\s*)({)"},{token:"paren.rparen",regex:"(})"},{token:"paren.lparen",regex:"({)"},{token:["storage.type","text","paren.lparen"],regex:"\\b(if)(\\s+)(\\()",push:[{token:"paren.rparen",regex:"\\)|$",next:"pop"},{include:"lexical"}]},{token:"keyword",regex:"\\b("+e+")\\b",push:[{token:"punctuation",regex:";",next:"pop"},{include:"lexical"}]},{token:["keyword","text","string.regexp","text","punctuation"],regex:"\\b(rewrite)(\\s)(\\S*)(\\s.*)(;)"},{include:"lexical"},{include:"comments"}],comments:[{token:"comment",regex:"#.*$"}],lexical:[{token:"string",regex:"'",push:[{token:"string",regex:"'",next:"pop"},{include:"variables"},{defaultToken:"string"}]},{token:"string",regex:'"',push:[{token:"string",regex:'"',next:"pop"},{include:"variables"},{defaultToken:"string"}]},{token:"string.regexp",regex:/[!]?[~][*]?\s+.*(?=\))/},{token:"string.regexp",regex:/[\^]\S*(?=;$)/},{token:"string.regexp",regex:/[\^]\S*(?=;|\s|$)/},{token:"keyword.operator",regex:"\\B(\\+|\\-|\\*|\\=|!=)\\B"},{token:"constant.language",regex:"\\b(true|false|on|off|all|any|main|always)\\b"},{token:"text",regex:"\\s+"},{include:"variables"}],variables:[{token:"variable",regex:"\\$[\\w_]+"},{token:"variable.language",regex:"\\b(GET|POST|HEAD)\\b"}]},this.normalizeRules()};r.inherits(s,i),t.NginxHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/nginx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nginx_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nginx_highlight_rules").NginxHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/nginx"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/nginx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-nim.js b/mixly/common/modules/web-modules/ace/mode-nim.js new file mode 100644 index 00000000..81238a00 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-nim.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/nim_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({variable:"var|let|const",keyword:"assert|parallel|spawn|export|include|from|template|mixin|bind|import|concept|raise|defer|try|finally|except|converter|proc|func|macro|method|and|or|not|xor|shl|shr|div|mod|in|notin|is|isnot|of|static|if|elif|else|case|of|discard|when|return|yield|block|break|while|echo|continue|asm|using|cast|addr|unsafeAddr|type|ref|ptr|do|declared|defined|definedInScope|compiles|sizeOf|is|shallowCopy|getAst|astToStr|spawn|procCall|for|iterator|as","storage.type":"newSeq|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|char|bool|string|set|pointer|float32|float64|enum|object|cstring|array|seq|openArray|varargs|UncheckedArray|tuple|set|distinct|void|auto|openarray|range","support.function":"lock|ze|toU8|toU16|toU32|ord|low|len|high|add|pop|contains|card|incl|excl|dealloc|inc","constant.language":"nil|true|false"},"identifier"),t="(?:0[xX][\\dA-Fa-f][\\dA-Fa-f_]*)",n="(?:[0-9][\\d_]*)",r="(?:0o[0-7][0-7_]*)",i="(?:0[bB][01][01_]*)",s="(?:"+t+"|"+n+"|"+r+"|"+i+")(?:'?[iIuU](?:8|16|32|64)|u)?\\b",o="(?:[eE][+-]?[\\d][\\d_]*)",u="(?:[\\d][\\d_]*(?:[.][\\d](?:[\\d_]*)"+o+"?)|"+o+")",a="(?:"+t+"(?:'(?:(?:[fF](?:32|64)?)|[dD])))|(?:"+u+"|"+n+"|"+r+"|"+i+")(?:'(?:(?:[fF](?:32|64)?)|[dD]))",f="\\\\([abeprcnlftv\\\"']|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",l="[a-zA-Z][a-zA-Z0-9_]*";this.$rules={start:[{token:["identifier","keyword.operator","support.function"],regex:"("+l+")([.]{1})("+l+")(?=\\()"},{token:"paren.lparen",regex:"(\\{\\.)",next:[{token:"paren.rparen",regex:"(\\.\\}|\\})",next:"start"},{include:"methods"},{token:"identifier",regex:l},{token:"punctuation",regex:/[,]/},{token:"keyword.operator",regex:/[=:.]/},{token:"paren.lparen",regex:/[[(]/},{token:"paren.rparen",regex:/[\])]/},{include:"math"},{include:"strings"},{defaultToken:"text"}]},{token:"comment.doc.start",regex:/##\[(?!])/,push:"docBlockComment"},{token:"comment.start",regex:/#\[(?!])/,push:"blockComment"},{token:"comment.doc",regex:"##.*$"},{token:"comment",regex:"#.*$"},{include:"strings"},{token:"string",regex:"'(?:\\\\(?:[abercnlftv]|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})|.{1})?'"},{include:"methods"},{token:e,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"},{token:["keyword.operator","text","storage.type"],regex:"([:])(\\s+)("+l+")(?=$|\\)|\\[|,|\\s+=|;|\\s+\\{)"},{token:"paren.lparen",regex:/\[\.|{\||\(\.|\[:|[[({`]/},{token:"paren.rparen",regex:/\.\)|\|}|\.]|[\])}]/},{token:"keyword.operator",regex:/[=+\-*\/<>@$~&%|!?^.:\\]/},{token:"punctuation",regex:/[,;]/},{include:"math"}],blockComment:[{regex:/#\[]/,token:"comment"},{regex:/#\[(?!])/,token:"comment.start",push:"blockComment"},{regex:/]#/,token:"comment.end",next:"pop"},{defaultToken:"comment"}],docBlockComment:[{regex:/##\[]/,token:"comment.doc"},{regex:/##\[(?!])/,token:"comment.doc.start",push:"docBlockComment"},{regex:/]##/,token:"comment.doc.end",next:"pop"},{defaultToken:"comment.doc"}],math:[{token:"constant.float",regex:a},{token:"constant.float",regex:u},{token:"constant.integer",regex:s}],methods:[{token:"support.function",regex:"(\\w+)(?=\\()"}],strings:[{token:"string",regex:"(\\b"+l+')?"""',push:[{token:"string",regex:'"""',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\b"+l+'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:'"',push:[{token:"string",regex:'"|$',next:"pop"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]}]},this.normalizeRules()};r.inherits(s,i),t.NimHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/nim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nim_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nim_highlight_rules").NimHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.blockComment={start:"#[",end:"]#",nestable:!0},this.$id="ace/mode/nim"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/nim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-nix.js b/mixly/common/modules/web-modules/ace/mode-nix.js new file mode 100644 index 00000000..61601deb --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-nix.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|class|wchar_t|template|char16_t|char32_t",r="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local",s="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="true|false",t="with|import|if|else|then|inherit",n="let|in|rec",r=this.createKeywordMapper({"constant.language.nix":e,"keyword.control.nix":t,"keyword.declaration.nix":n},"identifier");this.$rules={start:[{token:"comment",regex:/#.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant",regex:"<[^>]+>"},{regex:"(==|!=|<=?|>=?)",token:["keyword.operator.comparison.nix"]},{regex:"((?:[+*/%-]|\\~)=)",token:["keyword.operator.assignment.arithmetic.nix"]},{regex:"=",token:"keyword.operator.assignment.nix"},{token:"string",regex:"''",next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',push:"qqstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{regex:"}",token:function(e,t,n){return n[1]&&n[1].charAt(0)=="q"?"constant.language.escape":"text"},next:"pop"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqdoc:[{token:"constant.language.escape",regex:/\$\{/,push:"start"},{token:"string",regex:"''",next:"pop"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:/\$\{/,push:"start"},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\$\{/,push:"start"},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(s,i),t.NixHighlightRules=s}),ace.define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./nix_highlight_rules").NixHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/nix"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/nix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-nsis.js b/mixly/common/modules/web-modules/ace/mode-nsis.js new file mode 100644 index 00000000..41985171 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-nsis.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/nsis_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.compiler.nsis",regex:/^\s*!(?:include|addincludedir|addplugindir|appendfile|assert|cd|delfile|echo|error|execute|packhdr|pragma|finalize|getdllversion|gettlbversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace|uninstfinalize)\b/,caseInsensitive:!0},{token:"keyword.command.nsis",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|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/,caseInsensitive:!0},{token:"keyword.control.nsis",regex:/^\s*!(?:ifdef|ifndef|if|ifmacrodef|ifmacrondef|else|endif)\b/,caseInsensitive:!0},{token:"keyword.plugin.nsis",regex:/^\s*\w+::\w+/,caseInsensitive:!0},{token:"keyword.operator.comparison.nsis",regex:/[!<>]?=|<>|<|>/},{token:"support.function.nsis",regex:/(?:\b|^\s*)(?:Function|FunctionEnd|Section|SectionEnd|SectionGroup|SectionGroupEnd|PageEx|PageExEnd)\b/,caseInsensitive:!0},{token:"support.library.nsis",regex:/\${[\w\.:-]+}/},{token:"constant.nsis",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/,caseInsensitive:!0},{token:"constant.library.nsis",regex:/\${(?:AtLeastServicePack|AtLeastWin7|AtLeastWin8|AtLeastWin10|AtLeastWin95|AtLeastWin98|AtLeastWin2000|AtLeastWin2003|AtLeastWin2008|AtLeastWin2008R2|AtLeastWinME|AtLeastWinNT4|AtLeastWinVista|AtLeastWinXP|AtMostServicePack|AtMostWin7|AtMostWin8|AtMostWin10|AtMostWin95|AtMostWin98|AtMostWin2000|AtMostWin2003|AtMostWin2008|AtMostWin2008R2|AtMostWinME|AtMostWinNT4|AtMostWinVista|AtMostWinXP|IsDomainController|IsNT|IsServer|IsServicePack|IsWin7|IsWin8|IsWin10|IsWin95|IsWin98|IsWin2000|IsWin2003|IsWin2008|IsWin2008R2|IsWinME|IsWinNT4|IsWinVista|IsWinXP)}/},{token:"constant.language.boolean.true.nsis",regex:/\b(?:true|on)\b/},{token:"constant.language.boolean.false.nsis",regex:/\b(?:false|off)\b/},{token:"constant.language.option.nsis",regex:/(?:\b|^\s*)(?:(?:un\.)?components|(?:un\.)?custom|(?:un\.)?directory|(?:un\.)?instfiles|(?:un\.)?license|uninstConfirm|admin|all|amd64-unicode|auto|both|bottom|bzip2|current|force|hide|highest|ifdiff|ifnewer|lastused|leave|left|listonly|lzma|nevershow|none|normal|notset|right|show|silent|silentlog|textonly|top|try|user|Win10|Win7|Win8|WinVista|x86-(ansi|unicode)|zlib)\b/,caseInsensitive:!0},{token:"constant.language.slash-option.nsis",regex:/\b\/(?:a|BRANDING|CENTER|COMPONENTSONLYONCUSTOM|CUSTOMSTRING=|date|e|ENABLECANCEL|FILESONLY|file|FINAL|GLOBAL|gray|ifempty|ifndef|ignorecase|IMGID=|ITALIC|LANG=|NOCUSTOM|noerrors|NONFATAL|nonfatal|oname=|o|REBOOTOK|redef|RESIZETOFIT|r|SHORT|SILENT|SOLID|STRIKE|TRIM|UNDERLINE|utcdate|windows|x)\b/,caseInsensitive:!0},{token:"constant.numeric.nsis",regex:/\b(?:0(?:x|X)[0-9a-fA-F]+|[0-9]+(?:\.[0-9]+)?)\b/},{token:"entity.name.function.nsis",regex:/\$\([\w\.:-]+\)/},{token:"storage.type.function.nsis",regex:/\$\w+/},{token:"punctuation.definition.string.begin.nsis",regex:/`/,push:[{token:"punctuation.definition.string.end.nsis",regex:/`/,next:"pop"},{token:"constant.character.escape.nsis",regex:/\$\\./},{defaultToken:"string.quoted.back.nsis"}]},{token:"punctuation.definition.string.begin.nsis",regex:/"/,push:[{token:"punctuation.definition.string.end.nsis",regex:/"/,next:"pop"},{token:"constant.character.escape.nsis",regex:/\$\\./},{defaultToken:"string.quoted.double.nsis"}]},{token:"punctuation.definition.string.begin.nsis",regex:/'/,push:[{token:"punctuation.definition.string.end.nsis",regex:/'/,next:"pop"},{token:"constant.character.escape.nsis",regex:/\$\\./},{defaultToken:"string.quoted.single.nsis"}]},{token:["punctuation.definition.comment.nsis","comment.line.nsis"],regex:/(;|#)(.*$)/},{token:"punctuation.definition.comment.nsis",regex:/\/\*/,push:[{token:"punctuation.definition.comment.nsis",regex:/\*\//,next:"pop"},{defaultToken:"comment.block.nsis"}]},{token:"text",regex:/(?:!include|!insertmacro)\b/}]},this.normalizeRules()};s.metaData={comment:"\n todo: - highlight functions\n ",fileTypes:["nsi","nsh"],name:"NSIS",scopeName:"source.nsis"},r.inherits(s,i),t.NSISHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/nsis",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nsis_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nsis_highlight_rules").NSISHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=[";","#"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/nsis"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/nsis"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-nunjucks.js b/mixly/common/modules/web-modules/ace/mode-nunjucks.js new file mode 100644 index 00000000..650e2388 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-nunjucks.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/nunjucks_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./html_highlight_rules").HtmlHighlightRules,o=function(){s.call(this),this.$rules.start.unshift({token:"punctuation.begin",regex:/{{-?/,push:[{token:"punctuation.end",regex:/-?}}/,next:"pop"},{include:"expression"}]},{token:"punctuation.begin",regex:/{%-?/,push:[{token:"punctuation.end",regex:/-?%}/,next:"pop"},{token:"constant.language.escape",regex:/\b(r\/.*\/[gimy]?)\b/},{include:"statement"}]},{token:"comment.begin",regex:/{#/,push:[{token:"comment.end",regex:/#}/,next:"pop"},{defaultToken:"comment"}]}),this.addRules({attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{token:"punctuation.begin",regex:/{{-?/,push:[{token:"punctuation.end",regex:/-?}}/,next:"pop"},{include:"expression"}]},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{token:"punctuation.begin",regex:/{{-?/,push:[{token:"punctuation.end",regex:/-?}}/,next:"pop"},{include:"expression"}]},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}],statement:[{token:"keyword.control",regex:/\b(block|endblock|extends|endif|elif|for|endfor|asyncEach|endeach|include|asyncAll|endall|macro|endmacro|set|endset|ignore missing|as|from|raw|verbatim|filter|endfilter)\b/},{include:"expression"}],expression:[{token:"constant.language",regex:/\b(true|false|none)\b/},{token:"string",regex:/"/,push:[{token:"string",regex:/"/,next:"pop"},{include:"escapeStrings"},{defaultToken:"string"}]},{token:"string",regex:/'/,push:[{token:"string",regex:/'/,next:"pop"},{include:"escapeStrings"},{defaultToken:"string"}]},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"keyword.operator",regex:/\+|-|\/\/|\/|%|\*\*|\*|===|==|!==|!=|>=|>|<=|>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=function(){var e={"support.function.cocoa.leopard":"NSRectToCGRect|NSRectFromCGRect|NSMakeCollectable|NSStringFromProtocol|NSSizeToCGSize|NSSizeFromCGSize|NSDrawNinePartImage|NSDrawThreePartImage|NSPointToCGPoint|NSPointFromCGPoint|NSProtocolFromString|NSEventMaskFromType|NSValue","support.function.cocoa":"NSRoundDownToMultipleOfPageSize|NSRoundUpToMultipleOfPageSize|NSRunCriticalAlertPanel|NSRunCriticalAlertPanelRelativeToWindow|NSRunInformationalAlertPanel|NSRunInformationalAlertPanelRelativeToWindow|NSRunAlertPanel|NSRunAlertPanelRelativeToWindow|NSResetMapTable|NSResetHashTable|NSRecycleZone|NSRectClip|NSRectClipList|NSRectFill|NSRectFillUsingOperation|NSRectFillList|NSRectFillListUsingOperation|NSRectFillListWithGrays|NSRectFillListWithColors|NSRectFillListWithColorsUsingOperation|NSRectFromString|NSRecordAllocationEvent|NSReturnAddress|NSReleaseAlertPanel|NSReadPixel|NSRealMemoryAvailable|NSReallocateCollectable|NSRegisterServicesProvider|NSRangeFromString|NSGetSizeAndAlignment|NSGetCriticalAlertPanel|NSGetInformationalAlertPanel|NSGetUncaughtExceptionHandler|NSGetFileType|NSGetFileTypes|NSGetWindowServerMemory|NSGetAlertPanel|NSMinX|NSMinY|NSMidX|NSMidY|NSMouseInRect|NSMapRemove|NSMapGet|NSMapMember|NSMapInsert|NSMapInsertIfAbsent|NSMapInsertKnownAbsent|NSMakeRect|NSMakeRange|NSMakeSize|NSMakePoint|NSMaxRange|NSMaxX|NSMaxY|NSBitsPerSampleFromDepth|NSBitsPerPixelFromDepth|NSBestDepth|NSBeep|NSBeginCriticalAlertSheet|NSBeginInformationalAlertSheet|NSBeginAlertSheet|NSShouldRetainWithZone|NSShowsServicesMenuItem|NSShowAnimationEffect|NSStringFromRect|NSStringFromRange|NSStringFromMapTable|NSStringFromSize|NSStringFromSelector|NSStringFromHashTable|NSStringFromClass|NSStringFromPoint|NSSizeFromString|NSSetShowsServicesMenuItem|NSSetZoneName|NSSetUncaughtExceptionHandler|NSSetFocusRingStyle|NSSelectorFromString|NSSearchPathForDirectoriesInDomains|NSSwapBigShortToHost|NSSwapBigIntToHost|NSSwapBigDoubleToHost|NSSwapBigFloatToHost|NSSwapBigLongToHost|NSSwapBigLongLongToHost|NSSwapShort|NSSwapHostShortToBig|NSSwapHostShortToLittle|NSSwapHostIntToBig|NSSwapHostIntToLittle|NSSwapHostDoubleToBig|NSSwapHostDoubleToLittle|NSSwapHostFloatToBig|NSSwapHostFloatToLittle|NSSwapHostLongToBig|NSSwapHostLongToLittle|NSSwapHostLongLongToBig|NSSwapHostLongLongToLittle|NSSwapInt|NSSwapDouble|NSSwapFloat|NSSwapLittleShortToHost|NSSwapLittleIntToHost|NSSwapLittleDoubleToHost|NSSwapLittleFloatToHost|NSSwapLittleLongToHost|NSSwapLittleLongLongToHost|NSSwapLong|NSSwapLongLong|NSHighlightRect|NSHostByteOrder|NSHomeDirectory|NSHomeDirectoryForUser|NSHeight|NSHashRemove|NSHashGet|NSHashInsert|NSHashInsertIfAbsent|NSHashInsertKnownAbsent|NSHFSTypeCodeFromFileType|NSHFSTypeOfFile|NSNumberOfColorComponents|NSNextMapEnumeratorPair|NSNextHashEnumeratorItem|NSContainsRect|NSConvertGlyphsToPackedGlyphs|NSConvertSwappedDoubleToHost|NSConvertSwappedFloatToHost|NSConvertHostDoubleToSwapped|NSConvertHostFloatToSwapped|NSCountMapTable|NSCountHashTable|NSCountFrames|NSCountWindows|NSCountWindowsForContext|NSCopyMemoryPages|NSCopyMapTableWithZone|NSCopyBits|NSCopyHashTableWithZone|NSCopyObject|NSColorSpaceFromDepth|NSCompareMapTables|NSCompareHashTables|NSClassFromString|NSCreateMapTable|NSCreateMapTableWithZone|NSCreateHashTable|NSCreateHashTableWithZone|NSCreateZone|NSCreateFilenamePboardType|NSCreateFileContentsPboardType|NSTemporaryDirectory|NSIsControllerMarker|NSIsEmptyRect|NSIsFreedObject|NSInsetRect|NSIncrementExtraRefCount|NSIntersectsRect|NSIntersectionRect|NSIntersectionRange|NSInterfaceStyleForKey|NSIntegralRect|NSZoneRealloc|NSZoneMalloc|NSZoneName|NSZoneCalloc|NSZoneFromPointer|NSZoneFree|NSOpenStepRootDirectory|NSOffsetRect|NSDisableScreenUpdates|NSDivideRect|NSDottedFrameRect|NSDecimalRound|NSDecimalMultiply|NSDecimalString|NSDecimalSubtract|NSDecimalNormalize|NSDecimalCopy|NSDecimalCompact|NSDecimalCompare|NSDecimalIsNotANumber|NSDecimalDivide|NSDecimalPower|NSDecimalAdd|NSDecrementExtraRefCountWasZero|NSDefaultMallocZone|NSDeallocateMemoryPages|NSDeallocateObject|NSDrawGroove|NSDrawGrayBezel|NSDrawBitmap|NSDrawButton|NSDrawColorTiledRects|NSDrawTiledRects|NSDrawDarkBezel|NSDrawWhiteBezel|NSDrawWindowBackground|NSDrawLightBezel|NSUserName|NSUnionRect|NSUnionRange|NSUnregisterServicesProvider|NSUpdateDynamicServices|NSJavaBundleSetup|NSJavaBundleCleanup|NSJavaSetup|NSJavaSetupVirtualMachine|NSJavaNeedsToLoadClasses|NSJavaNeedsVirtualMachine|NSJavaClassesForBundle|NSJavaClassesFromPath|NSJavaObjectNamedInPath|NSJavaProvidesClasses|NSPointInRect|NSPointFromString|NSPerformService|NSPlanarFromDepth|NSPageSize|NSEndMapTableEnumeration|NSEndHashTableEnumeration|NSEnumerateMapTable|NSEnumerateHashTable|NSEnableScreenUpdates|NSEqualRects|NSEqualRanges|NSEqualSizes|NSEqualPoints|NSEraseRect|NSExtraRefCount|NSFileTypeForHFSTypeCode|NSFullUserName|NSFreeMapTable|NSFreeHashTable|NSFrameRect|NSFrameRectWithWidth|NSFrameRectWithWidthUsingOperation|NSFrameAddress|NSWindowList|NSWindowListForContext|NSWidth|NSLocationInRange|NSLog|NSLogv|NSLogPageSize|NSAccessibilityRoleDescription|NSAccessibilityRoleDescriptionForUIElement|NSAccessibilityRaiseBadArgumentException|NSAccessibilityUnignoredChildren|NSAccessibilityUnignoredChildrenForOnlyChild|NSAccessibilityUnignoredDescendant|NSAccessibilityUnignoredAncestor|NSAccessibilityPostNotification|NSAccessibilityActionDescription|NSApplicationMain|NSApplicationLoad|NSAvailableWindowDepths|NSAllMapTableValues|NSAllMapTableKeys|NSAllHashTableObjects|NSAllocateMemoryPages|NSAllocateCollectable|NSAllocateObject","support.class.cocoa.leopard":"NSRuleEditor|NSGarbageCollector|NSGradient|NSMapTable|NSHashTable|NSCondition|NSCollectionView|NSCollectionViewItem|NSToolbarItemGroup|NSTextInputClient|NSTreeNode|NSTrackingArea|NSInvocationOperation|NSOperation|NSOperationQueue|NSDictionaryController|NSDockTile|NSPointerFunctions|NSPointerArray|NSPathControl|NSPathControlDelegate|NSPathComponentCell|NSPathCell|NSPathCellDelegate|NSPrintPanelAccessorizing|NSPredicateEditor|NSPredicateEditorRowTemplate|NSViewController|NSFastEnumeration|NSAnimationContext|NSAnimatablePropertyContainer","support.class.cocoa":"NSRunLoop|NSRulerMarker|NSRulerView|NSResponder|NSRecursiveLock|NSRelativeSpecifier|NSRandomSpecifier|NSRangeSpecifier|NSGetCommand|NSGlyphGenerator|NSGlyphStorage|NSGlyphInfo|NSGraphicsContext|NSXMLNode|NSXMLDocument|NSXMLDTD|NSXMLDTDNode|NSXMLParser|NSXMLElement|NSMiddleSpecifier|NSMovie|NSMovieView|NSMoveCommand|NSMutableString|NSMutableSet|NSMutableCharacterSet|NSMutableCopying|NSMutableIndexSet|NSMutableDictionary|NSMutableData|NSMutableURLRequest|NSMutableParagraphStyle|NSMutableAttributedString|NSMutableArray|NSMessagePort|NSMessagePortNameServer|NSMenu|NSMenuItem|NSMenuItemCell|NSMenuView|NSMethodSignature|NSMetadataItem|NSMetadataQuery|NSMetadataQueryResultGroup|NSMetadataQueryAttributeValueTuple|NSMachBootstrapServer|NSMachPort|NSMatrix|NSBitmapImageRep|NSBox|NSBundle|NSButton|NSButtonCell|NSBezierPath|NSBrowser|NSBrowserCell|NSShadow|NSScanner|NSScriptSuiteRegistry|NSScriptCoercionHandler|NSScriptCommand|NSScriptCommandDescription|NSScriptClassDescription|NSScriptObjectSpecifier|NSScriptExecutionContext|NSScriptWhoseTest|NSScroller|NSScrollView|NSScreen|NSStepper|NSStepperCell|NSStatusBar|NSStatusItem|NSString|NSStream|NSSimpleHorizontalTypesetter|NSSimpleCString|NSSocketPort|NSSocketPortNameServer|NSSound|NSSortDescriptor|NSSpecifierTest|NSSpeechRecognizer|NSSpeechSynthesizer|NSSpellServer|NSSpellChecker|NSSplitView|NSSecureTextField|NSSecureTextFieldCell|NSSet|NSSetCommand|NSSearchField|NSSearchFieldCell|NSSerializer|NSSegmentedControl|NSSegmentedCell|NSSlider|NSSliderCell|NSSavePanel|NSHost|NSHTTPCookie|NSHTTPCookieStorage|NSHTTPURLResponse|NSHelpManager|NSNib|NSNibConnector|NSNibControlConnector|NSNibOutletConnector|NSNotification|NSNotificationCenter|NSNotificationQueue|NSNull|NSNumber|NSNumberFormatter|NSNetService|NSNetServiceBrowser|NSNameSpecifier|NSChangeSpelling|NSCharacterSet|NSConstantString|NSConnection|NSControl|NSController|NSConditionLock|NSCoding|NSCoder|NSCountCommand|NSCountedSet|NSCopying|NSColor|NSColorSpace|NSColorPickingCustom|NSColorPickingDefault|NSColorPicker|NSColorPanel|NSColorWell|NSColorList|NSCompoundPredicate|NSComparisonPredicate|NSComboBox|NSComboBoxCell|NSCustomImageRep|NSCursor|NSCIImageRep|NSCell|NSClipView|NSCloseCommand|NSCloneCommand|NSClassDescription|NSCachedImageRep|NSCachedURLResponse|NSCalendar|NSCalendarDate|NSCreateCommand|NSThread|NSTypesetter|NSTimeZone|NSTimer|NSToolbar|NSToolbarItem|NSToolbarItemValidations|NSTokenField|NSTokenFieldCell|NSText|NSTextBlock|NSTextStorage|NSTextContainer|NSTextTab|NSTextTable|NSTextTableBlock|NSTextInput|NSTextView|NSTextField|NSTextFieldCell|NSTextList|NSTextAttachment|NSTextAttachmentCell|NSTask|NSTableHeaderCell|NSTableHeaderView|NSTableColumn|NSTableView|NSTabView|NSTabViewItem|NSTreeController|NSIndexSpecifier|NSIndexSet|NSIndexPath|NSInputManager|NSInputStream|NSInputServiceProvider|NSInputServer|NSInputServerMouseTracker|NSInvocation|NSIgnoreMisspelledWords|NSImage|NSImageRep|NSImageCell|NSImageView|NSOutputStream|NSOutlineView|NSOpenGLContext|NSOpenGLPixelBuffer|NSOpenGLPixelFormat|NSOpenGLView|NSOpenPanel|NSObjCTypeSerializationCallBack|NSObject|NSObjectController|NSDistantObject|NSDistantObjectRequest|NSDistributedNotificationCenter|NSDistributedLock|NSDictionary|NSDirectoryEnumerator|NSDocument|NSDocumentController|NSDeserializer|NSDecimalNumber|NSDecimalNumberBehaviors|NSDecimalNumberHandler|NSDeleteCommand|NSDate|NSDateComponents|NSDatePicker|NSDatePickerCell|NSDateFormatter|NSData|NSDrawer|NSDraggingInfo|NSUserInterfaceValidations|NSUserDefaults|NSUserDefaultsController|NSURL|NSURLResponse|NSURLRequest|NSURLHandle|NSURLHandleClient|NSURLConnection|NSURLCache|NSURLCredential|NSURLCredentialStorage|NSURLDownload|NSURLDownloadDelegate|NSURLProtocol|NSURLProtocolClient|NSURLProtectionSpace|NSURLAuthenticationChallenge|NSURLAuthenticationChallengeSender|NSUniqueIDSpecifier|NSUndoManager|NSUnarchiver|NSPipe|NSPositionalSpecifier|NSPopUpButton|NSPopUpButtonCell|NSPort|NSPortMessage|NSPortNameServer|NSPortCoder|NSPICTImageRep|NSPersistentDocument|NSPDFImageRep|NSPasteboard|NSPanel|NSParagraphStyle|NSPageLayout|NSPrintInfo|NSPrinter|NSPrintOperation|NSPrintPanel|NSProcessInfo|NSProtocolChecker|NSPropertySpecifier|NSPropertyListSerialization|NSProgressIndicator|NSProxy|NSPredicate|NSEnumerator|NSEvent|NSEPSImageRep|NSError|NSException|NSExistsCommand|NSExpression|NSView|NSViewAnimation|NSValidatedToobarItem|NSValidatedUserInterfaceItem|NSValueTransformer|NSKeyedUnarchiver|NSKeyedArchiver|NSQuickDrawView|NSQuitCommand|NSFileManager|NSFileHandle|NSFileWrapper|NSFont|NSFontManager|NSFontDescriptor|NSFontPanel|NSFormCell|NSFormatter|NSWhoseSpecifier|NSWindow|NSWindowController|NSWorkspace|NSLock|NSLocking|NSLocale|NSLogicalTest|NSLevelIndicator|NSLevelIndicatorCell|NSLayoutManager|NSAssertionHandler|NSAnimation|NSActionCell|NSAttributedString|NSAutoreleasePool|NSATSTypesetter|NSApplication|NSAppleScript|NSAppleEventManager|NSAppleEventDescriptor|NSAffineTransform|NSAlert|NSArchiver|NSArray|NSArrayController","support.type.cocoa.leopard":"","support.class.quartz":"CISampler|CIContext|CIColor|CIImage|CIImageAccumulator|CIPlugIn|CIPlugInRegistration|CIVector|CIKernel|CIFilter|CIFilterGenerator|CIFilterShape|CARenderer|CAMediaTiming|CAMediaTimingFunction|CABasicAnimation|CAScrollLayer|CAConstraint|CAConstraintLayoutManager|CATiledLayer|CATextLayer|CATransition|CATransaction|CAOpenGLLayer|CAPropertyAnimation|CAKeyframeAnimation|CALayer|CAAnimation|CAAnimationGroup|CAAction","support.type.quartz":"CGFloat|CGPoint|CGSize|CGRect|CIFormat|CAConstraintAttribute","support.type.cocoa":"NSRect|NSRectEdge|NSRange|NSGlyph|NSGlyphRelation|NSGlyphLayoutMode|NSGradientType|NSModalSession|NSMatrixMode|NSMapEnumerator|NSBitmapImageFileType|NSBorderType|NSButtonType|NSBezelStyle|NSBackingStoreType|NSBrowserColumnResizingType|NSScrollerPart|NSScrollerArrow|NSScrollArrowPosition|NSScreenAuxiliaryOpaque|NSStringEncoding|NSSize|NSSocketNativeHandle|NSSelectionGranularity|NSSelectionDirection|NSSelectionAffinity|NSSwappedDouble|NSSwappedFloat|NSSaveOperationType|NSHashEnumerator|NSHandler|NSHandler2|NSControlSize|NSControlTint|NSCompositingOperation|NSComparisonResult|NSCellState|NSCellType|NSCellImagePosition|NSCellAttribute|NSThreadPrivate|NSTypesetterGlyphInfo|NSTickMarkPosition|NSTitlePosition|NSTimeInterval|NSToolTipTag|NSToolbarSizeMode|NSToolbarDisplayMode|NSTokenStyle|NSTIFFCompression|NSTextTabType|NSTextAlignment|NSTabState|NSTableViewDropOperation|NSTabViewType|NSTrackingRectTag|NSImageInterpolation|NSZone|NSOpenGLContextAuxiliary|NSOpenGLPixelFormatAuxiliary|NSDocumentChangeType|NSDatePickerElementFlags|NSDrawerState|NSDragOperation|NSUsableScrollerParts|NSPoint|NSPrintingPageOrder|NSProgressIndicatorStyle|NSProgressIndicatorThickness|NSProgressIndicatorThreadInfo|NSEventType|NSKeyValueObservingOptions|NSFontSymbolicTraits|NSFontTraitMask|NSFontAction|NSFocusRingType|NSWindowOrderingMode|NSWindowDepth|NSWorkspaceIconCreationOptions|NSWorkspaceLaunchOptions|NSWritingDirection|NSLineBreakMode|NSLayoutStatus|NSLayoutDirection|NSAnimationProgress|NSAnimationEffect|NSApplicationTerminateReply|NSApplicationDelegateReply|NSApplicationPrintReply|NSAppleEventManagerSuspensionID|NSAffineTransformStruct|NSAlertStyle","support.constant.cocoa":"NSRGBModeColorPanel|NSRGBColorSpaceModel|NSRightMouseDown|NSRightMouseDownMask|NSRightMouseDragged|NSRightMouseDraggedMask|NSRightMouseUp|NSRightMouseUpMask|NSRightTextMovement|NSRightTextAlignment|NSRightTabsBezelBorder|NSRightTabStopType|NSRightArrowFunctionKey|NSRoundRectBezelStyle|NSRoundBankers|NSRoundedBezelStyle|NSRoundedTokenStyle|NSRoundedDisclosureBezelStyle|NSRoundDown|NSRoundUp|NSRoundPlain|NSRoundLineCapStyle|NSRoundLineJoinStyle|NSRunStoppedResponse|NSRunContinuesResponse|NSRunAbortedResponse|NSResizableWindowMask|NSResetCursorRectsRunLoopOrdering|NSResetFunctionKey|NSRecessedBezelStyle|NSReceiversCantHandleCommandScriptError|NSReceiverEvaluationScriptError|NSReturnTextMovement|NSRedoFunctionKey|NSRequiredArgumentsMissingScriptError|NSRelevancyLevelIndicatorStyle|NSRelativeBefore|NSRelativeAfter|NSRegularSquareBezelStyle|NSRegularControlSize|NSRemoveTraitFontAction|NSRandomSubelement|NSRangeDateMode|NSRatingLevelIndicatorStyle|NSRadioModeMatrix|NSRadioButton|NSGIFFileType|NSGlyphBelow|NSGlyphInscribeBelow|NSGlyphInscribeBase|NSGlyphInscribeOverstrike|NSGlyphInscribeOverBelow|NSGlyphInscribeAbove|NSGlyphLayoutWithPrevious|NSGlyphLayoutAtAPoint|NSGlyphLayoutAgainstAPoint|NSGlyphAttributeBidiLevel|NSGlyphAttributeSoft|NSGlyphAttributeInscribe|NSGlyphAttributeElastic|NSGlyphAbove|NSGrooveBorder|NSGreaterThanComparison|NSGreaterThanOrEqualToComparison|NSGreaterThanOrEqualToPredicateOperatorType|NSGreaterThanPredicateOperatorType|NSGrayModeColorPanel|NSGrayColorSpaceModel|NSGradientNone|NSGradientConcaveStrong|NSGradientConcaveWeak|NSGradientConvexStrong|NSGradientConvexWeak|NSGraphiteControlTint|NSXMLNotationDeclarationKind|NSXMLNodeCompactEmptyElement|NSXMLNodeIsCDATA|NSXMLNodeOptionsNone|NSXMLNodeUseSingleQuotes|NSXMLNodeUseDoubleQuotes|NSXMLNodePreserveNamespaceOrder|NSXMLNodePreserveCharacterReferences|NSXMLNodePreserveCDATA|NSXMLNodePreserveDTD|NSXMLNodePreservePrefixes|NSXMLNodePreserveEntities|NSXMLNodePreserveEmptyElements|NSXMLNodePreserveQuotes|NSXMLNodePreserveWhitespace|NSXMLNodePreserveAttributeOrder|NSXMLNodePreserveAll|NSXMLNodePrettyPrint|NSXMLNodeExpandEmptyElement|NSXMLNamespaceKind|NSXMLCommentKind|NSXMLTextKind|NSXMLInvalidKind|NSXMLDocumentXMLKind|NSXMLDocumentXHTMLKind|NSXMLDocumentXInclude|NSXMLDocumentHTMLKind|NSXMLDocumentTidyXML|NSXMLDocumentTidyHTML|NSXMLDocumentTextKind|NSXMLDocumentIncludeContentTypeDeclaration|NSXMLDocumentValidate|NSXMLDocumentKind|NSXMLDTDKind|NSXMLParserGTRequiredError|NSXMLParserXMLDeclNotStartedError|NSXMLParserXMLDeclNotFinishedError|NSXMLParserMisplacedXMLDeclarationError|NSXMLParserMisplacedCDATAEndStringError|NSXMLParserMixedContentDeclNotStartedError|NSXMLParserMixedContentDeclNotFinishedError|NSXMLParserStandaloneValueError|NSXMLParserStringNotStartedError|NSXMLParserStringNotClosedError|NSXMLParserSpaceRequiredError|NSXMLParserSeparatorRequiredError|NSXMLParserNMTOKENRequiredError|NSXMLParserNotationNotStartedError|NSXMLParserNotationNotFinishedError|NSXMLParserNotWellBalancedError|NSXMLParserNoDTDError|NSXMLParserNamespaceDeclarationError|NSXMLParserNAMERequiredError|NSXMLParserCharacterRefInDTDError|NSXMLParserCharacterRefInPrologError|NSXMLParserCharacterRefInEpilogError|NSXMLParserCharacterRefAtEOFError|NSXMLParserConditionalSectionNotStartedError|NSXMLParserConditionalSectionNotFinishedError|NSXMLParserCommentNotFinishedError|NSXMLParserCommentContainsDoubleHyphenError|NSXMLParserCDATANotFinishedError|NSXMLParserTagNameMismatchError|NSXMLParserInternalError|NSXMLParserInvalidHexCharacterRefError|NSXMLParserInvalidCharacterRefError|NSXMLParserInvalidCharacterInEntityError|NSXMLParserInvalidCharacterError|NSXMLParserInvalidConditionalSectionError|NSXMLParserInvalidDecimalCharacterRefError|NSXMLParserInvalidURIError|NSXMLParserInvalidEncodingNameError|NSXMLParserInvalidEncodingError|NSXMLParserOutOfMemoryError|NSXMLParserDocumentStartError|NSXMLParserDelegateAbortedParseError|NSXMLParserDOCTYPEDeclNotFinishedError|NSXMLParserURIRequiredError|NSXMLParserURIFragmentError|NSXMLParserUndeclaredEntityError|NSXMLParserUnparsedEntityError|NSXMLParserUnknownEncodingError|NSXMLParserUnfinishedTagError|NSXMLParserPCDATARequiredError|NSXMLParserPublicIdentifierRequiredError|NSXMLParserParsedEntityRefMissingSemiError|NSXMLParserParsedEntityRefNoNameError|NSXMLParserParsedEntityRefInInternalSubsetError|NSXMLParserParsedEntityRefInInternalError|NSXMLParserParsedEntityRefInPrologError|NSXMLParserParsedEntityRefInEpilogError|NSXMLParserParsedEntityRefAtEOFError|NSXMLParserProcessingInstructionNotStartedError|NSXMLParserProcessingInstructionNotFinishedError|NSXMLParserPrematureDocumentEndError|NSXMLParserEncodingNotSupportedError|NSXMLParserEntityRefInDTDError|NSXMLParserEntityRefInPrologError|NSXMLParserEntityRefInEpilogError|NSXMLParserEntityReferenceMissingSemiError|NSXMLParserEntityReferenceWithoutNameError|NSXMLParserEntityRefLoopError|NSXMLParserEntityRefAtEOFError|NSXMLParserEntityBoundaryError|NSXMLParserEntityNotStartedError|NSXMLParserEntityNotFinishedError|NSXMLParserEntityIsParameterError|NSXMLParserEntityIsExternalError|NSXMLParserEntityValueRequiredError|NSXMLParserEqualExpectedError|NSXMLParserElementContentDeclNotStartedError|NSXMLParserElementContentDeclNotFinishedError|NSXMLParserExternalStandaloneEntityError|NSXMLParserExternalSubsetNotFinishedError|NSXMLParserExtraContentError|NSXMLParserEmptyDocumentError|NSXMLParserLiteralNotStartedError|NSXMLParserLiteralNotFinishedError|NSXMLParserLTRequiredError|NSXMLParserLTSlashRequiredError|NSXMLParserLessThanSymbolInAttributeError|NSXMLParserAttributeRedefinedError|NSXMLParserAttributeHasNoValueError|NSXMLParserAttributeNotStartedError|NSXMLParserAttributeNotFinishedError|NSXMLParserAttributeListNotStartedError|NSXMLParserAttributeListNotFinishedError|NSXMLProcessingInstructionKind|NSXMLEntityGeneralKind|NSXMLEntityDeclarationKind|NSXMLEntityUnparsedKind|NSXMLEntityParsedKind|NSXMLEntityParameterKind|NSXMLEntityPredefined|NSXMLElementDeclarationMixedKind|NSXMLElementDeclarationUndefinedKind|NSXMLElementDeclarationElementKind|NSXMLElementDeclarationEmptyKind|NSXMLElementDeclarationKind|NSXMLElementDeclarationAnyKind|NSXMLElementKind|NSXMLAttributeNMTokensKind|NSXMLAttributeNMTokenKind|NSXMLAttributeNotationKind|NSXMLAttributeCDATAKind|NSXMLAttributeIDRefsKind|NSXMLAttributeIDRefKind|NSXMLAttributeIDKind|NSXMLAttributeDeclarationKind|NSXMLAttributeEntityKind|NSXMLAttributeEntitiesKind|NSXMLAttributeEnumerationKind|NSXMLAttributeKind|NSMinXEdge|NSMiniaturizableWindowMask|NSMinYEdge|NSMinuteCalendarUnit|NSMiterLineJoinStyle|NSMiddleSubelement|NSMixedState|NSMonthCalendarUnit|NSModeSwitchFunctionKey|NSMouseMoved|NSMouseMovedMask|NSMouseEntered|NSMouseEnteredMask|NSMouseEventSubtype|NSMouseExited|NSMouseExitedMask|NSMoveToBezierPathElement|NSMomentaryChangeButton|NSMomentaryPushButton|NSMomentaryPushInButton|NSMomentaryLight|NSMomentaryLightButton|NSMenuFunctionKey|NSMacintoshInterfaceStyle|NSMacOSRomanStringEncoding|NSMatchesPredicateOperatorType|NSMappedRead|NSMaxXEdge|NSMaxYEdge|NSMACHOperatingSystem|NSBMPFileType|NSBottomTabsBezelBorder|NSBoldFontMask|NSBorderlessWindowMask|NSBoxSecondary|NSBoxSeparator|NSBoxOldStyle|NSBoxPrimary|NSButtLineCapStyle|NSBezelBorder|NSBevelLineJoinStyle|NSBelowBottom|NSBelowTop|NSBeginsWithComparison|NSBeginsWithPredicateOperatorType|NSBeginFunctionKey|NSBlueControlTint|NSBackspaceCharacter|NSBacktabTextMovement|NSBackingStoreRetained|NSBackingStoreBuffered|NSBackingStoreNonretained|NSBackTabCharacter|NSBackwardsSearch|NSBackgroundTab|NSBrowserNoColumnResizing|NSBrowserUserColumnResizing|NSBrowserAutoColumnResizing|NSBreakFunctionKey|NSShiftJISStringEncoding|NSShiftKeyMask|NSShowControlGlyphs|NSShowInvisibleGlyphs|NSShadowlessSquareBezelStyle|NSSysReqFunctionKey|NSSystemDomainMask|NSSystemDefined|NSSystemDefinedMask|NSSystemFunctionKey|NSSymbolStringEncoding|NSScannedOption|NSScaleNone|NSScaleToFit|NSScaleProportionally|NSScrollerNoPart|NSScrollerIncrementPage|NSScrollerIncrementLine|NSScrollerIncrementArrow|NSScrollerDecrementPage|NSScrollerDecrementLine|NSScrollerDecrementArrow|NSScrollerKnob|NSScrollerKnobSlot|NSScrollerArrowsMinEnd|NSScrollerArrowsMaxEnd|NSScrollerArrowsNone|NSScrollerArrowsDefaultSetting|NSScrollWheel|NSScrollWheelMask|NSScrollLockFunctionKey|NSScreenChangedEventType|NSStopFunctionKey|NSStringDrawingOneShot|NSStringDrawingDisableScreenFontSubstitution|NSStringDrawingUsesDeviceMetrics|NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin|NSStreamStatusReading|NSStreamStatusNotOpen|NSStreamStatusClosed|NSStreamStatusOpen|NSStreamStatusOpening|NSStreamStatusError|NSStreamStatusWriting|NSStreamStatusAtEnd|NSStreamEventHasBytesAvailable|NSStreamEventHasSpaceAvailable|NSStreamEventNone|NSStreamEventOpenCompleted|NSStreamEventEndEncountered|NSStreamEventErrorOccurred|NSSingleDateMode|NSSingleUnderlineStyle|NSSizeDownFontAction|NSSizeUpFontAction|NSSolarisOperatingSystem|NSSunOSOperatingSystem|NSSpecialPageOrder|NSSecondCalendarUnit|NSSelectByCharacter|NSSelectByParagraph|NSSelectByWord|NSSelectingNext|NSSelectingPrevious|NSSelectionAffinityDownstream|NSSelectionAffinityUpstream|NSSelectedTab|NSSelectFunctionKey|NSSegmentSwitchTrackingMomentary|NSSegmentSwitchTrackingSelectOne|NSSegmentSwitchTrackingSelectAny|NSSquareLineCapStyle|NSSwitchButton|NSSaveToOperation|NSSaveOptionsYes|NSSaveOptionsNo|NSSaveOptionsAsk|NSSaveOperation|NSSaveAsOperation|NSSmallSquareBezelStyle|NSSmallControlSize|NSSmallCapsFontMask|NSSmallIconButtonBezelStyle|NSHighlightModeMatrix|NSHSBModeColorPanel|NSHourMinuteSecondDatePickerElementFlag|NSHourMinuteDatePickerElementFlag|NSHourCalendarUnit|NSHorizontalRuler|NSHomeFunctionKey|NSHTTPCookieAcceptPolicyNever|NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain|NSHTTPCookieAcceptPolicyAlways|NSHelpButtonBezelStyle|NSHelpKeyMask|NSHelpFunctionKey|NSHeavierFontAction|NSHPUXOperatingSystem|NSYearMonthDayDatePickerElementFlag|NSYearMonthDatePickerElementFlag|NSYearCalendarUnit|NSNonStandardCharacterSetFontMask|NSNonZeroWindingRule|NSNonactivatingPanelMask|NSNonLossyASCIIStringEncoding|NSNoBorder|NSNotificationSuspensionBehaviorHold|NSNotificationSuspensionBehaviorCoalesce|NSNotificationSuspensionBehaviorDeliverImmediately|NSNotificationSuspensionBehaviorDrop|NSNotificationNoCoalescing|NSNotificationCoalescingOnSender|NSNotificationCoalescingOnName|NSNotificationDeliverImmediately|NSNotificationPostToAllSessions|NSNotPredicateType|NSNotEqualToPredicateOperatorType|NSNoScriptError|NSNoScrollerParts|NSNoSubelement|NSNoSpecifierError|NSNoCellMask|NSNoTitle|NSNoTopLevelContainersSpecifierError|NSNoTabsBezelBorder|NSNoTabsNoBorder|NSNoTabsLineBorder|NSNoInterfaceStyle|NSNoImage|NSNoUnderlineStyle|NSNoFontChangeAction|NSNullGlyph|NSNullCellType|NSNumericSearch|NSNumericPadKeyMask|NSNumberFormatterRoundHalfDown|NSNumberFormatterRoundHalfUp|NSNumberFormatterRoundHalfEven|NSNumberFormatterRoundCeiling|NSNumberFormatterRoundDown|NSNumberFormatterRoundUp|NSNumberFormatterRoundFloor|NSNumberFormatterBehavior10|NSNumberFormatterBehaviorDefault|NSNumberFormatterScientificStyle|NSNumberFormatterSpellOutStyle|NSNumberFormatterNoStyle|NSNumberFormatterCurrencyStyle|NSNumberFormatterDecimalStyle|NSNumberFormatterPercentStyle|NSNumberFormatterPadBeforeSuffix|NSNumberFormatterPadBeforePrefix|NSNumberFormatterPadAfterSuffix|NSNumberFormatterPadAfterPrefix|NSNetServicesBadArgumentError|NSNetServicesNotFoundError|NSNetServicesCollisionError|NSNetServicesCancelledError|NSNetServicesTimeoutError|NSNetServicesInvalidError|NSNetServicesUnknownError|NSNetServicesActivityInProgress|NSNetworkDomainMask|NSNewlineCharacter|NSNextStepInterfaceStyle|NSNextFunctionKey|NSNEXTSTEPStringEncoding|NSNativeShortGlyphPacking|NSNaturalTextAlignment|NSNarrowFontMask|NSChangeReadOtherContents|NSChangeGrayCell|NSChangeGrayCellMask|NSChangeBackgroundCell|NSChangeBackgroundCellMask|NSChangeCleared|NSChangeDone|NSChangeUndone|NSChangeAutosaved|NSCMYKModeColorPanel|NSCMYKColorSpaceModel|NSCircularBezelStyle|NSCircularSlider|NSConstantValueExpressionType|NSContinuousCapacityLevelIndicatorStyle|NSContentsCellMask|NSContainsComparison|NSContainerSpecifierError|NSControlGlyph|NSControlKeyMask|NSCondensedFontMask|NSColorPanelRGBModeMask|NSColorPanelGrayModeMask|NSColorPanelHSBModeMask|NSColorPanelCMYKModeMask|NSColorPanelColorListModeMask|NSColorPanelCustomPaletteModeMask|NSColorPanelCrayonModeMask|NSColorPanelWheelModeMask|NSColorPanelAllModesMask|NSColorListModeColorPanel|NSCoreServiceDirectory|NSCompositeXOR|NSCompositeSourceIn|NSCompositeSourceOut|NSCompositeSourceOver|NSCompositeSourceAtop|NSCompositeHighlight|NSCompositeCopy|NSCompositeClear|NSCompositeDestinationIn|NSCompositeDestinationOut|NSCompositeDestinationOver|NSCompositeDestinationAtop|NSCompositePlusDarker|NSCompositePlusLighter|NSCompressedFontMask|NSCommandKeyMask|NSCustomSelectorPredicateOperatorType|NSCustomPaletteModeColorPanel|NSCursorUpdate|NSCursorUpdateMask|NSCursorPointingDevice|NSCurveToBezierPathElement|NSCenterTextAlignment|NSCenterTabStopType|NSCellHighlighted|NSCellHasImageHorizontal|NSCellHasImageOnLeftOrBottom|NSCellHasOverlappingImage|NSCellChangesContents|NSCellIsBordered|NSCellIsInsetButton|NSCellDisabled|NSCellEditable|NSCellLightsByGray|NSCellLightsByBackground|NSCellLightsByContents|NSCellAllowsMixedState|NSClipPagination|NSClosePathBezierPathElement|NSClosableWindowMask|NSClockAndCalendarDatePickerStyle|NSClearControlTint|NSClearDisplayFunctionKey|NSClearLineFunctionKey|NSCaseInsensitiveSearch|NSCaseInsensitivePredicateOption|NSCannotCreateScriptCommandError|NSCancelButton|NSCancelTextMovement|NSCachesDirectory|NSCalculationNoError|NSCalculationOverflow|NSCalculationDivideByZero|NSCalculationUnderflow|NSCalculationLossOfPrecision|NSCarriageReturnCharacter|NSCriticalRequest|NSCriticalAlertStyle|NSCrayonModeColorPanel|NSThickSquareBezelStyle|NSThickerSquareBezelStyle|NSTypesetterBehavior|NSTypesetterHorizontalTabAction|NSTypesetterContainerBreakAction|NSTypesetterZeroAdvancementAction|NSTypesetterOriginalBehavior|NSTypesetterParagraphBreakAction|NSTypesetterWhitespaceAction|NSTypesetterLineBreakAction|NSTypesetterLatestBehavior|NSTickMarkRight|NSTickMarkBelow|NSTickMarkLeft|NSTickMarkAbove|NSTitledWindowMask|NSTimeZoneDatePickerElementFlag|NSToolbarItemVisibilityPriorityStandard|NSToolbarItemVisibilityPriorityHigh|NSToolbarItemVisibilityPriorityUser|NSToolbarItemVisibilityPriorityLow|NSTopTabsBezelBorder|NSToggleButton|NSTIFFCompressionNone|NSTIFFCompressionNEXT|NSTIFFCompressionCCITTFAX3|NSTIFFCompressionCCITTFAX4|NSTIFFCompressionOldJPEG|NSTIFFCompressionJPEG|NSTIFFCompressionPackBits|NSTIFFCompressionLZW|NSTIFFFileType|NSTerminateNow|NSTerminateCancel|NSTerminateLater|NSTextReadInapplicableDocumentTypeError|NSTextReadWriteErrorMinimum|NSTextReadWriteErrorMaximum|NSTextBlockMinimumHeight|NSTextBlockMinimumWidth|NSTextBlockMiddleAlignment|NSTextBlockMargin|NSTextBlockMaximumHeight|NSTextBlockMaximumWidth|NSTextBlockBottomAlignment|NSTextBlockBorder|NSTextBlockBaselineAlignment|NSTextBlockHeight|NSTextBlockTopAlignment|NSTextBlockPercentageValueType|NSTextBlockPadding|NSTextBlockWidth|NSTextBlockAbsoluteValueType|NSTextStorageEditedCharacters|NSTextStorageEditedAttributes|NSTextCellType|NSTexturedRoundedBezelStyle|NSTexturedBackgroundWindowMask|NSTexturedSquareBezelStyle|NSTextTableFixedLayoutAlgorithm|NSTextTableAutomaticLayoutAlgorithm|NSTextFieldRoundedBezel|NSTextFieldSquareBezel|NSTextFieldAndStepperDatePickerStyle|NSTextWriteInapplicableDocumentTypeError|NSTextListPrependEnclosingMarker|NSTwoByteGlyphPacking|NSTabCharacter|NSTabTextMovement|NSTabletPoint|NSTabletPointMask|NSTabletPointEventSubtype|NSTabletProximity|NSTabletProximityMask|NSTabletProximityEventSubtype|NSTableColumnNoResizing|NSTableColumnUserResizingMask|NSTableColumnAutoresizingMask|NSTableViewReverseSequentialColumnAutoresizingStyle|NSTableViewGridNone|NSTableViewSolidHorizontalGridLineMask|NSTableViewSolidVerticalGridLineMask|NSTableViewSequentialColumnAutoresizingStyle|NSTableViewNoColumnAutoresizing|NSTableViewUniformColumnAutoresizingStyle|NSTableViewFirstColumnOnlyAutoresizingStyle|NSTableViewLastColumnOnlyAutoresizingStyle|NSTrackModeMatrix|NSInsertCharFunctionKey|NSInsertFunctionKey|NSInsertLineFunctionKey|NSIntType|NSInternalScriptError|NSInternalSpecifierError|NSIndexSubelement|NSInvalidIndexSpecifierError|NSInformationalRequest|NSInformationalAlertStyle|NSInPredicateOperatorType|NSItalicFontMask|NSISO2022JPStringEncoding|NSISOLatin1StringEncoding|NSISOLatin2StringEncoding|NSIdentityMappingCharacterCollection|NSIllegalTextMovement|NSImageRight|NSImageRepMatchesDevice|NSImageRepLoadStatusReadingHeader|NSImageRepLoadStatusCompleted|NSImageRepLoadStatusInvalidData|NSImageRepLoadStatusUnexpectedEOF|NSImageRepLoadStatusUnknownType|NSImageRepLoadStatusWillNeedAllData|NSImageBelow|NSImageCellType|NSImageCacheBySize|NSImageCacheNever|NSImageCacheDefault|NSImageCacheAlways|NSImageInterpolationHigh|NSImageInterpolationNone|NSImageInterpolationDefault|NSImageInterpolationLow|NSImageOnly|NSImageOverlaps|NSImageFrameGroove|NSImageFrameGrayBezel|NSImageFrameButton|NSImageFrameNone|NSImageFramePhoto|NSImageLoadStatusReadError|NSImageLoadStatusCompleted|NSImageLoadStatusCancelled|NSImageLoadStatusInvalidData|NSImageLoadStatusUnexpectedEOF|NSImageLeft|NSImageAlignRight|NSImageAlignBottom|NSImageAlignBottomRight|NSImageAlignBottomLeft|NSImageAlignCenter|NSImageAlignTop|NSImageAlignTopRight|NSImageAlignTopLeft|NSImageAlignLeft|NSImageAbove|NSOnState|NSOneByteGlyphPacking|NSOnOffButton|NSOnlyScrollerArrows|NSOtherMouseDown|NSOtherMouseDownMask|NSOtherMouseDragged|NSOtherMouseDraggedMask|NSOtherMouseUp|NSOtherMouseUpMask|NSOtherTextMovement|NSOSF1OperatingSystem|NSOpenGLGOResetLibrary|NSOpenGLGORetainRenderers|NSOpenGLGOClearFormatCache|NSOpenGLGOFormatCacheSize|NSOpenGLPFARobust|NSOpenGLPFARendererID|NSOpenGLPFAMinimumPolicy|NSOpenGLPFAMultisample|NSOpenGLPFAMultiScreen|NSOpenGLPFAMPSafe|NSOpenGLPFAMaximumPolicy|NSOpenGLPFABackingStore|NSOpenGLPFAScreenMask|NSOpenGLPFAStencilSize|NSOpenGLPFAStereo|NSOpenGLPFASingleRenderer|NSOpenGLPFASupersample|NSOpenGLPFASamples|NSOpenGLPFASampleBuffers|NSOpenGLPFASampleAlpha|NSOpenGLPFANoRecovery|NSOpenGLPFAColorSize|NSOpenGLPFAColorFloat|NSOpenGLPFACompliant|NSOpenGLPFAClosestPolicy|NSOpenGLPFAOffScreen|NSOpenGLPFADoubleBuffer|NSOpenGLPFADepthSize|NSOpenGLPFAPixelBuffer|NSOpenGLPFAVirtualScreenCount|NSOpenGLPFAFullScreen|NSOpenGLPFAWindow|NSOpenGLPFAAccumSize|NSOpenGLPFAAccelerated|NSOpenGLPFAAuxBuffers|NSOpenGLPFAAuxDepthStencil|NSOpenGLPFAAlphaSize|NSOpenGLPFAAllRenderers|NSOpenStepUnicodeReservedBase|NSOperationNotSupportedForKeyScriptError|NSOperationNotSupportedForKeySpecifierError|NSOffState|NSOKButton|NSOrPredicateType|NSObjCBitfield|NSObjCBoolType|NSObjCShortType|NSObjCStringType|NSObjCStructType|NSObjCSelectorType|NSObjCNoType|NSObjCCharType|NSObjCObjectType|NSObjCDoubleType|NSObjCUnionType|NSObjCPointerType|NSObjCVoidType|NSObjCFloatType|NSObjCLongType|NSObjCLonglongType|NSObjCArrayType|NSDisclosureBezelStyle|NSDiscreteCapacityLevelIndicatorStyle|NSDisplayWindowRunLoopOrdering|NSDiacriticInsensitivePredicateOption|NSDirectSelection|NSDirectPredicateModifier|NSDocModalWindowMask|NSDocumentDirectory|NSDocumentationDirectory|NSDoubleType|NSDownTextMovement|NSDownArrowFunctionKey|NSDescendingPageOrder|NSDesktopDirectory|NSDecimalTabStopType|NSDeviceNColorSpaceModel|NSDeviceIndependentModifierFlagsMask|NSDeveloperDirectory|NSDeveloperApplicationDirectory|NSDefaultControlTint|NSDefaultTokenStyle|NSDeleteCharacter|NSDeleteCharFunctionKey|NSDeleteFunctionKey|NSDeleteLineFunctionKey|NSDemoApplicationDirectory|NSDayCalendarUnit|NSDateFormatterMediumStyle|NSDateFormatterBehavior10|NSDateFormatterBehaviorDefault|NSDateFormatterShortStyle|NSDateFormatterNoStyle|NSDateFormatterFullStyle|NSDateFormatterLongStyle|NSDrawerClosingState|NSDrawerClosedState|NSDrawerOpeningState|NSDrawerOpenState|NSDragOperationGeneric|NSDragOperationMove|NSDragOperationNone|NSDragOperationCopy|NSDragOperationDelete|NSDragOperationPrivate|NSDragOperationEvery|NSDragOperationLink|NSDragOperationAll|NSUserCancelledError|NSUserDirectory|NSUserDomainMask|NSUserFunctionKey|NSURLHandleNotLoaded|NSURLHandleLoadSucceeded|NSURLHandleLoadInProgress|NSURLHandleLoadFailed|NSURLCredentialPersistenceNone|NSURLCredentialPersistencePermanent|NSURLCredentialPersistenceForSession|NSUnscaledWindowMask|NSUncachedRead|NSUnicodeStringEncoding|NSUnitalicFontMask|NSUnifiedTitleAndToolbarWindowMask|NSUndoCloseGroupingRunLoopOrdering|NSUndoFunctionKey|NSUndefinedDateComponent|NSUnderlineStyleSingle|NSUnderlineStyleNone|NSUnderlineStyleThick|NSUnderlineStyleDouble|NSUnderlinePatternSolid|NSUnderlinePatternDot|NSUnderlinePatternDash|NSUnderlinePatternDashDot|NSUnderlinePatternDashDotDot|NSUnknownColorSpaceModel|NSUnknownPointingDevice|NSUnknownPageOrder|NSUnknownKeyScriptError|NSUnknownKeySpecifierError|NSUnboldFontMask|NSUtilityWindowMask|NSUTF8StringEncoding|NSUpdateWindowsRunLoopOrdering|NSUpTextMovement|NSUpArrowFunctionKey|NSJustifiedTextAlignment|NSJPEG2000FileType|NSJPEGFileType|NSJapaneseEUCGlyphPacking|NSJapaneseEUCStringEncoding|NSPostNow|NSPosterFontMask|NSPostWhenIdle|NSPostASAP|NSPositionReplace|NSPositionBefore|NSPositionBeginning|NSPositionEnd|NSPositionAfter|NSPositiveIntType|NSPositiveDoubleType|NSPositiveFloatType|NSPopUpNoArrow|NSPopUpArrowAtBottom|NSPopUpArrowAtCenter|NSPowerOffEventType|NSPortraitOrientation|NSPNGFileType|NSPushInCell|NSPushInCellMask|NSPushOnPushOffButton|NSPenTipMask|NSPenUpperSideMask|NSPenPointingDevice|NSPenLowerSideMask|NSPeriodic|NSPeriodicMask|NSPPScaleField|NSPPStatusTitle|NSPPStatusField|NSPPSaveButton|NSPPNoteTitle|NSPPNoteField|NSPPNameTitle|NSPPNameField|NSPPCopiesField|NSPPTitleField|NSPPImageButton|NSPPOptionsButton|NSPPPaperFeedButton|NSPPPageRangeTo|NSPPPageRangeFrom|NSPPPageChoiceMatrix|NSPPPreviewButton|NSPPLayoutButton|NSPlainTextTokenStyle|NSPauseFunctionKey|NSParagraphSeparatorCharacter|NSPageDownFunctionKey|NSPageUpFunctionKey|NSPrintingReplyLater|NSPrintingSuccess|NSPrintingCancelled|NSPrintingFailure|NSPrintScreenFunctionKey|NSPrinterTableNotFound|NSPrinterTableOK|NSPrinterTableError|NSPrintFunctionKey|NSPropertyListXMLFormat|NSPropertyListMutableContainers|NSPropertyListMutableContainersAndLeaves|NSPropertyListBinaryFormat|NSPropertyListImmutable|NSPropertyListOpenStepFormat|NSProprietaryStringEncoding|NSProgressIndicatorBarStyle|NSProgressIndicatorSpinningStyle|NSProgressIndicatorPreferredSmallThickness|NSProgressIndicatorPreferredThickness|NSProgressIndicatorPreferredLargeThickness|NSProgressIndicatorPreferredAquaThickness|NSPressedTab|NSPrevFunctionKey|NSPLHeightForm|NSPLCancelButton|NSPLTitleField|NSPLImageButton|NSPLOKButton|NSPLOrientationMatrix|NSPLUnitsButton|NSPLPaperNameButton|NSPLWidthForm|NSEnterCharacter|NSEndsWithComparison|NSEndsWithPredicateOperatorType|NSEndFunctionKey|NSEvenOddWindingRule|NSEverySubelement|NSEvaluatedObjectExpressionType|NSEqualToComparison|NSEqualToPredicateOperatorType|NSEraserPointingDevice|NSEraCalendarUnit|NSEraDatePickerElementFlag|NSExclude10|NSExcludeQuickDrawElementsIconCreationOption|NSExpandedFontMask|NSExecuteFunctionKey|NSViewMinXMargin|NSViewMinYMargin|NSViewMaxXMargin|NSViewMaxYMargin|NSViewHeightSizable|NSViewNotSizable|NSViewWidthSizable|NSViaPanelFontAction|NSVerticalRuler|NSValidationErrorMinimum|NSValidationErrorMaximum|NSVariableExpressionType|NSKeySpecifierEvaluationScriptError|NSKeyDown|NSKeyDownMask|NSKeyUp|NSKeyUpMask|NSKeyPathExpressionType|NSKeyValueMinusSetMutation|NSKeyValueSetSetMutation|NSKeyValueChangeReplacement|NSKeyValueChangeRemoval|NSKeyValueChangeSetting|NSKeyValueChangeInsertion|NSKeyValueIntersectSetMutation|NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld|NSKeyValueUnionSetMutation|NSKeyValueValidationError|NSQTMovieNormalPlayback|NSQTMovieLoopingBackAndForthPlayback|NSQTMovieLoopingPlayback|NSF11FunctionKey|NSF17FunctionKey|NSF12FunctionKey|NSF18FunctionKey|NSF13FunctionKey|NSF19FunctionKey|NSF14FunctionKey|NSF15FunctionKey|NSF1FunctionKey|NSF10FunctionKey|NSF16FunctionKey|NSF7FunctionKey|NSFindPanelActionReplace|NSFindPanelActionReplaceAndFind|NSFindPanelActionReplaceAll|NSFindPanelActionReplaceAllInSelection|NSFindPanelActionShowFindPanel|NSFindPanelActionSetFindString|NSFindPanelActionSelectAll|NSFindPanelActionSelectAllInSelection|NSFindPanelActionNext|NSFindPanelActionPrevious|NSFindFunctionKey|NSFitPagination|NSFileReadNoSuchFileError|NSFileReadNoPermissionError|NSFileReadCorruptFileError|NSFileReadInvalidFileNameError|NSFileReadInapplicableStringEncodingError|NSFileReadUnsupportedSchemeError|NSFileReadUnknownError|NSFileHandlingPanelCancelButton|NSFileHandlingPanelOKButton|NSFileNoSuchFileError|NSFileErrorMinimum|NSFileErrorMaximum|NSFileWriteNoPermissionError|NSFileWriteInvalidFileNameError|NSFileWriteInapplicableStringEncodingError|NSFileWriteOutOfSpaceError|NSFileWriteUnsupportedSchemeError|NSFileWriteUnknownError|NSFileLockingError|NSFixedPitchFontMask|NSF21FunctionKey|NSF27FunctionKey|NSF22FunctionKey|NSF28FunctionKey|NSF23FunctionKey|NSF29FunctionKey|NSF24FunctionKey|NSF25FunctionKey|NSF2FunctionKey|NSF20FunctionKey|NSF26FunctionKey|NSFontMonoSpaceTrait|NSFontModernSerifsClass|NSFontBoldTrait|NSFontSymbolicClass|NSFontScriptsClass|NSFontSlabSerifsClass|NSFontSansSerifClass|NSFontCondensedTrait|NSFontCollectionApplicationOnlyMask|NSFontClarendonSerifsClass|NSFontTransitionalSerifsClass|NSFontIntegerAdvancementsRenderingMode|NSFontItalicTrait|NSFontOldStyleSerifsClass|NSFontOrnamentalsClass|NSFontDefaultRenderingMode|NSFontUnknownClass|NSFontUIOptimizedTrait|NSFontPanelShadowEffectModeMask|NSFontPanelStandardModesMask|NSFontPanelStrikethroughEffectModeMask|NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask|NSFontPanelTextColorEffectModeMask|NSFontPanelDocumentColorEffectModeMask|NSFontPanelUnderlineEffectModeMask|NSFontPanelFaceModeMask|NSFontPanelAllModesMask|NSFontPanelAllEffectsModeMask|NSFontExpandedTrait|NSFontVerticalTrait|NSFontFamilyClassMask|NSFontFreeformSerifsClass|NSFontAntialiasedRenderingMode|NSFontAntialiasedIntegerAdvancementsRenderingMode|NSFocusRingBelow|NSFocusRingTypeNone|NSFocusRingTypeDefault|NSFocusRingTypeExterior|NSFocusRingOnly|NSFocusRingAbove|NSFourByteGlyphPacking|NSFormattingError|NSFormattingErrorMinimum|NSFormattingErrorMaximum|NSFormFeedCharacter|NSF8FunctionKey|NSFunctionExpressionType|NSFunctionKeyMask|NSF31FunctionKey|NSF32FunctionKey|NSF33FunctionKey|NSF34FunctionKey|NSF35FunctionKey|NSF3FunctionKey|NSF30FunctionKey|NSF9FunctionKey|NSF4FunctionKey|NSFPRevertButton|NSFPSizeTitle|NSFPSizeField|NSFPSetButton|NSFPCurrentField|NSFPPreviewButton|NSFPPreviewField|NSFloatingPointSamplesBitmapFormat|NSFloatType|NSFlagsChanged|NSFlagsChangedMask|NSFaxButton|NSF5FunctionKey|NSF6FunctionKey|NSWheelModeColorPanel|NSWindowsNTOperatingSystem|NSWindowsCP1251StringEncoding|NSWindowsCP1252StringEncoding|NSWindowsCP1253StringEncoding|NSWindowsCP1254StringEncoding|NSWindowsCP1250StringEncoding|NSWindows95InterfaceStyle|NSWindows95OperatingSystem|NSWindowMiniaturizeButton|NSWindowMovedEventType|NSWindowBelow|NSWindowCloseButton|NSWindowToolbarButton|NSWindowZoomButton|NSWindowOut|NSWindowDocumentIconButton|NSWindowExposedEventType|NSWindowAbove|NSWorkspaceLaunchNewInstance|NSWorkspaceLaunchInhibitingBackgroundOnly|NSWorkspaceLaunchDefault|NSWorkspaceLaunchPreferringClassic|NSWorkspaceLaunchWithoutActivation|NSWorkspaceLaunchWithoutAddingToRecents|NSWorkspaceLaunchAsync|NSWorkspaceLaunchAndHide|NSWorkspaceLaunchAndHideOthers|NSWorkspaceLaunchAndPrint|NSWorkspaceLaunchAllowingClassicStartup|NSWeekdayCalendarUnit|NSWeekdayOrdinalCalendarUnit|NSWeekCalendarUnit|NSWantsBidiLevels|NSWarningAlertStyle|NSWritingDirectionRightToLeft|NSWritingDirectionNatural|NSWritingDirectionLeftToRight|NSWrapCalendarComponents|NSListModeMatrix|NSLineMovesRight|NSLineMovesDown|NSLineMovesUp|NSLineMovesLeft|NSLineBorder|NSLineBreakByCharWrapping|NSLineBreakByClipping|NSLineBreakByTruncatingMiddle|NSLineBreakByTruncatingHead|NSLineBreakByTruncatingTail|NSLineBreakByWordWrapping|NSLineSeparatorCharacter|NSLineSweepRight|NSLineSweepDown|NSLineSweepUp|NSLineSweepLeft|NSLineToBezierPathElement|NSLineDoesntMove|NSLinearSlider|NSLiteralSearch|NSLikePredicateOperatorType|NSLighterFontAction|NSLibraryDirectory|NSLocalDomainMask|NSLessThanComparison|NSLessThanOrEqualToComparison|NSLessThanOrEqualToPredicateOperatorType|NSLessThanPredicateOperatorType|NSLeftMouseDown|NSLeftMouseDownMask|NSLeftMouseDragged|NSLeftMouseDraggedMask|NSLeftMouseUp|NSLeftMouseUpMask|NSLeftTextMovement|NSLeftTextAlignment|NSLeftTabsBezelBorder|NSLeftTabStopType|NSLeftArrowFunctionKey|NSLayoutRightToLeft|NSLayoutNotDone|NSLayoutCantFit|NSLayoutOutOfGlyphs|NSLayoutDone|NSLayoutLeftToRight|NSLandscapeOrientation|NSLABColorSpaceModel|NSAsciiWithDoubleByteEUCGlyphPacking|NSAscendingPageOrder|NSAnyType|NSAnyPredicateModifier|NSAnyEventMask|NSAnchoredSearch|NSAnimationBlocking|NSAnimationNonblocking|NSAnimationNonblockingThreaded|NSAnimationEffectDisappearingItemDefault|NSAnimationEffectPoof|NSAnimationEaseIn|NSAnimationEaseInOut|NSAnimationEaseOut|NSAnimationLinear|NSAndPredicateType|NSAtBottom|NSAttachmentCharacter|NSAtomicWrite|NSAtTop|NSASCIIStringEncoding|NSAdobeGB1CharacterCollection|NSAdobeCNS1CharacterCollection|NSAdobeJapan1CharacterCollection|NSAdobeJapan2CharacterCollection|NSAdobeKorea1CharacterCollection|NSAddTraitFontAction|NSAdminApplicationDirectory|NSAutosaveOperation|NSAutoPagination|NSApplicationSupportDirectory|NSApplicationDirectory|NSApplicationDefined|NSApplicationDefinedMask|NSApplicationDelegateReplySuccess|NSApplicationDelegateReplyCancel|NSApplicationDelegateReplyFailure|NSApplicationDeactivatedEventType|NSApplicationActivatedEventType|NSAppKitDefined|NSAppKitDefinedMask|NSAlternateKeyMask|NSAlphaShiftKeyMask|NSAlphaNonpremultipliedBitmapFormat|NSAlphaFirstBitmapFormat|NSAlertSecondButtonReturn|NSAlertThirdButtonReturn|NSAlertOtherReturn|NSAlertDefaultReturn|NSAlertErrorReturn|NSAlertFirstButtonReturn|NSAlertAlternateReturn|NSAllScrollerParts|NSAllDomainsMask|NSAllPredicateModifier|NSAllLibrariesDirectory|NSAllApplicationsDirectory|NSArgumentsWrongScriptError|NSArgumentEvaluationScriptError|NSAboveBottom|NSAboveTop|NSAWTEventType","support.constant.notification.cocoa.leopard":"NSMenuDidBeginTrackingNotification|NSViewDidUpdateTrackingAreasNotification","support.constant.notification.cocoa":"NSMenuDidRemoveItemNotification|NSMenuDidSendActionNotification|NSMenuDidChangeItemNotification|NSMenuDidEndTrackingNotification|NSMenuDidAddItemNotification|NSMenuWillSendActionNotification|NSSystemColorsDidChangeNotification|NSSplitViewDidResizeSubviewsNotification|NSSplitViewWillResizeSubviewsNotification|NSContextHelpModeDidDeactivateNotification|NSContextHelpModeDidActivateNotification|NSControlTintDidChangeNotification|NSControlTextDidBeginEditingNotification|NSControlTextDidChangeNotification|NSControlTextDidEndEditingNotification|NSColorPanelColorDidChangeNotification|NSColorListDidChangeNotification|NSComboBoxSelectionIsChangingNotification|NSComboBoxSelectionDidChangeNotification|NSComboBoxWillDismissNotification|NSComboBoxWillPopUpNotification|NSClassDescriptionNeededForClassNotification|NSToolbarDidRemoveItemNotification|NSToolbarWillAddItemNotification|NSTextStorageDidProcessEditingNotification|NSTextStorageWillProcessEditingNotification|NSTextDidBeginEditingNotification|NSTextDidChangeNotification|NSTextDidEndEditingNotification|NSTextViewDidChangeSelectionNotification|NSTextViewDidChangeTypingAttributesNotification|NSTextViewWillChangeNotifyingTextViewNotification|NSTableViewSelectionIsChangingNotification|NSTableViewSelectionDidChangeNotification|NSTableViewColumnDidResizeNotification|NSTableViewColumnDidMoveNotification|NSImageRepRegistryDidChangeNotification|NSOutlineViewSelectionIsChangingNotification|NSOutlineViewSelectionDidChangeNotification|NSOutlineViewColumnDidResizeNotification|NSOutlineViewColumnDidMoveNotification|NSOutlineViewItemDidCollapseNotification|NSOutlineViewItemDidExpandNotification|NSOutlineViewItemWillCollapseNotification|NSOutlineViewItemWillExpandNotification|NSDrawerDidCloseNotification|NSDrawerDidOpenNotification|NSDrawerWillCloseNotification|NSDrawerWillOpenNotification|NSPopUpButtonCellWillPopUpNotification|NSPopUpButtonWillPopUpNotification|NSViewGlobalFrameDidChangeNotification|NSViewBoundsDidChangeNotification|NSViewFocusDidChangeNotification|NSViewFrameDidChangeNotification|NSFontSetChangedNotification|NSWindowDidResizeNotification|NSWindowDidResignMainNotification|NSWindowDidResignKeyNotification|NSWindowDidMiniaturizeNotification|NSWindowDidMoveNotification|NSWindowDidBecomeMainNotification|NSWindowDidBecomeKeyNotification|NSWindowDidChangeScreenNotification|NSWindowDidChangeScreenProfileNotification|NSWindowDidDeminiaturizeNotification|NSWindowDidUpdateNotification|NSWindowDidEndSheetNotification|NSWindowDidExposeNotification|NSWindowWillMiniaturizeNotification|NSWindowWillMoveNotification|NSWindowWillBeginSheetNotification|NSWindowWillCloseNotification|NSWorkspaceSessionDidResignActiveNotification|NSWorkspaceSessionDidBecomeActiveNotification|NSWorkspaceDidMountNotification|NSWorkspaceDidTerminateApplicationNotification|NSWorkspaceDidUnmountNotification|NSWorkspaceDidPerformFileOperationNotification|NSWorkspaceDidWakeNotification|NSWorkspaceDidLaunchApplicationNotification|NSWorkspaceWillSleepNotification|NSWorkspaceWillUnmountNotification|NSWorkspaceWillPowerOffNotification|NSWorkspaceWillLaunchApplicationNotification|NSAntialiasThresholdChangedNotification|NSApplicationDidResignActiveNotification|NSApplicationDidBecomeActiveNotification|NSApplicationDidHideNotification|NSApplicationDidChangeScreenParametersNotification|NSApplicationDidUnhideNotification|NSApplicationDidUpdateNotification|NSApplicationDidFinishLaunchingNotification|NSApplicationWillResignActiveNotification|NSApplicationWillBecomeActiveNotification|NSApplicationWillHideNotification|NSApplicationWillTerminateNotification|NSApplicationWillUnhideNotification|NSApplicationWillUpdateNotification|NSApplicationWillFinishLaunchingNotification|NSAppleEventManagerWillProcessFirstEventNotification","support.constant.cocoa.leopard":"NSRuleEditorRowTypeSimple|NSRuleEditorRowTypeCompound|NSRuleEditorNestingModeSingle|NSRuleEditorNestingModeSimple|NSRuleEditorNestingModeCompound|NSRuleEditorNestingModeList|NSGradientDrawsBeforeStartingLocation|NSGradientDrawsAfterEndingLocation|NSMinusSetExpressionType|NSMachPortDeallocateReceiveRight|NSMachPortDeallocateSendRight|NSMachPortDeallocateNone|NSMapTableStrongMemory|NSMapTableCopyIn|NSMapTableZeroingWeakMemory|NSMapTableObjectPointerPersonality|NSBoxCustom|NSBundleExecutableArchitectureX86|NSBundleExecutableArchitectureI386|NSBundleExecutableArchitecturePPC|NSBundleExecutableArchitecturePPC64|NSBetweenPredicateOperatorType|NSBackgroundStyleRaised|NSBackgroundStyleDark|NSBackgroundStyleLight|NSBackgroundStyleLowered|NSStringDrawingTruncatesLastVisibleLine|NSStringEncodingConversionExternalRepresentation|NSStringEncodingConversionAllowLossy|NSSubqueryExpressionType|NSSpeechSentenceBoundary|NSSpeechImmediateBoundary|NSSpeechWordBoundary|NSSpellingStateGrammarFlag|NSSpellingStateSpellingFlag|NSSplitViewDividerStyleThin|NSSplitViewDividerStyleThick|NSServiceRequestTimedOutError|NSServiceMiscellaneousError|NSServiceMalformedServiceDictionaryError|NSServiceInvalidPasteboardDataError|NSServiceErrorMinimum|NSServiceErrorMaximum|NSServiceApplicationNotFoundError|NSServiceApplicationLaunchFailedError|NSSegmentStyleRoundRect|NSSegmentStyleRounded|NSSegmentStyleSmallSquare|NSSegmentStyleCapsule|NSSegmentStyleTexturedRounded|NSSegmentStyleTexturedSquare|NSSegmentStyleAutomatic|NSHUDWindowMask|NSHashTableStrongMemory|NSHashTableCopyIn|NSHashTableZeroingWeakMemory|NSHashTableObjectPointerPersonality|NSNoModeColorPanel|NSNetServiceNoAutoRename|NSChangeRedone|NSContainsPredicateOperatorType|NSColorRenderingIntentRelativeColorimetric|NSColorRenderingIntentSaturation|NSColorRenderingIntentDefault|NSColorRenderingIntentPerceptual|NSColorRenderingIntentAbsoluteColorimetric|NSCollectorDisabledOption|NSCellHitNone|NSCellHitContentArea|NSCellHitTrackableArea|NSCellHitEditableTextArea|NSTimeZoneNameStyleShortStandard|NSTimeZoneNameStyleShortDaylightSaving|NSTimeZoneNameStyleStandard|NSTimeZoneNameStyleDaylightSaving|NSTextFieldDatePickerStyle|NSTableViewSelectionHighlightStyleRegular|NSTableViewSelectionHighlightStyleSourceList|NSTrackingMouseMoved|NSTrackingMouseEnteredAndExited|NSTrackingCursorUpdate|NSTrackingInVisibleRect|NSTrackingEnabledDuringMouseDrag|NSTrackingAssumeInside|NSTrackingActiveInKeyWindow|NSTrackingActiveInActiveApp|NSTrackingActiveWhenFirstResponder|NSTrackingActiveAlways|NSIntersectSetExpressionType|NSIndexedColorSpaceModel|NSImageScaleNone|NSImageScaleProportionallyDown|NSImageScaleProportionallyUpOrDown|NSImageScaleAxesIndependently|NSOpenGLPFAAllowOfflineRenderers|NSOperationQueueDefaultMaxConcurrentOperationCount|NSOperationQueuePriorityHigh|NSOperationQueuePriorityNormal|NSOperationQueuePriorityVeryHigh|NSOperationQueuePriorityVeryLow|NSOperationQueuePriorityLow|NSDiacriticInsensitiveSearch|NSDownloadsDirectory|NSUnionSetExpressionType|NSUTF16BigEndianStringEncoding|NSUTF16StringEncoding|NSUTF16LittleEndianStringEncoding|NSUTF32BigEndianStringEncoding|NSUTF32StringEncoding|NSUTF32LittleEndianStringEncoding|NSPointerFunctionsMachVirtualMemory|NSPointerFunctionsMallocMemory|NSPointerFunctionsStrongMemory|NSPointerFunctionsStructPersonality|NSPointerFunctionsCStringPersonality|NSPointerFunctionsCopyIn|NSPointerFunctionsIntegerPersonality|NSPointerFunctionsZeroingWeakMemory|NSPointerFunctionsOpaqueMemory|NSPointerFunctionsOpaquePersonality|NSPointerFunctionsObjectPointerPersonality|NSPointerFunctionsObjectPersonality|NSPathStyleStandard|NSPathStyleNavigationBar|NSPathStylePopUp|NSPatternColorSpaceModel|NSPrintPanelShowsScaling|NSPrintPanelShowsCopies|NSPrintPanelShowsOrientation|NSPrintPanelShowsPaperSize|NSPrintPanelShowsPageRange|NSPrintPanelShowsPageSetupAccessory|NSPrintPanelShowsPreview|NSExecutableRuntimeMismatchError|NSExecutableNotLoadableError|NSExecutableErrorMinimum|NSExecutableErrorMaximum|NSExecutableLinkError|NSExecutableLoadError|NSExecutableArchitectureMismatchError|NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionPrior|NSFindPanelSubstringMatchTypeStartsWith|NSFindPanelSubstringMatchTypeContains|NSFindPanelSubstringMatchTypeEndsWith|NSFindPanelSubstringMatchTypeFullWord|NSFileReadTooLargeError|NSFileReadUnknownStringEncodingError|NSForcedOrderingSearch|NSWindowBackingLocationMainMemory|NSWindowBackingLocationDefault|NSWindowBackingLocationVideoMemory|NSWindowSharingReadOnly|NSWindowSharingReadWrite|NSWindowSharingNone|NSWindowCollectionBehaviorMoveToActiveSpace|NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorDefault|NSWidthInsensitiveSearch|NSAggregateExpressionType"},t="\\\\(?:[abefnrtv'\"?\\\\]|[0-3]\\d{1,2}|[4-7]\\d?|222|x[a-zA-Z0-9]+)",n=[{regex:"\\b_cmd\\b",token:"variable.other.selector.objc"},{regex:"\\b(?:self|super)\\b",token:"variable.language.objc"}],r=new s(e),o=r.getRules();this.$keywordList=r.$keywordList,this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:["storage.type.objc","punctuation.definition.storage.type.objc","entity.name.type.objc","text","entity.other.inherited-class.objc"],regex:"(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)"},{token:["storage.type.objc"],regex:"(@end)"},{token:["storage.type.objc","entity.name.type.objc","entity.other.inherited-class.objc"],regex:"(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?"},{token:"string.begin.objc",regex:'@"',next:"constant_NSString"},{token:"storage.type.objc",regex:"\\bid\\s*<",next:"protocol_list"},{token:"keyword.control.macro.objc",regex:"\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b"},{token:["punctuation.definition.keyword.objc","keyword.control.exception.objc"],regex:"(@)(try|catch|finally|throw)\\b"},{token:["punctuation.definition.keyword.objc","keyword.other.objc"],regex:"(@)(defs|encode)\\b"},{token:["storage.type.id.objc","text"],regex:"(\\bid\\b)(\\s|\\n)?"},{token:"storage.type.objc",regex:"\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b"},{token:["punctuation.definition.storage.type.objc","storage.type.objc"],regex:"(@)(class|protocol)\\b"},{token:["punctuation.definition.storage.type.objc","punctuation"],regex:"(@selector)(\\s*\\()",next:"selectors"},{token:["punctuation.definition.storage.modifier.objc","storage.modifier.objc"],regex:"(@)(synchronized|public|private|protected|package)\\b"},{token:"constant.language.objc",regex:"\\bYES|NO|Nil|nil\\b"},{token:"support.variable.foundation",regex:"\\bNSApp\\b"},{token:r.getKeywords(),regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.section.scope.begin.objc",regex:"\\[",next:"bracketed_content"},{token:"meta.function.objc",regex:"^(?:-|\\+)\\s*"}],constant_NSString:[{token:"constant.character.escape.objc",regex:t},{token:"invalid.illegal.unknown-escape.objc",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"punctuation.definition.string.end",regex:'"',next:"start"}],protocol_list:[{token:"punctuation.section.scope.end.objc",regex:">",next:"start"},{token:"support.other.protocol.objc",regex:"\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b"}],selectors:[{token:"support.function.any-method.name-of-parameter.objc",regex:"\\b(?:[a-zA-Z_:][\\w]*)+"},{token:"punctuation",regex:"\\)",next:"start"}],bracketed_content:[{token:"punctuation.section.scope.end.objc",regex:"]",next:"start"},{token:["support.function.any-method.objc"],regex:"(?:predicateWithFormat:| NSPredicate predicateWithFormat:)",next:"start"},{token:"support.function.any-method.objc",regex:"\\w+(?::|(?=]))",next:"start"}],bracketed_strings:[{token:"punctuation.section.scope.end.objc",regex:"]",next:"start"},{token:"keyword.operator.logical.predicate.cocoa",regex:"\\b(?:AND|OR|NOT|IN)\\b"},{token:["invalid.illegal.unknown-method.objc","punctuation.separator.arguments.objc"],regex:"\\b(\\w+)(:)"},{regex:"\\b(?:ALL|ANY|SOME|NONE)\\b",token:"constant.language.predicate.cocoa"},{regex:"\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",token:"constant.language.predicate.cocoa"},{regex:"\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",token:"keyword.operator.comparison.predicate.cocoa"},{regex:"\\bC(?:ASEINSENSITIVE|I)\\b",token:"keyword.other.modifier.predicate.cocoa"},{regex:"\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",token:"keyword.other.predicate.cocoa"},{regex:t,token:"constant.character.escape.objc"},{regex:"\\\\.",token:"invalid.illegal.unknown-escape.objc"},{token:"string",regex:'[^"\\\\]'},{token:"punctuation.definition.string.end.objc",regex:'"',next:"predicates"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{defaultToken:"comment"}],methods:[{token:"meta.function.objc",regex:"(?=\\{|#)|;",next:"start"}]};for(var u in o)this.$rules[u]?this.$rules[u].push&&this.$rules[u].push.apply(this.$rules[u],o[u]):this.$rules[u]=o[u];this.$rules.bracketed_content=this.$rules.bracketed_content.concat(this.$rules.start,n),this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.ObjectiveCHighlightRules=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./objectivec_highlight_rules").ObjectiveCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/objectivec"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/objectivec"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ocaml.js b/mixly/common/modules/web-modules/ace/mode-ocaml.js new file mode 100644 index 00000000..8d1bacd2 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ocaml.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|or|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with",t="true|false",n="abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|add_available_units|add_big_int|add_buffer|add_channel|add_char|add_initializer|add_int_big_int|add_interfaces|add_num|add_string|add_substitute|add_substring|alarm|allocated_bytes|allow_only|allow_unsafe_modules|always|append|appname_get|appname_set|approx_num_exp|approx_num_fix|arg|argv|arith_status|array|array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|chown|chr|chroot|classify_float|clear|clear_available_units|clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|close_out|close_out_noerr|close_process|close_process|close_process_full|close_process_in|close_process_out|close_subwindow|close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|combine|combine|command|compact|compare|compare_big_int|compare_num|complex32|complex64|concat|conj|connect|contains|contains_from|contents|copy|cos|cosh|count|count|counters|create|create_alarm|create_image|create_matrix|create_matrix|create_matrix|create_object|create_object_and_run_initializers|create_object_opt|create_process|create_process|create_process_env|create_process_env|create_table|current|current_dir_name|current_point|current_x|current_y|curveto|custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|error_message|escaped|establish_server|executable_name|execv|execve|execvp|execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|float|float32|float64|float_of_big_int|float_of_bits|float_of_int|float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|for_all|for_all2|force|force_newline|force_val|foreground|fork|format_of_string|formatter_of_buffer|formatter_of_out_channel|fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|genarray_of_array1|genarray_of_array2|genarray_of_array3|get|get_all_formatter_output_functions|get_approx_printing|get_copy|get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|get_formatter_output_functions|get_formatter_tag_functions|get_image|get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|global_replace|global_substitute|gmtime|green|grid|group_beginning|group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|marshal|match_beginning|match_end|matched_group|matched_string|max|max_array_length|max_big_int|max_elt|max_float|max_int|max_num|max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|output_char|output_string|output_value|over_max_boxes|pack|params|parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|power_big_int_positive_big_int|power_big_int_positive_int|power_int_positive_big_int|power_int_positive_int|power_num|pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|pp_get_all_formatter_output_functions|pp_get_ellipsis_text|pp_get_formatter_output_functions|pp_get_formatter_tag_functions|pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|pp_set_all_formatter_output_functions|pp_set_ellipsis_text|pp_set_formatter_out_channel|pp_set_formatter_output_functions|pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|print_bool|print_break|print_char|print_cut|print_endline|print_float|print_flush|print_if_newline|print_int|print_newline|print_space|print_stat|print_string|print_tab|print_tbreak|printf|prohibit|public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|regexp_string_case_fold|register|register_exception|rem|remember_mode|remove|remove_assoc|remove_assq|rename|replace|replace_first|replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|run_initializers|run_initializers_opt|scanf|search_backward|search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|set_all_formatter_output_functions|set_approx_printing|set_binary_mode_in|set_binary_mode_out|set_close_on_exec|set_close_on_exec|set_color|set_ellipsis_text|set_error_when_null_denominator|set_field|set_floating_precision|set_font|set_formatter_out_channel|set_formatter_output_functions|set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|str_formatter|string|string_after|string_before|string_match|string_of_big_int|string_of_bool|string_of_float|string_of_format|string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|sub_right|subset|subset|substitute_first|substring|succ|succ|succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|temp_file|text_size|time|time|time|timed_read|timed_write|times|times|tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|wait_timed_read|wait_timed_write|wait_write|waitpid|white|widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier"),i="(?:(?:[1-9]\\d*)|(?:0))",s="(?:0[oO]?[0-7]+)",o="(?:0[xX][\\dA-Fa-f]+)",u="(?:0[bB][01]+)",a="(?:"+i+"|"+s+"|"+o+"|"+u+")",f="(?:[eE][+-]?\\d+)",l="(?:\\.\\d+)",c="(?:\\d+)",h="(?:(?:"+c+"?"+l+")|(?:"+c+"\\.))",p="(?:(?:"+h+"|"+c+")"+f+")",d="(?:"+p+"|"+h+")";this.$rules={start:[{token:"comment",regex:"\\(\\*.*?\\*\\)\\s*?$"},{token:"comment",regex:"\\(\\*.*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"'.'"},{token:"string",regex:'"',next:"qstring"},{token:"constant.numeric",regex:"(?:"+d+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:a+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}],qstring:[{token:"string",regex:'"',next:"start"},{token:"string",regex:".+"}]}};r.inherits(s,i),t.OcamlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ocaml_highlight_rules").OcamlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour,this.$outdent=new o};r.inherits(a,i);var f=/(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;(function(){this.toggleCommentLines=function(e,t,n,r){var i,s,o=!0,a=/^\s*\(\*(.*)\*\)/;for(i=n;i<=r;i++)if(!a.test(t.getLine(i))){o=!1;break}var f=new u(0,0,0,0);for(i=n;i<=r;i++)s=t.getLine(i),f.start.row=i,f.end.row=i,f.end.column=s.length,t.replace(f,o?s.match(a)[1]:"(*"+s+"*)")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return(!i.length||i[i.length-1].type!=="comment")&&e==="start"&&f.test(t)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/ocaml"}).call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/ocaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-odin.js b/mixly/common/modules/web-modules/ace/mode-odin.js new file mode 100644 index 00000000..9d5263f9 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-odin.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/odin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=this&&this.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{while((t===void 0||t-->0)&&!(i=r.next()).done)s.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(o)throw o.error}}return s},i=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r>","&","&~","\\+","\\-","~","\\|",">","<","<=",">=","==","!="].concat(":").map(function(e){return e+"="}).concat("=",":=","::","->","\\^","&",":").join("|"),u="new|cap|copy|panic|len|make|delete|append|free",a="nil|true|false",f=this.createKeywordMapper({keyword:e,"constant.language":a,"support.function":u,"support.type":n},""),l="\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(/\\h/g,"[a-fA-F\\d]");this.$rules={start:[{token:"comment",regex:/\/\/.*$/},o.getStartRule("doc-start"),{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"string",regex:/"(?:[^"\\]|\\.)*?"/},{token:"string",regex:"`",next:"bqstring"},{token:"support.constant",regex:/#[a-z_]+/},{token:"constant.numeric",regex:"'(?:[^\\'\ud800-\udbff]|[\ud800-\udbff][\udc00-\udfff]|"+l.replace('"',"")+")'"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["entity.name.function","text","keyword.operator","text","keyword"],regex:"([a-zA-Z_$][a-zA-Z0-9_$]*)(\\s+)(::)(\\s+)(proc)\\b"},{token:function(e){return e[e.length-1]=="("?[{type:f(e.slice(0,-1))||"support.function",value:e.slice(0,-1)},{type:"paren.lparen",value:e.slice(-1)}]:f(e)||"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?"},{token:"keyword.operator",regex:s},{token:"punctuation.operator",regex:"\\?|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],bqstring:[{token:"string",regex:"`",next:"start"},{defaultToken:"string"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};s.inherits(a,u),t.OdinHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/odin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/odin_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./odin_highlight_rules").OdinHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/odin"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/odin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-partiql.js b/mixly/common/modules/web-modules/ace/mode-partiql.js new file mode 100644 index 00000000..d6db3a27 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-partiql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="TRUE|FALSE",t=e,n="NULL.NULL|NULL.BOOL|NULL.INT|NULL.FLOAT|NULL.DECIMAL|NULL.TIMESTAMP|NULL.STRING|NULL.SYMBOL|NULL.BLOB|NULL.CLOB|NULL.STRUCT|NULL.LIST|NULL.SEXP|NULL",r=n,i=this.createKeywordMapper({"constant.language.bool.ion":t,"constant.language.null.ion":r},"constant.other.symbol.identifier.ion",!0),s={token:i,regex:"\\b\\w+(?:\\.\\w+)?\\b"};this.$rules={start:[{include:"value"}],value:[{include:"whitespace"},{include:"comment"},{include:"annotation"},{include:"string"},{include:"number"},{include:"keywords"},{include:"symbol"},{include:"clob"},{include:"blob"},{include:"struct"},{include:"list"},{include:"sexp"}],sexp:[{token:"punctuation.definition.sexp.begin.ion",regex:"\\(",push:[{token:"punctuation.definition.sexp.end.ion",regex:"\\)",next:"pop"},{include:"comment"},{include:"value"},{token:"storage.type.symbol.operator.ion",regex:"[\\!\\#\\%\\&\\*\\+\\-\\./\\;\\<\\=\\>\\?\\@\\^\\`\\|\\~]+"}]}],comment:[{token:"comment.line.ion",regex:"//[^\\n]*"},{token:"comment.block.ion",regex:"/\\*",push:[{token:"comment.block.ion",regex:"[*]/",next:"pop"},{token:"comment.block.ion",regex:"[^*/]+"},{token:"comment.block.ion",regex:"[*/]+"}]}],list:[{token:"punctuation.definition.list.begin.ion",regex:"\\[",push:[{token:"punctuation.definition.list.end.ion",regex:"\\]",next:"pop"},{include:"comment"},{include:"value"},{token:"punctuation.definition.list.separator.ion",regex:","}]}],struct:[{token:"punctuation.definition.struct.begin.ion",regex:"\\{",push:[{token:"punctuation.definition.struct.end.ion",regex:"\\}",next:"pop"},{include:"comment"},{include:"value"},{token:"punctuation.definition.struct.separator.ion",regex:",|:"}]}],blob:[{token:["punctuation.definition.blob.begin.ion","string.other.blob.ion","punctuation.definition.blob.end.ion"],regex:'(\\{\\{)([^"]*)(\\}\\})'}],clob:[{token:["punctuation.definition.clob.begin.ion","string.other.clob.ion","punctuation.definition.clob.end.ion"],regex:'(\\{\\{)("[^"]*")(\\}\\})'}],symbol:[{token:"storage.type.symbol.quoted.ion",regex:"(['])((?:(?:\\\\')|(?:[^']))*?)(['])"},{token:"storage.type.symbol.identifier.ion",regex:"[\\$_a-zA-Z][\\$_a-zA-Z0-9]*"}],number:[{token:"constant.numeric.timestamp.ion",regex:"\\d{4}(?:-\\d{2})?(?:-\\d{2})?T(?:\\d{2}:\\d{2})(?::\\d{2})?(?:\\.\\d+)?(?:Z|[-+]\\d{2}:\\d{2})?"},{token:"constant.numeric.timestamp.ion",regex:"\\d{4}-\\d{2}-\\d{2}T?"},{token:"constant.numeric.integer.binary.ion",regex:"-?0[bB][01](?:_?[01])*"},{token:"constant.numeric.integer.hex.ion",regex:"-?0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*"},{token:"constant.numeric.float.ion",regex:"-?(?:0|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?(?:[eE][+-]?\\d+)"},{token:"constant.numeric.float.ion",regex:"(?:[-+]inf)|(?:nan)"},{token:"constant.numeric.decimal.ion",regex:"-?(?:0|[1-9](?:_?\\d)*)(?:(?:(?:\\.(?:\\d(?:_?\\d)*)?)(?:[dD][+-]?\\d+)|\\.(?:\\d(?:_?\\d)*)?)|(?:[dD][+-]?\\d+))"},{token:"constant.numeric.integer.ion",regex:"-?(?:0|[1-9](?:_?\\d)*)"}],string:[{token:["punctuation.definition.string.begin.ion","string.quoted.double.ion","punctuation.definition.string.end.ion"],regex:'(["])((?:(?:\\\\")|(?:[^"]))*?)(["])'},{token:"punctuation.definition.string.begin.ion",regex:"'{3}",push:[{token:"punctuation.definition.string.end.ion",regex:"'{3}",next:"pop"},{token:"string.quoted.triple.ion",regex:"(?:\\\\'|[^'])+"},{token:"string.quoted.triple.ion",regex:"'"}]}],annotation:[{token:["variable.language.annotation.ion","punctuation.definition.annotation.ion"],regex:/('(?:[^'\\]|\\.)*')\s*(::)/},{token:["variable.language.annotation.ion","punctuation.definition.annotation.ion"],regex:"([\\$_a-zA-Z][\\$_a-zA-Z0-9]*)\\s*(::)"}],whitespace:[{token:"text.ion",regex:"\\s+"}]},this.$rules.keywords=[s],this.normalizeRules()};r.inherits(s,i),t.IonHighlightRules=s}),ace.define("ace/mode/partiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ion_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./ion_highlight_rules").IonHighlightRules,o=function(){var e="MISSING",t="FALSE|NULL|TRUE",n=e+"|"+t,r="PIVOT|UNPIVOT|LIMIT|TUPLE|REMOVE|INDEX|CONFLICT|DO|NOTHING|RETURNING|MODIFIED|NEW|OLD|LET",i="ABSOLUTE|ACTION|ADD|ALL|ALLOCATE|ALTER|AND|ANY|ARE|AS|ASC|ASSERTION|AT|AUTHORIZATION|BEGIN|BETWEEN|BIT_LENGTH|BY|CASCADE|CASCADED|CASE|CATALOG|CHAR|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CLOSE|COLLATE|COLLATION|COLUMN|COMMIT|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONTINUE|CONVERT|CORRESPONDING|CREATE|CROSS|CURRENT|CURSOR|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DESC|DESCRIBE|DESCRIPTOR|DIAGNOSTICS|DISCONNECT|DISTINCT|DOMAIN|DROP|ELSE|END|END-EXEC|ESCAPE|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXTERNAL|EXTRACT|FETCH|FIRST|FOR|FOREIGN|FOUND|FROM|FULL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|IDENTITY|IMMEDIATE|IN|INDICATOR|INITIALLY|INNER|INPUT|INSENSITIVE|INSERT|INTERSECT|INTERVAL|INTO|IS|ISOLATION|JOIN|KEY|LANGUAGE|LAST|LEFT|LEVEL|LIKE|LOCAL|LOWER|MATCH|MODULE|NAMES|NATIONAL|NATURAL|NCHAR|NEXT|NO|NOT|OCTET_LENGTH|OF|ON|ONLY|OPEN|OPTION|OR|ORDER|OUTER|OUTPUT|OVERLAPS|PAD|PARTIAL|POSITION|PRECISION|PREPARE|PRESERVE|PRIMARY|PRIOR|PRIVILEGES|PROCEDURE|PUBLIC|READ|REAL|REFERENCES|RELATIVE|RESTRICT|REVOKE|RIGHT|ROLLBACK|ROWS|SCHEMA|SCROLL|SECTION|SELECT|SESSION|SET|SIZE|SOME|SPACE|SQL|SQLCODE|SQLERROR|SQLSTATE|TABLE|TEMPORARY|THEN|TIME|TO|TRANSACTION|TRANSLATE|TRANSLATION|UNION|UNIQUE|UNKNOWN|UPDATE|UPPER|USAGE|USER|USING|VALUE|VALUES|VIEW|WHEN|WHENEVER|WHERE|WITH|WORK|WRITE|ZONE",o=r+"|"+i,u="BOOL|BOOLEAN|STRING|SYMBOL|CLOB|BLOB|STRUCT|LIST|SEXP|BAG",a="CHARACTER|DATE|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|NUMERIC|SMALLINT|TIMESTAMP|VARCHAR|VARYING",f=u+"|"+a,l="AVG|COUNT|MAX|MIN|SUM",c=l,h="CAST|COALESCE|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|EXISTS|DATE_ADD|DATE_DIFF|NULLIF|SESSION_USER|SUBSTRING|SYSTEM_USER|TRIM",p=h,d=this.createKeywordMapper({"constant.language.partiql":n,"keyword.other.partiql":o,"storage.type.partiql":f,"support.function.aggregation.partiql":c,"support.function.partiql":p},"variable.language.identifier.partiql",!0),v={token:d,regex:"\\b\\w+\\b"};this.$rules={start:[{include:"whitespace"},{include:"comment"},{include:"value"}],value:[{include:"whitespace"},{include:"comment"},{include:"tuple_value"},{include:"collection_value"},{include:"scalar_value"}],scalar_value:[{include:"string"},{include:"number"},{include:"keywords"},{include:"identifier"},{include:"embed-ion"},{include:"operator"},{include:"punctuation"}],punctuation:[{token:"punctuation.partiql",regex:"[;:()\\[\\]\\{\\},.]"}],operator:[{token:"keyword.operator.partiql",regex:"[+*/<>=~!@#%&|?^-]+"}],identifier:[{token:"variable.language.identifier.quoted.partiql",regex:'(["])((?:(?:\\\\.)|(?:[^"\\\\]))*?)(["])'},{token:"variable.language.identifier.at.partiql",regex:"@\\w+"},{token:"variable.language.identifier.partiql",regex:"\\b\\w+(?:\\.\\w+)?\\b"}],number:[{token:"constant.numeric.partiql",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}],string:[{token:["punctuation.definition.string.begin.partiql","string.quoted.single.partiql","punctuation.definition.string.end.partiql"],regex:"(['])((?:(?:\\\\.)|(?:[^'\\\\]))*?)(['])"}],collection_value:[{include:"array_value"},{include:"bag_value"}],bag_value:[{token:"punctuation.definition.bag.begin.partiql",regex:"<<",push:[{token:"punctuation.definition.bag.end.partiql",regex:">>",next:"pop"},{include:"comment"},{token:"punctuation.definition.bag.separator.partiql",regex:","},{include:"value"}]}],comment:[{token:"comment.line.partiql",regex:"--.*"},{token:"comment.block.partiql",regex:"/\\*",push:"comment__1"}],comment__1:[{token:"comment.block.partiql",regex:"[*]/",next:"pop"},{token:"comment.block.partiql",regex:"[^*/]+"},{token:"comment.block.partiql",regex:"/\\*",push:"comment__1"},{token:"comment.block.partiql",regex:"[*/]+"}],array_value:[{token:"punctuation.definition.array.begin.partiql",regex:"\\[",push:[{token:"punctuation.definition.array.end.partiql",regex:"\\]",next:"pop"},{include:"comment"},{token:"punctuation.definition.array.separator.partiql",regex:","},{include:"value"}]}],tuple_value:[{token:"punctuation.definition.tuple.begin.partiql",regex:"\\{",push:[{token:"punctuation.definition.tuple.end.partiql",regex:"\\}",next:"pop"},{include:"comment"},{token:"punctuation.definition.tuple.separator.partiql",regex:",|:"},{include:"value"}]}],whitespace:[{token:"text.partiql",regex:"\\s+"}]},this.$rules.keywords=[v],this.$rules["embed-ion"]=[{token:"punctuation.definition.ion.begin.partiql",regex:"`",next:"ion-start"}],this.embedRules(s,"ion-",[{token:"punctuation.definition.ion.end.partiql",regex:"`",next:"start"}]),this.normalizeRules()};r.inherits(o,i),t.PartiqlHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/partiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/partiql_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./partiql_highlight_rules").PartiqlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/",nestable:!0},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/partiql"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/partiql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-pascal.js b/mixly/common/modules/web-modules/ace/mode-pascal.js new file mode 100644 index 00000000..bb45edd9 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-pascal.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"keyword.control":"absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor"},"identifier",!0);this.$rules={start:[{caseInsensitive:!0,token:["variable","text","storage.type.prototype","entity.name.function.prototype"],regex:"\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))"},{caseInsensitive:!0,token:["variable","text","storage.type.function","entity.name.function"],regex:"\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?"},{caseInsensitive:!0,token:e,regex:/\b[a-z_]+\b/},{token:"constant.numeric",regex:"\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"punctuation.definition.comment",regex:"--.*$"},{token:"punctuation.definition.comment",regex:"//.*$"},{token:"punctuation.definition.comment",regex:"\\(\\*",push:[{token:"punctuation.definition.comment",regex:"\\*\\)",next:"pop"},{defaultToken:"comment.block.one"}]},{token:"punctuation.definition.comment",regex:"\\{",push:[{token:"punctuation.definition.comment",regex:"\\}",next:"pop"},{defaultToken:"comment.block.two"}]},{token:"punctuation.definition.string.begin",regex:'"',push:[{token:"constant.character.escape",regex:"\\\\."},{token:"punctuation.definition.string.end",regex:'"',next:"pop"},{defaultToken:"string.quoted.double"}]},{token:"punctuation.definition.string.begin",regex:"'",push:[{token:"constant.character.escape.apostrophe",regex:"''"},{token:"punctuation.definition.string.end",regex:"'",next:"pop"},{defaultToken:"string.quoted.single"}]},{token:"keyword.operator",regex:"[+\\-;,/*%]|:=|="}]},this.normalizeRules()};r.inherits(s,i),t.PascalHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"comment",regex:"#.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],block_comment:[{token:"comment.doc",regex:"^=cut\\b",next:"start"},{defaultToken:"comment.doc"}]}};r.inherits(s,i),t.PerlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./perl_highlight_rules").PerlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u({start:"^=(begin|item)\\b",end:"^=(cut)\\b"}),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment=[{start:"=begin",end:"=cut",lineStartOnly:!0},{start:"=item",end:"=cut",lineStartOnly:!0}],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/perl",this.snippetFileId="ace/snippets/perl"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/perl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-pgsql.js b/mixly/common/modules/web-modules/ace/mode-pgsql.js new file mode 100644 index 00000000..f6a97e32 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-pgsql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars",t="ARGV|ENV|INC|SIG",n="getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do",r=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment.doc",regex:"^=(?:begin|item)\\b",next:"block_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"comment",regex:"#.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],block_comment:[{token:"comment.doc",regex:"^=cut\\b",next:"start"},{defaultToken:"comment.doc"}]}};r.inherits(s,i),t.PerlHighlightRules=s}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./perl_highlight_rules").PerlHighlightRules,a=e("./python_highlight_rules").PythonHighlightRules,f=e("./json_highlight_rules").JsonHighlightRules,l=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|cross|cstring|csv|current|current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone|ties",t="RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|json_object_field|json_object_field_text|json_object_keys|json_out|json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|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_available_extension_versions|pg_available_extensions|pg_backend_pid|pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|pg_extension_update_paths|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_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|pg_stat_get_function_calls|pg_stat_get_function_self_time|pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|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_xlog_location_diff|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|range_after|range_before|range_cmp|range_contained_by|range_contains|range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists",n=this.createKeywordMapper({"support.function":t,keyword:e},"identifier",!0),r=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}];this.$rules={start:[{token:"comment",regex:"--.*$"},s.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$perl\\$",next:"perl-start"},{token:"string",regex:"\\$python\\$",next:"python-start"},{token:"string",regex:"\\$json\\$",next:"json-start"},{token:"string",regex:"\\$(js|javascript)\\$",next:"javascript-start"},{token:"string",regex:"\\$\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(r),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentDollarSql"},{token:["keyword","statementEnd","text","string"],regex:"(^|END)(;)?(\\s*)(\\$\\$)",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(r),comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],commentStatement:[{token:"comment",regex:"\\*\\/",next:"statement"},{defaultToken:"comment"}],commentDollarSql:[{token:"comment",regex:"\\*\\/",next:"dollarSql"},{defaultToken:"comment"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",regex:".+"}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.embedRules(u,"perl-",[{token:"string",regex:"\\$perl\\$",next:"statement"}]),this.embedRules(a,"python-",[{token:"string",regex:"\\$python\\$",next:"statement"}]),this.embedRules(f,"json-",[{token:"string",regex:"\\$json\\$",next:"statement"}]),this.embedRules(l,"javascript-",[{token:"string",regex:"\\$(js|javascript)\\$",next:"statement"}])};r.inherits(c,o),t.PgsqlHighlightRules=c}),ace.define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./pgsql_highlight_rules").PgsqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){return e=="start"||e=="keyword.statementEnd"?"":this.$getIndent(t)},this.$id="ace/mode/pgsql"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/pgsql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-php.js b/mixly/common/modules/web-modules/ace/mode-php.js new file mode 100644 index 00000000..f4df91b2 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-php.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(){var e=s,t=i.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_column|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|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_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|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_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")),n=i.arrayToMap("abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|finally|for|foreach|function|global|goto|if|implements|instanceof|insteadof|interface|namespace|new|or|private|protected|public|static|switch|throw|trait|try|use|var|while|xor|yield".split("|")),r=i.arrayToMap("__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),o=i.arrayToMap("true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__".split("|")),u=i.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),a=i.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),f=i.arrayToMap("cfunction|old_function".split("|")),l=i.arrayToMap([]);this.$rules={start:[{token:"comment",regex:/(?:#|\/\/)(?:[^?]|\?[^>])*/},e.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"'",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},{token:["keyword","text","support.class"],regex:"\\b(new)(\\s+)(\\w+)"},{token:["support.class","keyword.operator"],regex:"\\b(\\w+)(::)"},{token:"constant.language",regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},{token:function(e){return n.hasOwnProperty(e)?"keyword":o.hasOwnProperty(e)?"constant.language":u.hasOwnProperty(e)?"variable.language":l.hasOwnProperty(e)?"invalid.illegal":t.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":e.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)?"variable":"identifier"},regex:/[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{onMatch:function(e,t,n){e=e.substr(3);if(e[0]=="'"||e[0]=='"')e=e.slice(1,-1);return n.unshift(this.next,e),"markup.list"},regex:/<<<(?:\w+|'\w+'|"\w+")$/,next:"heredoc"},{token:"keyword.operator",regex:"::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|\\.=|=|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:/[,;]/},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],heredoc:[{onMatch:function(e,t,n){return n[1]!=e?(this.next="","string"):(n.shift(),n.shift(),this.next=this.nextState,"markup.list")},regex:"^\\w+(?=;?$)",nextState:"start"},{token:"string",regex:".*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"constant.language.escape",regex:'\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},{token:"variable",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable",regex:/\$\{[^"\}]+\}?/},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}]},this.embedRules(s,"doc-",[s.getEndRule("start")])};r.inherits(a,o);var f=function(){u.call(this);var e=[{token:"support.php_tag",regex:"<\\?(?:php|=)?",push:"php-start"}],t=[{token:"support.php_tag",regex:"\\?>",next:"pop"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(a,"php-",t,["start"]),this.normalizeRules()};r.inherits(f,u),t.PhpHighlightRules=f,t.PhpLangHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/php_completions",["require","exports","module"],function(e,t,n){"use strict";function s(e,t){return e.type.lastIndexOf(t)>-1}var r={abs:["int abs(int number)","Return the absolute value of the number"],acos:["float acos(float number)","Return the arc cosine of the number in radians"],acosh:["float acosh(float number)","Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number"],addGlob:["bool addGlob(string pattern[,int flags [, array options]])","Add files matching the glob pattern. See php's glob for the pattern syntax."],addPattern:["bool addPattern(string pattern[, string path [, array options]])","Add files matching the pcre pattern. See php's pcre for the pattern syntax."],addcslashes:["string addcslashes(string str, string charlist)","Escapes all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\\n', '\\r', '\\t' etc...)"],addslashes:["string addslashes(string str)","Escapes single quote, double quotes and backslash characters in a string with backslashes"],apache_child_terminate:["bool apache_child_terminate()","Terminate apache process after this request"],apache_get_modules:["array apache_get_modules()","Get a list of loaded Apache modules"],apache_get_version:["string apache_get_version()","Fetch Apache version"],apache_getenv:["bool apache_getenv(string variable [, bool walk_to_top])","Get an Apache subprocess_env variable"],apache_lookup_uri:["object apache_lookup_uri(string URI)","Perform a partial request of the given URI to obtain information about it"],apache_note:["string apache_note(string note_name [, string note_value])","Get and set Apache request notes"],apache_request_auth_name:["string apache_request_auth_name()",""],apache_request_auth_type:["string apache_request_auth_type()",""],apache_request_discard_request_body:["long apache_request_discard_request_body()",""],apache_request_err_headers_out:["array apache_request_err_headers_out([{string name|array list} [, string value [, bool replace = false]]])","* fetch all headers that go out in case of an error or a subrequest"],apache_request_headers:["array apache_request_headers()","Fetch all HTTP request headers"],apache_request_headers_in:["array apache_request_headers_in()","* fetch all incoming request headers"],apache_request_headers_out:["array apache_request_headers_out([{string name|array list} [, string value [, bool replace = false]]])","* fetch all outgoing request headers"],apache_request_is_initial_req:["bool apache_request_is_initial_req()",""],apache_request_log_error:["bool apache_request_log_error(string message, [long facility])",""],apache_request_meets_conditions:["long apache_request_meets_conditions()",""],apache_request_remote_host:["int apache_request_remote_host([int type])",""],apache_request_run:["long apache_request_run()","This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status."],apache_request_satisfies:["long apache_request_satisfies()",""],apache_request_server_port:["int apache_request_server_port()",""],apache_request_set_etag:["void apache_request_set_etag()",""],apache_request_set_last_modified:["void apache_request_set_last_modified()",""],apache_request_some_auth_required:["bool apache_request_some_auth_required()",""],apache_request_sub_req_lookup_file:["object apache_request_sub_req_lookup_file(string file)","Returns sub-request for the specified file. You would need to run it yourself with run()."],apache_request_sub_req_lookup_uri:["object apache_request_sub_req_lookup_uri(string uri)","Returns sub-request for the specified uri. You would need to run it yourself with run()"],apache_request_sub_req_method_uri:["object apache_request_sub_req_method_uri(string method, string uri)","Returns sub-request for the specified file. You would need to run it yourself with run()."],apache_request_update_mtime:["long apache_request_update_mtime([int dependency_mtime])",""],apache_reset_timeout:["bool apache_reset_timeout()","Reset the Apache write timer"],apache_response_headers:["array apache_response_headers()","Fetch all HTTP response headers"],apache_setenv:["bool apache_setenv(string variable, string value [, bool walk_to_top])","Set an Apache subprocess_env variable"],array_change_key_case:["array array_change_key_case(array input [, int case=CASE_LOWER])","Retuns an array with all string keys lowercased [or uppercased]"],array_chunk:["array array_chunk(array input, int size [, bool preserve_keys])","Split array into chunks"],array_combine:["array array_combine(array keys, array values)","Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values"],array_count_values:["array array_count_values(array input)","Return the value as key and the frequency of that value in input as value"],array_diff:["array array_diff(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are not present in any of the others arguments."],array_diff_assoc:["array array_diff_assoc(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal"],array_diff_key:["array array_diff_key(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have keys which are not present in any of the others arguments. This function is like array_diff() but works on the keys instead of the values. The associativity is preserved."],array_diff_uassoc:["array array_diff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Elements are compared by user supplied function."],array_diff_ukey:["array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)","Returns the entries of arr1 that have keys which are not present in any of the others arguments. User supplied function is used for comparing the keys. This function is like array_udiff() but works on the keys instead of the values. The associativity is preserved."],array_fill:["array array_fill(int start_key, int num, mixed val)","Create an array containing num elements starting with index start_key each initialized to val"],array_fill_keys:["array array_fill_keys(array keys, mixed val)","Create an array using the elements of the first parameter as keys each initialized to val"],array_filter:["array array_filter(array input [, mixed callback])","Filters elements from the array via the callback."],array_flip:["array array_flip(array input)","Return array with key <-> value flipped"],array_intersect:["array array_intersect(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are present in all the other arguments"],array_intersect_assoc:["array array_intersect_assoc(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check"],array_intersect_key:["array array_intersect_key(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). Equivalent of array_intersect_assoc() but does not do compare of the data."],array_intersect_uassoc:["array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check and they are compared by using an user-supplied callback."],array_intersect_ukey:["array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)","Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). The comparison of the keys is performed by a user supplied function. Equivalent of array_intersect_uassoc() but does not do compare of the data."],array_key_exists:["bool array_key_exists(mixed key, array search)","Checks if the given key or index exists in the array"],array_keys:["array array_keys(array input [, mixed search_value[, bool strict]])","Return just the keys from the input array, optionally only for the specified search_value"],array_key_first:["mixed array_key_first(array arr)","Returns the first key of arr if the array is not empty; NULL otherwise"],array_key_last:["mixed array_key_last(array arr)","Returns the last key of arr if the array is not empty; NULL otherwise"],array_map:["array array_map(mixed callback, array input1 [, array input2 ,...])","Applies the callback to the elements in given arrays."],array_merge:["array array_merge(array arr1, array arr2 [, array ...])","Merges elements from passed arrays into one array"],array_merge_recursive:["array array_merge_recursive(array arr1, array arr2 [, array ...])","Recursively merges elements from passed arrays into one array"],array_multisort:["bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])","Sort multiple arrays at once similar to how ORDER BY clause works in SQL"],array_pad:["array array_pad(array input, int pad_size, mixed pad_value)","Returns a copy of input array padded with pad_value to size pad_size"],array_pop:["mixed array_pop(array stack)","Pops an element off the end of the array"],array_product:["mixed array_product(array input)","Returns the product of the array entries"],array_push:["int array_push(array stack, mixed var [, mixed ...])","Pushes elements onto the end of the array"],array_rand:["mixed array_rand(array input [, int num_req])","Return key/keys for random entry/entries in the array"],array_reduce:["mixed array_reduce(array input, mixed callback [, mixed initial])","Iteratively reduce the array to a single value via the callback."],array_replace:["array array_replace(array arr1, array arr2 [, array ...])","Replaces elements from passed arrays into one array"],array_replace_recursive:["array array_replace_recursive(array arr1, array arr2 [, array ...])","Recursively replaces elements from passed arrays into one array"],array_reverse:["array array_reverse(array input [, bool preserve keys])","Return input as a new array with the order of the entries reversed"],array_search:["mixed array_search(mixed needle, array haystack [, bool strict])","Searches the array for a given value and returns the corresponding key if successful"],array_shift:["mixed array_shift(array stack)","Pops an element off the beginning of the array"],array_slice:["array array_slice(array input, int offset [, int length [, bool preserve_keys]])","Returns elements specified by offset and length"],array_splice:["array array_splice(array input, int offset [, int length [, array replacement]])","Removes the elements designated by offset and length and replace them with supplied array"],array_sum:["mixed array_sum(array input)","Returns the sum of the array entries"],array_udiff:["array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function."],array_udiff_assoc:["array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function."],array_udiff_uassoc:["array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions."],array_uintersect:["array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback."],array_uintersect_assoc:["array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Data is compared by using an user-supplied callback."],array_uintersect_uassoc:["array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks."],array_unique:["array array_unique(array input [, int sort_flags])","Removes duplicate values from array"],array_unshift:["int array_unshift(array stack, mixed var [, mixed ...])","Pushes elements onto the beginning of the array"],array_values:["array array_values(array input)","Return just the values from the input array"],array_walk:["bool array_walk(array input, string funcname [, mixed userdata])","Apply a user function to every member of an array"],array_walk_recursive:["bool array_walk_recursive(array input, string funcname [, mixed userdata])","Apply a user function recursively to every member of an array"],arsort:["bool arsort(array &array_arg [, int sort_flags])","Sort an array in reverse order and maintain index association"],asin:["float asin(float number)","Returns the arc sine of the number in radians"],asinh:["float asinh(float number)","Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number"],asort:["bool asort(array &array_arg [, int sort_flags])","Sort an array and maintain index association"],assert:["int assert(string|bool assertion)","Checks if assertion is false"],assert_options:["mixed assert_options(int what [, mixed value])","Set/get the various assert flags"],atan:["float atan(float number)","Returns the arc tangent of the number in radians"],atan2:["float atan2(float y, float x)","Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x"],atanh:["float atanh(float number)","Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number"],attachIterator:["void attachIterator(Iterator iterator[, mixed info])","Attach a new iterator"],base64_decode:["string base64_decode(string str[, bool strict])","Decodes string using MIME base64 algorithm"],base64_encode:["string base64_encode(string str)","Encodes string using MIME base64 algorithm"],base_convert:["string base_convert(string number, int frombase, int tobase)","Converts a number in a string from any base <= 36 to any base <= 36"],basename:["string basename(string path [, string suffix])","Returns the filename component of the path"],bcadd:["string bcadd(string left_operand, string right_operand [, int scale])","Returns the sum of two arbitrary precision numbers"],bccomp:["int bccomp(string left_operand, string right_operand [, int scale])","Compares two arbitrary precision numbers"],bcdiv:["string bcdiv(string left_operand, string right_operand [, int scale])","Returns the quotient of two arbitrary precision numbers (division)"],bcmod:["string bcmod(string left_operand, string right_operand)","Returns the modulus of the two arbitrary precision operands"],bcmul:["string bcmul(string left_operand, string right_operand [, int scale])","Returns the multiplication of two arbitrary precision numbers"],bcpow:["string bcpow(string x, string y [, int scale])","Returns the value of an arbitrary precision number raised to the power of another"],bcpowmod:["string bcpowmod(string x, string y, string mod [, int scale])","Returns the value of an arbitrary precision number raised to the power of another reduced by a modulous"],bcscale:["bool bcscale(int scale)","Sets default scale parameter for all bc math functions"],bcsqrt:["string bcsqrt(string operand [, int scale])","Returns the square root of an arbitray precision number"],bcsub:["string bcsub(string left_operand, string right_operand [, int scale])","Returns the difference between two arbitrary precision numbers"],bin2hex:["string bin2hex(string data)","Converts the binary representation of data to hex"],bind_textdomain_codeset:["string bind_textdomain_codeset (string domain, string codeset)","Specify the character encoding in which the messages from the DOMAIN message catalog will be returned."],bindec:["int bindec(string binary_number)","Returns the decimal equivalent of the binary number"],bindtextdomain:["string bindtextdomain(string domain_name, string dir)","Bind to the text domain domain_name, looking for translations in dir. Returns the current domain"],birdstep_autocommit:["bool birdstep_autocommit(int index)",""],birdstep_close:["bool birdstep_close(int id)",""],birdstep_commit:["bool birdstep_commit(int index)",""],birdstep_connect:["int birdstep_connect(string server, string user, string pass)",""],birdstep_exec:["int birdstep_exec(int index, string exec_str)",""],birdstep_fetch:["bool birdstep_fetch(int index)",""],birdstep_fieldname:["string birdstep_fieldname(int index, int col)",""],birdstep_fieldnum:["int birdstep_fieldnum(int index)",""],birdstep_freeresult:["bool birdstep_freeresult(int index)",""],birdstep_off_autocommit:["bool birdstep_off_autocommit(int index)",""],birdstep_result:["mixed birdstep_result(int index, mixed col)",""],birdstep_rollback:["bool birdstep_rollback(int index)",""],bzcompress:["string bzcompress(string source [, int blocksize100k [, int workfactor]])","Compresses a string into BZip2 encoded data"],bzdecompress:["string bzdecompress(string source [, int small])","Decompresses BZip2 compressed data"],bzerrno:["int bzerrno(resource bz)","Returns the error number"],bzerror:["array bzerror(resource bz)","Returns the error number and error string in an associative array"],bzerrstr:["string bzerrstr(resource bz)","Returns the error string"],bzopen:["resource bzopen(string|int file|fp, string mode)","Opens a new BZip2 stream"],bzread:["string bzread(resource bz[, int length])","Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified"],cal_days_in_month:["int cal_days_in_month(int calendar, int month, int year)","Returns the number of days in a month for a given year and calendar"],cal_from_jd:["array cal_from_jd(int jd, int calendar)","Converts from Julian Day Count to a supported calendar and return extended information"],cal_info:["array cal_info([int calendar])","Returns information about a particular calendar"],cal_to_jd:["int cal_to_jd(int calendar, int month, int day, int year)","Converts from a supported calendar to Julian Day Count"],call_user_func:["mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])","Call a user function which is the first parameter"],call_user_func_array:["mixed call_user_func_array(string function_name, array parameters)","Call a user function which is the first parameter with the arguments contained in array"],call_user_method:["mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])","Call a user method on a specific object or class"],call_user_method_array:["mixed call_user_method_array(string method_name, mixed object, array params)","Call a user method on a specific object or class using a parameter array"],ceil:["float ceil(float number)","Returns the next highest integer value of the number"],chdir:["bool chdir(string directory)","Change the current directory"],checkdate:["bool checkdate(int month, int day, int year)","Returns true(1) if it is a valid date in gregorian calendar"],chgrp:["bool chgrp(string filename, mixed group)","Change file group"],chmod:["bool chmod(string filename, int mode)","Change file mode"],chown:["bool chown(string filename, mixed user)","Change file owner"],chr:["string chr(int ascii)","Converts ASCII code to a character"],chroot:["bool chroot(string directory)","Change root directory"],chunk_split:["string chunk_split(string str [, int chunklen [, string ending]])","Returns split line"],class_alias:["bool class_alias(string user_class_name , string alias_name [, bool autoload])","Creates an alias for user defined class"],class_exists:["bool class_exists(string classname [, bool autoload])","Checks if the class exists"],class_implements:["array class_implements(mixed what [, bool autoload ])","Return all classes and interfaces implemented by SPL"],class_parents:["array class_parents(object instance [, bool autoload = true])","Return an array containing the names of all parent classes"],clearstatcache:["void clearstatcache([bool clear_realpath_cache[, string filename]])","Clear file stat cache"],closedir:["void closedir([resource dir_handle])","Close directory connection identified by the dir_handle"],closelog:["bool closelog()","Close connection to system logger"],collator_asort:["bool collator_asort( Collator $coll, array(string) $arr )","* Sort array using specified collator, maintaining index association."],collator_compare:["int collator_compare( Collator $coll, string $str1, string $str2 )","* Compare two strings."],collator_create:["Collator collator_create( string $locale )","* Create collator."],collator_get_attribute:["int collator_get_attribute( Collator $coll, int $attr )","* Get collation attribute value."],collator_get_error_code:["int collator_get_error_code( Collator $coll )","* Get collator's last error code."],collator_get_error_message:["string collator_get_error_message( Collator $coll )","* Get text description for collator's last error code."],collator_get_locale:["string collator_get_locale( Collator $coll, int $type )","* Gets the locale name of the collator."],collator_get_sort_key:["bool collator_get_sort_key( Collator $coll, string $str )","* Get a sort key for a string from a Collator. }}}"],collator_get_strength:["int collator_get_strength(Collator coll)","* Returns the current collation strength."],collator_set_attribute:["bool collator_set_attribute( Collator $coll, int $attr, int $val )","* Set collation attribute."],collator_set_strength:["bool collator_set_strength(Collator coll, int strength)","* Set the collation strength."],collator_sort:["bool collator_sort( Collator $coll, array(string) $arr [, int $sort_flags] )","* Sort array using specified collator."],collator_sort_with_sort_keys:["bool collator_sort_with_sort_keys( Collator $coll, array(string) $arr )","* Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance."],com_create_guid:["string com_create_guid()","Generate a globally unique identifier (GUID)"],com_event_sink:["bool com_event_sink(object comobject, object sinkobject [, mixed sinkinterface])","Connect events from a COM object to a PHP object"],com_get_active_object:["object com_get_active_object(string progid [, int code_page ])","Returns a handle to an already running instance of a COM object"],com_load_typelib:["bool com_load_typelib(string typelib_name [, int case_insensitive])","Loads a Typelibrary and registers its constants"],com_message_pump:["bool com_message_pump([int timeoutms])","Process COM messages, sleeping for up to timeoutms milliseconds"],com_print_typeinfo:["bool com_print_typeinfo(object comobject | string typelib, string dispinterface, bool wantsink)","Print out a PHP class definition for a dispatchable interface"],compact:["array compact(mixed var_names [, mixed ...])","Creates a hash containing variables and their values"],compose_locale:["static string compose_locale($array)","* Creates a locale by combining the parts of locale-ID passed * }}}"],confirm_extname_compiled:["string confirm_extname_compiled(string arg)","Return a string to confirm that the module is compiled in"],connection_aborted:["int connection_aborted()","Returns true if client disconnected"],connection_status:["int connection_status()","Returns the connection status bitfield"],constant:["mixed constant(string const_name)","Given the name of a constant this function will return the constant's associated value"],convert_cyr_string:["string convert_cyr_string(string str, string from, string to)","Convert from one Cyrillic character set to another"],convert_uudecode:["string convert_uudecode(string data)","decode a uuencoded string"],convert_uuencode:["string convert_uuencode(string data)","uuencode a string"],copy:["bool copy(string source_file, string destination_file [, resource context])","Copy a file"],cos:["float cos(float number)","Returns the cosine of the number in radians"],cosh:["float cosh(float number)","Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2"],count:["int count(mixed var [, int mode])","Count the number of elements in a variable (usually an array)"],count_chars:["mixed count_chars(string input [, int mode])","Returns info about what characters are used in input"],crc32:["string crc32(string str)","Calculate the crc32 polynomial of a string"],create_function:["string create_function(string args, string code)","Creates an anonymous function, and returns its name"],crypt:["string crypt(string str [, string salt])","Hash a string"],ctype_alnum:["bool ctype_alnum(mixed c)","Checks for alphanumeric character(s)"],ctype_alpha:["bool ctype_alpha(mixed c)","Checks for alphabetic character(s)"],ctype_cntrl:["bool ctype_cntrl(mixed c)","Checks for control character(s)"],ctype_digit:["bool ctype_digit(mixed c)","Checks for numeric character(s)"],ctype_graph:["bool ctype_graph(mixed c)","Checks for any printable character(s) except space"],ctype_lower:["bool ctype_lower(mixed c)","Checks for lowercase character(s)"],ctype_print:["bool ctype_print(mixed c)","Checks for printable character(s)"],ctype_punct:["bool ctype_punct(mixed c)","Checks for any printable character which is not whitespace or an alphanumeric character"],ctype_space:["bool ctype_space(mixed c)","Checks for whitespace character(s)"],ctype_upper:["bool ctype_upper(mixed c)","Checks for uppercase character(s)"],ctype_xdigit:["bool ctype_xdigit(mixed c)","Checks for character(s) representing a hexadecimal digit"],curl_close:["void curl_close(resource ch)","Close a cURL session"],curl_copy_handle:["resource curl_copy_handle(resource ch)","Copy a cURL handle along with all of it's preferences"],curl_errno:["int curl_errno(resource ch)","Return an integer containing the last error number"],curl_error:["string curl_error(resource ch)","Return a string contain the last error for the current session"],curl_exec:["bool curl_exec(resource ch)","Perform a cURL session"],curl_getinfo:["mixed curl_getinfo(resource ch [, int option])","Get information regarding a specific transfer"],curl_init:["resource curl_init([string url])","Initialize a cURL session"],curl_multi_add_handle:["int curl_multi_add_handle(resource mh, resource ch)","Add a normal cURL handle to a cURL multi handle"],curl_multi_close:["void curl_multi_close(resource mh)","Close a set of cURL handles"],curl_multi_exec:["int curl_multi_exec(resource mh, int &still_running)","Run the sub-connections of the current cURL handle"],curl_multi_getcontent:["string curl_multi_getcontent(resource ch)","Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set"],curl_multi_info_read:["array curl_multi_info_read(resource mh [, long msgs_in_queue])","Get information about the current transfers"],curl_multi_init:["resource curl_multi_init()","Returns a new cURL multi handle"],curl_multi_remove_handle:["int curl_multi_remove_handle(resource mh, resource ch)","Remove a multi handle from a set of cURL handles"],curl_multi_select:["int curl_multi_select(resource mh[, double timeout])",'Get all the sockets associated with the cURL extension, which can then be "selected"'],curl_setopt:["bool curl_setopt(resource ch, int option, mixed value)","Set an option for a cURL transfer"],curl_setopt_array:["bool curl_setopt_array(resource ch, array options)","Set an array of option for a cURL transfer"],curl_version:["array curl_version([int version])","Return cURL version information."],current:["mixed current(array array_arg)","Return the element currently pointed to by the internal array pointer"],date:["string date(string format [, long timestamp])","Format a local date/time"],date_add:["DateTime date_add(DateTime object, DateInterval interval)","Adds an interval to the current date in object."],date_create:["DateTime date_create([string time[, DateTimeZone object]])","Returns new DateTime object"],date_create_from_format:["DateTime date_create_from_format(string format, string time[, DateTimeZone object])","Returns new DateTime object formatted according to the specified format"],date_date_set:["DateTime date_date_set(DateTime object, long year, long month, long day)","Sets the date."],date_default_timezone_get:["string date_default_timezone_get()","Gets the default timezone used by all date/time functions in a script"],date_default_timezone_set:["bool date_default_timezone_set(string timezone_identifier)","Sets the default timezone used by all date/time functions in a script"],date_diff:["DateInterval date_diff(DateTime object [, bool absolute])","Returns the difference between two DateTime objects."],date_format:["string date_format(DateTime object, string format)","Returns date formatted according to given format"],date_get_last_errors:["array date_get_last_errors()","Returns the warnings and errors found while parsing a date/time string."],date_interval_create_from_date_string:["DateInterval date_interval_create_from_date_string(string time)","Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string"],date_interval_format:["string date_interval_format(DateInterval object, string format)","Formats the interval."],date_isodate_set:["DateTime date_isodate_set(DateTime object, long year, long week[, long day])","Sets the ISO date."],date_modify:["DateTime date_modify(DateTime object, string modify)","Alters the timestamp."],date_offset_get:["long date_offset_get(DateTime object)","Returns the DST offset."],date_parse:["array date_parse(string date)","Returns associative array with detailed info about given date"],date_parse_from_format:["array date_parse_from_format(string format, string date)","Returns associative array with detailed info about given date"],date_sub:["DateTime date_sub(DateTime object, DateInterval interval)","Subtracts an interval to the current date in object."],date_sun_info:["array date_sun_info(long time, float latitude, float longitude)","Returns an array with information about sun set/rise and twilight begin/end"],date_sunrise:["mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])","Returns time of sunrise for a given day and location"],date_sunset:["mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])","Returns time of sunset for a given day and location"],date_time_set:["DateTime date_time_set(DateTime object, long hour, long minute[, long second])","Sets the time."],date_timestamp_get:["long date_timestamp_get(DateTime object)","Gets the Unix timestamp."],date_timestamp_set:["DateTime date_timestamp_set(DateTime object, long unixTimestamp)","Sets the date and time based on an Unix timestamp."],date_timezone_get:["DateTimeZone date_timezone_get(DateTime object)","Return new DateTimeZone object relative to give DateTime"],date_timezone_set:["DateTime date_timezone_set(DateTime object, DateTimeZone object)","Sets the timezone for the DateTime object."],datefmt_create:["IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )","* Create formatter."],datefmt_format:["string datefmt_format( [mixed]int $args or array $args )","* Format the time value as a string. }}}"],datefmt_get_calendar:["string datefmt_get_calendar( IntlDateFormatter $mf )","* Get formatter calendar."],datefmt_get_datetype:["string datefmt_get_datetype( IntlDateFormatter $mf )","* Get formatter datetype."],datefmt_get_error_code:["int datefmt_get_error_code( IntlDateFormatter $nf )","* Get formatter's last error code."],datefmt_get_error_message:["string datefmt_get_error_message( IntlDateFormatter $coll )","* Get text description for formatter's last error code."],datefmt_get_locale:["string datefmt_get_locale(IntlDateFormatter $mf)","* Get formatter locale."],datefmt_get_pattern:["string datefmt_get_pattern( IntlDateFormatter $mf )","* Get formatter pattern."],datefmt_get_timetype:["string datefmt_get_timetype( IntlDateFormatter $mf )","* Get formatter timetype."],datefmt_get_timezone_id:["string datefmt_get_timezone_id( IntlDateFormatter $mf )","* Get formatter timezone_id."],datefmt_isLenient:["string datefmt_isLenient(IntlDateFormatter $mf)","* Get formatter locale."],datefmt_localtime:["integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse[, int $parse_pos ])","* Parse the string $value to a localtime array }}}"],datefmt_parse:["integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse [, int $parse_pos] )","* Parse the string $value starting at parse_pos to a Unix timestamp -int }}}"],datefmt_setLenient:["string datefmt_setLenient(IntlDateFormatter $mf)","* Set formatter lenient."],datefmt_set_calendar:["bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )","* Set formatter calendar."],datefmt_set_pattern:["bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern )","* Set formatter pattern."],datefmt_set_timezone_id:["bool datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)","* Set formatter timezone_id."],dba_close:["void dba_close(resource handle)","Closes database"],dba_delete:["bool dba_delete(string key, resource handle)","Deletes the entry associated with key If inifile: remove all other key lines"],dba_exists:["bool dba_exists(string key, resource handle)","Checks, if the specified key exists"],dba_fetch:["string dba_fetch(string key, [int skip ,] resource handle)","Fetches the data associated with key"],dba_firstkey:["string dba_firstkey(resource handle)","Resets the internal key pointer and returns the first key"],dba_handlers:["array dba_handlers([bool full_info])","List configured database handlers"],dba_insert:["bool dba_insert(string key, string value, resource handle)","If not inifile: Insert value as key, return false, if key exists already If inifile: Add vakue as key (next instance of key)"],dba_key_split:["array|false dba_key_split(string key)","Splits an inifile key into an array of the form array(0=>group,1=>value_name) but returns false if input is false or null"],dba_list:["array dba_list()","List opened databases"],dba_nextkey:["string dba_nextkey(resource handle)","Returns the next key"],dba_open:["resource dba_open(string path, string mode [, string handlername, string ...])","Opens path using the specified handler in mode"],dba_optimize:["bool dba_optimize(resource handle)","Optimizes (e.g. clean up, vacuum) database"],dba_popen:["resource dba_popen(string path, string mode [, string handlername, string ...])","Opens path using the specified handler in mode persistently"],dba_replace:["bool dba_replace(string key, string value, resource handle)","Inserts value as key, replaces key, if key exists already If inifile: remove all other key lines"],dba_sync:["bool dba_sync(resource handle)","Synchronizes database"],dcgettext:["string dcgettext(string domain_name, string msgid, long category)","Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist"],dcngettext:["string dcngettext(string domain, string msgid1, string msgid2, int n, int category)","Plural version of dcgettext()"],debug_backtrace:["array debug_backtrace([bool provide_object])","Return backtrace as array"],debug_print_backtrace:["void debug_print_backtrace()","Prints a PHP backtrace"],debug_zval_dump:["void debug_zval_dump(mixed var)","Dumps a string representation of an internal Zend value to output"],decbin:["string decbin(int decimal_number)","Returns a string containing a binary representation of the number"],dechex:["string dechex(int decimal_number)","Returns a string containing a hexadecimal representation of the given number"],decoct:["string decoct(int decimal_number)","Returns a string containing an octal representation of the given number"],define:["bool define(string constant_name, mixed value, bool case_insensitive=false)","Define a new constant"],define_syslog_variables:["void define_syslog_variables()","Initializes all syslog-related variables"],defined:["bool defined(string constant_name)","Check whether a constant exists"],deg2rad:["float deg2rad(float number)","Converts the number in degrees to the radian equivalent"],dgettext:["string dgettext(string domain_name, string msgid)","Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist"],die:["void die([mixed status])","Output a message and terminate the current script"],dir:["object dir(string directory[, resource context])","Directory class with properties, handle and class and methods read, rewind and close"],dirname:["string dirname(string path)","Returns the directory name component of the path"],disk_free_space:["float disk_free_space(string path)","Get free disk space for filesystem that path is on"],disk_total_space:["float disk_total_space(string path)","Get total disk space for filesystem that path is on"],display_disabled_function:["void display_disabled_function()","Dummy function which displays an error when a disabled function is called."],dl:["int dl(string extension_filename)","Load a PHP extension at runtime"],dngettext:["string dngettext(string domain, string msgid1, string msgid2, int count)","Plural version of dgettext()"],dns_check_record:["bool dns_check_record(string host [, string type])","Check DNS records corresponding to a given Internet host name or IP address"],dns_get_mx:["bool dns_get_mx(string hostname, array mxhosts [, array weight])","Get MX records corresponding to a given Internet host name"],dns_get_record:["array|false dns_get_record(string hostname [, int type[, array authns, array addtl]])","Get any Resource Record corresponding to a given Internet host name"],dom_attr_is_id:["bool dom_attr_is_id()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-isId Since: DOM Level 3"],dom_characterdata_append_data:["void dom_characterdata_append_data(string arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-32791A2F Since:"],dom_characterdata_delete_data:["void dom_characterdata_delete_data(int offset, int count)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7C603781 Since:"],dom_characterdata_insert_data:["void dom_characterdata_insert_data(int offset, string arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3EDB695F Since:"],dom_characterdata_replace_data:["void dom_characterdata_replace_data(int offset, int count, string arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-E5CBA7FB Since:"],dom_characterdata_substring_data:["string dom_characterdata_substring_data(int offset, int count)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6531BCCF Since:"],dom_document_adopt_node:["DOMNode dom_document_adopt_node(DOMNode source)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-adoptNode Since: DOM Level 3"],dom_document_create_attribute:["DOMAttr dom_document_create_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198 Since:"],dom_document_create_attribute_ns:["DOMAttr dom_document_create_attribute_ns(string namespaceURI, string qualifiedName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrAttrNS Since: DOM Level 2"],dom_document_create_cdatasection:["DOMCdataSection dom_document_create_cdatasection(string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8 Since:"],dom_document_create_comment:["DOMComment dom_document_create_comment(string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328 Since:"],dom_document_create_document_fragment:["DOMDocumentFragment dom_document_create_document_fragment()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5 Since:"],dom_document_create_element:["DOMElement dom_document_create_element(string tagName [, string value])","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547 Since:"],dom_document_create_element_ns:["DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value])","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS Since: DOM Level 2"],dom_document_create_entity_reference:["DOMEntityReference dom_document_create_entity_reference(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE Since:"],dom_document_create_processing_instruction:["DOMProcessingInstruction dom_document_create_processing_instruction(string target, string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439 Since:"],dom_document_create_text_node:["DOMText dom_document_create_text_node(string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127 Since:"],dom_document_get_element_by_id:["DOMElement dom_document_get_element_by_id(string elementId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBId Since: DOM Level 2"],dom_document_get_elements_by_tag_name:["DOMNodeList dom_document_get_elements_by_tag_name(string tagname)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094 Since:"],dom_document_get_elements_by_tag_name_ns:["DOMNodeList dom_document_get_elements_by_tag_name_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBTNNS Since: DOM Level 2"],dom_document_import_node:["DOMNode dom_document_import_node(DOMNode importedNode, bool deep)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Core-Document-importNode Since: DOM Level 2"],dom_document_load:["DOMNode dom_document_load(string source [, int options])","URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load Since: DOM Level 3"],dom_document_load_html:["DOMNode dom_document_load_html(string source)","Since: DOM extended"],dom_document_load_html_file:["DOMNode dom_document_load_html_file(string source)","Since: DOM extended"],dom_document_loadxml:["DOMNode dom_document_loadxml(string source [, int options])","URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-loadXML Since: DOM Level 3"],dom_document_normalize_document:["void dom_document_normalize_document()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-normalizeDocument Since: DOM Level 3"],dom_document_relaxNG_validate_file:["bool dom_document_relaxNG_validate_file(string filename); */","PHP_FUNCTION(dom_document_relaxNG_validate_file) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file"],dom_document_relaxNG_validate_xml:["bool dom_document_relaxNG_validate_xml(string source); */","PHP_FUNCTION(dom_document_relaxNG_validate_xml) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_relaxNG_validate_xml"],dom_document_rename_node:["DOMNode dom_document_rename_node(node n, string namespaceURI, string qualifiedName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-renameNode Since: DOM Level 3"],dom_document_save:["int dom_document_save(string file)","Convenience method to save to file"],dom_document_save_html:["string dom_document_save_html()","Convenience method to output as html"],dom_document_save_html_file:["int dom_document_save_html_file(string file)","Convenience method to save to file as html"],dom_document_savexml:["string dom_document_savexml([node n])","URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3"],dom_document_schema_validate:["bool dom_document_schema_validate(string source); */","PHP_FUNCTION(dom_document_schema_validate_xml) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_schema_validate"],dom_document_schema_validate_file:["bool dom_document_schema_validate_file(string filename); */","PHP_FUNCTION(dom_document_schema_validate_file) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file"],dom_document_validate:["bool dom_document_validate()","Since: DOM extended"],dom_document_xinclude:["int dom_document_xinclude([int options])","Substitutues xincludes in a DomDocument"],dom_domconfiguration_can_set_parameter:["bool dom_domconfiguration_can_set_parameter(string name, domuserdata value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter Since:"],dom_domconfiguration_get_parameter:["domdomuserdata dom_domconfiguration_get_parameter(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:"],dom_domconfiguration_set_parameter:["dom_void dom_domconfiguration_set_parameter(string name, domuserdata value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:"],dom_domerrorhandler_handle_error:["dom_bool dom_domerrorhandler_handle_error(domerror error)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:"],dom_domimplementation_create_document:["DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2"],dom_domimplementation_create_document_type:["DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2"],dom_domimplementation_get_feature:["DOMNode dom_domimplementation_get_feature(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3"],dom_domimplementation_has_feature:["bool dom_domimplementation_has_feature(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:"],dom_domimplementationlist_item:["domdomimplementation dom_domimplementationlist_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:"],dom_domimplementationsource_get_domimplementation:["domdomimplementation dom_domimplementationsource_get_domimplementation(string features)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:"],dom_domimplementationsource_get_domimplementations:["domimplementationlist dom_domimplementationsource_get_domimplementations(string features)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:"],dom_domstringlist_item:["domstring dom_domstringlist_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:"],dom_element_get_attribute:["string dom_element_get_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:"],dom_element_get_attribute_node:["DOMAttr dom_element_get_attribute_node(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-217A91B8 Since:"],dom_element_get_attribute_node_ns:["DOMAttr dom_element_get_attribute_node_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAtNodeNS Since: DOM Level 2"],dom_element_get_attribute_ns:["string dom_element_get_attribute_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAttrNS Since: DOM Level 2"],dom_element_get_elements_by_tag_name:["DOMNodeList dom_element_get_elements_by_tag_name(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D Since:"],dom_element_get_elements_by_tag_name_ns:["DOMNodeList dom_element_get_elements_by_tag_name_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C90942 Since: DOM Level 2"],dom_element_has_attribute:["bool dom_element_has_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttr Since: DOM Level 2"],dom_element_has_attribute_ns:["bool dom_element_has_attribute_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttrNS Since: DOM Level 2"],dom_element_remove_attribute:["void dom_element_remove_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D6AC0F9 Since:"],dom_element_remove_attribute_node:["DOMAttr dom_element_remove_attribute_node(DOMAttr oldAttr)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D589198 Since:"],dom_element_remove_attribute_ns:["void dom_element_remove_attribute_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElRemAtNS Since: DOM Level 2"],dom_element_set_attribute:["void dom_element_set_attribute(string name, string value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68F082 Since:"],dom_element_set_attribute_node:["DOMAttr dom_element_set_attribute_node(DOMAttr newAttr)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-887236154 Since:"],dom_element_set_attribute_node_ns:["DOMAttr dom_element_set_attribute_node_ns(DOMAttr newAttr)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAtNodeNS Since: DOM Level 2"],dom_element_set_attribute_ns:["void dom_element_set_attribute_ns(string namespaceURI, string qualifiedName, string value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAttrNS Since: DOM Level 2"],dom_element_set_id_attribute:["void dom_element_set_id_attribute(string name, bool isId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttr Since: DOM Level 3"],dom_element_set_id_attribute_node:["void dom_element_set_id_attribute_node(attr idAttr, bool isId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNode Since: DOM Level 3"],dom_element_set_id_attribute_ns:["void dom_element_set_id_attribute_ns(string namespaceURI, string localName, bool isId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNS Since: DOM Level 3"],dom_import_simplexml:["somNode dom_import_simplexml(sxeobject node)","Get a simplexml_element object from dom to allow for processing"],dom_namednodemap_get_named_item:["DOMNode dom_namednodemap_get_named_item(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549 Since:"],dom_namednodemap_get_named_item_ns:["DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS Since: DOM Level 2"],dom_namednodemap_item:["DOMNode dom_namednodemap_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9 Since:"],dom_namednodemap_remove_named_item:["DOMNode dom_namednodemap_remove_named_item(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193 Since:"],dom_namednodemap_remove_named_item_ns:["DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS Since: DOM Level 2"],dom_namednodemap_set_named_item:["DOMNode dom_namednodemap_set_named_item(DOMNode arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788 Since:"],dom_namednodemap_set_named_item_ns:["DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS Since: DOM Level 2"],dom_namelist_get_name:["string dom_namelist_get_name(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName Since:"],dom_namelist_get_namespace_uri:["string dom_namelist_get_namespace_uri(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI Since:"],dom_node_append_child:["DomNode dom_node_append_child(DomNode newChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107 Since:"],dom_node_clone_node:["DomNode dom_node_clone_node(bool deep)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4 Since:"],dom_node_compare_document_position:["short dom_node_compare_document_position(DomNode other)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition Since: DOM Level 3"],dom_node_get_feature:["DomNode dom_node_get_feature(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature Since: DOM Level 3"],dom_node_get_user_data:["mixed dom_node_get_user_data(string key)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData Since: DOM Level 3"],dom_node_has_attributes:["bool dom_node_has_attributes()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs Since: DOM Level 2"],dom_node_has_child_nodes:["bool dom_node_has_child_nodes()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187 Since:"],dom_node_insert_before:["domnode dom_node_insert_before(DomNode newChild, DomNode refChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727 Since:"],dom_node_is_default_namespace:["bool dom_node_is_default_namespace(string namespaceURI)","URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace Since: DOM Level 3"],dom_node_is_equal_node:["bool dom_node_is_equal_node(DomNode arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode Since: DOM Level 3"],dom_node_is_same_node:["bool dom_node_is_same_node(DomNode other)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode Since: DOM Level 3"],dom_node_is_supported:["bool dom_node_is_supported(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Level-2-Core-Node-supports Since: DOM Level 2"],dom_node_lookup_namespace_uri:["string dom_node_lookup_namespace_uri(string prefix)","URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI Since: DOM Level 3"],dom_node_lookup_prefix:["string dom_node_lookup_prefix(string namespaceURI)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix Since: DOM Level 3"],dom_node_normalize:["void dom_node_normalize()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize Since:"],dom_node_remove_child:["DomNode dom_node_remove_child(DomNode oldChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066 Since:"],dom_node_replace_child:["DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307 Since:"],dom_node_set_user_data:["mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData Since: DOM Level 3"],dom_nodelist_item:["DOMNode dom_nodelist_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-844377136 Since:"],dom_string_extend_find_offset16:["int dom_string_extend_find_offset16(int offset32)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16 Since:"],dom_string_extend_find_offset32:["int dom_string_extend_find_offset32(int offset16)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32 Since:"],dom_text_is_whitespace_in_element_content:["bool dom_text_is_whitespace_in_element_content()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3"],dom_text_replace_whole_text:["DOMText dom_text_replace_whole_text(string content)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3"],dom_text_split_text:["DOMText dom_text_split_text(int offset)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since:"],dom_userdatahandler_handle:["dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent Since:"],dom_xpath_evaluate:["mixed dom_xpath_evaluate(string expr [,DOMNode context])",""],dom_xpath_query:["DOMNodeList dom_xpath_query(string expr [,DOMNode context])",""],dom_xpath_register_ns:["bool dom_xpath_register_ns(string prefix, string uri)",""],dom_xpath_register_php_functions:["void dom_xpath_register_php_functions()",""],each:["array each(array arr)","Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element"],easter_date:["int easter_date([int year])","Return the timestamp of midnight on Easter of a given year (defaults to current year)"],easter_days:["int easter_days([int year, [int method]])","Return the number of days after March 21 that Easter falls on for a given year (defaults to current year)"],echo:["void echo(string arg1 [, string ...])","Output one or more strings"],empty:["bool empty(mixed var)","Determine whether a variable is empty"],enchant_broker_describe:["array enchant_broker_describe(resource broker)","Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo()"],enchant_broker_dict_exists:["bool enchant_broker_dict_exists(resource broker, string tag)","Whether a dictionary exists or not. Using non-empty tag"],enchant_broker_free:["bool enchant_broker_free(resource broker)","Destroys the broker object and its dictionnaries"],enchant_broker_free_dict:["resource enchant_broker_free_dict(resource dict)","Free the dictionary resource"],enchant_broker_get_dict_path:["string enchant_broker_get_dict_path(resource broker, int dict_type)","Get the directory path for a given backend, works with ispell and myspell"],enchant_broker_get_error:["string enchant_broker_get_error(resource broker)","Returns the last error of the broker"],enchant_broker_init:["resource enchant_broker_init()","create a new broker object capable of requesting"],enchant_broker_list_dicts:["string enchant_broker_list_dicts(resource broker)","Lists the dictionaries available for the given broker"],enchant_broker_request_dict:["resource enchant_broker_request_dict(resource broker, string tag)",'create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for ("en_US", "de_DE", ...)'],enchant_broker_request_pwl_dict:["resource enchant_broker_request_pwl_dict(resource broker, string filename)","creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call."],enchant_broker_set_dict_path:["bool enchant_broker_set_dict_path(resource broker, int dict_type, string value)","Set the directory path for a given backend, works with ispell and myspell"],enchant_broker_set_ordering:["bool enchant_broker_set_ordering(resource broker, string tag, string ordering)","Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the \"*\" tag can be used as a language tag to declare a default ordering for any language that does not explictly declare an ordering."],enchant_dict_add_to_personal:["void enchant_dict_add_to_personal(resource dict, string word)","add 'word' to personal word list"],enchant_dict_add_to_session:["void enchant_dict_add_to_session(resource dict, string word)","add 'word' to this spell-checking session"],enchant_dict_check:["bool enchant_dict_check(resource dict, string word)","If the word is correctly spelled return true, otherwise return false"],enchant_dict_describe:["array enchant_dict_describe(resource dict)","Describes an individual dictionary 'dict'"],enchant_dict_get_error:["string enchant_dict_get_error(resource dict)","Returns the last error of the current spelling-session"],enchant_dict_is_in_session:["bool enchant_dict_is_in_session(resource dict, string word)","whether or not 'word' exists in this spelling-session"],enchant_dict_quick_check:["bool enchant_dict_quick_check(resource dict, string word [, array &suggestions])","If the word is correctly spelled return true, otherwise return false, if suggestions variable is provided, fill it with spelling alternatives."],enchant_dict_store_replacement:["void enchant_dict_store_replacement(resource dict, string mis, string cor)","add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list."],enchant_dict_suggest:["array enchant_dict_suggest(resource dict, string word)","Will return a list of values if any of those pre-conditions are not met."],end:["mixed end(array array_arg)","Advances array argument's internal pointer to the last element and return it"],ereg:["int ereg(string pattern, string string [, array registers])","Regular expression match"],ereg_replace:["string ereg_replace(string pattern, string replacement, string string)","Replace regular expression"],eregi:["int eregi(string pattern, string string [, array registers])","Case-insensitive regular expression match"],eregi_replace:["string eregi_replace(string pattern, string replacement, string string)","Case insensitive replace regular expression"],error_get_last:["array error_get_last()","Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet."],error_log:["bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])","Send an error message somewhere"],error_reporting:["int error_reporting([int new_error_level])","Return the current error_reporting level, and if an argument was passed - change to the new level"],escapeshellarg:["string escapeshellarg(string arg)","Quote and escape an argument for use in a shell command"],escapeshellcmd:["string escapeshellcmd(string command)","Escape shell metacharacters"],exec:["string exec(string command [, array &output [, int &return_value]])","Execute an external program"],exif_imagetype:["int exif_imagetype(string imagefile)","Get the type of an image"],exif_read_data:["array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])","Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails"],exif_tagname:["string exif_tagname(index)","Get headername for index or false if not defined"],exif_thumbnail:["string exif_thumbnail(string filename [, &width, &height [, &imagetype]])","Reads the embedded thumbnail"],exit:["void exit([mixed status])","Output a message and terminate the current script"],exp:["float exp(float number)","Returns e raised to the power of the number"],explode:["array explode(string separator, string str [, int limit])","Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned."],expm1:["float expm1(float number)","Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero"],extension_loaded:["bool extension_loaded(string extension_name)","Returns true if the named extension is loaded"],extract:["int extract(array var_array [, int extract_type [, string prefix]])","Imports variables into symbol table from an array"],ezmlm_hash:["int ezmlm_hash(string addr)","Calculate EZMLM list hash value."],fclose:["bool fclose(resource fp)","Close an open file pointer"],feof:["bool feof(resource fp)","Test for end-of-file on a file pointer"],fflush:["bool fflush(resource fp)","Flushes output"],fgetc:["string fgetc(resource fp)","Get a character from file pointer"],fgetcsv:["array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])","Get line from file pointer and parse for CSV fields"],fgets:["string fgets(resource fp[, int length])","Get a line from file pointer"],fgetss:["string fgetss(resource fp [, int length [, string allowable_tags]])","Get a line from file pointer and strip HTML tags"],file:["array file(string filename [, int flags[, resource context]])","Read entire file into an array"],file_exists:["bool file_exists(string filename)","Returns true if filename exists"],file_get_contents:["string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])","Read the entire file into a string"],file_put_contents:["int file_put_contents(string file, mixed data [, int flags [, resource context]])","Write/Create a file with contents data and return the number of bytes written"],fileatime:["int fileatime(string filename)","Get last access time of file"],filectime:["int filectime(string filename)","Get inode modification time of file"],filegroup:["int filegroup(string filename)","Get file group"],fileinode:["int fileinode(string filename)","Get file inode"],filemtime:["int filemtime(string filename)","Get last modification time of file"],fileowner:["int fileowner(string filename)","Get file owner"],fileperms:["int fileperms(string filename)","Get file permissions"],filesize:["int filesize(string filename)","Get file size"],filetype:["string filetype(string filename)","Get file type"],filter_has_var:["mixed filter_has_var(constant type, string variable_name)","* Returns true if the variable with the name 'name' exists in source."],filter_input:["mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])","* Returns the filtered variable 'name'* from source `type`."],filter_input_array:["mixed filter_input_array(constant type, [, mixed options]])","* Returns an array with all arguments defined in 'definition'."],filter_var:["mixed filter_var(mixed variable [, long filter [, mixed options]])","* Returns the filtered version of the vriable."],filter_var_array:["mixed filter_var_array(array data, [, mixed options]])","* Returns an array with all arguments defined in 'definition'."],finfo_buffer:["string finfo_buffer(resource finfo, char *string [, int options [, resource context]])","Return infromation about a string buffer."],finfo_close:["resource finfo_close(resource finfo)","Close fileinfo resource."],finfo_file:["string finfo_file(resource finfo, char *file_name [, int options [, resource context]])","Return information about a file."],finfo_open:["resource finfo_open([int options [, string arg]])","Create a new fileinfo resource."],finfo_set_flags:["bool finfo_set_flags(resource finfo, int options)","Set libmagic configuration options."],floatval:["float floatval(mixed var)","Get the float value of a variable"],flock:["bool flock(resource fp, int operation [, int &wouldblock])","Portable file locking"],floor:["float floor(float number)","Returns the next lowest integer value from the number"],flush:["void flush()","Flush the output buffer"],fmod:["float fmod(float x, float y)","Returns the remainder of dividing x by y as a float"],fnmatch:["bool fnmatch(string pattern, string filename [, int flags])","Match filename against pattern"],fopen:["resource fopen(string filename, string mode [, bool use_include_path [, resource context]])","Open a file or a URL and return a file pointer"],forward_static_call:["mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...])","Call a user function which is the first parameter"],fpassthru:["int fpassthru(resource fp)","Output all remaining data from a file pointer"],fprintf:["int fprintf(resource stream, string format [, mixed arg1 [, mixed ...]])","Output a formatted string into a stream"],fputcsv:["int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]])","Format line as CSV and write to file pointer"],fread:["string fread(resource fp, int length)","Binary-safe file read"],frenchtojd:["int frenchtojd(int month, int day, int year)","Converts a french republic calendar date to julian day count"],fscanf:["mixed fscanf(resource stream, string format [, string ...])","Implements a mostly ANSI compatible fscanf()"],fseek:["int fseek(resource fp, int offset [, int whence])","Seek on a file pointer"],fsockopen:["resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])","Open Internet or Unix domain socket connection"],fstat:["array fstat(resource fp)","Stat() on a filehandle"],ftell:["int ftell(resource fp)","Get file pointer's read/write position"],ftok:["int ftok(string pathname, string proj)","Convert a pathname and a project identifier to a System V IPC key"],ftp_alloc:["bool ftp_alloc(resource stream, int size[, &response])","Attempt to allocate space on the remote FTP server"],ftp_cdup:["bool ftp_cdup(resource stream)","Changes to the parent directory"],ftp_chdir:["bool ftp_chdir(resource stream, string directory)","Changes directories"],ftp_chmod:["int ftp_chmod(resource stream, int mode, string filename)","Sets permissions on a file"],ftp_close:["bool ftp_close(resource stream)","Closes the FTP stream"],ftp_connect:["resource ftp_connect(string host [, int port [, int timeout]])","Opens a FTP stream"],ftp_delete:["bool ftp_delete(resource stream, string file)","Deletes a file"],ftp_exec:["bool ftp_exec(resource stream, string command)","Requests execution of a program on the FTP server"],ftp_fget:["bool ftp_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])","Retrieves a file from the FTP server and writes it to an open file"],ftp_fput:["bool ftp_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])","Stores a file from an open file to the FTP server"],ftp_get:["bool ftp_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])","Retrieves a file from the FTP server and writes it to a local file"],ftp_get_option:["mixed ftp_get_option(resource stream, int option)","Gets an FTP option"],ftp_login:["bool ftp_login(resource stream, string username, string password)","Logs into the FTP server"],ftp_mdtm:["int ftp_mdtm(resource stream, string filename)","Returns the last modification time of the file, or -1 on error"],ftp_mkdir:["string ftp_mkdir(resource stream, string directory)","Creates a directory and returns the absolute path for the new directory or false on error"],ftp_nb_continue:["int ftp_nb_continue(resource stream)","Continues retrieving/sending a file nbronously"],ftp_nb_fget:["int ftp_nb_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])","Retrieves a file from the FTP server asynchronly and writes it to an open file"],ftp_nb_fput:["int ftp_nb_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])","Stores a file from an open file to the FTP server nbronly"],ftp_nb_get:["int ftp_nb_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])","Retrieves a file from the FTP server nbhronly and writes it to a local file"],ftp_nb_put:["int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])","Stores a file on the FTP server"],ftp_nlist:["array ftp_nlist(resource stream, string directory)","Returns an array of filenames in the given directory"],ftp_pasv:["bool ftp_pasv(resource stream, bool pasv)","Turns passive mode on or off"],ftp_put:["bool ftp_put(resource stream, string remote_file, string local_file, int mode[, int startpos])","Stores a file on the FTP server"],ftp_pwd:["string ftp_pwd(resource stream)","Returns the present working directory"],ftp_raw:["array ftp_raw(resource stream, string command)","Sends a literal command to the FTP server"],ftp_rawlist:["array ftp_rawlist(resource stream, string directory [, bool recursive])","Returns a detailed listing of a directory as an array of output lines"],ftp_rename:["bool ftp_rename(resource stream, string src, string dest)","Renames the given file to a new path"],ftp_rmdir:["bool ftp_rmdir(resource stream, string directory)","Removes a directory"],ftp_set_option:["bool ftp_set_option(resource stream, int option, mixed value)","Sets an FTP option"],ftp_site:["bool ftp_site(resource stream, string cmd)","Sends a SITE command to the server"],ftp_size:["int ftp_size(resource stream, string filename)","Returns the size of the file, or -1 on error"],ftp_ssl_connect:["resource ftp_ssl_connect(string host [, int port [, int timeout]])","Opens a FTP-SSL stream"],ftp_systype:["string ftp_systype(resource stream)","Returns the system type identifier"],ftruncate:["bool ftruncate(resource fp, int size)","Truncate file to 'size' length"],func_get_arg:["mixed func_get_arg(int arg_num)","Get the $arg_num'th argument that was passed to the function"],func_get_args:["array func_get_args()","Get an array of the arguments that were passed to the function"],func_num_args:["int func_num_args()","Get the number of arguments that were passed to the function"],"function ":["",""],"foreach ":["",""],function_exists:["bool function_exists(string function_name)","Checks if the function exists"],fwrite:["int fwrite(resource fp, string str [, int length])","Binary-safe file write"],gc_collect_cycles:["int gc_collect_cycles()","Forces collection of any existing garbage cycles. Returns number of freed zvals"],gc_disable:["void gc_disable()","Deactivates the circular reference collector"],gc_enable:["void gc_enable()","Activates the circular reference collector"],gc_enabled:["void gc_enabled()","Returns status of the circular reference collector"],gd_info:["array gd_info()",""],getKeywords:["static array getKeywords(string $locale) {","* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array * }}}"],get_browser:["mixed get_browser([string browser_name [, bool return_array]])","Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array."],get_called_class:["string get_called_class()",'Retrieves the "Late Static Binding" class name'],get_cfg_var:["mixed get_cfg_var(string option_name)","Get the value of a PHP configuration option"],get_class:["string get_class([object object])","Retrieves the class name"],get_class_methods:["array get_class_methods(mixed class)","Returns an array of method names for class or class instance."],get_class_vars:["array get_class_vars(string class_name)","Returns an array of default properties of the class."],get_current_user:["string get_current_user()","Get the name of the owner of the current PHP script"],get_declared_classes:["array get_declared_classes()","Returns an array of all declared classes."],get_declared_interfaces:["array get_declared_interfaces()","Returns an array of all declared interfaces."],get_defined_constants:["array get_defined_constants([bool categorize])","Return an array containing the names and values of all defined constants"],get_defined_functions:["array get_defined_functions()","Returns an array of all defined functions"],get_defined_vars:["array get_defined_vars()","Returns an associative array of names and values of all currently defined variable names (variables in the current scope)"],get_display_language:["static string get_display_language($locale[, $in_locale = null])","* gets the language for the $locale in $in_locale or default_locale"],get_display_name:["static string get_display_name($locale[, $in_locale = null])","* gets the name for the $locale in $in_locale or default_locale"],get_display_region:["static string get_display_region($locale, $in_locale = null)","* gets the region for the $locale in $in_locale or default_locale"],get_display_script:["static string get_display_script($locale, $in_locale = null)","* gets the script for the $locale in $in_locale or default_locale"],get_extension_funcs:["array get_extension_funcs(string extension_name)","Returns an array with the names of functions belonging to the named extension"],get_headers:["array get_headers(string url[, int format])","fetches all the headers sent by the server in response to a HTTP request"],get_html_translation_table:["array get_html_translation_table([int table [, int quote_style]])","Returns the internal translation table used by htmlspecialchars and htmlentities"],get_include_path:["string get_include_path()","Get the current include_path configuration option"],get_included_files:["array get_included_files()","Returns an array with the file names that were include_once()'d"],get_loaded_extensions:["array get_loaded_extensions([bool zend_extensions])","Return an array containing names of loaded extensions"],get_magic_quotes_gpc:["int get_magic_quotes_gpc()","Get the current active configuration setting of magic_quotes_gpc"],get_magic_quotes_runtime:["int get_magic_quotes_runtime()","Get the current active configuration setting of magic_quotes_runtime"],get_meta_tags:["array get_meta_tags(string filename [, bool use_include_path])","Extracts all meta tag content attributes from a file and returns an array"],get_object_vars:["array get_object_vars(object obj)","Returns an array of object properties"],get_parent_class:["string get_parent_class([mixed object])","Retrieves the parent class name for object or class or current scope."],get_resource_type:["string get_resource_type(resource res)","Get the resource type name for a given resource"],getallheaders:["array getallheaders()",""],getcwd:["mixed getcwd()","Gets the current directory"],getdate:["array getdate([int timestamp])","Get date/time information"],getenv:["string getenv(string varname)","Get the value of an environment variable"],gethostbyaddr:["string gethostbyaddr(string ip_address)","Get the Internet host name corresponding to a given IP address"],gethostbyname:["string gethostbyname(string hostname)","Get the IP address corresponding to a given Internet host name"],gethostbynamel:["array gethostbynamel(string hostname)","Return a list of IP addresses that a given hostname resolves to."],gethostname:["string gethostname()","Get the host name of the current machine"],getimagesize:["array getimagesize(string imagefile [, array info])","Get the size of an image as 4-element array"],getlastmod:["int getlastmod()","Get time of last page modification"],getmygid:["int getmygid()","Get PHP script owner's GID"],getmyinode:["int getmyinode()","Get the inode of the current script being parsed"],getmypid:["int getmypid()","Get current process ID"],getmyuid:["int getmyuid()","Get PHP script owner's UID"],getopt:["array getopt(string options [, array longopts])","Get options from the command line argument list"],getprotobyname:["int getprotobyname(string name)","Returns protocol number associated with name as per /etc/protocols"],getprotobynumber:["string getprotobynumber(int proto)","Returns protocol name associated with protocol number proto"],getrandmax:["int getrandmax()","Returns the maximum value a random number can have"],getrusage:["array getrusage([int who])","Returns an array of usage statistics"],getservbyname:["int getservbyname(string service, string protocol)",'Returns port associated with service. Protocol must be "tcp" or "udp"'],getservbyport:["string getservbyport(int port, string protocol)",'Returns service name associated with port. Protocol must be "tcp" or "udp"'],gettext:["string gettext(string msgid)","Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist"],gettimeofday:["array gettimeofday([bool get_as_float])","Returns the current time as array"],gettype:["string gettype(mixed var)","Returns the type of the variable"],glob:["array glob(string pattern [, int flags])","Find pathnames matching a pattern"],gmdate:["string gmdate(string format [, long timestamp])","Format a GMT date/time"],gmmktime:["int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])","Get UNIX timestamp for a GMT date"],gmp_abs:["resource gmp_abs(resource a)","Calculates absolute value"],gmp_add:["resource gmp_add(resource a, resource b)","Add a and b"],gmp_and:["resource gmp_and(resource a, resource b)","Calculates logical AND of a and b"],gmp_clrbit:["void gmp_clrbit(resource &a, int index)","Clears bit in a"],gmp_cmp:["int gmp_cmp(resource a, resource b)","Compares two numbers"],gmp_com:["resource gmp_com(resource a)","Calculates one's complement of a"],gmp_div_q:["resource gmp_div_q(resource a, resource b [, int round])","Divide a by b, returns quotient only"],gmp_div_qr:["array gmp_div_qr(resource a, resource b [, int round])","Divide a by b, returns quotient and reminder"],gmp_div_r:["resource gmp_div_r(resource a, resource b [, int round])","Divide a by b, returns reminder only"],gmp_divexact:["resource gmp_divexact(resource a, resource b)","Divide a by b using exact division algorithm"],gmp_fact:["resource gmp_fact(int a)","Calculates factorial function"],gmp_gcd:["resource gmp_gcd(resource a, resource b)","Computes greatest common denominator (gcd) of a and b"],gmp_gcdext:["array gmp_gcdext(resource a, resource b)","Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)"],gmp_hamdist:["int gmp_hamdist(resource a, resource b)","Calculates hamming distance between a and b"],gmp_init:["resource gmp_init(mixed number [, int base])","Initializes GMP number"],gmp_intval:["int gmp_intval(resource gmpnumber)","Gets signed long value of GMP number"],gmp_invert:["resource gmp_invert(resource a, resource b)","Computes the inverse of a modulo b"],gmp_jacobi:["int gmp_jacobi(resource a, resource b)","Computes Jacobi symbol"],gmp_legendre:["int gmp_legendre(resource a, resource b)","Computes Legendre symbol"],gmp_mod:["resource gmp_mod(resource a, resource b)","Computes a modulo b"],gmp_mul:["resource gmp_mul(resource a, resource b)","Multiply a and b"],gmp_neg:["resource gmp_neg(resource a)","Negates a number"],gmp_nextprime:["resource gmp_nextprime(resource a)","Finds next prime of a"],gmp_or:["resource gmp_or(resource a, resource b)","Calculates logical OR of a and b"],gmp_perfect_square:["bool gmp_perfect_square(resource a)","Checks if a is an exact square"],gmp_popcount:["int gmp_popcount(resource a)","Calculates the population count of a"],gmp_pow:["resource gmp_pow(resource base, int exp)","Raise base to power exp"],gmp_powm:["resource gmp_powm(resource base, resource exp, resource mod)","Raise base to power exp and take result modulo mod"],gmp_prob_prime:["int gmp_prob_prime(resource a[, int reps])",'Checks if a is "probably prime"'],gmp_random:["resource gmp_random([int limiter])","Gets random number"],gmp_scan0:["int gmp_scan0(resource a, int start)","Finds first zero bit"],gmp_scan1:["int gmp_scan1(resource a, int start)","Finds first non-zero bit"],gmp_setbit:["void gmp_setbit(resource &a, int index[, bool set_clear])","Sets or clear bit in a"],gmp_sign:["int gmp_sign(resource a)","Gets the sign of the number"],gmp_sqrt:["resource gmp_sqrt(resource a)","Takes integer part of square root of a"],gmp_sqrtrem:["array gmp_sqrtrem(resource a)","Square root with remainder"],gmp_strval:["string gmp_strval(resource gmpnumber [, int base])","Gets string representation of GMP number"],gmp_sub:["resource gmp_sub(resource a, resource b)","Subtract b from a"],gmp_testbit:["bool gmp_testbit(resource a, int index)","Tests if bit is set in a"],gmp_xor:["resource gmp_xor(resource a, resource b)","Calculates logical exclusive OR of a and b"],gmstrftime:["string gmstrftime(string format [, int timestamp])","Format a GMT/UCT time/date according to locale settings"],grapheme_extract:["string grapheme_extract(string str, int size[, int extract_type[, int start[, int next]]])","Function to extract a sequence of default grapheme clusters"],grapheme_stripos:["int grapheme_stripos(string haystack, string needle [, int offset ])","Find position of first occurrence of a string within another, ignoring case differences"],grapheme_stristr:["string grapheme_stristr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another"],grapheme_strlen:["int grapheme_strlen(string str)","Get number of graphemes in a string"],grapheme_strpos:["int grapheme_strpos(string haystack, string needle [, int offset ])","Find position of first occurrence of a string within another"],grapheme_strripos:["int grapheme_strripos(string haystack, string needle [, int offset])","Find position of last occurrence of a string within another, ignoring case"],grapheme_strrpos:["int grapheme_strrpos(string haystack, string needle [, int offset])","Find position of last occurrence of a string within another"],grapheme_strstr:["string grapheme_strstr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another"],grapheme_substr:["string grapheme_substr(string str, int start [, int length])","Returns part of a string"],gregoriantojd:["int gregoriantojd(int month, int day, int year)","Converts a gregorian calendar date to julian day count"],gzcompress:["string gzcompress(string data [, int level])","Gzip-compress a string"],gzdeflate:["string gzdeflate(string data [, int level])","Gzip-compress a string"],gzencode:["string gzencode(string data [, int level [, int encoding_mode]])","GZ encode a string"],gzfile:["array gzfile(string filename [, int use_include_path])","Read und uncompress entire .gz-file into an array"],gzinflate:["string gzinflate(string data [, int length])","Unzip a gzip-compressed string"],gzopen:["resource gzopen(string filename, string mode [, int use_include_path])","Open a .gz-file and return a .gz-file pointer"],gzuncompress:["string gzuncompress(string data [, int length])","Unzip a gzip-compressed string"],hash:["string hash(string algo, string data[, bool raw_output = false])","Generate a hash of a given input string Returns lowercase hexits by default"],hash_algos:["array hash_algos()","Return a list of registered hashing algorithms"],hash_copy:["resource hash_copy(resource context)","Copy hash resource"],hash_file:["string hash_file(string algo, string filename[, bool raw_output = false])","Generate a hash of a given file Returns lowercase hexits by default"],hash_final:["string hash_final(resource context[, bool raw_output=false])","Output resulting digest"],hash_hmac:["string hash_hmac(string algo, string data, string key[, bool raw_output = false])","Generate a hash of a given input string with a key using HMAC Returns lowercase hexits by default"],hash_hmac_file:["string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])","Generate a hash of a given file with a key using HMAC Returns lowercase hexits by default"],hash_init:["resource hash_init(string algo[, int options, string key])","Initialize a hashing context"],hash_update:["bool hash_update(resource context, string data)","Pump data into the hashing algorithm"],hash_update_file:["bool hash_update_file(resource context, string filename[, resource context])","Pump data into the hashing algorithm from a file"],hash_update_stream:["int hash_update_stream(resource context, resource handle[, integer length])","Pump data into the hashing algorithm from an open stream"],header:["void header(string header [, bool replace, [int http_response_code]])","Sends a raw HTTP header"],header_remove:["void header_remove([string name])","Removes an HTTP header previously set using header()"],headers_list:["array headers_list()","Return list of headers to be sent / already sent"],headers_sent:["bool headers_sent([string &$file [, int &$line]])","Returns true if headers have already been sent, false otherwise"],hebrev:["string hebrev(string str [, int max_chars_per_line])","Converts logical Hebrew text to visual text"],hebrevc:["string hebrevc(string str [, int max_chars_per_line])","Converts logical Hebrew text to visual text with newline conversion"],hexdec:["int hexdec(string hexadecimal_number)","Returns the decimal equivalent of the hexadecimal number"],highlight_file:["bool highlight_file(string file_name [, bool return] )","Syntax highlight a source file"],highlight_string:["bool highlight_string(string string [, bool return] )","Syntax highlight a string or optionally return it"],html_entity_decode:["string html_entity_decode(string string [, int quote_style][, string charset])","Convert all HTML entities to their applicable characters"],htmlentities:["string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])","Convert all applicable characters to HTML entities"],htmlspecialchars:["string htmlspecialchars(string string [, int quote_style[, string charset[, bool double_encode]]])","Convert special characters to HTML entities"],htmlspecialchars_decode:["string htmlspecialchars_decode(string string [, int quote_style])","Convert special HTML entities back to characters"],http_build_query:["string http_build_query(mixed formdata [, string prefix [, string arg_separator]])","Generates a form-encoded query string from an associative array or object."],hypot:["float hypot(float num1, float num2)","Returns sqrt(num1*num1 + num2*num2)"],ibase_add_user:["bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])","Add a user to security database"],ibase_affected_rows:["int ibase_affected_rows( [ resource link_identifier ] )","Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement"],ibase_backup:["mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]])","Initiates a backup task in the service manager and returns immediately"],ibase_blob_add:["bool ibase_blob_add(resource blob_handle, string data)","Add data into created blob"],ibase_blob_cancel:["bool ibase_blob_cancel(resource blob_handle)","Cancel creating blob"],ibase_blob_close:["string ibase_blob_close(resource blob_handle)","Close blob"],ibase_blob_create:["resource ibase_blob_create([resource link_identifier])","Create blob for adding data"],ibase_blob_echo:["bool ibase_blob_echo([ resource link_identifier, ] string blob_id)","Output blob contents to browser"],ibase_blob_get:["string ibase_blob_get(resource blob_handle, int len)","Get len bytes data from open blob"],ibase_blob_import:["string ibase_blob_import([ resource link_identifier, ] resource file)","Create blob, copy file in it, and close it"],ibase_blob_info:["array ibase_blob_info([ resource link_identifier, ] string blob_id)","Return blob length and other useful info"],ibase_blob_open:["resource ibase_blob_open([ resource link_identifier, ] string blob_id)","Open blob for retrieving data parts"],ibase_close:["bool ibase_close([resource link_identifier])","Close an InterBase connection"],ibase_commit:["bool ibase_commit( resource link_identifier )","Commit transaction"],ibase_commit_ret:["bool ibase_commit_ret( resource link_identifier )","Commit transaction and retain the transaction context"],ibase_connect:["resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])","Open a connection to an InterBase database"],ibase_db_info:["string ibase_db_info(resource service_handle, string db, int action [, int argument])","Request statistics about a database"],ibase_delete_user:["bool ibase_delete_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])","Delete a user from security database"],ibase_drop_db:["bool ibase_drop_db([resource link_identifier])","Drop an InterBase database"],ibase_errcode:["int ibase_errcode()","Return error code"],ibase_errmsg:["string ibase_errmsg()","Return error message"],ibase_execute:["mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]])","Execute a previously prepared query"],ibase_fetch_assoc:["array ibase_fetch_assoc(resource result [, int fetch_flags])","Fetch a row from the results of a query"],ibase_fetch_object:["object ibase_fetch_object(resource result [, int fetch_flags])","Fetch a object from the results of a query"],ibase_fetch_row:["array ibase_fetch_row(resource result [, int fetch_flags])","Fetch a row from the results of a query"],ibase_field_info:["array ibase_field_info(resource query_result, int field_number)","Get information about a field"],ibase_free_event_handler:["bool ibase_free_event_handler(resource event)","Frees the event handler set by ibase_set_event_handler()"],ibase_free_query:["bool ibase_free_query(resource query)","Free memory used by a query"],ibase_free_result:["bool ibase_free_result(resource result)","Free the memory used by a result"],ibase_gen_id:["int ibase_gen_id(string generator [, int increment [, resource link_identifier ]])","Increments the named generator and returns its new value"],ibase_maintain_db:["bool ibase_maintain_db(resource service_handle, string db, int action [, int argument])","Execute a maintenance command on the database server"],ibase_modify_user:["bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])","Modify a user in security database"],ibase_name_result:["bool ibase_name_result(resource result, string name)","Assign a name to a result for use with ... WHERE CURRENT OF statements"],ibase_num_fields:["int ibase_num_fields(resource query_result)","Get the number of fields in result"],ibase_num_params:["int ibase_num_params(resource query)","Get the number of params in a prepared query"],ibase_num_rows:["int ibase_num_rows( resource result_identifier )","Return the number of rows that are available in a result"],ibase_param_info:["array ibase_param_info(resource query, int field_number)","Get information about a parameter"],ibase_pconnect:["resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])","Open a persistent connection to an InterBase database"],ibase_prepare:["resource ibase_prepare(resource link_identifier[, string query [, resource trans_identifier ]])","Prepare a query for later execution"],ibase_query:["mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]])","Execute a query"],ibase_restore:["mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]])","Initiates a restore task in the service manager and returns immediately"],ibase_rollback:["bool ibase_rollback( resource link_identifier )","Rollback transaction"],ibase_rollback_ret:["bool ibase_rollback_ret( resource link_identifier )","Rollback transaction and retain the transaction context"],ibase_server_info:["string ibase_server_info(resource service_handle, int action)","Request information about a database server"],ibase_service_attach:["resource ibase_service_attach(string host, string dba_username, string dba_password)","Connect to the service manager"],ibase_service_detach:["bool ibase_service_detach(resource service_handle)","Disconnect from the service manager"],ibase_set_event_handler:["resource ibase_set_event_handler([resource link_identifier,] callback handler, string event [, string event [, ...]])","Register the callback for handling each of the named events"],ibase_trans:["resource ibase_trans([int trans_args [, resource link_identifier [, ... ], int trans_args [, resource link_identifier [, ... ]] [, ...]]])","Start a transaction over one or several databases"],ibase_wait_event:["string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]])","Waits for any one of the passed Interbase events to be posted by the database, and returns its name"],iconv:["string iconv(string in_charset, string out_charset, string str)","Returns str converted to the out_charset character set"],iconv_get_encoding:["mixed iconv_get_encoding([string type])","Get internal encoding and output encoding for ob_iconv_handler()"],iconv_mime_decode:["string iconv_mime_decode(string encoded_string [, int mode, string charset])","Decodes a mime header field"],iconv_mime_decode_headers:["array iconv_mime_decode_headers(string headers [, int mode, string charset])","Decodes multiple mime header fields"],iconv_mime_encode:["string iconv_mime_encode(string field_name, string field_value [, array preference])","Composes a mime header field with field_name and field_value in a specified scheme"],iconv_set_encoding:["bool iconv_set_encoding(string type, string charset)","Sets internal encoding and output encoding for ob_iconv_handler()"],iconv_strlen:["int iconv_strlen(string str [, string charset])","Returns the character count of str"],iconv_strpos:["int iconv_strpos(string haystack, string needle [, int offset [, string charset]])","Finds position of first occurrence of needle within part of haystack beginning with offset"],iconv_strrpos:["int iconv_strrpos(string haystack, string needle [, string charset])","Finds position of last occurrence of needle within part of haystack beginning with offset"],iconv_substr:["string iconv_substr(string str, int offset, [int length, string charset])","Returns specified part of a string"],idate:["int idate(string format [, int timestamp])","Format a local time/date as integer"],idn_to_ascii:["int idn_to_ascii(string domain[, int options])","Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC"],idn_to_utf8:["int idn_to_utf8(string domain[, int options])","Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC"],ignore_user_abort:["int ignore_user_abort([string value])","Set whether we want to ignore a user abort event or not"],image2wbmp:["bool image2wbmp(resource im [, string filename [, int threshold]])","Output WBMP image to browser or file"],image_type_to_extension:["string image_type_to_extension(int imagetype [, bool include_dot])","Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype"],image_type_to_mime_type:["string image_type_to_mime_type(int imagetype)","Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype"],imagealphablending:["bool imagealphablending(resource im, bool on)","Turn alpha blending mode on or off for the given image"],imageantialias:["bool imageantialias(resource im, bool on)","Should antialiased functions used or not"],imagearc:["bool imagearc(resource im, int cx, int cy, int w, int h, int s, int e, int col)","Draw a partial ellipse"],imagechar:["bool imagechar(resource im, int font, int x, int y, string c, int col)","Draw a character"],imagecharup:["bool imagecharup(resource im, int font, int x, int y, string c, int col)","Draw a character rotated 90 degrees counter-clockwise"],imagecolorallocate:["int imagecolorallocate(resource im, int red, int green, int blue)","Allocate a color for an image"],imagecolorallocatealpha:["int imagecolorallocatealpha(resource im, int red, int green, int blue, int alpha)","Allocate a color with an alpha level. Works for true color and palette based images"],imagecolorat:["int imagecolorat(resource im, int x, int y)","Get the index of the color of a pixel"],imagecolorclosest:["int imagecolorclosest(resource im, int red, int green, int blue)","Get the index of the closest color to the specified color"],imagecolorclosestalpha:["int imagecolorclosestalpha(resource im, int red, int green, int blue, int alpha)","Find the closest matching colour with alpha transparency"],imagecolorclosesthwb:["int imagecolorclosesthwb(resource im, int red, int green, int blue)","Get the index of the color which has the hue, white and blackness nearest to the given color"],imagecolordeallocate:["bool imagecolordeallocate(resource im, int index)","De-allocate a color for an image"],imagecolorexact:["int imagecolorexact(resource im, int red, int green, int blue)","Get the index of the specified color"],imagecolorexactalpha:["int imagecolorexactalpha(resource im, int red, int green, int blue, int alpha)","Find exact match for colour with transparency"],imagecolormatch:["bool imagecolormatch(resource im1, resource im2)","Makes the colors of the palette version of an image more closely match the true color version"],imagecolorresolve:["int imagecolorresolve(resource im, int red, int green, int blue)","Get the index of the specified color or its closest possible alternative"],imagecolorresolvealpha:["int imagecolorresolvealpha(resource im, int red, int green, int blue, int alpha)","Resolve/Allocate a colour with an alpha level. Works for true colour and palette based images"],imagecolorset:["void imagecolorset(resource im, int col, int red, int green, int blue)","Set the color for the specified palette index"],imagecolorsforindex:["array imagecolorsforindex(resource im, int col)","Get the colors for an index"],imagecolorstotal:["int imagecolorstotal(resource im)","Find out the number of colors in an image's palette"],imagecolortransparent:["int imagecolortransparent(resource im [, int col])","Define a color as transparent"],imageconvolution:["resource imageconvolution(resource src_im, array matrix3x3, double div, double offset)","Apply a 3x3 convolution matrix, using coefficient div and offset"],imagecopy:["bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)","Copy part of an image"],imagecopymerge:["bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)","Merge one part of an image with another"],imagecopymergegray:["bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)","Merge one part of an image with another"],imagecopyresampled:["bool imagecopyresampled(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)","Copy and resize part of an image using resampling to help ensure clarity"],imagecopyresized:["bool imagecopyresized(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)","Copy and resize part of an image"],imagecreate:["resource imagecreate(int x_size, int y_size)","Create a new image"],imagecreatefromgd:["resource imagecreatefromgd(string filename)","Create a new image from GD file or URL"],imagecreatefromgd2:["resource imagecreatefromgd2(string filename)","Create a new image from GD2 file or URL"],imagecreatefromgd2part:["resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height)","Create a new image from a given part of GD2 file or URL"],imagecreatefromgif:["resource imagecreatefromgif(string filename)","Create a new image from GIF file or URL"],imagecreatefromjpeg:["resource imagecreatefromjpeg(string filename)","Create a new image from JPEG file or URL"],imagecreatefrompng:["resource imagecreatefrompng(string filename)","Create a new image from PNG file or URL"],imagecreatefromstring:["resource imagecreatefromstring(string image)","Create a new image from the image stream in the string"],imagecreatefromwbmp:["resource imagecreatefromwbmp(string filename)","Create a new image from WBMP file or URL"],imagecreatefromxbm:["resource imagecreatefromxbm(string filename)","Create a new image from XBM file or URL"],imagecreatefromxpm:["resource imagecreatefromxpm(string filename)","Create a new image from XPM file or URL"],imagecreatetruecolor:["resource imagecreatetruecolor(int x_size, int y_size)","Create a new true color image"],imagedashedline:["bool imagedashedline(resource im, int x1, int y1, int x2, int y2, int col)","Draw a dashed line"],imagedestroy:["bool imagedestroy(resource im)","Destroy an image"],imageellipse:["bool imageellipse(resource im, int cx, int cy, int w, int h, int color)","Draw an ellipse"],imagefill:["bool imagefill(resource im, int x, int y, int col)","Flood fill"],imagefilledarc:["bool imagefilledarc(resource im, int cx, int cy, int w, int h, int s, int e, int col, int style)","Draw a filled partial ellipse"],imagefilledellipse:["bool imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)","Draw an ellipse"],imagefilledpolygon:["bool imagefilledpolygon(resource im, array point, int num_points, int col)","Draw a filled polygon"],imagefilledrectangle:["bool imagefilledrectangle(resource im, int x1, int y1, int x2, int y2, int col)","Draw a filled rectangle"],imagefilltoborder:["bool imagefilltoborder(resource im, int x, int y, int border, int col)","Flood fill to specific color"],imagefilter:["bool imagefilter(resource src_im, int filtertype, [args] )","Applies Filter an image using a custom angle"],imagefontheight:["int imagefontheight(int font)","Get font height"],imagefontwidth:["int imagefontwidth(int font)","Get font width"],imageftbbox:["array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])","Give the bounding box of a text using fonts via freetype2"],imagefttext:["array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])","Write text to the image using fonts via freetype2"],imagegammacorrect:["bool imagegammacorrect(resource im, float inputgamma, float outputgamma)","Apply a gamma correction to a GD image"],imagegd:["bool imagegd(resource im [, string filename])","Output GD image to browser or file"],imagegd2:["bool imagegd2(resource im [, string filename, [, int chunk_size, [, int type]]])","Output GD2 image to browser or file"],imagegif:["bool imagegif(resource im [, string filename])","Output GIF image to browser or file"],imagegrabscreen:["resource imagegrabscreen()","Grab a screenshot"],imagegrabwindow:["resource imagegrabwindow(int window_handle [, int client_area])","Grab a window or its client area using a windows handle (HWND property in COM instance)"],imageinterlace:["int imageinterlace(resource im [, int interlace])","Enable or disable interlace"],imageistruecolor:["bool imageistruecolor(resource im)","return true if the image uses truecolor"],imagejpeg:["bool imagejpeg(resource im [, string filename [, int quality]])","Output JPEG image to browser or file"],imagelayereffect:["bool imagelayereffect(resource im, int effect)","Set the alpha blending flag to use the bundled libgd layering effects"],imageline:["bool imageline(resource im, int x1, int y1, int x2, int y2, int col)","Draw a line"],imageloadfont:["int imageloadfont(string filename)","Load a new font"],imagepalettecopy:["void imagepalettecopy(resource dst, resource src)","Copy the palette from the src image onto the dst image"],imagepng:["bool imagepng(resource im [, string filename])","Output PNG image to browser or file"],imagepolygon:["bool imagepolygon(resource im, array point, int num_points, int col)","Draw a polygon"],imagepsbbox:["array imagepsbbox(string text, resource font, int size [, int space, int tightness, float angle])","Return the bounding box needed by a string if rasterized"],imagepscopyfont:["int imagepscopyfont(int font_index)","Make a copy of a font for purposes like extending or reenconding"],imagepsencodefont:["bool imagepsencodefont(resource font_index, string filename)","To change a fonts character encoding vector"],imagepsextendfont:["bool imagepsextendfont(resource font_index, float extend)","Extend or or condense if (extend < 1) a font"],imagepsfreefont:["bool imagepsfreefont(resource font_index)","Free memory used by a font"],imagepsloadfont:["resource imagepsloadfont(string pathname)","Load a new font from specified file"],imagepsslantfont:["bool imagepsslantfont(resource font_index, float slant)","Slant a font"],imagepstext:["array imagepstext(resource image, string text, resource font, int size, int foreground, int background, int xcoord, int ycoord [, int space [, int tightness [, float angle [, int antialias])","Rasterize a string over an image"],imagerectangle:["bool imagerectangle(resource im, int x1, int y1, int x2, int y2, int col)","Draw a rectangle"],imagerotate:["resource imagerotate(resource src_im, float angle, int bgdcolor [, int ignoretransparent])","Rotate an image using a custom angle"],imagesavealpha:["bool imagesavealpha(resource im, bool on)","Include alpha channel to a saved image"],imagesetbrush:["bool imagesetbrush(resource image, resource brush)",'Set the brush image to $brush when filling $image with the "IMG_COLOR_BRUSHED" color'],imagesetpixel:["bool imagesetpixel(resource im, int x, int y, int col)","Set a single pixel"],imagesetstyle:["bool imagesetstyle(resource im, array styles)","Set the line drawing styles for use with imageline and IMG_COLOR_STYLED."],imagesetthickness:["bool imagesetthickness(resource im, int thickness)","Set line thickness for drawing lines, ellipses, rectangles, polygons etc."],imagesettile:["bool imagesettile(resource image, resource tile)",'Set the tile image to $tile when filling $image with the "IMG_COLOR_TILED" color'],imagestring:["bool imagestring(resource im, int font, int x, int y, string str, int col)","Draw a string horizontally"],imagestringup:["bool imagestringup(resource im, int font, int x, int y, string str, int col)","Draw a string vertically - rotated 90 degrees counter-clockwise"],imagesx:["int imagesx(resource im)","Get image width"],imagesy:["int imagesy(resource im)","Get image height"],imagetruecolortopalette:["void imagetruecolortopalette(resource im, bool ditherFlag, int colorsWanted)","Convert a true colour image to a palette based image with a number of colours, optionally using dithering."],imagettfbbox:["array imagettfbbox(float size, float angle, string font_file, string text)","Give the bounding box of a text using TrueType fonts"],imagettftext:["array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)","Write text to the image using a TrueType font"],imagetypes:["int imagetypes()","Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM"],imagewbmp:["bool imagewbmp(resource im [, string filename, [, int foreground]])","Output WBMP image to browser or file"],imagexbm:["int imagexbm(int im, string filename [, int foreground])","Output XBM image to browser or file"],imap_8bit:["string imap_8bit(string text)","Convert an 8-bit string to a quoted-printable string"],imap_alerts:["array imap_alerts()","Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called."],imap_append:["bool imap_append(resource stream_id, string folder, string message [, string options [, string internal_date]])","Append a new message to a specified mailbox"],imap_base64:["string imap_base64(string text)","Decode BASE64 encoded text"],imap_binary:["string imap_binary(string text)","Convert an 8bit string to a base64 string"],imap_body:["string imap_body(resource stream_id, int msg_no [, int options])","Read the message body"],imap_bodystruct:["object imap_bodystruct(resource stream_id, int msg_no, string section)","Read the structure of a specified body section of a specific message"],imap_check:["object imap_check(resource stream_id)","Get mailbox properties"],imap_clearflag_full:["bool imap_clearflag_full(resource stream_id, string sequence, string flag [, int options])","Clears flags on messages"],imap_close:["bool imap_close(resource stream_id [, int options])","Close an IMAP stream"],imap_createmailbox:["bool imap_createmailbox(resource stream_id, string mailbox)","Create a new mailbox"],imap_delete:["bool imap_delete(resource stream_id, int msg_no [, int options])","Mark a message for deletion"],imap_deletemailbox:["bool imap_deletemailbox(resource stream_id, string mailbox)","Delete a mailbox"],imap_errors:["array imap_errors()","Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called."],imap_expunge:["bool imap_expunge(resource stream_id)","Permanently delete all messages marked for deletion"],imap_fetch_overview:["array imap_fetch_overview(resource stream_id, string sequence [, int options])","Read an overview of the information in the headers of the given message sequence"],imap_fetchbody:["string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])","Get a specific body section"],imap_fetchheader:["string imap_fetchheader(resource stream_id, int msg_no [, int options])","Get the full unfiltered header for a message"],imap_fetchstructure:["object imap_fetchstructure(resource stream_id, int msg_no [, int options])","Read the full structure of a message"],imap_gc:["bool imap_gc(resource stream_id, int flags)","This function garbage collects (purges) the cache of entries of a specific type."],imap_get_quota:["array imap_get_quota(resource stream_id, string qroot)","Returns the quota set to the mailbox account qroot"],imap_get_quotaroot:["array imap_get_quotaroot(resource stream_id, string mbox)","Returns the quota set to the mailbox account mbox"],imap_getacl:["array imap_getacl(resource stream_id, string mailbox)","Gets the ACL for a given mailbox"],imap_getmailboxes:["array imap_getmailboxes(resource stream_id, string ref, string pattern)","Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter"],imap_getsubscribed:["array imap_getsubscribed(resource stream_id, string ref, string pattern)","Return a list of subscribed mailboxes, in the same format as imap_getmailboxes()"],imap_headerinfo:["object imap_headerinfo(resource stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])","Read the headers of the message"],imap_headers:["array imap_headers(resource stream_id)","Returns headers for all messages in a mailbox"],imap_last_error:["string imap_last_error()","Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call."],imap_list:["array imap_list(resource stream_id, string ref, string pattern)","Read the list of mailboxes"],imap_listscan:["array imap_listscan(resource stream_id, string ref, string pattern, string content)","Read list of mailboxes containing a certain string"],imap_lsub:["array imap_lsub(resource stream_id, string ref, string pattern)","Return a list of subscribed mailboxes"],imap_mail:["bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])","Send an email message"],imap_mail_compose:["string imap_mail_compose(array envelope, array body)","Create a MIME message based on given envelope and body sections"],imap_mail_copy:["bool imap_mail_copy(resource stream_id, string msglist, string mailbox [, int options])","Copy specified message to a mailbox"],imap_mail_move:["bool imap_mail_move(resource stream_id, string sequence, string mailbox [, int options])","Move specified message to a mailbox"],imap_mailboxmsginfo:["object imap_mailboxmsginfo(resource stream_id)","Returns info about the current mailbox"],imap_mime_header_decode:["array imap_mime_header_decode(string str)","Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text'"],imap_msgno:["int imap_msgno(resource stream_id, int unique_msg_id)","Get the sequence number associated with a UID"],imap_mutf7_to_utf8:["string imap_mutf7_to_utf8(string in)","Decode a modified UTF-7 string to UTF-8"],imap_num_msg:["int imap_num_msg(resource stream_id)","Gives the number of messages in the current mailbox"],imap_num_recent:["int imap_num_recent(resource stream_id)","Gives the number of recent messages in current mailbox"],imap_open:["resource imap_open(string mailbox, string user, string password [, int options [, int n_retries]])","Open an IMAP stream to a mailbox"],imap_ping:["bool imap_ping(resource stream_id)","Check if the IMAP stream is still active"],imap_qprint:["string imap_qprint(string text)","Convert a quoted-printable string to an 8-bit string"],imap_renamemailbox:["bool imap_renamemailbox(resource stream_id, string old_name, string new_name)","Rename a mailbox"],imap_reopen:["bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]])","Reopen an IMAP stream to a new mailbox"],imap_rfc822_parse_adrlist:["array imap_rfc822_parse_adrlist(string address_string, string default_host)","Parses an address string"],imap_rfc822_parse_headers:["object imap_rfc822_parse_headers(string headers [, string default_host])","Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo()"],imap_rfc822_write_address:["string imap_rfc822_write_address(string mailbox, string host, string personal)","Returns a properly formatted email address given the mailbox, host, and personal info"],imap_savebody:['bool imap_savebody(resource stream_id, string|resource file, int msg_no[, string section = ""[, int options = 0]])',"Save a specific body section to a file"],imap_search:["array imap_search(resource stream_id, string criteria [, int options [, string charset]])","Return a list of messages matching the given criteria"],imap_set_quota:["bool imap_set_quota(resource stream_id, string qroot, int mailbox_size)","Will set the quota for qroot mailbox"],imap_setacl:["bool imap_setacl(resource stream_id, string mailbox, string id, string rights)","Sets the ACL for a given mailbox"],imap_setflag_full:["bool imap_setflag_full(resource stream_id, string sequence, string flag [, int options])","Sets flags on messages"],imap_sort:["array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]])","Sort an array of message headers, optionally including only messages that meet specified criteria."],imap_status:["object imap_status(resource stream_id, string mailbox, int options)","Get status info from a mailbox"],imap_subscribe:["bool imap_subscribe(resource stream_id, string mailbox)","Subscribe to a mailbox"],imap_thread:["array imap_thread(resource stream_id [, int options])","Return threaded by REFERENCES tree"],imap_timeout:["mixed imap_timeout(int timeout_type [, int timeout])","Set or fetch imap timeout"],imap_uid:["int imap_uid(resource stream_id, int msg_no)","Get the unique message id associated with a standard sequential message number"],imap_undelete:["bool imap_undelete(resource stream_id, int msg_no [, int flags])","Remove the delete flag from a message"],imap_unsubscribe:["bool imap_unsubscribe(resource stream_id, string mailbox)","Unsubscribe from a mailbox"],imap_utf7_decode:["string imap_utf7_decode(string buf)","Decode a modified UTF-7 string"],imap_utf7_encode:["string imap_utf7_encode(string buf)","Encode a string in modified UTF-7"],imap_utf8:["string imap_utf8(string mime_encoded_text)","Convert a mime-encoded text to UTF-8"],imap_utf8_to_mutf7:["string imap_utf8_to_mutf7(string in)","Encode a UTF-8 string to modified UTF-7"],implode:["string implode([string glue,] array pieces)","Joins array elements placing glue string between items and return one string"],import_request_variables:["bool import_request_variables(string types [, string prefix])","Import GET/POST/Cookie variables into the global scope"],in_array:["bool in_array(mixed needle, array haystack [, bool strict])","Checks if the given value exists in the array"],include:["bool include(string path)","Includes and evaluates the specified file"],include_once:["bool include_once(string path)","Includes and evaluates the specified file"],inet_ntop:["string inet_ntop(string in_addr)","Converts a packed inet address to a human readable IP address string"],inet_pton:["string inet_pton(string ip_address)","Converts a human readable IP address to a packed binary string"],ini_get:["string ini_get(string varname)","Get a configuration option"],ini_get_all:["array ini_get_all([string extension[, bool details = true]])","Get all configuration options"],ini_restore:["void ini_restore(string varname)","Restore the value of a configuration option specified by varname"],ini_set:["string ini_set(string varname, string newvalue)","Set a configuration option, returns false on error and the old value of the configuration option on success"],interface_exists:["bool interface_exists(string classname [, bool autoload])","Checks if the class exists"],intl_error_name:["string intl_error_name()","* Return a string for a given error code. * The string will be the same as the name of the error code constant."],intl_get_error_code:["int intl_get_error_code()","* Get code of the last occured error."],intl_get_error_message:["string intl_get_error_message()","* Get text description of the last occured error."],intl_is_failure:["bool intl_is_failure()","* Check whether the given error code indicates a failure. * Returns true if it does, and false if the code * indicates success or a warning."],intval:["int intval(mixed var [, int base])","Get the integer value of a variable using the optional base for the conversion"],ip2long:["int ip2long(string ip_address)","Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address"],iptcembed:["array iptcembed(string iptcdata, string jpeg_file_name [, int spool])","Embed binary IPTC data into a JPEG image."],iptcparse:["array iptcparse(string iptcdata)","Parse binary IPTC-data into associative array"],is_a:["bool is_a(object object, string class_name)","Returns true if the object is of this class or has this class as one of its parents"],is_array:["bool is_array(mixed var)","Returns true if variable is an array"],is_bool:["bool is_bool(mixed var)","Returns true if variable is a boolean"],is_callable:["bool is_callable(mixed var [, bool syntax_only [, string callable_name]])","Returns true if var is callable."],is_countable:["bool is_countable(mixed var)","Returns true if var is countable, false otherwise"],is_dir:["bool is_dir(string filename)","Returns true if file is directory"],is_executable:["bool is_executable(string filename)","Returns true if file is executable"],is_file:["bool is_file(string filename)","Returns true if file is a regular file"],is_finite:["bool is_finite(float val)","Returns whether argument is finite"],is_float:["bool is_float(mixed var)","Returns true if variable is float point"],is_infinite:["bool is_infinite(float val)","Returns whether argument is infinite"],is_link:["bool is_link(string filename)","Returns true if file is symbolic link"],is_long:["bool is_long(mixed var)","Returns true if variable is a long (integer)"],is_nan:["bool is_nan(float val)","Returns whether argument is not a number"],is_null:["bool is_null(mixed var)","Returns true if variable is null"],is_numeric:["bool is_numeric(mixed value)","Returns true if value is a number or a numeric string"],is_object:["bool is_object(mixed var)","Returns true if variable is an object"],is_readable:["bool is_readable(string filename)","Returns true if file can be read"],is_resource:["bool is_resource(mixed var)","Returns true if variable is a resource"],is_scalar:["bool is_scalar(mixed value)","Returns true if value is a scalar"],is_string:["bool is_string(mixed var)","Returns true if variable is a string"],is_subclass_of:["bool is_subclass_of(object object, string class_name)","Returns true if the object has this class as one of its parents"],is_uploaded_file:["bool is_uploaded_file(string path)","Check if file was created by rfc1867 upload"],is_writable:["bool is_writable(string filename)","Returns true if file can be written"],isset:["bool isset(mixed var [, mixed var])","Determine whether a variable is set"],iterator_apply:["int iterator_apply(Traversable iterator, callable function [, array args = null)","Calls a function for every element in an iterator"],iterator_count:["int iterator_count(Traversable iterator)","Count the elements in an iterator"],iterator_to_array:["array iterator_to_array(Traversable iterator [, bool use_keys = true])","Copy the iterator into an array"],jddayofweek:["mixed jddayofweek(int juliandaycount [, int mode])","Returns name or number of day of week from julian day count"],jdmonthname:["string jdmonthname(int juliandaycount, int mode)","Returns name of month for julian day count"],jdtofrench:["string jdtofrench(int juliandaycount)","Converts a julian day count to a french republic calendar date"],jdtogregorian:["string jdtogregorian(int juliandaycount)","Converts a julian day count to a gregorian calendar date"],jdtojewish:["string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])","Converts a julian day count to a jewish calendar date"],jdtojulian:["string jdtojulian(int juliandaycount)","Convert a julian day count to a julian calendar date"],jdtounix:["int jdtounix(int jday)","Convert Julian Day to UNIX timestamp"],jewishtojd:["int jewishtojd(int month, int day, int year)","Converts a jewish calendar date to a julian day count"],join:["string join([string glue,] array pieces)","Returns a string containing a string representation of all the arrayelements in the same order, with the glue string between each element"],jpeg2wbmp:["bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)","Convert JPEG image to WBMP image"],json_decode:["mixed json_decode(string json [, bool assoc [, long depth]])","Decodes the JSON representation into a PHP value"],json_encode:["string json_encode(mixed data [, int options])","Returns the JSON representation of a value"],json_last_error:["int json_last_error()","Returns the error code of the last json_decode()."],juliantojd:["int juliantojd(int month, int day, int year)","Converts a julian calendar date to julian day count"],key:["mixed key(array array_arg)","Return the key of the element currently pointed to by the internal array pointer"],krsort:["bool krsort(array &array_arg [, int sort_flags])","Sort an array by key value in reverse order"],ksort:["bool ksort(array &array_arg [, int sort_flags])","Sort an array by key"],lcfirst:["string lcfirst(string str)","Make a string's first character lowercase"],lcg_value:["float lcg_value()","Returns a value from the combined linear congruential generator"],lchgrp:["bool lchgrp(string filename, mixed group)","Change symlink group"],ldap_8859_to_t61:["string ldap_8859_to_t61(string value)","Translate 8859 characters to t61 characters"],ldap_add:["bool ldap_add(resource link, string dn, array entry)","Add entries to LDAP directory"],ldap_bind:["bool ldap_bind(resource link [, string dn [, string password]])","Bind to LDAP directory"],ldap_compare:["bool ldap_compare(resource link, string dn, string attr, string value)","Determine if an entry has a specific value for one of its attributes"],ldap_connect:["resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])","Connect to an LDAP server"],ldap_count_entries:["int ldap_count_entries(resource link, resource result)","Count the number of entries in a search result"],ldap_delete:["bool ldap_delete(resource link, string dn)","Delete an entry from a directory"],ldap_dn2ufn:["string ldap_dn2ufn(string dn)","Convert DN to User Friendly Naming format"],ldap_err2str:["string ldap_err2str(int errno)","Convert error number to error string"],ldap_errno:["int ldap_errno(resource link)","Get the current ldap error number"],ldap_error:["string ldap_error(resource link)","Get the current ldap error string"],ldap_explode_dn:["array ldap_explode_dn(string dn, int with_attrib)","Splits DN into its component parts"],ldap_first_attribute:["string ldap_first_attribute(resource link, resource result_entry)","Return first attribute"],ldap_first_entry:["resource ldap_first_entry(resource link, resource result)","Return first result id"],ldap_first_reference:["resource ldap_first_reference(resource link, resource result)","Return first reference"],ldap_free_result:["bool ldap_free_result(resource result)","Free result memory"],ldap_get_attributes:["array ldap_get_attributes(resource link, resource result_entry)","Get attributes from a search result entry"],ldap_get_dn:["string ldap_get_dn(resource link, resource result_entry)","Get the DN of a result entry"],ldap_get_entries:["array ldap_get_entries(resource link, resource result)","Get all result entries"],ldap_get_option:["bool ldap_get_option(resource link, int option, mixed retval)","Get the current value of various session-wide parameters"],ldap_get_values_len:["array ldap_get_values_len(resource link, resource result_entry, string attribute)","Get all values with lengths from a result entry"],ldap_list:["resource ldap_list(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])","Single-level search"],ldap_mod_add:["bool ldap_mod_add(resource link, string dn, array entry)","Add attribute values to current"],ldap_mod_del:["bool ldap_mod_del(resource link, string dn, array entry)","Delete attribute values"],ldap_mod_replace:["bool ldap_mod_replace(resource link, string dn, array entry)","Replace attribute values with new ones"],ldap_next_attribute:["string ldap_next_attribute(resource link, resource result_entry)","Get the next attribute in result"],ldap_next_entry:["resource ldap_next_entry(resource link, resource result_entry)","Get next result entry"],ldap_next_reference:["resource ldap_next_reference(resource link, resource reference_entry)","Get next reference"],ldap_parse_reference:["bool ldap_parse_reference(resource link, resource reference_entry, array referrals)","Extract information from reference entry"],ldap_parse_result:["bool ldap_parse_result(resource link, resource result, int errcode, string matcheddn, string errmsg, array referrals)","Extract information from result"],ldap_read:["resource ldap_read(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])","Read an entry"],ldap_rename:["bool ldap_rename(resource link, string dn, string newrdn, string newparent, bool deleteoldrdn)","Modify the name of an entry"],ldap_sasl_bind:["bool ldap_sasl_bind(resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, string sasl_authz_id [, string props]]]]]]])","Bind to LDAP directory using SASL"],ldap_search:["resource ldap_search(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])","Search LDAP tree under base_dn"],ldap_set_option:["bool ldap_set_option(resource link, int option, mixed newval)","Set the value of various session-wide parameters"],ldap_set_rebind_proc:["bool ldap_set_rebind_proc(resource link, string callback)","Set a callback function to do re-binds on referral chasing."],ldap_sort:["bool ldap_sort(resource link, resource result, string sortfilter)","Sort LDAP result entries"],ldap_start_tls:["bool ldap_start_tls(resource link)","Start TLS"],ldap_t61_to_8859:["string ldap_t61_to_8859(string value)","Translate t61 characters to 8859 characters"],ldap_unbind:["bool ldap_unbind(resource link)","Unbind from LDAP directory"],leak:["void leak(int num_bytes=3)","Cause an intentional memory leak, for testing/debugging purposes"],levenshtein:["int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])","Calculate Levenshtein distance between two strings"],libxml_clear_errors:["void libxml_clear_errors()","Clear last error from libxml"],libxml_disable_entity_loader:["bool libxml_disable_entity_loader([bool disable])","Disable/Enable ability to load external entities"],libxml_get_errors:["object libxml_get_errors()","Retrieve array of errors"],libxml_get_last_error:["object libxml_get_last_error()","Retrieve last error from libxml"],libxml_set_streams_context:["void libxml_set_streams_context(resource streams_context)","Set the streams context for the next libxml document load or write"],libxml_use_internal_errors:["bool libxml_use_internal_errors([bool use_errors])","Disable libxml errors and allow user to fetch error information as needed"],link:["int link(string target, string link)","Create a hard link"],linkinfo:["int linkinfo(string filename)","Returns the st_dev field of the UNIX C stat structure describing the link"],litespeed_request_headers:["array litespeed_request_headers()","Fetch all HTTP request headers"],litespeed_response_headers:["array litespeed_response_headers()","Fetch all HTTP response headers"],locale_accept_from_http:["string locale_accept_from_http(string $http_accept)",null],locale_canonicalize:["static string locale_canonicalize(Locale $loc, string $locale)","* @param string $locale The locale string to canonicalize"],locale_filter_matches:["bool locale_filter_matches(string $langtag, string $locale[, bool $canonicalize])","* Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm"],locale_get_all_variants:["static array locale_get_all_variants($locale)","* gets an array containing the list of variants, or null"],locale_get_default:["static string locale_get_default( )","Get default locale"],locale_get_keywords:["static array locale_get_keywords(string $locale) {","* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array"],locale_get_primary_language:["static string locale_get_primary_language($locale)","* gets the primary language for the $locale"],locale_get_region:["static string locale_get_region($locale)","* gets the region for the $locale"],locale_get_script:["static string locale_get_script($locale)","* gets the script for the $locale"],locale_lookup:["string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])","* Searchs the items in $langtag for the best match to the language * range"],locale_set_default:["static string locale_set_default( string $locale )","Set default locale"],localeconv:["array localeconv()","Returns numeric formatting information based on the current locale"],localtime:["array localtime([int timestamp [, bool associative_array]])","Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array"],log:["float log(float number, [float base])","Returns the natural logarithm of the number, or the base log if base is specified"],log10:["float log10(float number)","Returns the base-10 logarithm of the number"],log1p:["float log1p(float number)","Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero"],long2ip:["string long2ip(int proper_address)","Converts an (IPv4) Internet network address into a string in Internet standard dotted format"],lstat:["array lstat(string filename)","Give information about a file or symbolic link"],ltrim:["string ltrim(string str [, string character_mask])","Strips whitespace from the beginning of a string"],mail:["int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])","Send an email message"],max:["mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])","Return the highest value in an array or a series of arguments"],mb_check_encoding:["bool mb_check_encoding([string var[, string encoding]])","Check if the string is valid for the specified encoding"],mb_convert_case:["string mb_convert_case(string sourcestring, int mode [, string encoding])","Returns a case-folded version of sourcestring"],mb_convert_encoding:["string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])","Returns converted string in desired encoding"],mb_convert_kana:["string mb_convert_kana(string str [, string option] [, string encoding])","Conversion between full-width character and half-width character (Japanese)"],mb_convert_variables:["string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...])","Converts the string resource in variables to desired encoding"],mb_decode_mimeheader:["string mb_decode_mimeheader(string string)",'Decodes the MIME "encoded-word" in the string'],mb_decode_numericentity:["string mb_decode_numericentity(string string, array convmap [, string encoding])","Converts HTML numeric entities to character code"],mb_detect_encoding:["string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]])","Encodings of the given string is returned (as a string)"],mb_detect_order:["bool|array mb_detect_order([mixed encoding-list])","Sets the current detect_order or Return the current detect_order as a array"],mb_encode_mimeheader:["string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])",'Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?='],mb_encode_numericentity:["string mb_encode_numericentity(string string, array convmap [, string encoding])","Converts specified characters to HTML numeric entities"],mb_encoding_aliases:["array mb_encoding_aliases(string encoding)","Returns an array of the aliases of a given encoding name"],mb_ereg:["int mb_ereg(string pattern, string string [, array registers])","Regular expression match for multibyte string"],mb_ereg_match:["bool mb_ereg_match(string pattern, string string [,string option])","Regular expression match for multibyte string"],mb_ereg_replace:["string mb_ereg_replace(string pattern, string replacement, string string [, string option])","Replace regular expression for multibyte string"],mb_ereg_search:["bool mb_ereg_search([string pattern[, string option]])","Regular expression search for multibyte string"],mb_ereg_search_getpos:["int mb_ereg_search_getpos()","Get search start position"],mb_ereg_search_getregs:["array mb_ereg_search_getregs()","Get matched substring of the last time"],mb_ereg_search_init:["bool mb_ereg_search_init(string string [, string pattern[, string option]])","Initialize string and regular expression for search."],mb_ereg_search_pos:["array mb_ereg_search_pos([string pattern[, string option]])","Regular expression search for multibyte string"],mb_ereg_search_regs:["array mb_ereg_search_regs([string pattern[, string option]])","Regular expression search for multibyte string"],mb_ereg_search_setpos:["bool mb_ereg_search_setpos(int position)","Set search start position"],mb_eregi:["int mb_eregi(string pattern, string string [, array registers])","Case-insensitive regular expression match for multibyte string"],mb_eregi_replace:["string mb_eregi_replace(string pattern, string replacement, string string)","Case insensitive replace regular expression for multibyte string"],mb_get_info:["mixed mb_get_info([string type])","Returns the current settings of mbstring"],mb_http_input:["mixed mb_http_input([string type])","Returns the input encoding"],mb_http_output:["string mb_http_output([string encoding])","Sets the current output_encoding or returns the current output_encoding as a string"],mb_internal_encoding:["string mb_internal_encoding([string encoding])","Sets the current internal encoding or Returns the current internal encoding as a string"],mb_language:["string mb_language([string language])","Sets the current language or Returns the current language as a string"],mb_list_encodings:["mixed mb_list_encodings()","Returns an array of all supported entity encodings"],mb_output_handler:["string mb_output_handler(string contents, int status)","Returns string in output buffer converted to the http_output encoding"],mb_parse_str:["bool mb_parse_str(string encoded_string [, array result])","Parses GET/POST/COOKIE data and sets global variables"],mb_preferred_mime_name:["string mb_preferred_mime_name(string encoding)","Return the preferred MIME name (charset) as a string"],mb_regex_encoding:["string mb_regex_encoding([string encoding])","Returns the current encoding for regex as a string."],mb_regex_set_options:["string mb_regex_set_options([string options])","Set or get the default options for mbregex functions"],mb_send_mail:["int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])","* Sends an email message with MIME scheme"],mb_split:["array mb_split(string pattern, string string [, int limit])","split multibyte string into array by regular expression"],mb_strcut:["string mb_strcut(string str, int start [, int length [, string encoding]])","Returns part of a string"],mb_strimwidth:["string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])","Trim the string in terminal width"],mb_stripos:["int mb_stripos(string haystack, string needle [, int offset [, string encoding]])","Finds position of first occurrence of a string within another, case insensitive"],mb_stristr:["string mb_stristr(string haystack, string needle[, bool part[, string encoding]])","Finds first occurrence of a string within another, case insensitive"],mb_strlen:["int mb_strlen(string str [, string encoding])","Get character numbers of a string"],mb_strpos:["int mb_strpos(string haystack, string needle [, int offset [, string encoding]])","Find position of first occurrence of a string within another"],mb_strrchr:["string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])","Finds the last occurrence of a character in a string within another"],mb_strrichr:["string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])","Finds the last occurrence of a character in a string within another, case insensitive"],mb_strripos:["int mb_strripos(string haystack, string needle [, int offset [, string encoding]])","Finds position of last occurrence of a string within another, case insensitive"],mb_strrpos:["int mb_strrpos(string haystack, string needle [, int offset [, string encoding]])","Find position of last occurrence of a string within another"],mb_strstr:["string mb_strstr(string haystack, string needle[, bool part[, string encoding]])","Finds first occurrence of a string within another"],mb_strtolower:["string mb_strtolower(string sourcestring [, string encoding])","* Returns a lowercased version of sourcestring"],mb_strtoupper:["string mb_strtoupper(string sourcestring [, string encoding])","* Returns a uppercased version of sourcestring"],mb_strwidth:["int mb_strwidth(string str [, string encoding])","Gets terminal width of a string"],mb_substitute_character:["mixed mb_substitute_character([mixed substchar])","Sets the current substitute_character or returns the current substitute_character"],mb_substr:["string mb_substr(string str, int start [, int length [, string encoding]])","Returns part of a string"],mb_substr_count:["int mb_substr_count(string haystack, string needle [, string encoding])","Count the number of substring occurrences"],mcrypt_cbc:["string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)","CBC crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_cfb:["string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)","CFB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_create_iv:["string mcrypt_create_iv(int size, int source)","Create an initialization vector (IV)"],mcrypt_decrypt:["string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)","OFB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_ecb:["string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)","ECB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_enc_get_algorithms_name:["string mcrypt_enc_get_algorithms_name(resource td)","Returns the name of the algorithm specified by the descriptor td"],mcrypt_enc_get_block_size:["int mcrypt_enc_get_block_size(resource td)","Returns the block size of the cipher specified by the descriptor td"],mcrypt_enc_get_iv_size:["int mcrypt_enc_get_iv_size(resource td)","Returns the size of the IV in bytes of the algorithm specified by the descriptor td"],mcrypt_enc_get_key_size:["int mcrypt_enc_get_key_size(resource td)","Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td"],mcrypt_enc_get_modes_name:["string mcrypt_enc_get_modes_name(resource td)","Returns the name of the mode specified by the descriptor td"],mcrypt_enc_get_supported_key_sizes:["array mcrypt_enc_get_supported_key_sizes(resource td)","This function decrypts the crypttext"],mcrypt_enc_is_block_algorithm:["bool mcrypt_enc_is_block_algorithm(resource td)","Returns TRUE if the alrogithm is a block algorithms"],mcrypt_enc_is_block_algorithm_mode:["bool mcrypt_enc_is_block_algorithm_mode(resource td)","Returns TRUE if the mode is for use with block algorithms"],mcrypt_enc_is_block_mode:["bool mcrypt_enc_is_block_mode(resource td)","Returns TRUE if the mode outputs blocks"],mcrypt_enc_self_test:["int mcrypt_enc_self_test(resource td)","This function runs the self test on the algorithm specified by the descriptor td"],mcrypt_encrypt:["string mcrypt_encrypt(string cipher, string key, string data, string mode, string iv)","OFB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_generic:["string mcrypt_generic(resource td, string data)","This function encrypts the plaintext"],mcrypt_generic_deinit:["bool mcrypt_generic_deinit(resource td)","This function terminates encrypt specified by the descriptor td"],mcrypt_generic_init:["int mcrypt_generic_init(resource td, string key, string iv)","This function initializes all buffers for the specific module"],mcrypt_get_block_size:["int mcrypt_get_block_size(string cipher, string module)","Get the key size of cipher"],mcrypt_get_cipher_name:["string mcrypt_get_cipher_name(string cipher)","Get the key size of cipher"],mcrypt_get_iv_size:["int mcrypt_get_iv_size(string cipher, string module)","Get the IV size of cipher (Usually the same as the blocksize)"],mcrypt_get_key_size:["int mcrypt_get_key_size(string cipher, string module)","Get the key size of cipher"],mcrypt_list_algorithms:["array mcrypt_list_algorithms([string lib_dir])",'List all algorithms in "module_dir"'],mcrypt_list_modes:["array mcrypt_list_modes([string lib_dir])",'List all modes "module_dir"'],mcrypt_module_close:["bool mcrypt_module_close(resource td)","Free the descriptor td"],mcrypt_module_get_algo_block_size:["int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir])","Returns the block size of the algorithm"],mcrypt_module_get_algo_key_size:["int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir])","Returns the maximum supported key size of the algorithm"],mcrypt_module_get_supported_key_sizes:["array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir])","This function decrypts the crypttext"],mcrypt_module_is_block_algorithm:["bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir])","Returns TRUE if the algorithm is a block algorithm"],mcrypt_module_is_block_algorithm_mode:["bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir])","Returns TRUE if the mode is for use with block algorithms"],mcrypt_module_is_block_mode:["bool mcrypt_module_is_block_mode(string mode [, string lib_dir])","Returns TRUE if the mode outputs blocks of bytes"],mcrypt_module_open:["resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory)","Opens the module of the algorithm and the mode to be used"],mcrypt_module_self_test:["bool mcrypt_module_self_test(string algorithm [, string lib_dir])",'Does a self test of the module "module"'],mcrypt_ofb:["string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)","OFB crypt/decrypt data using key key with cipher cipher starting with iv"],md5:["string md5(string str, [ bool raw_output])","Calculate the md5 hash of a string"],md5_file:["string md5_file(string filename [, bool raw_output])","Calculate the md5 hash of given filename"],mdecrypt_generic:["string mdecrypt_generic(resource td, string data)","This function decrypts the plaintext"],memory_get_peak_usage:["int memory_get_peak_usage([real_usage])","Returns the peak allocated by PHP memory"],memory_get_usage:["int memory_get_usage([real_usage])","Returns the allocated by PHP memory"],metaphone:["string metaphone(string text[, int phones])","Break english phrases down into their phonemes"],method_exists:["bool method_exists(object object, string method)","Checks if the class method exists"],mhash:["string mhash(int hash, string data [, string key])","Hash data with hash"],mhash_count:["int mhash_count()","Gets the number of available hashes"],mhash_get_block_size:["int mhash_get_block_size(int hash)","Gets the block size of hash"],mhash_get_hash_name:["string mhash_get_hash_name(int hash)","Gets the name of hash"],mhash_keygen_s2k:["string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)","Generates a key using hash functions"],microtime:["mixed microtime([bool get_as_float])","Returns either a string or a float containing the current time in seconds and microseconds"],mime_content_type:["string mime_content_type(string filename|resource stream)","Return content-type for file"],min:["mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])","Return the lowest value in an array or a series of arguments"],mkdir:["bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])","Create a directory"],mktime:["int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])","Get UNIX timestamp for a date"],money_format:["string money_format(string format , float value)","Convert monetary value(s) to string"],move_uploaded_file:["bool move_uploaded_file(string path, string new_path)","Move a file if and only if it was created by an upload"],msg_get_queue:["resource msg_get_queue(int key [, int perms])","Attach to a message queue"],msg_queue_exists:["bool msg_queue_exists(int key)","Check whether a message queue exists"],msg_receive:["mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])","Send a message of type msgtype (must be > 0) to a message queue"],msg_remove_queue:["bool msg_remove_queue(resource queue)","Destroy the queue"],msg_send:["bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])","Send a message of type msgtype (must be > 0) to a message queue"],msg_set_queue:["bool msg_set_queue(resource queue, array data)","Set information for a message queue"],msg_stat_queue:["array msg_stat_queue(resource queue)","Returns information about a message queue"],msgfmt_create:["MessageFormatter msgfmt_create( string $locale, string $pattern )","* Create formatter."],msgfmt_format:["mixed msgfmt_format( MessageFormatter $nf, array $args )","* Format a message."],msgfmt_format_message:["mixed msgfmt_format_message( string $locale, string $pattern, array $args )","* Format a message."],msgfmt_get_error_code:["int msgfmt_get_error_code( MessageFormatter $nf )","* Get formatter's last error code."],msgfmt_get_error_message:["string msgfmt_get_error_message( MessageFormatter $coll )","* Get text description for formatter's last error code."],msgfmt_get_locale:["string msgfmt_get_locale(MessageFormatter $mf)","* Get formatter locale."],msgfmt_get_pattern:["string msgfmt_get_pattern( MessageFormatter $mf )","* Get formatter pattern."],msgfmt_parse:["array msgfmt_parse( MessageFormatter $nf, string $source )","* Parse a message."],msgfmt_set_pattern:["bool msgfmt_set_pattern( MessageFormatter $mf, string $pattern )","* Set formatter pattern."],mssql_bind:["bool mssql_bind(resource stmt, string param_name, mixed var, int type [, bool is_output [, bool is_null [, int maxlen]]])","Adds a parameter to a stored procedure or a remote stored procedure"],mssql_close:["bool mssql_close([resource conn_id])","Closes a connection to a MS-SQL server"],mssql_connect:["int mssql_connect([string servername [, string username [, string password [, bool new_link]]]])","Establishes a connection to a MS-SQL server"],mssql_data_seek:["bool mssql_data_seek(resource result_id, int offset)","Moves the internal row pointer of the MS-SQL result associated with the specified result identifier to pointer to the specified row number"],mssql_execute:["mixed mssql_execute(resource stmt [, bool skip_results = false])","Executes a stored procedure on a MS-SQL server database"],mssql_fetch_array:["array mssql_fetch_array(resource result_id [, int result_type])","Returns an associative array of the current row in the result set specified by result_id"],mssql_fetch_assoc:["array mssql_fetch_assoc(resource result_id)","Returns an associative array of the current row in the result set specified by result_id"],mssql_fetch_batch:["int mssql_fetch_batch(resource result_index)","Returns the next batch of records"],mssql_fetch_field:["object mssql_fetch_field(resource result_id [, int offset])","Gets information about certain fields in a query result"],mssql_fetch_object:["object mssql_fetch_object(resource result_id)","Returns a pseudo-object of the current row in the result set specified by result_id"],mssql_fetch_row:["array mssql_fetch_row(resource result_id)","Returns an array of the current row in the result set specified by result_id"],mssql_field_length:["int mssql_field_length(resource result_id [, int offset])","Get the length of a MS-SQL field"],mssql_field_name:["string mssql_field_name(resource result_id [, int offset])","Returns the name of the field given by offset in the result set given by result_id"],mssql_field_seek:["bool mssql_field_seek(resource result_id, int offset)","Seeks to the specified field offset"],mssql_field_type:["string mssql_field_type(resource result_id [, int offset])","Returns the type of a field"],mssql_free_result:["bool mssql_free_result(resource result_index)","Free a MS-SQL result index"],mssql_free_statement:["bool mssql_free_statement(resource result_index)","Free a MS-SQL statement index"],mssql_get_last_message:["string mssql_get_last_message()","Gets the last message from the MS-SQL server"],mssql_guid_string:["string mssql_guid_string(string binary [,bool short_format])","Converts a 16 byte binary GUID to a string"],mssql_init:["int mssql_init(string sp_name [, resource conn_id])","Initializes a stored procedure or a remote stored procedure"],mssql_min_error_severity:["void mssql_min_error_severity(int severity)","Sets the lower error severity"],mssql_min_message_severity:["void mssql_min_message_severity(int severity)","Sets the lower message severity"],mssql_next_result:["bool mssql_next_result(resource result_id)","Move the internal result pointer to the next result"],mssql_num_fields:["int mssql_num_fields(resource mssql_result_index)","Returns the number of fields fetched in from the result id specified"],mssql_num_rows:["int mssql_num_rows(resource mssql_result_index)","Returns the number of rows fetched in from the result id specified"],mssql_pconnect:["int mssql_pconnect([string servername [, string username [, string password [, bool new_link]]]])","Establishes a persistent connection to a MS-SQL server"],mssql_query:["resource mssql_query(string query [, resource conn_id [, int batch_size]])","Perform an SQL query on a MS-SQL server database"],mssql_result:["string mssql_result(resource result_id, int row, mixed field)","Returns the contents of one cell from a MS-SQL result set"],mssql_rows_affected:["int mssql_rows_affected(resource conn_id)","Returns the number of records affected by the query"],mssql_select_db:["bool mssql_select_db(string database_name [, resource conn_id])","Select a MS-SQL database"],mt_getrandmax:["int mt_getrandmax()","Returns the maximum value a random number from Mersenne Twister can have"],mt_rand:["int mt_rand([int min, int max])","Returns a random number from Mersenne Twister"],mt_srand:["void mt_srand([int seed])","Seeds Mersenne Twister random number generator"],mysql_affected_rows:["int mysql_affected_rows([int link_identifier])","Gets number of affected rows in previous MySQL operation"],mysql_client_encoding:["string mysql_client_encoding([int link_identifier])","Returns the default character set for the current connection"],mysql_close:["bool mysql_close([int link_identifier])","Close a MySQL connection"],mysql_connect:["resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])","Opens a connection to a MySQL Server"],mysql_create_db:["bool mysql_create_db(string database_name [, int link_identifier])","Create a MySQL database"],mysql_data_seek:["bool mysql_data_seek(resource result, int row_number)","Move internal result pointer"],mysql_db_query:["resource mysql_db_query(string database_name, string query [, int link_identifier])","Sends an SQL query to MySQL"],mysql_drop_db:["bool mysql_drop_db(string database_name [, int link_identifier])","Drops (delete) a MySQL database"],mysql_errno:["int mysql_errno([int link_identifier])","Returns the number of the error message from previous MySQL operation"],mysql_error:["string mysql_error([int link_identifier])","Returns the text of the error message from previous MySQL operation"],mysql_escape_string:["string mysql_escape_string(string to_be_escaped)","Escape string for mysql query"],mysql_fetch_array:["array mysql_fetch_array(resource result [, int result_type])","Fetch a result row as an array (associative, numeric or both)"],mysql_fetch_assoc:["array mysql_fetch_assoc(resource result)","Fetch a result row as an associative array"],mysql_fetch_field:["object mysql_fetch_field(resource result [, int field_offset])","Gets column information from a result and return as an object"],mysql_fetch_lengths:["array mysql_fetch_lengths(resource result)","Gets max data size of each column in a result"],mysql_fetch_object:["object mysql_fetch_object(resource result [, string class_name [, NULL|array ctor_params]])","Fetch a result row as an object"],mysql_fetch_row:["array mysql_fetch_row(resource result)","Gets a result row as an enumerated array"],mysql_field_flags:["string mysql_field_flags(resource result, int field_offset)","Gets the flags associated with the specified field in a result"],mysql_field_len:["int mysql_field_len(resource result, int field_offset)","Returns the length of the specified field"],mysql_field_name:["string mysql_field_name(resource result, int field_index)","Gets the name of the specified field in a result"],mysql_field_seek:["bool mysql_field_seek(resource result, int field_offset)","Sets result pointer to a specific field offset"],mysql_field_table:["string mysql_field_table(resource result, int field_offset)","Gets name of the table the specified field is in"],mysql_field_type:["string mysql_field_type(resource result, int field_offset)","Gets the type of the specified field in a result"],mysql_free_result:["bool mysql_free_result(resource result)","Free result memory"],mysql_get_client_info:["string mysql_get_client_info()","Returns a string that represents the client library version"],mysql_get_host_info:["string mysql_get_host_info([int link_identifier])","Returns a string describing the type of connection in use, including the server host name"],mysql_get_proto_info:["int mysql_get_proto_info([int link_identifier])","Returns the protocol version used by current connection"],mysql_get_server_info:["string mysql_get_server_info([int link_identifier])","Returns a string that represents the server version number"],mysql_info:["string mysql_info([int link_identifier])","Returns a string containing information about the most recent query"],mysql_insert_id:["int mysql_insert_id([int link_identifier])","Gets the ID generated from the previous INSERT operation"],mysql_list_dbs:["resource mysql_list_dbs([int link_identifier])","List databases available on a MySQL server"],mysql_list_fields:["resource mysql_list_fields(string database_name, string table_name [, int link_identifier])","List MySQL result fields"],mysql_list_processes:["resource mysql_list_processes([int link_identifier])","Returns a result set describing the current server threads"],mysql_list_tables:["resource mysql_list_tables(string database_name [, int link_identifier])","List tables in a MySQL database"],mysql_num_fields:["int mysql_num_fields(resource result)","Gets number of fields in a result"],mysql_num_rows:["int mysql_num_rows(resource result)","Gets number of rows in a result"],mysql_pconnect:["resource mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])","Opens a persistent connection to a MySQL Server"],mysql_ping:["bool mysql_ping([int link_identifier])","Ping a server connection. If no connection then reconnect."],mysql_query:["resource mysql_query(string query [, int link_identifier])","Sends an SQL query to MySQL"],mysql_real_escape_string:["string mysql_real_escape_string(string to_be_escaped [, int link_identifier])","Escape special characters in a string for use in a SQL statement, taking into account the current charset of the connection"],mysql_result:["mixed mysql_result(resource result, int row [, mixed field])","Gets result data"],mysql_select_db:["bool mysql_select_db(string database_name [, int link_identifier])","Selects a MySQL database"],mysql_set_charset:["bool mysql_set_charset(string csname [, int link_identifier])","sets client character set"],mysql_stat:["string mysql_stat([int link_identifier])","Returns a string containing status information"],mysql_thread_id:["int mysql_thread_id([int link_identifier])","Returns the thread id of current connection"],mysql_unbuffered_query:["resource mysql_unbuffered_query(string query [, int link_identifier])","Sends an SQL query to MySQL, without fetching and buffering the result rows"],mysqli_affected_rows:["mixed mysqli_affected_rows(object link)","Get number of affected rows in previous MySQL operation"],mysqli_autocommit:["bool mysqli_autocommit(object link, bool mode)","Turn auto commit on or of"],mysqli_cache_stats:["array mysqli_cache_stats()","Returns statistics about the zval cache"],mysqli_change_user:["bool mysqli_change_user(object link, string user, string password, string database)","Change logged-in user of the active connection"],mysqli_character_set_name:["string mysqli_character_set_name(object link)","Returns the name of the character set used for this connection"],mysqli_close:["bool mysqli_close(object link)","Close connection"],mysqli_commit:["bool mysqli_commit(object link)","Commit outstanding actions and close transaction"],mysqli_connect:["object mysqli_connect([string hostname [,string username [,string passwd [,string dbname [,int port [,string socket]]]]]])","Open a connection to a mysql server"],mysqli_connect_errno:["int mysqli_connect_errno()","Returns the numerical value of the error message from last connect command"],mysqli_connect_error:["string mysqli_connect_error()","Returns the text of the error message from previous MySQL operation"],mysqli_data_seek:["bool mysqli_data_seek(object result, int offset)","Move internal result pointer"],mysqli_debug:["void mysqli_debug(string debug)",""],mysqli_dump_debug_info:["bool mysqli_dump_debug_info(object link)",""],mysqli_embedded_server_end:["void mysqli_embedded_server_end()",""],mysqli_embedded_server_start:["bool mysqli_embedded_server_start(bool start, array arguments, array groups)","initialize and start embedded server"],mysqli_errno:["int mysqli_errno(object link)","Returns the numerical value of the error message from previous MySQL operation"],mysqli_error:["string mysqli_error(object link)","Returns the text of the error message from previous MySQL operation"],mysqli_fetch_all:["mixed mysqli_fetch_all(object result [,int resulttype])","Fetches all result rows as an associative array, a numeric array, or both"],mysqli_fetch_array:["mixed mysqli_fetch_array(object result [,int resulttype])","Fetch a result row as an associative array, a numeric array, or both"],mysqli_fetch_assoc:["mixed mysqli_fetch_assoc(object result)","Fetch a result row as an associative array"],mysqli_fetch_field:["mixed mysqli_fetch_field(object result)","Get column information from a result and return as an object"],mysqli_fetch_field_direct:["mixed mysqli_fetch_field_direct(object result, int offset)","Fetch meta-data for a single field"],mysqli_fetch_fields:["mixed mysqli_fetch_fields(object result)","Return array of objects containing field meta-data"],mysqli_fetch_lengths:["mixed mysqli_fetch_lengths(object result)","Get the length of each output in a result"],mysqli_fetch_object:["mixed mysqli_fetch_object(object result [, string class_name [, NULL|array ctor_params]])","Fetch a result row as an object"],mysqli_fetch_row:["array mysqli_fetch_row(object result)","Get a result row as an enumerated array"],mysqli_field_count:["int mysqli_field_count(object link)","Fetch the number of fields returned by the last query for the given link"],mysqli_field_seek:["int mysqli_field_seek(object result, int fieldnr)","Set result pointer to a specified field offset"],mysqli_field_tell:["int mysqli_field_tell(object result)","Get current field offset of result pointer"],mysqli_free_result:["void mysqli_free_result(object result)","Free query result memory for the given result handle"],mysqli_get_charset:["object mysqli_get_charset(object link)","returns a character set object"],mysqli_get_client_info:["string mysqli_get_client_info()","Get MySQL client info"],mysqli_get_client_stats:["array mysqli_get_client_stats()","Returns statistics about the zval cache"],mysqli_get_client_version:["int mysqli_get_client_version()","Get MySQL client info"],mysqli_get_connection_stats:["array mysqli_get_connection_stats()","Returns statistics about the zval cache"],mysqli_get_host_info:["string mysqli_get_host_info(object link)","Get MySQL host info"],mysqli_get_proto_info:["int mysqli_get_proto_info(object link)","Get MySQL protocol information"],mysqli_get_server_info:["string mysqli_get_server_info(object link)","Get MySQL server info"],mysqli_get_server_version:["int mysqli_get_server_version(object link)","Return the MySQL version for the server referenced by the given link"],mysqli_get_warnings:["object mysqli_get_warnings(object link)",""],mysqli_info:["string mysqli_info(object link)","Get information about the most recent query"],mysqli_init:["resource mysqli_init()","Initialize mysqli and return a resource for use with mysql_real_connect"],mysqli_insert_id:["mixed mysqli_insert_id(object link)","Get the ID generated from the previous INSERT operation"],mysqli_kill:["bool mysqli_kill(object link, int processid)","Kill a mysql process on the server"],mysqli_link_construct:["object mysqli_link_construct()",""],mysqli_more_results:["bool mysqli_more_results(object link)","check if there any more query results from a multi query"],mysqli_multi_query:["bool mysqli_multi_query(object link, string query)","allows to execute multiple queries"],mysqli_next_result:["bool mysqli_next_result(object link)","read next result from multi_query"],mysqli_num_fields:["int mysqli_num_fields(object result)","Get number of fields in result"],mysqli_num_rows:["mixed mysqli_num_rows(object result)","Get number of rows in result"],mysqli_options:["bool mysqli_options(object link, int flags, mixed values)","Set options"],mysqli_ping:["bool mysqli_ping(object link)","Ping a server connection or reconnect if there is no connection"],mysqli_poll:["int mysqli_poll(array read, array write, array error, long sec [, long usec])","Poll connections"],mysqli_prepare:["mixed mysqli_prepare(object link, string query)","Prepare a SQL statement for execution"],mysqli_query:["mixed mysqli_query(object link, string query [,int resultmode])",""],mysqli_real_connect:["bool mysqli_real_connect(object link [,string hostname [,string username [,string passwd [,string dbname [,int port [,string socket [,int flags]]]]]]])","Open a connection to a mysql server"],mysqli_real_escape_string:["string mysqli_real_escape_string(object link, string escapestr)","Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection"],mysqli_real_query:["bool mysqli_real_query(object link, string query)","Binary-safe version of mysql_query()"],mysqli_reap_async_query:["int mysqli_reap_async_query(object link)","Poll connections"],mysqli_refresh:["bool mysqli_refresh(object link, long options)","Flush tables or caches, or reset replication server information"],mysqli_report:["bool mysqli_report(int flags)","sets report level"],mysqli_rollback:["bool mysqli_rollback(object link)","Undo actions from current transaction"],mysqli_select_db:["bool mysqli_select_db(object link, string dbname)","Select a MySQL database"],mysqli_set_charset:["bool mysqli_set_charset(object link, string csname)","sets client character set"],mysqli_set_local_infile_default:["void mysqli_set_local_infile_default(object link)","unsets user defined handler for load local infile command"],mysqli_set_local_infile_handler:["bool mysqli_set_local_infile_handler(object link, callback read_func)","Set callback functions for LOAD DATA LOCAL INFILE"],mysqli_sqlstate:["string mysqli_sqlstate(object link)","Returns the SQLSTATE error from previous MySQL operation"],mysqli_ssl_set:["bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])",""],mysqli_stat:["mixed mysqli_stat(object link)","Get current system status"],mysqli_stmt_affected_rows:["mixed mysqli_stmt_affected_rows(object stmt)","Return the number of rows affected in the last query for the given link"],mysqli_stmt_attr_get:["int mysqli_stmt_attr_get(object stmt, long attr)",""],mysqli_stmt_attr_set:["int mysqli_stmt_attr_set(object stmt, long attr, long mode)",""],mysqli_stmt_bind_param:["bool mysqli_stmt_bind_param(object stmt, string types, mixed variable [,mixed,....])","Bind variables to a prepared statement as parameters"],mysqli_stmt_bind_result:["bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])","Bind variables to a prepared statement for result storage"],mysqli_stmt_close:["bool mysqli_stmt_close(object stmt)","Close statement"],mysqli_stmt_data_seek:["void mysqli_stmt_data_seek(object stmt, int offset)","Move internal result pointer"],mysqli_stmt_errno:["int mysqli_stmt_errno(object stmt)",""],mysqli_stmt_error:["string mysqli_stmt_error(object stmt)",""],mysqli_stmt_execute:["bool mysqli_stmt_execute(object stmt)","Execute a prepared statement"],mysqli_stmt_fetch:["mixed mysqli_stmt_fetch(object stmt)","Fetch results from a prepared statement into the bound variables"],mysqli_stmt_field_count:["int mysqli_stmt_field_count(object stmt) {","Return the number of result columns for the given statement"],mysqli_stmt_free_result:["void mysqli_stmt_free_result(object stmt)","Free stored result memory for the given statement handle"],mysqli_stmt_get_result:["object mysqli_stmt_get_result(object link)","Buffer result set on client"],mysqli_stmt_get_warnings:["object mysqli_stmt_get_warnings(object link)",""],mysqli_stmt_init:["mixed mysqli_stmt_init(object link)","Initialize statement object"],mysqli_stmt_insert_id:["mixed mysqli_stmt_insert_id(object stmt)","Get the ID generated from the previous INSERT operation"],mysqli_stmt_next_result:["bool mysqli_stmt_next_result(object link)","read next result from multi_query"],mysqli_stmt_num_rows:["mixed mysqli_stmt_num_rows(object stmt)","Return the number of rows in statements result set"],mysqli_stmt_param_count:["int mysqli_stmt_param_count(object stmt)","Return the number of parameter for the given statement"],mysqli_stmt_prepare:["bool mysqli_stmt_prepare(object stmt, string query)","prepare server side statement with query"],mysqli_stmt_reset:["bool mysqli_stmt_reset(object stmt)","reset a prepared statement"],mysqli_stmt_result_metadata:["mixed mysqli_stmt_result_metadata(object stmt)","return result set from statement"],mysqli_stmt_send_long_data:["bool mysqli_stmt_send_long_data(object stmt, int param_nr, string data)",""],mysqli_stmt_sqlstate:["string mysqli_stmt_sqlstate(object stmt)",""],mysqli_stmt_store_result:["bool mysqli_stmt_store_result(stmt)",""],mysqli_store_result:["object mysqli_store_result(object link)","Buffer result set on client"],mysqli_thread_id:["int mysqli_thread_id(object link)","Return the current thread ID"],mysqli_thread_safe:["bool mysqli_thread_safe()","Return whether thread safety is given or not"],mysqli_use_result:["mixed mysqli_use_result(object link)","Directly retrieve query results - do not buffer results on client side"],mysqli_warning_count:["int mysqli_warning_count(object link)","Return number of warnings from the last query for the given link"],natcasesort:["void natcasesort(array &array_arg)","Sort an array using case-insensitive natural sort"],natsort:["void natsort(array &array_arg)","Sort an array using natural sort"],next:["mixed next(array array_arg)","Move array argument's internal pointer to the next element and return it"],ngettext:["string ngettext(string MSGID1, string MSGID2, int N)","Plural version of gettext()"],nl2br:["string nl2br(string str [, bool is_xhtml])","Converts newlines to HTML line breaks"],nl_langinfo:["string nl_langinfo(int item)","Query language and locale information"],normalizer_is_normalize:["bool normalizer_is_normalize( string $input [, string $form = FORM_C] )","* Test if a string is in a given normalization form."],normalizer_normalize:["string normalizer_normalize( string $input [, string $form = FORM_C] )","* Normalize a string."],nsapi_request_headers:["array nsapi_request_headers()","Get all headers from the request"],nsapi_response_headers:["array nsapi_response_headers()","Get all headers from the response"],nsapi_virtual:["bool nsapi_virtual(string uri)","Perform an NSAPI sub-request"],number_format:["string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])","Formats a number with grouped thousands"],numfmt_create:["NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )","* Create number formatter."],numfmt_format:["mixed numfmt_format( NumberFormatter $nf, mixed $num[, int type] )","* Format a number."],numfmt_format_currency:["mixed numfmt_format_currency( NumberFormatter $nf, double $num, string $currency )","* Format a number as currency."],numfmt_get_attribute:["mixed numfmt_get_attribute( NumberFormatter $nf, int $attr )","* Get formatter attribute value."],numfmt_get_error_code:["int numfmt_get_error_code( NumberFormatter $nf )","* Get formatter's last error code."],numfmt_get_error_message:["string numfmt_get_error_message( NumberFormatter $nf )","* Get text description for formatter's last error code."],numfmt_get_locale:["string numfmt_get_locale( NumberFormatter $nf[, int type] )","* Get formatter locale."],numfmt_get_pattern:["string numfmt_get_pattern( NumberFormatter $nf )","* Get formatter pattern."],numfmt_get_symbol:["string numfmt_get_symbol( NumberFormatter $nf, int $attr )","* Get formatter symbol value."],numfmt_get_text_attribute:["string numfmt_get_text_attribute( NumberFormatter $nf, int $attr )","* Get formatter attribute value."],numfmt_parse:["mixed numfmt_parse( NumberFormatter $nf, string $str[, int $type, int &$position ])","* Parse a number."],numfmt_parse_currency:["double numfmt_parse_currency( NumberFormatter $nf, string $str, string $¤cy[, int $&position] )","* Parse a number as currency."],numfmt_parse_message:["array numfmt_parse_message( string $locale, string $pattern, string $source )","* Parse a message."],numfmt_set_attribute:["bool numfmt_set_attribute( NumberFormatter $nf, int $attr, mixed $value )","* Get formatter attribute value."],numfmt_set_pattern:["bool numfmt_set_pattern( NumberFormatter $nf, string $pattern )","* Set formatter pattern."],numfmt_set_symbol:["bool numfmt_set_symbol( NumberFormatter $nf, int $attr, string $symbol )","* Set formatter symbol value."],numfmt_set_text_attribute:["bool numfmt_set_text_attribute( NumberFormatter $nf, int $attr, string $value )","* Get formatter attribute value."],ob_clean:["bool ob_clean()","Clean (delete) the current output buffer"],ob_end_clean:["bool ob_end_clean()","Clean the output buffer, and delete current output buffer"],ob_end_flush:["bool ob_end_flush()","Flush (send) the output buffer, and delete current output buffer"],ob_flush:["bool ob_flush()","Flush (send) contents of the output buffer. The last buffer content is sent to next buffer"],ob_get_clean:["bool ob_get_clean()","Get current buffer contents and delete current output buffer"],ob_get_contents:["string ob_get_contents()","Return the contents of the output buffer"],ob_get_flush:["bool ob_get_flush()","Get current buffer contents, flush (send) the output buffer, and delete current output buffer"],ob_get_length:["int ob_get_length()","Return the length of the output buffer"],ob_get_level:["int ob_get_level()","Return the nesting level of the output buffer"],ob_get_status:["false|array ob_get_status([bool full_status])","Return the status of the active or all output buffers"],ob_gzhandler:["string ob_gzhandler(string str, int mode)","Encode str based on accept-encoding setting - designed to be called from ob_start()"],ob_iconv_handler:["string ob_iconv_handler(string contents, int status)","Returns str in output buffer converted to the iconv.output_encoding character set"],ob_implicit_flush:["void ob_implicit_flush([int flag])","Turn implicit flush on/off and is equivalent to calling flush() after every output call"],ob_list_handlers:["false|array ob_list_handlers()","* List all output_buffers in an array"],ob_start:["bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])","Turn on Output Buffering (specifying an optional output handler)."],oci_bind_array_by_name:["bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]])","Bind a PHP array to an Oracle PL/SQL type by name"],oci_bind_by_name:["bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]])","Bind a PHP variable to an Oracle placeholder by name"],oci_cancel:["bool oci_cancel(resource stmt)","Cancel reading from a cursor"],oci_close:["bool oci_close(resource connection)","Disconnect from database"],oci_collection_append:["bool oci_collection_append(string value)","Append an object to the collection"],oci_collection_assign:["bool oci_collection_assign(object from)","Assign a collection from another existing collection"],oci_collection_element_assign:["bool oci_collection_element_assign(int index, string val)","Assign element val to collection at index ndx"],oci_collection_element_get:["string oci_collection_element_get(int ndx)","Retrieve the value at collection index ndx"],oci_collection_max:["int oci_collection_max()","Return the max value of a collection. For a varray this is the maximum length of the array"],oci_collection_size:["int oci_collection_size()","Return the size of a collection"],oci_collection_trim:["bool oci_collection_trim(int num)","Trim num elements from the end of a collection"],oci_commit:["bool oci_commit(resource connection)","Commit the current context"],oci_connect:["resource oci_connect(string user, string pass [, string db [, string charset [, int session_mode ]])","Connect to an Oracle database and log on. Returns a new session."],oci_define_by_name:["bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])","Define a PHP variable to an Oracle column by name"],oci_error:["array oci_error([resource stmt|connection|global])","Return the last error of stmt|connection|global. If no error happened returns false."],oci_execute:["bool oci_execute(resource stmt [, int mode])","Execute a parsed statement"],oci_fetch:["bool oci_fetch(resource stmt)","Prepare a new row of data for reading"],oci_fetch_all:["int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]])","Fetch all rows of result data into an array"],oci_fetch_array:["array oci_fetch_array( resource stmt [, int mode ])","Fetch a result row as an array"],oci_fetch_assoc:["array oci_fetch_assoc( resource stmt )","Fetch a result row as an associative array"],oci_fetch_object:["object oci_fetch_object( resource stmt )","Fetch a result row as an object"],oci_fetch_row:["array oci_fetch_row( resource stmt )","Fetch a result row as an enumerated array"],oci_field_is_null:["bool oci_field_is_null(resource stmt, int col)","Tell whether a column is NULL"],oci_field_name:["string oci_field_name(resource stmt, int col)","Tell the name of a column"],oci_field_precision:["int oci_field_precision(resource stmt, int col)","Tell the precision of a column"],oci_field_scale:["int oci_field_scale(resource stmt, int col)","Tell the scale of a column"],oci_field_size:["int oci_field_size(resource stmt, int col)","Tell the maximum data size of a column"],oci_field_type:["mixed oci_field_type(resource stmt, int col)","Tell the data type of a column"],oci_field_type_raw:["int oci_field_type_raw(resource stmt, int col)","Tell the raw oracle data type of a column"],oci_free_collection:["bool oci_free_collection()","Deletes collection object"],oci_free_descriptor:["bool oci_free_descriptor()","Deletes large object description"],oci_free_statement:["bool oci_free_statement(resource stmt)","Free all resources associated with a statement"],oci_internal_debug:["void oci_internal_debug(int onoff)","Toggle internal debugging output for the OCI extension"],oci_lob_append:["bool oci_lob_append( object lob )","Appends data from a LOB to another LOB"],oci_lob_close:["bool oci_lob_close()","Closes lob descriptor"],oci_lob_copy:["bool oci_lob_copy( object lob_to, object lob_from [, int length ] )","Copies data from a LOB to another LOB"],oci_lob_eof:["bool oci_lob_eof()","Checks if EOF is reached"],oci_lob_erase:["int oci_lob_erase( [ int offset [, int length ] ] )","Erases a specified portion of the internal LOB, starting at a specified offset"],oci_lob_export:["bool oci_lob_export([string filename [, int start [, int length]]])","Writes a large object into a file"],oci_lob_flush:["bool oci_lob_flush( [ int flag ] )","Flushes the LOB buffer"],oci_lob_import:["bool oci_lob_import( string filename )","Loads file into a LOB"],oci_lob_is_equal:["bool oci_lob_is_equal( object lob1, object lob2 )","Tests to see if two LOB/FILE locators are equal"],oci_lob_load:["string oci_lob_load()","Loads a large object"],oci_lob_read:["string oci_lob_read( int length )","Reads particular part of a large object"],oci_lob_rewind:["bool oci_lob_rewind()","Rewind pointer of a LOB"],oci_lob_save:["bool oci_lob_save( string data [, int offset ])","Saves a large object"],oci_lob_seek:["bool oci_lob_seek( int offset [, int whence ])","Moves the pointer of a LOB"],oci_lob_size:["int oci_lob_size()","Returns size of a large object"],oci_lob_tell:["int oci_lob_tell()","Tells LOB pointer position"],oci_lob_truncate:["bool oci_lob_truncate( [ int length ])","Truncates a LOB"],oci_lob_write:["int oci_lob_write( string string [, int length ])","Writes data to current position of a LOB"],oci_lob_write_temporary:["bool oci_lob_write_temporary(string var [, int lob_type])","Writes temporary blob"],oci_new_collection:["object oci_new_collection(resource connection, string tdo [, string schema])","Initialize a new collection"],oci_new_connect:["resource oci_new_connect(string user, string pass [, string db])","Connect to an Oracle database and log on. Returns a new session."],oci_new_cursor:["resource oci_new_cursor(resource connection)","Return a new cursor (Statement-Handle) - use this to bind ref-cursors!"],oci_new_descriptor:["object oci_new_descriptor(resource connection [, int type])","Initialize a new empty descriptor LOB/FILE (LOB is default)"],oci_num_fields:["int oci_num_fields(resource stmt)","Return the number of result columns in a statement"],oci_num_rows:["int oci_num_rows(resource stmt)","Return the row count of an OCI statement"],oci_parse:["resource oci_parse(resource connection, string query)","Parse a query and return a statement"],oci_password_change:["bool oci_password_change(resource connection, string username, string old_password, string new_password)","Changes the password of an account"],oci_pconnect:["resource oci_pconnect(string user, string pass [, string db [, string charset ]])","Connect to an Oracle database using a persistent connection and log on. Returns a new session."],oci_result:["string oci_result(resource stmt, mixed column)","Return a single column of result data"],oci_rollback:["bool oci_rollback(resource connection)","Rollback the current context"],oci_server_version:["string oci_server_version(resource connection)","Return a string containing server version information"],oci_set_action:["bool oci_set_action(resource connection, string value)","Sets the action attribute on the connection"],oci_set_client_identifier:["bool oci_set_client_identifier(resource connection, string value)","Sets the client identifier attribute on the connection"],oci_set_client_info:["bool oci_set_client_info(resource connection, string value)","Sets the client info attribute on the connection"],oci_set_edition:["bool oci_set_edition(string value)","Sets the edition attribute for all subsequent connections created"],oci_set_module_name:["bool oci_set_module_name(resource connection, string value)","Sets the module attribute on the connection"],oci_set_prefetch:["bool oci_set_prefetch(resource stmt, int prefetch_rows)","Sets the number of rows to be prefetched on execute to prefetch_rows for stmt"],oci_statement_type:["string oci_statement_type(resource stmt)","Return the query type of an OCI statement"],ocifetchinto:["int ocifetchinto(resource stmt, array &output [, int mode])","Fetch a row of result data into an array"],ocigetbufferinglob:["bool ocigetbufferinglob()","Returns current state of buffering for a LOB"],ocisetbufferinglob:["bool ocisetbufferinglob( bool flag )","Enables/disables buffering for a LOB"],octdec:["int octdec(string octal_number)","Returns the decimal equivalent of an octal string"],odbc_autocommit:["mixed odbc_autocommit(resource connection_id [, int OnOff])","Toggle autocommit mode or get status"],odbc_binmode:["bool odbc_binmode(int result_id, int mode)","Handle binary column data"],odbc_close:["void odbc_close(resource connection_id)","Close an ODBC connection"],odbc_close_all:["void odbc_close_all()","Close all ODBC connections"],odbc_columnprivileges:["resource odbc_columnprivileges(resource connection_id, string catalog, string schema, string table, string column)","Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table"],odbc_columns:["resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])","Returns a result identifier that can be used to fetch a list of column names in specified tables"],odbc_commit:["bool odbc_commit(resource connection_id)","Commit an ODBC transaction"],odbc_connect:["resource odbc_connect(string DSN, string user, string password [, int cursor_option])","Connect to a datasource"],odbc_cursor:["string odbc_cursor(resource result_id)","Get cursor name"],odbc_data_source:["array odbc_data_source(resource connection_id, int fetch_type)","Return information about the currently connected data source"],odbc_error:["string odbc_error([resource connection_id])","Get the last error code"],odbc_errormsg:["string odbc_errormsg([resource connection_id])","Get the last error message"],odbc_exec:["resource odbc_exec(resource connection_id, string query [, int flags])","Prepare and execute an SQL statement"],odbc_execute:["bool odbc_execute(resource result_id [, array parameters_array])","Execute a prepared statement"],odbc_fetch_array:["array odbc_fetch_array(int result [, int rownumber])","Fetch a result row as an associative array"],odbc_fetch_into:["int odbc_fetch_into(resource result_id, array &result_array, [, int rownumber])","Fetch one result row into an array"],odbc_fetch_object:["object odbc_fetch_object(int result [, int rownumber])","Fetch a result row as an object"],odbc_fetch_row:["bool odbc_fetch_row(resource result_id [, int row_number])","Fetch a row"],odbc_field_len:["int odbc_field_len(resource result_id, int field_number)","Get the length (precision) of a column"],odbc_field_name:["string odbc_field_name(resource result_id, int field_number)","Get a column name"],odbc_field_num:["int odbc_field_num(resource result_id, string field_name)","Return column number"],odbc_field_scale:["int odbc_field_scale(resource result_id, int field_number)","Get the scale of a column"],odbc_field_type:["string odbc_field_type(resource result_id, int field_number)","Get the datatype of a column"],odbc_foreignkeys:["resource odbc_foreignkeys(resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)","Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table"],odbc_free_result:["bool odbc_free_result(resource result_id)","Free resources associated with a result"],odbc_gettypeinfo:["resource odbc_gettypeinfo(resource connection_id [, int data_type])","Returns a result identifier containing information about data types supported by the data source"],odbc_longreadlen:["bool odbc_longreadlen(int result_id, int length)","Handle LONG columns"],odbc_next_result:["bool odbc_next_result(resource result_id)","Checks if multiple results are avaiable"],odbc_num_fields:["int odbc_num_fields(resource result_id)","Get number of columns in a result"],odbc_num_rows:["int odbc_num_rows(resource result_id)","Get number of rows in a result"],odbc_pconnect:["resource odbc_pconnect(string DSN, string user, string password [, int cursor_option])","Establish a persistent connection to a datasource"],odbc_prepare:["resource odbc_prepare(resource connection_id, string query)","Prepares a statement for execution"],odbc_primarykeys:["resource odbc_primarykeys(resource connection_id, string qualifier, string owner, string table)","Returns a result identifier listing the column names that comprise the primary key for a table"],odbc_procedurecolumns:["resource odbc_procedurecolumns(resource connection_id [, string qualifier, string owner, string proc, string column])","Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures"],odbc_procedures:["resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])","Returns a result identifier containg the list of procedure names in a datasource"],odbc_result:["mixed odbc_result(resource result_id, mixed field)","Get result data"],odbc_result_all:["int odbc_result_all(resource result_id [, string format])","Print result as HTML table"],odbc_rollback:["bool odbc_rollback(resource connection_id)","Rollback a transaction"],odbc_setoption:["bool odbc_setoption(resource conn_id|result_id, int which, int option, int value)","Sets connection or statement options"],odbc_specialcolumns:["resource odbc_specialcolumns(resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)","Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction"],odbc_statistics:["resource odbc_statistics(resource connection_id, string qualifier, string owner, string name, int unique, int accuracy)","Returns a result identifier that contains statistics about a single table and the indexes associated with the table"],odbc_tableprivileges:["resource odbc_tableprivileges(resource connection_id, string qualifier, string owner, string name)","Returns a result identifier containing a list of tables and the privileges associated with each table"],odbc_tables:["resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])","Call the SQLTables function"],opendir:["mixed opendir(string path[, resource context])","Open a directory and return a dir_handle"],openlog:["bool openlog(string ident, int option, int facility)","Open connection to system logger"],openssl_csr_export:["bool openssl_csr_export(resource csr, string &out [, bool notext=true])","Exports a CSR to file or a var"],openssl_csr_export_to_file:["bool openssl_csr_export_to_file(resource csr, string outfilename [, bool notext=true])","Exports a CSR to file"],openssl_csr_get_public_key:["mixed openssl_csr_get_public_key(mixed csr)","Returns the subject of a CERT or FALSE on error"],openssl_csr_get_subject:["mixed openssl_csr_get_subject(mixed csr)","Returns the subject of a CERT or FALSE on error"],openssl_csr_new:["bool openssl_csr_new(array dn, resource &privkey [, array configargs [, array extraattribs]])","Generates a privkey and CSR"],openssl_csr_sign:["resource openssl_csr_sign(mixed csr, mixed x509, mixed priv_key, long days [, array config_args [, long serial]])","Signs a cert with another CERT"],openssl_decrypt:["string openssl_decrypt(string data, string method, string password [, bool raw_input=false])","Takes raw or base64 encoded string and dectupt it using given method and key"],openssl_dh_compute_key:["string openssl_dh_compute_key(string pub_key, resource dh_key)","Computes shared sicret for public value of remote DH key and local DH key"],openssl_digest:["string openssl_digest(string data, string method [, bool raw_output=false])","Computes digest hash value for given data using given method, returns raw or binhex encoded string"],openssl_encrypt:["string openssl_encrypt(string data, string method, string password [, bool raw_output=false])","Encrypts given data with given method and key, returns raw or base64 encoded string"],openssl_error_string:["mixed openssl_error_string()","Returns a description of the last error, and alters the index of the error messages. Returns false when the are no more messages"],openssl_get_cipher_methods:["array openssl_get_cipher_methods([bool aliases = false])","Return array of available cipher methods"],openssl_get_md_methods:["array openssl_get_md_methods([bool aliases = false])","Return array of available digest methods"],openssl_open:["bool openssl_open(string data, &string opendata, string ekey, mixed privkey)","Opens data"],openssl_pkcs12_export:["bool openssl_pkcs12_export(mixed x509, string &out, mixed priv_key, string pass[, array args])","Creates and exports a PKCS12 to a var"],openssl_pkcs12_export_to_file:["bool openssl_pkcs12_export_to_file(mixed x509, string filename, mixed priv_key, string pass[, array args])","Creates and exports a PKCS to file"],openssl_pkcs12_read:["bool openssl_pkcs12_read(string PKCS12, array &certs, string pass)","Parses a PKCS12 to an array"],openssl_pkcs7_decrypt:["bool openssl_pkcs7_decrypt(string infilename, string outfilename, mixed recipcert [, mixed recipkey])","Decrypts the S/MIME message in the file name infilename and output the results to the file name outfilename. recipcert is a CERT for one of the recipients. recipkey specifies the private key matching recipcert, if recipcert does not include the key"],openssl_pkcs7_encrypt:["bool openssl_pkcs7_encrypt(string infile, string outfile, mixed recipcerts, array headers [, long flags [, long cipher]])","Encrypts the message in the file named infile with the certificates in recipcerts and output the result to the file named outfile"],openssl_pkcs7_sign:["bool openssl_pkcs7_sign(string infile, string outfile, mixed signcert, mixed signkey, array headers [, long flags [, string extracertsfilename]])","Signs the MIME message in the file named infile with signcert/signkey and output the result to file name outfile. headers lists plain text headers to exclude from the signed portion of the message, and should include to, from and subject as a minimum"],openssl_pkcs7_verify:["bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])","Verifys that the data block is intact, the signer is who they say they are, and returns the CERTs of the signers"],openssl_pkey_export:["bool openssl_pkey_export(mixed key, &mixed out [, string passphrase [, array config_args]])","Gets an exportable representation of a key into a string or file"],openssl_pkey_export_to_file:["bool openssl_pkey_export_to_file(mixed key, string outfilename [, string passphrase, array config_args)","Gets an exportable representation of a key into a file"],openssl_pkey_free:["void openssl_pkey_free(int key)","Frees a key"],openssl_pkey_get_details:["resource openssl_pkey_get_details(resource key)","returns an array with the key details (bits, pkey, type)"],openssl_pkey_get_private:["int openssl_pkey_get_private(string key [, string passphrase])","Gets private keys"],openssl_pkey_get_public:["int openssl_pkey_get_public(mixed cert)","Gets public key from X.509 certificate"],openssl_pkey_new:["resource openssl_pkey_new([array configargs])","Generates a new private key"],openssl_private_decrypt:["bool openssl_private_decrypt(string data, string &decrypted, mixed key [, int padding])","Decrypts data with private key"],openssl_private_encrypt:["bool openssl_private_encrypt(string data, string &crypted, mixed key [, int padding])","Encrypts data with private key"],openssl_public_decrypt:["bool openssl_public_decrypt(string data, string &crypted, resource key [, int padding])","Decrypts data with public key"],openssl_public_encrypt:["bool openssl_public_encrypt(string data, string &crypted, mixed key [, int padding])","Encrypts data with public key"],openssl_random_pseudo_bytes:["string openssl_random_pseudo_bytes(integer length [, &bool returned_strong_result])","Returns a string of the length specified filled with random pseudo bytes"],openssl_seal:["int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys)","Seals data"],openssl_sign:["bool openssl_sign(string data, &string signature, mixed key[, mixed method])","Signs data"],openssl_verify:["int openssl_verify(string data, string signature, mixed key[, mixed method])","Verifys data"],openssl_x509_check_private_key:["bool openssl_x509_check_private_key(mixed cert, mixed key)","Checks if a private key corresponds to a CERT"],openssl_x509_checkpurpose:["int openssl_x509_checkpurpose(mixed x509cert, int purpose, array cainfo [, string untrustedfile])","Checks the CERT to see if it can be used for the purpose in purpose. cainfo holds information about trusted CAs"],openssl_x509_export:["bool openssl_x509_export(mixed x509, string &out [, bool notext = true])","Exports a CERT to file or a var"],openssl_x509_export_to_file:["bool openssl_x509_export_to_file(mixed x509, string outfilename [, bool notext = true])","Exports a CERT to file or a var"],openssl_x509_free:["void openssl_x509_free(resource x509)","Frees X.509 certificates"],openssl_x509_parse:["array openssl_x509_parse(mixed x509 [, bool shortnames=true])","Returns an array of the fields/values of the CERT"],openssl_x509_read:["resource openssl_x509_read(mixed cert)","Reads X.509 certificates"],ord:["int ord(string character)","Returns ASCII value of character"],output_add_rewrite_var:["bool output_add_rewrite_var(string name, string value)","Add URL rewriter values"],output_reset_rewrite_vars:["bool output_reset_rewrite_vars()","Reset(clear) URL rewriter values"],pack:["string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])","Takes one or more arguments and packs them into a binary string according to the format argument"],parse_ini_file:["array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])","Parse configuration file"],parse_ini_string:["array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])","Parse configuration string"],parse_locale:["static array parse_locale($locale)","* parses a locale-id into an array the different parts of it"],parse_str:["void parse_str(string encoded_string [, array result])","Parses GET/POST/COOKIE data and sets global variables"],parse_url:["mixed parse_url(string url, [int url_component])","Parse a URL and return its components"],passthru:["void passthru(string command [, int &return_value])","Execute an external program and display raw output"],pathinfo:["array pathinfo(string path[, int options])","Returns information about a certain string"],pclose:["int pclose(resource fp)","Close a file pointer opened by popen()"],pcnlt_sigwaitinfo:["int pcnlt_sigwaitinfo(array set[, array &siginfo])","Synchronously wait for queued signals"],pcntl_alarm:["int pcntl_alarm(int seconds)","Set an alarm clock for delivery of a signal"],pcntl_exec:["bool pcntl_exec(string path [, array args [, array envs]])","Executes specified program in current process space as defined by exec(2)"],pcntl_fork:["int pcntl_fork()","Forks the currently running process following the same behavior as the UNIX fork() system call"],pcntl_getpriority:["int pcntl_getpriority([int pid [, int process_identifier]])","Get the priority of any process"],pcntl_setpriority:["bool pcntl_setpriority(int priority [, int pid [, int process_identifier]])","Change the priority of any process"],pcntl_signal:["bool pcntl_signal(int signo, callback handle [, bool restart_syscalls])","Assigns a system signal handler to a PHP function"],pcntl_signal_dispatch:["bool pcntl_signal_dispatch()","Dispatch signals to signal handlers"],pcntl_sigprocmask:["bool pcntl_sigprocmask(int how, array set[, array &oldset])","Examine and change blocked signals"],pcntl_sigtimedwait:["int pcntl_sigtimedwait(array set[, array &siginfo[, int seconds[, int nanoseconds]]])","Wait for queued signals"],pcntl_wait:["int pcntl_wait(int &status)","Waits on or returns the status of a forked child as defined by the waitpid() system call"],pcntl_waitpid:["int pcntl_waitpid(int pid, int &status, int options)","Waits on or returns the status of a forked child as defined by the waitpid() system call"],pcntl_wexitstatus:["int pcntl_wexitstatus(int status)","Returns the status code of a child's exit"],pcntl_wifexited:["bool pcntl_wifexited(int status)","Returns true if the child status code represents a successful exit"],pcntl_wifsignaled:["bool pcntl_wifsignaled(int status)","Returns true if the child status code represents a process that was terminated due to a signal"],pcntl_wifstopped:["bool pcntl_wifstopped(int status)","Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid)"],pcntl_wstopsig:["int pcntl_wstopsig(int status)","Returns the number of the signal that caused the process to stop who's status code is passed"],pcntl_wtermsig:["int pcntl_wtermsig(int status)","Returns the number of the signal that terminated the process who's status code is passed"],pdo_drivers:["array pdo_drivers()","Return array of available PDO drivers"],pfsockopen:["resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])","Open persistent Internet or Unix domain socket connection"],pg_affected_rows:["int pg_affected_rows(resource result)","Returns the number of affected tuples"],pg_cancel_query:["bool pg_cancel_query(resource connection)","Cancel request"],pg_client_encoding:["string pg_client_encoding([resource connection])","Get the current client encoding"],pg_close:["bool pg_close([resource connection])","Close a PostgreSQL connection"],pg_connect:["resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database)","Open a PostgreSQL connection"],pg_connection_busy:["bool pg_connection_busy(resource connection)","Get connection is busy or not"],pg_connection_reset:["bool pg_connection_reset(resource connection)","Reset connection (reconnect)"],pg_connection_status:["int pg_connection_status(resource connnection)","Get connection status"],pg_convert:["array pg_convert(resource db, string table, array values[, int options])","Check and convert values for PostgreSQL SQL statement"],pg_copy_from:["bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]])","Copy table from array"],pg_copy_to:["array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]])","Copy table to array"],pg_dbname:["string pg_dbname([resource connection])","Get the database name"],pg_delete:["mixed pg_delete(resource db, string table, array ids[, int options])","Delete records has ids (id => value)"],pg_end_copy:["bool pg_end_copy([resource connection])","Sync with backend. Completes the Copy command"],pg_escape_bytea:["string pg_escape_bytea([resource connection,] string data)","Escape binary for bytea type"],pg_escape_string:["string pg_escape_string([resource connection,] string data)","Escape string for text/char type"],pg_execute:["resource pg_execute([resource connection,] string stmtname, array params)","Execute a prepared query"],pg_fetch_all:["array pg_fetch_all(resource result)","Fetch all rows into array"],pg_fetch_all_columns:["array pg_fetch_all_columns(resource result [, int column_number])","Fetch all rows into array"],pg_fetch_array:["array pg_fetch_array(resource result [, int row [, int result_type]])","Fetch a row as an array"],pg_fetch_assoc:["array pg_fetch_assoc(resource result [, int row])","Fetch a row as an assoc array"],pg_fetch_object:["object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]])","Fetch a row as an object"],pg_fetch_result:["mixed pg_fetch_result(resource result, [int row_number,] mixed field_name)","Returns values from a result identifier"],pg_fetch_row:["array pg_fetch_row(resource result [, int row [, int result_type]])","Get a row as an enumerated array"],pg_field_is_null:["int pg_field_is_null(resource result, [int row,] mixed field_name_or_number)","Test if a field is NULL"],pg_field_name:["string pg_field_name(resource result, int field_number)","Returns the name of the field"],pg_field_num:["int pg_field_num(resource result, string field_name)","Returns the field number of the named field"],pg_field_prtlen:["int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number)","Returns the printed length"],pg_field_size:["int pg_field_size(resource result, int field_number)","Returns the internal size of the field"],pg_field_table:["mixed pg_field_table(resource result, int field_number[, bool oid_only])","Returns the name of the table field belongs to, or table's oid if oid_only is true"],pg_field_type:["string pg_field_type(resource result, int field_number)","Returns the type name for the given field"],pg_field_type_oid:["string pg_field_type_oid(resource result, int field_number)","Returns the type oid for the given field"],pg_free_result:["bool pg_free_result(resource result)","Free result memory"],pg_get_notify:["array pg_get_notify([resource connection[, result_type]])","Get asynchronous notification"],pg_get_pid:["int pg_get_pid([resource connection)","Get backend(server) pid"],pg_get_result:["resource pg_get_result(resource connection)","Get asynchronous query result"],pg_host:["string pg_host([resource connection])","Returns the host name associated with the connection"],pg_insert:["mixed pg_insert(resource db, string table, array values[, int options])","Insert values (filed => value) to table"],pg_last_error:["string pg_last_error([resource connection])","Get the error message string"],pg_last_notice:["string pg_last_notice(resource connection)","Returns the last notice set by the backend"],pg_last_oid:["string pg_last_oid(resource result)","Returns the last object identifier"],pg_lo_close:["bool pg_lo_close(resource large_object)","Close a large object"],pg_lo_create:["mixed pg_lo_create([resource connection],[mixed large_object_oid])","Create a large object"],pg_lo_export:["bool pg_lo_export([resource connection, ] int objoid, string filename)","Export large object direct to filesystem"],pg_lo_import:["int pg_lo_import([resource connection, ] string filename [, mixed oid])","Import large object direct from filesystem"],pg_lo_open:["resource pg_lo_open([resource connection,] int large_object_oid, string mode)","Open a large object and return fd"],pg_lo_read:["string pg_lo_read(resource large_object [, int len])","Read a large object"],pg_lo_read_all:["int pg_lo_read_all(resource large_object)","Read a large object and send straight to browser"],pg_lo_seek:["bool pg_lo_seek(resource large_object, int offset [, int whence])","Seeks position of large object"],pg_lo_tell:["int pg_lo_tell(resource large_object)","Returns current position of large object"],pg_lo_unlink:["bool pg_lo_unlink([resource connection,] string large_object_oid)","Delete a large object"],pg_lo_write:["int pg_lo_write(resource large_object, string buf [, int len])","Write a large object"],pg_meta_data:["array pg_meta_data(resource db, string table)","Get meta_data"],pg_num_fields:["int pg_num_fields(resource result)","Return the number of fields in the result"],pg_num_rows:["int pg_num_rows(resource result)","Return the number of rows in the result"],pg_options:["string pg_options([resource connection])","Get the options associated with the connection"],pg_parameter_status:["string|false pg_parameter_status([resource connection,] string param_name)","Returns the value of a server parameter"],pg_pconnect:["resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database)","Open a persistent PostgreSQL connection"],pg_ping:["bool pg_ping([resource connection])","Ping database. If connection is bad, try to reconnect."],pg_port:["int pg_port([resource connection])","Return the port number associated with the connection"],pg_prepare:["resource pg_prepare([resource connection,] string stmtname, string query)","Prepare a query for future execution"],pg_put_line:["bool pg_put_line([resource connection,] string query)","Send null-terminated string to backend server"],pg_query:["resource pg_query([resource connection,] string query)","Execute a query"],pg_query_params:["resource pg_query_params([resource connection,] string query, array params)","Execute a query"],pg_result_error:["string pg_result_error(resource result)","Get error message associated with result"],pg_result_error_field:["string pg_result_error_field(resource result, int fieldcode)","Get error message field associated with result"],pg_result_seek:["bool pg_result_seek(resource result, int offset)","Set internal row offset"],pg_result_status:["mixed pg_result_status(resource result[, long result_type])","Get status of query result"],pg_select:["mixed pg_select(resource db, string table, array ids[, int options])","Select records that has ids (id => value)"],pg_send_execute:["bool pg_send_execute(resource connection, string stmtname, array params)","Executes prevriously prepared stmtname asynchronously"],pg_send_prepare:["bool pg_send_prepare(resource connection, string stmtname, string query)","Asynchronously prepare a query for future execution"],pg_send_query:["bool pg_send_query(resource connection, string query)","Send asynchronous query"],pg_send_query_params:["bool pg_send_query_params(resource connection, string query, array params)","Send asynchronous parameterized query"],pg_set_client_encoding:["int pg_set_client_encoding([resource connection,] string encoding)","Set client encoding"],pg_set_error_verbosity:["int pg_set_error_verbosity([resource connection,] int verbosity)","Set error verbosity"],pg_trace:["bool pg_trace(string filename [, string mode [, resource connection]])","Enable tracing a PostgreSQL connection"],pg_transaction_status:["int pg_transaction_status(resource connnection)","Get transaction status"],pg_tty:["string pg_tty([resource connection])","Return the tty name associated with the connection"],pg_unescape_bytea:["string pg_unescape_bytea(string data)","Unescape binary for bytea type"],pg_untrace:["bool pg_untrace([resource connection])","Disable tracing of a PostgreSQL connection"],pg_update:["mixed pg_update(resource db, string table, array fields, array ids[, int options])","Update table using values (field => value) and ids (id => value)"],pg_version:["array pg_version([resource connection])","Returns an array with client, protocol and server version (when available)"],php_egg_logo_guid:["string php_egg_logo_guid()","Return the special ID used to request the PHP logo in phpinfo screens"],php_ini_loaded_file:["string php_ini_loaded_file()","Return the actual loaded ini filename"],php_ini_scanned_files:["string php_ini_scanned_files()","Return comma-separated string of .ini files parsed from the additional ini dir"],php_logo_guid:["string php_logo_guid()","Return the special ID used to request the PHP logo in phpinfo screens"],php_real_logo_guid:["string php_real_logo_guid()","Return the special ID used to request the PHP logo in phpinfo screens"],php_sapi_name:["string php_sapi_name()","Return the current SAPI module name"],php_snmpv3:["void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st)","* * Generic SNMPv3 object fetcher * From here is passed on the the common internal object fetcher. * * st=SNMP_CMD_GET snmp3_get() - query an agent and return a single value. * st=SNMP_CMD_GETNEXT snmp3_getnext() - query an agent and return the next single value. * st=SNMP_CMD_WALK snmp3_walk() - walk the mib and return a single dimensional array * containing the values. * st=SNMP_CMD_REALWALK snmp3_real_walk() - walk the mib and return an * array of oid,value pairs. * st=SNMP_CMD_SET snmp3_set() - query an agent and set a single value *"],php_strip_whitespace:["string php_strip_whitespace(string file_name)","Return source with stripped comments and whitespace"],php_uname:["string php_uname()","Return information about the system PHP was built on"],phpcredits:["void phpcredits([int flag])","Prints the list of people who've contributed to the PHP project"],phpinfo:["void phpinfo([int what])","Output a page of useful information about PHP and the current request"],phpversion:["string phpversion([string extension])","Return the current PHP version"],pi:["float pi()","Returns an approximation of pi"],png2wbmp:["bool png2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)","Convert PNG image to WBMP image"],popen:["resource popen(string command, string mode)","Execute a command and open either a read or a write pipe to it"],posix_access:["bool posix_access(string file [, int mode])","Determine accessibility of a file (POSIX.1 5.6.3)"],posix_ctermid:["string posix_ctermid()","Generate terminal path name (POSIX.1, 4.7.1)"],posix_get_last_error:["int posix_get_last_error()","Retrieve the error number set by the last posix function which failed."],posix_getcwd:["string posix_getcwd()","Get working directory pathname (POSIX.1, 5.2.2)"],posix_getegid:["int posix_getegid()","Get the current effective group id (POSIX.1, 4.2.1)"],posix_geteuid:["int posix_geteuid()","Get the current effective user id (POSIX.1, 4.2.1)"],posix_getgid:["int posix_getgid()","Get the current group id (POSIX.1, 4.2.1)"],posix_getgrgid:["array posix_getgrgid(long gid)","Group database access (POSIX.1, 9.2.1)"],posix_getgrnam:["array posix_getgrnam(string groupname)","Group database access (POSIX.1, 9.2.1)"],posix_getgroups:["array posix_getgroups()","Get supplementary group id's (POSIX.1, 4.2.3)"],posix_getlogin:["string posix_getlogin()","Get user name (POSIX.1, 4.2.4)"],posix_getpgid:["int posix_getpgid()","Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)"],posix_getpgrp:["int posix_getpgrp()","Get current process group id (POSIX.1, 4.3.1)"],posix_getpid:["int posix_getpid()","Get the current process id (POSIX.1, 4.1.1)"],posix_getppid:["int posix_getppid()","Get the parent process id (POSIX.1, 4.1.1)"],posix_getpwnam:["array posix_getpwnam(string groupname)","User database access (POSIX.1, 9.2.2)"],posix_getpwuid:["array posix_getpwuid(long uid)","User database access (POSIX.1, 9.2.2)"],posix_getrlimit:["array posix_getrlimit()","Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally)"],posix_getsid:["int posix_getsid()","Get process group id of session leader (This is not a POSIX function, but a SVR4ism, so be compile conditionally)"],posix_getuid:["int posix_getuid()","Get the current user id (POSIX.1, 4.2.1)"],posix_initgroups:["bool posix_initgroups(string name, int base_group_id)","Calculate the group access list for the user specified in name."],posix_isatty:["bool posix_isatty(int fd)","Determine if filedesc is a tty (POSIX.1, 4.7.1)"],posix_kill:["bool posix_kill(int pid, int sig)","Send a signal to a process (POSIX.1, 3.3.2)"],posix_mkfifo:["bool posix_mkfifo(string pathname, int mode)","Make a FIFO special file (POSIX.1, 5.4.2)"],posix_mknod:["bool posix_mknod(string pathname, int mode [, int major [, int minor]])","Make a special or ordinary file (POSIX.1)"],posix_setegid:["bool posix_setegid(long uid)","Set effective group id"],posix_seteuid:["bool posix_seteuid(long uid)","Set effective user id"],posix_setgid:["bool posix_setgid(int uid)","Set group id (POSIX.1, 4.2.2)"],posix_setpgid:["bool posix_setpgid(int pid, int pgid)","Set process group id for job control (POSIX.1, 4.3.3)"],posix_setsid:["int posix_setsid()","Create session and set process group id (POSIX.1, 4.3.2)"],posix_setuid:["bool posix_setuid(long uid)","Set user id (POSIX.1, 4.2.2)"],posix_strerror:["string posix_strerror(int errno)","Retrieve the system error message associated with the given errno."],posix_times:["array posix_times()","Get process times (POSIX.1, 4.5.2)"],posix_ttyname:["string posix_ttyname(int fd)","Determine terminal device name (POSIX.1, 4.7.2)"],posix_uname:["array posix_uname()","Get system name (POSIX.1, 4.4.1)"],pow:["number pow(number base, number exponent)","Returns base raised to the power of exponent. Returns integer result when possible"],preg_filter:["mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])","Perform Perl-style regular expression replacement and only return matches."],preg_grep:["array preg_grep(string regex, array input [, int flags])","Searches array and returns entries which match regex"],preg_last_error:["int preg_last_error()","Returns the error code of the last regexp execution."],preg_match:["int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])","Perform a Perl-style regular expression match"],preg_match_all:["int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]])","Perform a Perl-style global regular expression match"],preg_quote:["string preg_quote(string str [, string delim_char])","Quote regular expression characters plus an optional character"],preg_replace:["mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])","Perform Perl-style regular expression replacement."],preg_replace_callback:["mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])","Perform Perl-style regular expression replacement using replacement callback."],preg_split:["array preg_split(string pattern, string subject [, int limit [, int flags]])","Split string into an array using a perl-style regular expression as a delimiter"],prev:["mixed prev(array array_arg)","Move array argument's internal pointer to the previous element and return it"],print:["int print(string arg)","Output a string"],print_r:["mixed print_r(mixed var [, bool return])","Prints out or returns information about the specified variable"],printf:["int printf(string format [, mixed arg1 [, mixed ...]])","Output a formatted string"],proc_close:["int proc_close(resource process)","close a process opened by proc_open"],proc_get_status:["array proc_get_status(resource process)","get information about a process opened by proc_open"],proc_nice:["bool proc_nice(int priority)","Change the priority of the current process"],proc_open:["resource proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]])","Run a process with more control over it's file descriptors"],proc_terminate:["bool proc_terminate(resource process [, long signal])","kill a process opened by proc_open"],property_exists:["bool property_exists(mixed object_or_class, string property_name)","Checks if the object or class has a property"],pspell_add_to_personal:["bool pspell_add_to_personal(int pspell, string word)","Adds a word to a personal list"],pspell_add_to_session:["bool pspell_add_to_session(int pspell, string word)","Adds a word to the current session"],pspell_check:["bool pspell_check(int pspell, string word)","Returns true if word is valid"],pspell_clear_session:["bool pspell_clear_session(int pspell)","Clears the current session"],pspell_config_create:["int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])","Create a new config to be used later to create a manager"],pspell_config_data_dir:["bool pspell_config_data_dir(int conf, string directory)","location of language data files"],pspell_config_dict_dir:["bool pspell_config_dict_dir(int conf, string directory)","location of the main word list"],pspell_config_ignore:["bool pspell_config_ignore(int conf, int ignore)","Ignore words <= n chars"],pspell_config_mode:["bool pspell_config_mode(int conf, long mode)","Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS)"],pspell_config_personal:["bool pspell_config_personal(int conf, string personal)","Use a personal dictionary for this config"],pspell_config_repl:["bool pspell_config_repl(int conf, string repl)","Use a personal dictionary with replacement pairs for this config"],pspell_config_runtogether:["bool pspell_config_runtogether(int conf, bool runtogether)","Consider run-together words as valid components"],pspell_config_save_repl:["bool pspell_config_save_repl(int conf, bool save)","Save replacement pairs when personal list is saved for this config"],pspell_new:["int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])","Load a dictionary"],pspell_new_config:["int pspell_new_config(int config)","Load a dictionary based on the given config"],pspell_new_personal:["int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])","Load a dictionary with a personal wordlist"],pspell_save_wordlist:["bool pspell_save_wordlist(int pspell)","Saves the current (personal) wordlist"],pspell_store_replacement:["bool pspell_store_replacement(int pspell, string misspell, string correct)","Notify the dictionary of a user-selected replacement"],pspell_suggest:["array pspell_suggest(int pspell, string word)","Returns array of suggestions"],putenv:["bool putenv(string setting)","Set the value of an environment variable"],quoted_printable_decode:["string quoted_printable_decode(string str)","Convert a quoted-printable string to an 8 bit string"],quoted_printable_encode:["string quoted_printable_encode(string str)",""],quotemeta:["string quotemeta(string str)","Quotes meta characters"],rad2deg:["float rad2deg(float number)","Converts the radian number to the equivalent number in degrees"],rand:["int rand([int min, int max])","Returns a random number"],range:["array range(mixed low, mixed high[, int step])","Create an array containing the range of integers or characters from low to high (inclusive)"],rawurldecode:["string rawurldecode(string str)","Decodes URL-encodes string"],rawurlencode:["string rawurlencode(string str)","URL-encodes string"],readdir:["string readdir([resource dir_handle])","Read directory entry from dir_handle"],readfile:["int readfile(string filename [, bool use_include_path[, resource context]])","Output a file or a URL"],readgzfile:["int readgzfile(string filename [, int use_include_path])","Output a .gz-file"],readline:["string readline([string prompt])","Reads a line"],readline_add_history:["bool readline_add_history(string prompt)","Adds a line to the history"],readline_callback_handler_install:["void readline_callback_handler_install(string prompt, mixed callback)","Initializes the readline callback interface and terminal, prints the prompt and returns immediately"],readline_callback_handler_remove:["bool readline_callback_handler_remove()","Removes a previously installed callback handler and restores terminal settings"],readline_callback_read_char:["void readline_callback_read_char()","Informs the readline callback interface that a character is ready for input"],readline_clear_history:["bool readline_clear_history()","Clears the history"],readline_completion_function:["bool readline_completion_function(string funcname)","Readline completion function?"],readline_info:["mixed readline_info([string varname [, string newvalue]])","Gets/sets various internal readline variables."],readline_list_history:["array readline_list_history()","Lists the history"],readline_on_new_line:["void readline_on_new_line()","Inform readline that the cursor has moved to a new line"],readline_read_history:["bool readline_read_history([string filename])","Reads the history"],readline_redisplay:["void readline_redisplay()","Ask readline to redraw the display"],readline_write_history:["bool readline_write_history([string filename])","Writes the history"],readlink:["string readlink(string filename)","Return the target of a symbolic link"],realpath:["string realpath(string path)","Return the resolved path"],realpath_cache_get:["bool realpath_cache_get()","Get current size of realpath cache"],realpath_cache_size:["bool realpath_cache_size()","Get current size of realpath cache"],recode_file:["bool recode_file(string request, resource input, resource output)","Recode file input into file output according to request"],recode_string:["string recode_string(string request, string str)","Recode string str according to request string"],register_shutdown_function:["void register_shutdown_function(string function_name)","Register a user-level function to be called on request termination"],register_tick_function:["bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])","Registers a tick callback function"],rename:["bool rename(string old_name, string new_name[, resource context])","Rename a file"],require:["bool require(string path)","Includes and evaluates the specified file, erroring if the file cannot be included"],require_once:["bool require_once(string path)","Includes and evaluates the specified file, erroring if the file cannot be included"],reset:["mixed reset(array array_arg)","Set array argument's internal pointer to the first element and return it"],restore_error_handler:["void restore_error_handler()","Restores the previously defined error handler function"],restore_exception_handler:["void restore_exception_handler()","Restores the previously defined exception handler function"],restore_include_path:["void restore_include_path()","Restore the value of the include_path configuration option"],rewind:["bool rewind(resource fp)","Rewind the position of a file pointer"],rewinddir:["void rewinddir([resource dir_handle])","Rewind dir_handle back to the start"],rmdir:["bool rmdir(string dirname[, resource context])","Remove a directory"],round:["float round(float number [, int precision [, int mode]])","Returns the number rounded to specified precision"],rsort:["bool rsort(array &array_arg [, int sort_flags])","Sort an array in reverse order"],rtrim:["string rtrim(string str [, string character_mask])","Removes trailing whitespace"],scandir:["array scandir(string dir [, int sorting_order [, resource context]])","List files & directories inside the specified path"],sem_acquire:["bool sem_acquire(resource id)","Acquires the semaphore with the given id, blocking if necessary"],sem_get:["resource sem_get(int key [, int max_acquire [, int perm [, int auto_release]])","Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously"],sem_release:["bool sem_release(resource id)","Releases the semaphore with the given id"],sem_remove:["bool sem_remove(resource id)","Removes semaphore from Unix systems"],serialize:["string serialize(mixed variable)","Returns a string representation of variable (which can later be unserialized)"],session_cache_expire:["int session_cache_expire([int new_cache_expire])","Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire"],session_cache_limiter:["string session_cache_limiter([string new_cache_limiter])","Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter"],session_decode:["bool session_decode(string data)","Deserializes data and reinitializes the variables"],session_destroy:["bool session_destroy()","Destroy the current session and all data associated with it"],session_encode:["string session_encode()","Serializes the current setup and returns the serialized representation"],session_get_cookie_params:["array session_get_cookie_params()","Return the session cookie parameters"],session_id:["string session_id([string newid])","Return the current session id. If newid is given, the session id is replaced with newid"],session_is_registered:["bool session_is_registered(string varname)","Checks if a variable is registered in session"],session_module_name:["string session_module_name([string newname])","Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname"],session_name:["string session_name([string newname])","Return the current session name. If newname is given, the session name is replaced with newname"],session_regenerate_id:["bool session_regenerate_id([bool delete_old_session])","Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session."],session_register:["bool session_register(mixed var_names [, mixed ...])","Adds varname(s) to the list of variables which are freezed at the session end"],session_save_path:["string session_save_path([string newname])","Return the current save path passed to module_name. If newname is given, the save path is replaced with newname"],session_set_cookie_params:["void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])","Set session cookie parameters"],session_set_save_handler:["void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc)","Sets user-level functions"],session_start:["bool session_start()","Begin session - reinitializes freezed variables, registers browsers etc"],session_unregister:["bool session_unregister(string varname)","Removes varname from the list of variables which are freezed at the session end"],session_unset:["void session_unset()","Unset all registered variables"],session_write_close:["void session_write_close()","Write session data and end session"],set_error_handler:["string set_error_handler(string error_handler [, int error_types])","Sets a user-defined error handler function. Returns the previously defined error handler, or false on error"],set_exception_handler:["string set_exception_handler(callable exception_handler)","Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error"],set_include_path:["string set_include_path(string new_include_path)","Sets the include_path configuration option"],set_magic_quotes_runtime:["bool set_magic_quotes_runtime(int new_setting)","Set the current active configuration setting of magic_quotes_runtime and return previous"],set_time_limit:["bool set_time_limit(int seconds)","Sets the maximum time a script can run"],setcookie:["bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])","Send a cookie"],setlocale:["string setlocale(mixed category, string locale [, string ...])","Set locale information"],setrawcookie:["bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])","Send a cookie with no url encoding of the value"],settype:["bool settype(mixed var, string type)","Set the type of the variable"],sha1:["string sha1(string str [, bool raw_output])","Calculate the sha1 hash of a string"],sha1_file:["string sha1_file(string filename [, bool raw_output])","Calculate the sha1 hash of given filename"],shell_exec:["string shell_exec(string cmd)","Execute command via shell and return complete output as string"],shm_attach:["int shm_attach(int key [, int memsize [, int perm]])","Creates or open a shared memory segment"],shm_detach:["bool shm_detach(resource shm_identifier)","Disconnects from shared memory segment"],shm_get_var:["mixed shm_get_var(resource id, int variable_key)","Returns a variable from shared memory"],shm_has_var:["bool shm_has_var(resource id, int variable_key)","Checks whether a specific entry exists"],shm_put_var:["bool shm_put_var(resource shm_identifier, int variable_key, mixed variable)","Inserts or updates a variable in shared memory"],shm_remove:["bool shm_remove(resource shm_identifier)","Removes shared memory from Unix systems"],shm_remove_var:["bool shm_remove_var(resource id, int variable_key)","Removes variable from shared memory"],shmop_close:["void shmop_close(int shmid)","closes a shared memory segment"],shmop_delete:["bool shmop_delete(int shmid)","mark segment for deletion"],shmop_open:["int shmop_open(int key, string flags, int mode, int size)","gets and attaches a shared memory segment"],shmop_read:["string shmop_read(int shmid, int start, int count)","reads from a shm segment"],shmop_size:["int shmop_size(int shmid)","returns the shm size"],shmop_write:["int shmop_write(int shmid, string data, int offset)","writes to a shared memory segment"],shuffle:["bool shuffle(array array_arg)","Randomly shuffle the contents of an array"],similar_text:["int similar_text(string str1, string str2 [, float percent])","Calculates the similarity between two strings"],simplexml_import_dom:["simplemxml_element simplexml_import_dom(domNode node [, string class_name])","Get a simplexml_element object from dom to allow for processing"],simplexml_load_file:["simplemxml_element simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]])","Load a filename and return a simplexml_element object to allow for processing"],simplexml_load_string:["simplemxml_element simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]])","Load a string and return a simplexml_element object to allow for processing"],sin:["float sin(float number)","Returns the sine of the number in radians"],sinh:["float sinh(float number)","Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2"],sleep:["void sleep(int seconds)","Delay for a given number of seconds"],smfi_addheader:["bool smfi_addheader(string headerf, string headerv)","Adds a header to the current message."],smfi_addrcpt:["bool smfi_addrcpt(string rcpt)","Add a recipient to the message envelope."],smfi_chgheader:["bool smfi_chgheader(string headerf, string headerv)","Changes a header's value for the current message."],smfi_delrcpt:["bool smfi_delrcpt(string rcpt)","Removes the named recipient from the current message's envelope."],smfi_getsymval:["string smfi_getsymval(string macro)","Returns the value of the given macro or NULL if the macro is not defined."],smfi_replacebody:["bool smfi_replacebody(string body)","Replaces the body of the current message. If called more than once, subsequent calls result in data being appended to the new body."],smfi_setflags:["void smfi_setflags(long flags)","Sets the flags describing the actions the filter may take."],smfi_setreply:["bool smfi_setreply(string rcode, string xcode, string message)","Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter."],smfi_settimeout:["void smfi_settimeout(long timeout)","Sets the number of seconds libmilter will wait for an MTA connection before timing out a socket."],snmp2_get:["string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmp2_getnext:["string snmp2_getnext(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmp2_real_walk:["array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects including their respective object id withing the specified one"],snmp2_set:["int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])","Set the value of a SNMP object"],snmp2_walk:["array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects under the specified object id"],snmp3_get:["int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_getnext:["int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_real_walk:["int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_set:["int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed value [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_walk:["int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp_get_quick_print:["bool snmp_get_quick_print()","Return the current status of quick_print"],snmp_get_valueretrieval:["int snmp_get_valueretrieval()","Return the method how the SNMP values will be returned"],snmp_read_mib:["int snmp_read_mib(string filename)","Reads and parses a MIB file into the active MIB tree."],snmp_set_enum_print:["void snmp_set_enum_print(int enum_print)","Return all values that are enums with their enum value instead of the raw integer"],snmp_set_oid_output_format:["void snmp_set_oid_output_format(int oid_format)","Set the OID output format."],snmp_set_quick_print:["void snmp_set_quick_print(int quick_print)","Return all objects including their respective object id withing the specified one"],snmp_set_valueretrieval:["void snmp_set_valueretrieval(int method)","Specify the method how the SNMP values will be returned"],snmpget:["string snmpget(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmpgetnext:["string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmprealwalk:["array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects including their respective object id withing the specified one"],snmpset:["int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])","Set the value of a SNMP object"],snmpwalk:["array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects under the specified object id"],socket_accept:["resource socket_accept(resource socket)","Accepts a connection on the listening socket fd"],socket_bind:["bool socket_bind(resource socket, string addr [, int port])","Binds an open socket to a listening port, port is only specified in AF_INET family."],socket_clear_error:["void socket_clear_error([resource socket])","Clears the error on the socket or the last error code."],socket_close:["void socket_close(resource socket)","Closes a file descriptor"],socket_connect:["bool socket_connect(resource socket, string addr [, int port])","Opens a connection to addr:port on the socket specified by socket"],socket_create:["resource socket_create(int domain, int type, int protocol)","Creates an endpoint for communication in the domain specified by domain, of type specified by type"],socket_create_listen:["resource socket_create_listen(int port[, int backlog])","Opens a socket on port to accept connections"],socket_create_pair:["bool socket_create_pair(int domain, int type, int protocol, array &fd)","Creates a pair of indistinguishable sockets and stores them in fds."],socket_get_option:["mixed socket_get_option(resource socket, int level, int optname)","Gets socket options for the socket"],socket_getpeername:["bool socket_getpeername(resource socket, string &addr[, int &port])","Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type."],socket_getsockname:["bool socket_getsockname(resource socket, string &addr[, int &port])","Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type."],socket_last_error:["int socket_last_error([resource socket])","Returns the last socket error (either the last used or the provided socket resource)"],socket_listen:["bool socket_listen(resource socket[, int backlog])","Sets the maximum number of connections allowed to be waited for on the socket specified by fd"],socket_read:["string socket_read(resource socket, int length [, int type])","Reads a maximum of length bytes from socket"],socket_recv:["int socket_recv(resource socket, string &buf, int len, int flags)","Receives data from a connected socket"],socket_recvfrom:["int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name [, int &port])","Receives data from a socket, connected or not"],socket_select:["int socket_select(array &read_fds, array &write_fds, array &except_fds, int tv_sec[, int tv_usec])","Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and tv_usec"],socket_send:["int socket_send(resource socket, string buf, int len, int flags)","Sends data to a connected socket"],socket_sendto:["int socket_sendto(resource socket, string buf, int len, int flags, string addr [, int port])","Sends a message to a socket, whether it is connected or not"],socket_set_block:["bool socket_set_block(resource socket)","Sets blocking mode on a socket resource"],socket_set_nonblock:["bool socket_set_nonblock(resource socket)","Sets nonblocking mode on a socket resource"],socket_set_option:["bool socket_set_option(resource socket, int level, int optname, int|array optval)","Sets socket options for the socket"],socket_shutdown:["bool socket_shutdown(resource socket[, int how])","Shuts down a socket for receiving, sending, or both."],socket_strerror:["string socket_strerror(int errno)","Returns a string describing an error"],socket_write:["int socket_write(resource socket, string buf[, int length])","Writes the buffer to the socket resource, length is optional"],solid_fetch_prev:["bool solid_fetch_prev(resource result_id)",""],sort:["bool sort(array &array_arg [, int sort_flags])","Sort an array"],soundex:["string soundex(string str)","Calculate the soundex key of a string"],spl_autoload:["void spl_autoload(string class_name [, string file_extensions])","Default implementation for __autoload()"],spl_autoload_call:["void spl_autoload_call(string class_name)","Try all registerd autoload function to load the requested class"],spl_autoload_extensions:["string spl_autoload_extensions([string file_extensions])","Register and return default file extensions for spl_autoload"],spl_autoload_functions:["false|array spl_autoload_functions()","Return all registered __autoload() functionns"],spl_autoload_register:['bool spl_autoload_register([mixed autoload_function = "spl_autoload" [, throw = true [, prepend]]])',"Register given function as __autoload() implementation"],spl_autoload_unregister:["bool spl_autoload_unregister(mixed autoload_function)","Unregister given function as __autoload() implementation"],spl_classes:["array spl_classes()","Return an array containing the names of all clsses and interfaces defined in SPL"],spl_object_hash:["string spl_object_hash(object obj)","Return hash id for given object"],split:["array split(string pattern, string string [, int limit])","Split string into array by regular expression"],spliti:["array spliti(string pattern, string string [, int limit])","Split string into array by regular expression case-insensitive"],sprintf:["string sprintf(string format [, mixed arg1 [, mixed ...]])","Return a formatted string"],sql_regcase:["string sql_regcase(string string)","Make regular expression for case insensitive match"],sqlite_array_query:["array sqlite_array_query(resource db, string query [ , int result_type [, bool decode_binary]])","Executes a query against a given database and returns an array of arrays."],sqlite_busy_timeout:["void sqlite_busy_timeout(resource db, int ms)","Set busy timeout duration. If ms <= 0, all busy handlers are disabled."],sqlite_changes:["int sqlite_changes(resource db)","Returns the number of rows that were changed by the most recent SQL statement."],sqlite_close:["void sqlite_close(resource db)","Closes an open sqlite database."],sqlite_column:["mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary])","Fetches a column from the current row of a result set."],sqlite_create_aggregate:["bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args])","Registers an aggregate function for queries."],sqlite_create_function:["bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args])",'Registers a "regular" function for queries.'],sqlite_current:["array sqlite_current(resource result [, int result_type [, bool decode_binary]])","Fetches the current row from a result set as an array."],sqlite_error_string:["string sqlite_error_string(int error_code)","Returns the textual description of an error code."],sqlite_escape_string:["string sqlite_escape_string(string item)","Escapes a string for use as a query parameter."],sqlite_exec:["bool sqlite_exec(string query, resource db[, string &error_message])","Executes a result-less query against a given database"],sqlite_factory:["object sqlite_factory(string filename [, int mode [, string &error_message]])","Opens a SQLite database and creates an object for it. Will create the database if it does not exist."],sqlite_fetch_all:["array sqlite_fetch_all(resource result [, int result_type [, bool decode_binary]])","Fetches all rows from a result set as an array of arrays."],sqlite_fetch_array:["array sqlite_fetch_array(resource result [, int result_type [, bool decode_binary]])","Fetches the next row from a result set as an array."],sqlite_fetch_column_types:["resource sqlite_fetch_column_types(string table_name, resource db [, int result_type])","Return an array of column types from a particular table."],sqlite_fetch_object:["object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]])","Fetches the next row from a result set as an object."],sqlite_fetch_single:["string sqlite_fetch_single(resource result [, bool decode_binary])","Fetches the first column of a result set as a string."],sqlite_field_name:["string sqlite_field_name(resource result, int field_index)","Returns the name of a particular field of a result set."],sqlite_has_prev:["bool sqlite_has_prev(resource result)","* Returns whether a previous row is available."],sqlite_key:["int sqlite_key(resource result)","Return the current row index of a buffered result."],sqlite_last_error:["int sqlite_last_error(resource db)","Returns the error code of the last error for a database."],sqlite_last_insert_rowid:["int sqlite_last_insert_rowid(resource db)","Returns the rowid of the most recently inserted row."],sqlite_libencoding:["string sqlite_libencoding()","Returns the encoding (iso8859 or UTF-8) of the linked SQLite library."],sqlite_libversion:["string sqlite_libversion()","Returns the version of the linked SQLite library."],sqlite_next:["bool sqlite_next(resource result)","Seek to the next row number of a result set."],sqlite_num_fields:["int sqlite_num_fields(resource result)","Returns the number of fields in a result set."],sqlite_num_rows:["int sqlite_num_rows(resource result)","Returns the number of rows in a buffered result set."],sqlite_open:["resource sqlite_open(string filename [, int mode [, string &error_message]])","Opens a SQLite database. Will create the database if it does not exist."],sqlite_popen:["resource sqlite_popen(string filename [, int mode [, string &error_message]])","Opens a persistent handle to a SQLite database. Will create the database if it does not exist."],sqlite_prev:["bool sqlite_prev(resource result)","* Seek to the previous row number of a result set."],sqlite_query:["resource sqlite_query(string query, resource db [, int result_type [, string &error_message]])","Executes a query against a given database and returns a result handle."],sqlite_rewind:["bool sqlite_rewind(resource result)","Seek to the first row number of a buffered result set."],sqlite_seek:["bool sqlite_seek(resource result, int row)","Seek to a particular row number of a buffered result set."],sqlite_single_query:["array sqlite_single_query(resource db, string query [, bool first_row_only [, bool decode_binary]])","Executes a query and returns either an array for one single column or the value of the first row."],sqlite_udf_decode_binary:["string sqlite_udf_decode_binary(string data)","Decode binary encoding on a string parameter passed to an UDF."],sqlite_udf_encode_binary:["string sqlite_udf_encode_binary(string data)","Apply binary encoding (if required) to a string to return from an UDF."],sqlite_unbuffered_query:["resource sqlite_unbuffered_query(string query, resource db [ , int result_type [, string &error_message]])","Executes a query that does not prefetch and buffer all data."],sqlite_valid:["bool sqlite_valid(resource result)","Returns whether more rows are available."],sqrt:["float sqrt(float number)","Returns the square root of the number"],srand:["void srand([int seed])","Seeds random number generator"],sscanf:["mixed sscanf(string str, string format [, string ...])","Implements an ANSI C compatible sscanf"],stat:["array stat(string filename)","Give information about a file"],str_getcsv:["array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])","Parse a CSV string into an array"],str_ireplace:["mixed str_ireplace(mixed search, mixed replace, mixed subject [, int &replace_count])","Replaces all occurrences of search in haystack with replace / case-insensitive"],str_pad:["string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])","Returns input string padded on the left or right to specified length with pad_string"],str_repeat:["string str_repeat(string input, int mult)","Returns the input string repeat mult times"],str_replace:["mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count])","Replaces all occurrences of search in haystack with replace"],str_rot13:["string str_rot13(string str)","Perform the rot13 transform on a string"],str_shuffle:["void str_shuffle(string str)","Shuffles string. One permutation of all possible is created"],str_split:["array str_split(string str [, int split_length])","Convert a string to an array. If split_length is specified, break the string down into chunks each split_length characters long."],str_word_count:["mixed str_word_count(string str, [int format [, string charlist]])",'Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, \'word\' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with "\'" and "-" characters.'],strcasecmp:["int strcasecmp(string str1, string str2)","Binary safe case-insensitive string comparison"],strchr:["string strchr(string haystack, string needle)","An alias for strstr"],strcmp:["int strcmp(string str1, string str2)","Binary safe string comparison"],strcoll:["int strcoll(string str1, string str2)","Compares two strings using the current locale"],strcspn:["int strcspn(string str, string mask [, start [, len]])","Finds length of initial segment consisting entirely of characters not found in mask. If start or/and length is provide works like strcspn(substr($s,$start,$len),$bad_chars)"],stream_bucket_append:["void stream_bucket_append(resource brigade, resource bucket)","Append bucket to brigade"],stream_bucket_make_writeable:["object stream_bucket_make_writeable(resource brigade)","Return a bucket object from the brigade for operating on"],stream_bucket_new:["resource stream_bucket_new(resource stream, string buffer)","Create a new bucket for use on the current stream"],stream_bucket_prepend:["void stream_bucket_prepend(resource brigade, resource bucket)","Prepend bucket to brigade"],stream_context_create:["resource stream_context_create([array options[, array params]])","Create a file context and optionally set parameters"],stream_context_get_default:["resource stream_context_get_default([array options])","Get a handle on the default file/stream context and optionally set parameters"],stream_context_get_options:["array stream_context_get_options(resource context|resource stream)","Retrieve options for a stream/wrapper/context"],stream_context_get_params:["array stream_context_get_params(resource context|resource stream)","Get parameters of a file context"],stream_context_set_default:["resource stream_context_set_default(array options)","Set default file/stream context, returns the context as a resource"],stream_context_set_option:["bool stream_context_set_option(resource context|resource stream, string wrappername, string optionname, mixed value)","Set an option for a wrapper"],stream_context_set_params:["bool stream_context_set_params(resource context|resource stream, array options)","Set parameters for a file context"],stream_copy_to_stream:["long stream_copy_to_stream(resource source, resource dest [, long maxlen [, long pos]])","Reads up to maxlen bytes from source stream and writes them to dest stream."],stream_filter_append:["resource stream_filter_append(resource stream, string filtername[, int read_write[, string filterparams]])","Append a filter to a stream"],stream_filter_prepend:["resource stream_filter_prepend(resource stream, string filtername[, int read_write[, string filterparams]])","Prepend a filter to a stream"],stream_filter_register:["bool stream_filter_register(string filtername, string classname)","Registers a custom filter handler class"],stream_filter_remove:["bool stream_filter_remove(resource stream_filter)","Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource"],stream_get_contents:["string stream_get_contents(resource source [, long maxlen [, long offset]])","Reads all remaining bytes (or up to maxlen bytes) from a stream and returns them as a string."],stream_get_filters:["array stream_get_filters()","Returns a list of registered filters"],stream_get_line:["string stream_get_line(resource stream, int maxlen [, string ending])","Read up to maxlen bytes from a stream or until the ending string is found"],stream_get_meta_data:["array stream_get_meta_data(resource fp)","Retrieves header/meta data from streams/file pointers"],stream_get_transports:["array stream_get_transports()","Retrieves list of registered socket transports"],stream_get_wrappers:["array stream_get_wrappers()","Retrieves list of registered stream wrappers"],stream_is_local:["bool stream_is_local(resource stream|string url)",""],stream_resolve_include_path:["string stream_resolve_include_path(string filename)","Determine what file will be opened by calls to fopen() with a relative path"],stream_select:["int stream_select(array &read_streams, array &write_streams, array &except_streams, int tv_sec[, int tv_usec])","Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec"],stream_set_blocking:["bool stream_set_blocking(resource socket, int mode)","Set blocking/non-blocking mode on a socket or stream"],stream_set_timeout:["bool stream_set_timeout(resource stream, int seconds [, int microseconds])","Set timeout on stream read to seconds + microseonds"],stream_set_write_buffer:["int stream_set_write_buffer(resource fp, int buffer)","Set file write buffer"],stream_socket_accept:["resource stream_socket_accept(resource serverstream, [ double timeout [, string &peername ]])","Accept a client connection from a server socket"],stream_socket_client:["resource stream_socket_client(string remoteaddress [, long &errcode [, string &errstring [, double timeout [, long flags [, resource context]]]]])","Open a client connection to a remote address"],stream_socket_enable_crypto:["int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]])","Enable or disable a specific kind of crypto on the stream"],stream_socket_get_name:["string stream_socket_get_name(resource stream, bool want_peer)","Returns either the locally bound or remote name for a socket stream"],stream_socket_pair:["array stream_socket_pair(int domain, int type, int protocol)","Creates a pair of connected, indistinguishable socket streams"],stream_socket_recvfrom:["string stream_socket_recvfrom(resource stream, long amount [, long flags [, string &remote_addr]])","Receives data from a socket stream"],stream_socket_sendto:["long stream_socket_sendto(resouce stream, string data [, long flags [, string target_addr]])","Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format"],stream_socket_server:["resource stream_socket_server(string localaddress [, long &errcode [, string &errstring [, long flags [, resource context]]]])","Create a server socket bound to localaddress"],stream_socket_shutdown:["int stream_socket_shutdown(resource stream, int how)","causes all or part of a full-duplex connection on the socket associated with stream to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed."],stream_supports_lock:["bool stream_supports_lock(resource stream)","Tells whether the stream supports locking through flock()."],stream_wrapper_register:["bool stream_wrapper_register(string protocol, string classname[, integer flags])","Registers a custom URL protocol handler class"],stream_wrapper_restore:["bool stream_wrapper_restore(string protocol)","Restore the original protocol handler, overriding if necessary"],stream_wrapper_unregister:["bool stream_wrapper_unregister(string protocol)","Unregister a wrapper for the life of the current request."],strftime:["string strftime(string format [, int timestamp])","Format a local time/date according to locale settings"],strip_tags:["string strip_tags(string str [, string allowable_tags])","Strips HTML and PHP tags from a string"],stripcslashes:["string stripcslashes(string str)","Strips backslashes from a string. Uses C-style conventions"],stripos:["int stripos(string haystack, string needle [, int offset])","Finds position of first occurrence of a string within another, case insensitive"],stripslashes:["string stripslashes(string str)","Strips backslashes from a string"],stristr:["string stristr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another, case insensitive"],strlen:["int strlen(string str)","Get string length"],strnatcasecmp:["int strnatcasecmp(string s1, string s2)","Returns the result of case-insensitive string comparison using 'natural' algorithm"],strnatcmp:["int strnatcmp(string s1, string s2)","Returns the result of string comparison using 'natural' algorithm"],strncasecmp:["int strncasecmp(string str1, string str2, int len)","Binary safe string comparison"],strncmp:["int strncmp(string str1, string str2, int len)","Binary safe string comparison"],strpbrk:["array strpbrk(string haystack, string char_list)","Search a string for any of a set of characters"],strpos:["int strpos(string haystack, string needle [, int offset])","Finds position of first occurrence of a string within another"],strptime:["string strptime(string timestamp, string format)","Parse a time/date generated with strftime()"],strrchr:["string strrchr(string haystack, string needle)","Finds the last occurrence of a character in a string within another"],strrev:["string strrev(string str)","Reverse a string"],strripos:["int strripos(string haystack, string needle [, int offset])","Finds position of last occurrence of a string within another string"],strrpos:["int strrpos(string haystack, string needle [, int offset])","Finds position of last occurrence of a string within another string"],strspn:["int strspn(string str, string mask [, start [, len]])","Finds length of initial segment consisting entirely of characters found in mask. If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)"],strstr:["string strstr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another"],strtok:["string strtok([string str,] string token)","Tokenize a string"],strtolower:["string strtolower(string str)","Makes a string lowercase"],strtotime:["int strtotime(string time [, int now ])","Convert string representation of date and time to a timestamp"],strtoupper:["string strtoupper(string str)","Makes a string uppercase"],strtr:["string strtr(string str, string from[, string to])","Translates characters in str using given translation tables"],strval:["string strval(mixed var)","Get the string value of a variable"],substr:["string substr(string str, int start [, int length])","Returns part of a string"],substr_compare:["int substr_compare(string main_str, string str, int offset [, int length [, bool case_sensitivity]])","Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters"],substr_count:["int substr_count(string haystack, string needle [, int offset [, int length]])","Returns the number of times a substring occurs in the string"],substr_replace:["mixed substr_replace(mixed str, mixed repl, mixed start [, mixed length])","Replaces part of a string with another string"],sybase_affected_rows:["int sybase_affected_rows([resource link_id])","Get number of affected rows in last query"],sybase_close:["bool sybase_close([resource link_id])","Close Sybase connection"],sybase_connect:["int sybase_connect([string host [, string user [, string password [, string charset [, string appname [, bool new]]]]]])","Open Sybase server connection"],sybase_data_seek:["bool sybase_data_seek(resource result, int offset)","Move internal row pointer"],sybase_deadlock_retry_count:["void sybase_deadlock_retry_count(int retry_count)","Sets deadlock retry count"],sybase_fetch_array:["array sybase_fetch_array(resource result)","Fetch row as array"],sybase_fetch_assoc:["array sybase_fetch_assoc(resource result)","Fetch row as array without numberic indices"],sybase_fetch_field:["object sybase_fetch_field(resource result [, int offset])","Get field information"],sybase_fetch_object:["object sybase_fetch_object(resource result [, mixed object])","Fetch row as object"],sybase_fetch_row:["array sybase_fetch_row(resource result)","Get row as enumerated array"],sybase_field_seek:["bool sybase_field_seek(resource result, int offset)","Set field offset"],sybase_free_result:["bool sybase_free_result(resource result)","Free result memory"],sybase_get_last_message:["string sybase_get_last_message()","Returns the last message from server (over min_message_severity)"],sybase_min_client_severity:["void sybase_min_client_severity(int severity)","Sets minimum client severity"],sybase_min_server_severity:["void sybase_min_server_severity(int severity)","Sets minimum server severity"],sybase_num_fields:["int sybase_num_fields(resource result)","Get number of fields in result"],sybase_num_rows:["int sybase_num_rows(resource result)","Get number of rows in result"],sybase_pconnect:["int sybase_pconnect([string host [, string user [, string password [, string charset [, string appname]]]]])","Open persistent Sybase connection"],sybase_query:["int sybase_query(string query [, resource link_id])","Send Sybase query"],sybase_result:["string sybase_result(resource result, int row, mixed field)","Get result data"],sybase_select_db:["bool sybase_select_db(string database [, resource link_id])","Select Sybase database"],sybase_set_message_handler:["bool sybase_set_message_handler(mixed error_func [, resource connection])","Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted"],sybase_unbuffered_query:["int sybase_unbuffered_query(string query [, resource link_id])","Send Sybase query"],symlink:["int symlink(string target, string link)","Create a symbolic link"],sys_get_temp_dir:["string sys_get_temp_dir()","Returns directory path used for temporary files"],sys_getloadavg:["array sys_getloadavg()",""],syslog:["bool syslog(int priority, string message)","Generate a system log message"],system:["int system(string command [, int &return_value])","Execute an external program and display output"],tan:["float tan(float number)","Returns the tangent of the number in radians"],tanh:["float tanh(float number)","Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number)"],tempnam:["string tempnam(string dir, string prefix)","Create a unique filename in a directory"],textdomain:["string textdomain(string domain)",'Set the textdomain to "domain". Returns the current domain'],tidy_access_count:["int tidy_access_count()","Returns the Number of Tidy accessibility warnings encountered for specified document."],tidy_clean_repair:["bool tidy_clean_repair()","Execute configured cleanup and repair operations on parsed markup"],tidy_config_count:["int tidy_config_count()","Returns the Number of Tidy configuration errors encountered for specified document."],tidy_diagnose:["bool tidy_diagnose()","Run configured diagnostics on parsed and repaired markup."],tidy_error_count:["int tidy_error_count()","Returns the Number of Tidy errors encountered for specified document."],tidy_get_body:["TidyNode tidy_get_body(resource tidy)","Returns a TidyNode Object starting from the tag of the tidy parse tree"],tidy_get_config:["array tidy_get_config()","Get current Tidy configuarion"],tidy_get_error_buffer:["string tidy_get_error_buffer([bool detailed])","Return warnings and errors which occured parsing the specified document"],tidy_get_head:["TidyNode tidy_get_head()","Returns a TidyNode Object starting from the tag of the tidy parse tree"],tidy_get_html:["TidyNode tidy_get_html()","Returns a TidyNode Object starting from the tag of the tidy parse tree"],tidy_get_html_ver:["int tidy_get_html_ver()","Get the Detected HTML version for the specified document."],tidy_get_opt_doc:["string tidy_get_opt_doc(tidy resource, string optname)","Returns the documentation for the given option name"],tidy_get_output:["string tidy_get_output()","Return a string representing the parsed tidy markup"],tidy_get_release:["string tidy_get_release()","Get release date (version) for Tidy library"],tidy_get_root:["TidyNode tidy_get_root()","Returns a TidyNode Object representing the root of the tidy parse tree"],tidy_get_status:["int tidy_get_status()","Get status of specfied document."],tidy_getopt:["mixed tidy_getopt(string option)","Returns the value of the specified configuration option for the tidy document."],tidy_is_xhtml:["bool tidy_is_xhtml()","Indicates if the document is a XHTML document."],tidy_is_xml:["bool tidy_is_xml()","Indicates if the document is a generic (non HTML/XHTML) XML document."],tidy_parse_file:["bool tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])","Parse markup in file or URI"],tidy_parse_string:["bool tidy_parse_string(string input [, mixed config_options [, string encoding]])","Parse a document stored in a string"],tidy_repair_file:["bool tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])","Repair a file using an optionally provided configuration file"],tidy_repair_string:["bool tidy_repair_string(string data [, mixed config_file [, string encoding]])","Repair a string using an optionally provided configuration file"],tidy_warning_count:["int tidy_warning_count()","Returns the Number of Tidy warnings encountered for specified document."],time:["int time()","Return current UNIX timestamp"],time_nanosleep:["mixed time_nanosleep(long seconds, long nanoseconds)","Delay for a number of seconds and nano seconds"],time_sleep_until:["mixed time_sleep_until(float timestamp)","Make the script sleep until the specified time"],timezone_abbreviations_list:["array timezone_abbreviations_list()","Returns associative array containing dst, offset and the timezone name"],timezone_identifiers_list:["array timezone_identifiers_list([long what[, string country]])","Returns numerically index array with all timezone identifiers."],timezone_location_get:["array timezone_location_get()","Returns location information for a timezone, including country code, latitude/longitude and comments"],timezone_name_from_abbr:["string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])","Returns the timezone name from abbrevation"],timezone_name_get:["string timezone_name_get(DateTimeZone object)","Returns the name of the timezone."],timezone_offset_get:["long timezone_offset_get(DateTimeZone object, DateTime object)","Returns the timezone offset."],timezone_open:["DateTimeZone timezone_open(string timezone)","Returns new DateTimeZone object"],timezone_transitions_get:["array timezone_transitions_get(DateTimeZone object [, long timestamp_begin [, long timestamp_end ]])","Returns numerically indexed array containing associative array for all transitions in the specified range for the timezone."],timezone_version_get:["array timezone_version_get()","Returns the Olson database version number."],tmpfile:["resource tmpfile()","Create a temporary file that will be deleted automatically after use"],token_get_all:["array token_get_all(string source)",""],token_name:["string token_name(int type)",""],touch:["bool touch(string filename [, int time [, int atime]])","Set modification time of file"],trigger_error:["void trigger_error(string messsage [, int error_type])","Generates a user-level error/warning/notice message"],trim:["string trim(string str [, string character_mask])","Strips whitespace from the beginning and end of a string"],uasort:["bool uasort(array array_arg, string cmp_function)","Sort an array with a user-defined comparison function and maintain index association"],ucfirst:["string ucfirst(string str)","Make a string's first character lowercase"],ucwords:["string ucwords(string str)","Uppercase the first character of every word in a string"],uksort:["bool uksort(array array_arg, string cmp_function)","Sort an array by keys using a user-defined comparison function"],umask:["int umask([int mask])","Return or change the umask"],uniqid:["string uniqid([string prefix [, bool more_entropy]])","Generates a unique ID"],unixtojd:["int unixtojd([int timestamp])","Convert UNIX timestamp to Julian Day"],unlink:["bool unlink(string filename[, context context])","Delete a file"],unpack:["array unpack(string format, string input)","Unpack binary string into named array elements according to format argument"],unregister_tick_function:["void unregister_tick_function(string function_name)","Unregisters a tick callback function"],unserialize:["mixed unserialize(string variable_representation)","Takes a string representation of variable and recreates it"],unset:["void unset(mixed var [, mixed var])","Unset a given variable"],urldecode:["string urldecode(string str)","Decodes URL-encoded string"],urlencode:["string urlencode(string str)","URL-encodes string"],usleep:["void usleep(int micro_seconds)","Delay for a given number of micro seconds"],usort:["bool usort(array array_arg, string cmp_function)","Sort an array by values using a user-defined comparison function"],utf8_decode:["string utf8_decode(string data)","Converts a UTF-8 encoded string to ISO-8859-1"],utf8_encode:["string utf8_encode(string data)","Encodes an ISO-8859-1 string to UTF-8"],var_dump:["void var_dump(mixed var)","Dumps a string representation of variable to output"],var_export:["string var_export(mixed var [, bool return])","Outputs or returns a string representation of a variable"],variant_abs:["mixed variant_abs(mixed left)","Returns the absolute value of a variant"],variant_add:["mixed variant_add(mixed left, mixed right)",'"Adds" two variant values together and returns the result'],variant_and:["mixed variant_and(mixed left, mixed right)","performs a bitwise AND operation between two variants and returns the result"],variant_cast:["object variant_cast(object variant, int type)","Convert a variant into a new variant object of another type"],variant_cat:["mixed variant_cat(mixed left, mixed right)","concatenates two variant values together and returns the result"],variant_cmp:["int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])","Compares two variants"],variant_date_from_timestamp:["object variant_date_from_timestamp(int timestamp)","Returns a variant date representation of a unix timestamp"],variant_date_to_timestamp:["int variant_date_to_timestamp(object variant)","Converts a variant date/time value to unix timestamp"],variant_div:["mixed variant_div(mixed left, mixed right)","Returns the result from dividing two variants"],variant_eqv:["mixed variant_eqv(mixed left, mixed right)","Performs a bitwise equivalence on two variants"],variant_fix:["mixed variant_fix(mixed left)","Returns the integer part ? of a variant"],variant_get_type:["int variant_get_type(object variant)","Returns the VT_XXX type code for a variant"],variant_idiv:["mixed variant_idiv(mixed left, mixed right)","Converts variants to integers and then returns the result from dividing them"],variant_imp:["mixed variant_imp(mixed left, mixed right)","Performs a bitwise implication on two variants"],variant_int:["mixed variant_int(mixed left)","Returns the integer portion of a variant"],variant_mod:["mixed variant_mod(mixed left, mixed right)","Divides two variants and returns only the remainder"],variant_mul:["mixed variant_mul(mixed left, mixed right)","multiplies the values of the two variants and returns the result"],variant_neg:["mixed variant_neg(mixed left)","Performs logical negation on a variant"],variant_not:["mixed variant_not(mixed left)","Performs bitwise not negation on a variant"],variant_or:["mixed variant_or(mixed left, mixed right)","Performs a logical disjunction on two variants"],variant_pow:["mixed variant_pow(mixed left, mixed right)","Returns the result of performing the power function with two variants"],variant_round:["mixed variant_round(mixed left, int decimals)","Rounds a variant to the specified number of decimal places"],variant_set:["void variant_set(object variant, mixed value)","Assigns a new value for a variant object"],variant_set_type:["void variant_set_type(object variant, int type)",'Convert a variant into another type. Variant is modified "in-place"'],variant_sub:["mixed variant_sub(mixed left, mixed right)","subtracts the value of the right variant from the left variant value and returns the result"],variant_xor:["mixed variant_xor(mixed left, mixed right)","Performs a logical exclusion on two variants"],version_compare:["int version_compare(string ver1, string ver2 [, string oper])",'Compares two "PHP-standardized" version number strings'],vfprintf:["int vfprintf(resource stream, string format, array args)","Output a formatted string into a stream"],virtual:["bool virtual(string filename)","Perform an Apache sub-request"],vprintf:["int vprintf(string format, array args)","Output a formatted string"],vsprintf:["string vsprintf(string format, array args)","Return a formatted string"],wddx_add_vars:["int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])","Serializes given variables and adds them to packet given by packet_id"],wddx_deserialize:["mixed wddx_deserialize(mixed packet)","Deserializes given packet and returns a PHP value"],wddx_packet_end:["string wddx_packet_end(resource packet_id)","Ends specified WDDX packet and returns the string containing the packet"],wddx_packet_start:["resource wddx_packet_start([string comment])","Starts a WDDX packet with optional comment and returns the packet id"],wddx_serialize_value:["string wddx_serialize_value(mixed var [, string comment])","Creates a new packet and serializes the given value"],wddx_serialize_vars:["string wddx_serialize_vars(mixed var_name [, mixed ...])","Creates a new packet and serializes given variables into a struct"],wordwrap:["string wordwrap(string str [, int width [, string break [, bool cut]]])","Wraps buffer to selected number of characters using string break char"],xml_error_string:["string xml_error_string(int code)","Get XML parser error string"],xml_get_current_byte_index:["int xml_get_current_byte_index(resource parser)","Get current byte index for an XML parser"],xml_get_current_column_number:["int xml_get_current_column_number(resource parser)","Get current column number for an XML parser"],xml_get_current_line_number:["int xml_get_current_line_number(resource parser)","Get current line number for an XML parser"],xml_get_error_code:["int xml_get_error_code(resource parser)","Get XML parser error code"],xml_parse:["int xml_parse(resource parser, string data [, int isFinal])","Start parsing an XML document"],xml_parse_into_struct:["int xml_parse_into_struct(resource parser, string data, array &values [, array &index ])","Parsing a XML document"],xml_parser_create:["resource xml_parser_create([string encoding])","Create an XML parser"],xml_parser_create_ns:["resource xml_parser_create_ns([string encoding [, string sep]])","Create an XML parser"],xml_parser_free:["int xml_parser_free(resource parser)","Free an XML parser"],xml_parser_get_option:["int xml_parser_get_option(resource parser, int option)","Get options from an XML parser"],xml_parser_set_option:["int xml_parser_set_option(resource parser, int option, mixed value)","Set options in an XML parser"],xml_set_character_data_handler:["int xml_set_character_data_handler(resource parser, string hdl)","Set up character data handler"],xml_set_default_handler:["int xml_set_default_handler(resource parser, string hdl)","Set up default handler"],xml_set_element_handler:["int xml_set_element_handler(resource parser, string shdl, string ehdl)","Set up start and end element handlers"],xml_set_end_namespace_decl_handler:["int xml_set_end_namespace_decl_handler(resource parser, string hdl)","Set up character data handler"],xml_set_external_entity_ref_handler:["int xml_set_external_entity_ref_handler(resource parser, string hdl)","Set up external entity reference handler"],xml_set_notation_decl_handler:["int xml_set_notation_decl_handler(resource parser, string hdl)","Set up notation declaration handler"],xml_set_object:["int xml_set_object(resource parser, object &obj)","Set up object which should be used for callbacks"],xml_set_processing_instruction_handler:["int xml_set_processing_instruction_handler(resource parser, string hdl)","Set up processing instruction (PI) handler"],xml_set_start_namespace_decl_handler:["int xml_set_start_namespace_decl_handler(resource parser, string hdl)","Set up character data handler"],xml_set_unparsed_entity_decl_handler:["int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)","Set up unparsed entity declaration handler"],xmlrpc_decode:["array xmlrpc_decode(string xml [, string encoding])","Decodes XML into native PHP types"],xmlrpc_decode_request:["array xmlrpc_decode_request(string xml, string& method [, string encoding])","Decodes XML into native PHP types"],xmlrpc_encode:["string xmlrpc_encode(mixed value)","Generates XML for a PHP value"],xmlrpc_encode_request:["string xmlrpc_encode_request(string method, mixed params [, array output_options])","Generates XML for a method request"],xmlrpc_get_type:["string xmlrpc_get_type(mixed value)","Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings"],xmlrpc_is_fault:["bool xmlrpc_is_fault(array)","Determines if an array value represents an XMLRPC fault."],xmlrpc_parse_method_descriptions:["array xmlrpc_parse_method_descriptions(string xml)","Decodes XML into a list of method descriptions"],xmlrpc_server_add_introspection_data:["int xmlrpc_server_add_introspection_data(resource server, array desc)","Adds introspection documentation"],xmlrpc_server_call_method:["mixed xmlrpc_server_call_method(resource server, string xml, mixed user_data [, array output_options])","Parses XML requests and call methods"],xmlrpc_server_create:["resource xmlrpc_server_create()","Creates an xmlrpc server"],xmlrpc_server_destroy:["int xmlrpc_server_destroy(resource server)","Destroys server resources"],xmlrpc_server_register_introspection_callback:["bool xmlrpc_server_register_introspection_callback(resource server, string function)","Register a PHP function to generate documentation"],xmlrpc_server_register_method:["bool xmlrpc_server_register_method(resource server, string method_name, string function)","Register a PHP function to handle method matching method_name"],xmlrpc_set_type:["bool xmlrpc_set_type(string value, string type)","Sets xmlrpc type, base64 or datetime, for a PHP string value"],xmlwriter_end_attribute:["bool xmlwriter_end_attribute(resource xmlwriter)","End attribute - returns FALSE on error"],xmlwriter_end_cdata:["bool xmlwriter_end_cdata(resource xmlwriter)","End current CDATA - returns FALSE on error"],xmlwriter_end_comment:["bool xmlwriter_end_comment(resource xmlwriter)","Create end comment - returns FALSE on error"],xmlwriter_end_document:["bool xmlwriter_end_document(resource xmlwriter)","End current document - returns FALSE on error"],xmlwriter_end_dtd:["bool xmlwriter_end_dtd(resource xmlwriter)","End current DTD - returns FALSE on error"],xmlwriter_end_dtd_attlist:["bool xmlwriter_end_dtd_attlist(resource xmlwriter)","End current DTD AttList - returns FALSE on error"],xmlwriter_end_dtd_element:["bool xmlwriter_end_dtd_element(resource xmlwriter)","End current DTD element - returns FALSE on error"],xmlwriter_end_dtd_entity:["bool xmlwriter_end_dtd_entity(resource xmlwriter)","End current DTD Entity - returns FALSE on error"],xmlwriter_end_element:["bool xmlwriter_end_element(resource xmlwriter)","End current element - returns FALSE on error"],xmlwriter_end_pi:["bool xmlwriter_end_pi(resource xmlwriter)","End current PI - returns FALSE on error"],xmlwriter_flush:["mixed xmlwriter_flush(resource xmlwriter [,bool empty])","Output current buffer"],xmlwriter_full_end_element:["bool xmlwriter_full_end_element(resource xmlwriter)","End current element - returns FALSE on error"],xmlwriter_open_memory:["resource xmlwriter_open_memory()","Create new xmlwriter using memory for string output"],xmlwriter_open_uri:["resource xmlwriter_open_uri(resource xmlwriter, string source)","Create new xmlwriter using source uri for output"],xmlwriter_output_memory:["string xmlwriter_output_memory(resource xmlwriter [,bool flush])","Output current buffer as string"],xmlwriter_set_indent:["bool xmlwriter_set_indent(resource xmlwriter, bool indent)","Toggle indentation on/off - returns FALSE on error"],xmlwriter_set_indent_string:["bool xmlwriter_set_indent_string(resource xmlwriter, string indentString)","Set string used for indenting - returns FALSE on error"],xmlwriter_start_attribute:["bool xmlwriter_start_attribute(resource xmlwriter, string name)","Create start attribute - returns FALSE on error"],xmlwriter_start_attribute_ns:["bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri)","Create start namespaced attribute - returns FALSE on error"],xmlwriter_start_cdata:["bool xmlwriter_start_cdata(resource xmlwriter)","Create start CDATA tag - returns FALSE on error"],xmlwriter_start_comment:["bool xmlwriter_start_comment(resource xmlwriter)","Create start comment - returns FALSE on error"],xmlwriter_start_document:["bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone)","Create document tag - returns FALSE on error"],xmlwriter_start_dtd:["bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid)","Create start DTD tag - returns FALSE on error"],xmlwriter_start_dtd_attlist:["bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)","Create start DTD AttList - returns FALSE on error"],xmlwriter_start_dtd_element:["bool xmlwriter_start_dtd_element(resource xmlwriter, string name)","Create start DTD element - returns FALSE on error"],xmlwriter_start_dtd_entity:["bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)","Create start DTD Entity - returns FALSE on error"],xmlwriter_start_element:["bool xmlwriter_start_element(resource xmlwriter, string name)","Create start element tag - returns FALSE on error"],xmlwriter_start_element_ns:["bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri)","Create start namespaced element tag - returns FALSE on error"],xmlwriter_start_pi:["bool xmlwriter_start_pi(resource xmlwriter, string target)","Create start PI tag - returns FALSE on error"],xmlwriter_text:["bool xmlwriter_text(resource xmlwriter, string content)","Write text - returns FALSE on error"],xmlwriter_write_attribute:["bool xmlwriter_write_attribute(resource xmlwriter, string name, string content)","Write full attribute - returns FALSE on error"],xmlwriter_write_attribute_ns:["bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content)","Write full namespaced attribute - returns FALSE on error"],xmlwriter_write_cdata:["bool xmlwriter_write_cdata(resource xmlwriter, string content)","Write full CDATA tag - returns FALSE on error"],xmlwriter_write_comment:["bool xmlwriter_write_comment(resource xmlwriter, string content)","Write full comment tag - returns FALSE on error"],xmlwriter_write_dtd:["bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset)","Write full DTD tag - returns FALSE on error"],xmlwriter_write_dtd_attlist:["bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content)","Write full DTD AttList tag - returns FALSE on error"],xmlwriter_write_dtd_element:["bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content)","Write full DTD element tag - returns FALSE on error"],xmlwriter_write_dtd_entity:["bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])","Write full DTD Entity tag - returns FALSE on error"],xmlwriter_write_element:["bool xmlwriter_write_element(resource xmlwriter, string name[, string content])","Write full element tag - returns FALSE on error"],xmlwriter_write_element_ns:["bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])","Write full namespaced element tag - returns FALSE on error"],xmlwriter_write_pi:["bool xmlwriter_write_pi(resource xmlwriter, string target, string content)","Write full PI tag - returns FALSE on error"],xmlwriter_write_raw:["bool xmlwriter_write_raw(resource xmlwriter, string content)","Write text - returns FALSE on error"],xsl_xsltprocessor_get_parameter:["string xsl_xsltprocessor_get_parameter(string namespace, string name)",""],xsl_xsltprocessor_has_exslt_support:["bool xsl_xsltprocessor_has_exslt_support()",""],xsl_xsltprocessor_import_stylesheet:["void xsl_xsltprocessor_import_stylesheet(domdocument doc)",""],xsl_xsltprocessor_register_php_functions:["void xsl_xsltprocessor_register_php_functions([mixed $restrict])",""],xsl_xsltprocessor_remove_parameter:["bool xsl_xsltprocessor_remove_parameter(string namespace, string name)",""],xsl_xsltprocessor_set_parameter:["bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value])",""],xsl_xsltprocessor_set_profiling:["bool xsl_xsltprocessor_set_profiling(string filename)",""],xsl_xsltprocessor_transform_to_doc:["domdocument xsl_xsltprocessor_transform_to_doc(domnode doc)",""],xsl_xsltprocessor_transform_to_uri:["int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri)",""],xsl_xsltprocessor_transform_to_xml:["string xsl_xsltprocessor_transform_to_xml(domdocument doc)",""],zend_logo_guid:["string zend_logo_guid()","Return the special ID used to request the Zend logo in phpinfo screens"],zend_version:["string zend_version()","Get the version of the Zend Engine"],zip_close:["void zip_close(resource zip)","Close a Zip archive"],zip_entry_close:["void zip_entry_close(resource zip_ent)","Close a zip entry"],zip_entry_compressedsize:["int zip_entry_compressedsize(resource zip_entry)","Return the compressed size of a ZZip entry"],zip_entry_compressionmethod:["string zip_entry_compressionmethod(resource zip_entry)","Return a string containing the compression method used on a particular entry"],zip_entry_filesize:["int zip_entry_filesize(resource zip_entry)","Return the actual filesize of a ZZip entry"],zip_entry_name:["string zip_entry_name(resource zip_entry)","Return the name given a ZZip entry"],zip_entry_open:["bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])","Open a Zip File, pointed by the resource entry"],zip_entry_read:["mixed zip_entry_read(resource zip_entry [, int len])","Read from an open directory entry"],zip_open:["resource zip_open(string filename)","Create new zip using source uri for output"],zip_read:["resource zip_read(resource zip)","Returns the next file in the archive"],zlib_get_coding_type:["string zlib_get_coding_type()","Returns the coding type used for output compression"],array_column:["array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array","Return the values from a single column in the input array"],boolval:["boolval(mixed $value): bool","Get the boolean value of a variable"],bzclose:["bzclose(resource $bz): bool","Close a bzip2 file"],bzflush:["bzflush(resource $bz): bool","Do nothing"],bzwrite:["bzwrite(resource $bz, string $data, ?int $length = null): int|false","Binary safe bzip2 file write"],checkdnsrr:["checkdnsrr(string $hostname, string $type = "MX"): bool","Check DNS records corresponding to a given Internet host name or IP address"],chop:["chop()","Alias of rtrim()"],class_uses:["class_uses(object|string $object_or_class, bool $autoload = true): array|false",""],curl_escape:["curl_escape(CurlHandle $handle, string $string): string|false","URL encodes the given string"],curl_file_create:["curl_file_create()","Create a CURLFile object"],curl_multi_errno:["curl_multi_errno(CurlMultiHandle $multi_handle): int","Return the last multi curl error number"],curl_multi_setopt:["curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value): bool","Set an option for the cURL multi handle"],curl_multi_strerror:["curl_multi_strerror(int $error_code): ?string","Return string describing error code"],curl_pause:["curl_pause(CurlHandle $handle, int $flags): int","Pause and unpause a connection"],curl_reset:["curl_reset(CurlHandle $handle): void","Reset all options of a libcurl session handle"],curl_share_close:["curl_share_close(CurlShareHandle $share_handle): void","Close a cURL share handle"],curl_share_errno:["curl_share_errno(CurlShareHandle $share_handle): int","Return the last share curl error number"],curl_share_init:["curl_share_init(): CurlShareHandle","Initialize a cURL share handle"],curl_share_setopt:["curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool","Set an option for a cURL share handle"],curl_share_strerror:["curl_share_strerror(int $error_code): ?string","Return string describing the given error code"],curl_strerror:["curl_strerror(int $error_code): ?string","Return string describing the given error code"],curl_unescape:["curl_unescape(CurlHandle $handle, string $string): string|false","Decodes the given URL encoded string"],date_create_immutable_from_format:["date_create_immutable_from_format()","Alias of DateTimeImmutable::createFromFormat()"],date_create_immutable:["date_create_immutable()","Alias of DateTimeImmutable::__construct()"],deflate_add:["deflate_add(DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false","Incrementally deflate data"],deflate_init:["deflate_init(int $encoding, array $options = []): DeflateContext|false","Initialize an incremental deflate context"],"delete":["delete()","See unlink()"],diskfreespace:["diskfreespace()","Alias of disk_free_space()"],doubleval:["doubleval()","Alias of floatval()"],enchant_dict_add:["enchant_dict_add(EnchantDictionary $dictionary, string $word): void","Add a word to personal word list"],enchant_dict_is_added:["enchant_dict_is_added(EnchantDictionary $dictionary, string $word): bool","Whether or not 'word' exists in this spelling-session"],error_clear_last:["error_clear_last(): void","Clear the most recent error"],eval:["eval(string $code): mixed","Evaluate a string as PHP code"],expect_expectl:["expect_expectl(resource $expect, array $cases, array &$match = ?): int",""],expect_popen:["expect_popen(string $command): resource",""],fdiv:["fdiv(float $num1, float $num2): float","Divides two numbers, according to IEEE 754"],filter_id:["filter_id(string $name): int|false","Returns the filter ID belonging to a named filter"],filter_list:["filter_list(): array","Returns a list of all supported filters"],forward_static_call_array:["forward_static_call_array(callable $callback, array $args): mixed","Call a static method and pass the arguments as array"],fputs:["fputs()","Alias of fwrite()"],ftp_append:["ftp_append(FTP\\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool","Append the contents of a file to another file on the FTP server"],ftp_mlsd:["ftp_mlsd(FTP\\Connection $ftp, string $directory): array|false","Returns a list of files in the given directory"],ftp_quit:["ftp_quit()","Alias of ftp_close()"],gc_mem_caches:["gc_mem_caches(): int",""],gc_status:["gc_status(): array","Gets information about the garbage collector"],get_debug_type:["get_debug_type(mixed $value): string","Gets the type name of a variable in a way that is suitable for debugging"],get_declared_traits:["get_declared_traits(): array","Returns an array of all declared traits"],get_required_files:["get_required_files()","Alias of get_included_files()"],get_resource_id:["get_resource_id(resource $resource): int",""],get_resources:["get_resources(?string $type = null): array","Returns active resources"],getimagesizefromstring:["getimagesizefromstring(string $string, array &$image_info = null): array|false","Get the size of an image from a string"],getmxrr:["getmxrr(string $hostname, array &$hosts, array &$weights = null): bool","Get MX records corresponding to a given Internet host name"],gmp_binomial:["gmp_binomial(GMP|int|string $n, int $k): GMP","Calculates binomial coefficient"],gmp_div:["gmp_div()","Alias of gmp_div_q()"],gmp_export:["gmp_export(GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string","Export to a binary string"],gmp_import:["gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP","Import from a binary string"],gmp_kronecker:["gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int","Kronecker symbol"],gmp_lcm:["gmp_lcm(GMP|int|string $num1, GMP|int|string $num2): GMP","Calculate LCM"],gmp_perfect_power:["gmp_perfect_power(GMP|int|string $num): bool","Perfect power check"],gmp_random_bits:["gmp_random_bits(int $bits): GMP","Random number"],gmp_random_range:["gmp_random_range(GMP|int|string $min, GMP|int|string $max): GMP","Random number"],gmp_random_seed:["gmp_random_seed(GMP|int|string $seed): void","Sets the RNG seed"],gmp_root:["gmp_root(GMP|int|string $num, int $nth): GMP","Take the integer part of nth root"],gmp_rootrem:["gmp_rootrem(GMP|int|string $num, int $nth): array","Take the integer part and remainder of nth root"],gzclose:["gzclose(resource $stream): bool","Close an open gz-file pointer"],gzdecode:["gzdecode(string $data, int $max_length = 0): string|false","Decodes a gzip compressed string"],gzeof:["gzeof(resource $stream): bool","Test for EOF on a gz-file pointer"],gzgetc:["gzgetc(resource $stream): string|false","Get character from gz-file pointer"],gzgets:["gzgets(resource $stream, ?int $length = null): string|false","Get line from file pointer"],gzgetss:["gzgetss(resource $zp, int $length, string $allowable_tags = ?): string",""],gzpassthru:["gzpassthru(resource $stream): int",""],gzputs:["gzputs()","Alias of gzwrite()"],gzread:["gzread(resource $stream, int $length): string|false","Binary-safe gz-file read"],gzrewind:["gzrewind(resource $stream): bool","Rewind the position of a gz-file pointer"],gzseek:["gzseek(resource $stream, int $offset, int $whence = SEEK_SET): int","Seek on a gz-file pointer"],gztell:["gztell(resource $stream): int|false","Tell gz-file pointer read/write position"],gzwrite:["gzwrite(resource $stream, string $data, ?int $length = null): int|false","Binary-safe gz-file write"],halt_compiler:["__halt_compiler(): void",""],hash_equals:["hash_equals(string $known_string, string $user_string): bool","Timing attack safe string comparison"],hash_hkdf:['hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string',"Generate a HKDF key derivation of a supplied key input"],hash_hmac_algos:["hash_hmac_algos(): array","Return a list of registered hashing algorithms suitable for hash_hmac"],hash_pbkdf2:["hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string","Generate a PBKDF2 key derivation of a supplied password"],header_register_callback:["header_register_callback(callable $callback): bool","Call a header function"],hex2bin:["hex2bin(string $string): string|false","Decodes a hexadecimally encoded binary string"],hrtime:["hrtime(bool $as_number = false): array|int|float|false","Get the system's high resolution time"],http_response_code:["http_response_code(int $response_code = 0): int|bool","Get or Set the HTTP response code"],imageaffine:["imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false","Return an image containing the affine transformed src image, using an optional clipping area"],imageaffinematrixconcat:["imageaffinematrixconcat(array $matrix1, array $matrix2): array|false","Concatenate two affine transformation matrices"],imageaffinematrixget:["imageaffinematrixget(int $type, array|float $options): array|false","Get an affine transformation matrix"],imagebmp:["imagebmp(GdImage $image, resource|string|null $file = null, bool $compressed = true): bool","Output a BMP image to browser or file"],imagecreatefrombmp:["imagecreatefrombmp(string $filename): GdImage|false","Create a new image from file or URL"],imagecreatefromwebp:["imagecreatefromwebp(string $filename): GdImage|false","Create a new image from file or URL"],imagecrop:["imagecrop(GdImage $image, array $rectangle): GdImage|false","Crop an image to the given rectangle"],imagecropauto:["imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false","Crop an image automatically using one of the available modes"],imageflip:["imageflip(GdImage $image, int $mode): bool","Flips an image using a given mode"],imagegetclip:["imagegetclip(GdImage $image): array","Get the clipping rectangle"],imagegetinterpolation:["imagegetinterpolation(GdImage $image): int","Get the interpolation method"],imageopenpolygon:["imageopenpolygon(GdImage $image, array $points, int $color): bool","Draws an open polygon"],imagepalettetotruecolor:["imagepalettetotruecolor(GdImage $image): bool","Converts a palette based image to true color"],imageresolution:["imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool","Get or set the resolution of the image"],imagescale:["imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false","Scale an image using the given new width and height"],imagesetclip:["imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool","Set the clipping rectangle"],imagesetinterpolation:["imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool","Set the interpolation method"],imagewebp:["imagewebp(GdImage $image, resource|string|null $file = null, int $quality = -1): bool","Output a WebP image to browser or file"],imap_create:["","Alias of imap_createmailbox()"],imap_fetchmime:["imap_fetchmime(IMAP\\Connection $imap, int $message_num, string $section, int $flags = 0): string|false","Fetch MIME headers for a particular section of the message"],imap_fetchtext:["imap_fetchtext()","Alias of imap_body()"],imap_header:["imap_header()","Alias of imap_headerinfo()"],imap_listmailbox:["imap_listmailbox()","Alias of imap_list()"],imap_listsubscribed:["imap_listsubscribed()","Alias of imap_lsub()"],imap_rename:["imap_rename()","Alias of imap_renamemailbox()"],imap_scan:["imap_scan()","Alias of imap_listscan()"],imap_scanmailbox:["imap_scanmailbox()","Alias of imap_listscan()"],ini_alter:["ini_alter()","Alias of ini_set()"],intdiv:["intdiv(int $num1, int $num2): int","Integer division"],is_double:["is_double()","Alias of is_float()"],is_int:["is_int(mixed $value): bool","Find whether the type of a variable is integer"],is_integer:["is_integer()","Alias of is_int()"],is_iterable:["is_iterable(mixed $value): bool",""],is_real:["is_real()","Alias of is_float()"],is_soap_fault:["is_soap_fault(mixed $object): bool","Checks if a SOAP call has failed"],is_tainted:["is_tainted(string $string): bool","Checks whether a string is tainted"],is_writeable:["is_writeable()","Alias of is_writable()"],json_last_error_msg:["json_last_error_msg(): string","Returns the error string of the last json_encode() or json_decode() call"],key_exists:["key_exists()","Alias of array_key_exists()"],lchown:["lchown(string $filename, string|int $user): bool","Changes user ownership of symlink"],libxml_set_external_entity_loader:["libxml_set_external_entity_loader(?callable $resolver_function): bool","Changes the default external entity loader"],mb_chr:["mb_chr(int $codepoint, ?string $encoding = null): string|false","Return character by Unicode code point value"],mb_ereg_replace_callback:["mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null",""],mb_ord:["mb_ord(string $string, ?string $encoding = null): int|false","Get Unicode code point of character"],mb_scrub:["mb_scrub(string $string, ?string $encoding = null): string","Description"],mb_str_split:["mb_str_split(string $string, int $length = 1, ?string $encoding = null): array","Given a multibyte string, return an array of its characters"],memcache_debug:["memcache_debug(bool $on_off): bool","Turn debug output on/off"],mysql_db_name:["mysql_db_name(resource $result, int $row, mixed $field = NULL): string","Retrieves database name from the call to mysql_list_dbs()"],mysql_tablename:["mysql_tablename(resource $result, int $i): string|false","Get table name of field"],mysql_xdevapi_expression:["mysql_xdevapi\\expression(string $expression): object","Bind prepared statement variables as parameters"],mysql_xdevapi_getsession:["mysql_xdevapi\\getSession(string $uri): mysql_xdevapi\\Session","Connect to a MySQL server"],mysqli_escape_string:["mysqli_escape_string()","Alias of mysqli_real_escape_string()"],mysqli_execute:["mysqli_execute()","Alias for mysqli_stmt_execute()"],mysqli_get_links_stats:["mysqli_get_links_stats(): array","Return information about open and cached links"],mysqli_set_opt:["mysqli_set_opt()","Alias of mysqli_options()"],ob_tidyhandler:["ob_tidyhandler(string $input, int $mode = ?): string","ob_start callback function to repair the buffer"],odbc_do:["odbc_do()","Alias of odbc_exec()"],odbc_field_precision:["odbc_field_precision()","Alias of odbc_field_len()"],opcache_compile_file:["opcache_compile_file(string $filename): bool","Compiles and caches a PHP script without executing it"],opcache_get_configuration:["opcache_get_configuration(): array|false","Get configuration information about the cache"],opcache_get_status:["opcache_get_status(bool $include_scripts = true): array|false","Get status information about the cache"],opcache_invalidate:["opcache_invalidate(string $filename, bool $force = false): bool","Invalidates a cached script"],opcache_is_script_cached:["opcache_is_script_cached(string $filename): bool","Tells whether a script is cached in OPCache"],opcache_reset:["opcache_reset(): bool","Resets the contents of the opcode cache"],password_algos:["password_algos(): array","Get available password hashing algorithm IDs"],password_get_info:["password_get_info(string $hash): array","Returns information about the given hash"],password_hash:["password_hash(string $password, string|int|null $algo, array $options = []): string","Creates a password hash"],password_needs_rehash:["password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool","Checks if the given hash matches the given options"],password_verify:["password_verify(string $password, string $hash): bool","Verifies that a password matches a hash"],pcntl_async_signals:["pcntl_async_signals(?bool $enable = null): bool","Enable/disable asynchronous signal handling or return the old setting"],pcntl_errno:["pcntl_errno()","Alias of pcntl_get_last_error()"],pcntl_get_last_error:["pcntl_get_last_error(): int","Retrieve the error number set by the last pcntl function which failed"],pcntl_signal_get_handler:["pcntl_signal_get_handler(int $signal): callable|int","Get the current handler for specified signal"],pcntl_sigwaitinfo:["pcntl_sigwaitinfo(array $signals, array &$info = []): int|false","Waits for signals"],pcntl_strerror:["pcntl_strerror(int $error_code): string","Retrieve the system error message associated with the given errno"],pg_connect_poll:["pg_connect_poll(PgSql\\Connection $connection): int",""],pg_consume_input:["pg_consume_input(PgSql\\Connection $connection): bool","Reads input on the connection"],pg_escape_identifier:["pg_escape_identifier(PgSql\\Connection $connection = ?, string $data): string",""],pg_escape_literal:["pg_escape_literal(PgSql\\Connection $connection = ?, string $data): string",""],pg_flush:["pg_flush(PgSql\\Connection $connection): int|bool","Flush outbound query data on the connection"],pg_lo_truncate:["pg_lo_truncate(PgSql\\Lob $lob, int $size): bool",""],pg_socket:["pg_socket(PgSql\\Connection $connection): resource|false",""],pos:["pos()","Alias of current()"],posix_errno:["posix_errno()","Alias of posix_get_last_error()"],posix_setrlimit:["posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool","Set system resource limits"],preg_last_error_msg:["preg_last_error_msg(): string","Returns the error message of the last PCRE regex execution"],preg_replace_callback_array:["preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, int &$count = null, int $flags = 0): string|array|null","Perform a regular expression search and replace using callbacks"],ps_translate:["ps_translate(resource $psdoc, float $x, float $y): bool","Sets translation"],random_bytes:["random_bytes(int $length): string","Generates cryptographically secure pseudo-random bytes"],random_int:["random_int(int $min, int $max): int","Generates cryptographically secure pseudo-random integers"],read_exif_data:["read_exif_data()","Alias of exif_read_data()"],recode:["recode()","Alias of recode_string()"],session_abort:["session_abort(): bool","Discard session array changes and finish session"],session_commit:["session_commit()","Alias of session_write_close()"],session_create_id:['session_create_id(string $prefix = ""): string|false',"Create new session id"],session_gc:["session_gc(): int|false","Perform session data garbage collection"],session_register_shutdown:["session_register_shutdown(): void","Session shutdown function"],session_reset:["session_reset(): bool","Re-initialize session array with original values"],session_status:["session_status(): int","Returns the current session status"],set_file_buffer:["set_file_buffer()","Alias of stream_set_write_buffer()"],show_source:["show_source()","Alias of highlight_file()"],sizeof:["sizeof()","Alias of count()"],snmp_set_oid_numeric_print:["snmp_set_oid_numeric_print(int $format): bool",""],snmpwalkoid:["snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false",""],socket_addrinfo_bind:["socket_addrinfo_bind(AddressInfo $address): Socket|false","Create and bind to a socket from a given addrinfo"],socket_addrinfo_connect:["socket_addrinfo_connect(AddressInfo $address): Socket|false","Create and connect to a socket from a given addrinfo"],socket_addrinfo_explain:["socket_addrinfo_explain(AddressInfo $address): array","Get information about addrinfo"],socket_addrinfo_lookup:["socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []): array|false","Get array with contents of getaddrinfo about the given hostname"],socket_cmsg_space:["socket_cmsg_space(int $level, int $type, int $num = 0): ?int","Calculate message buffer size"],socket_export_stream:["socket_export_stream(Socket $socket): resource|false","Export a socket into a stream that encapsulates a socket"],socket_get_status:["socket_get_status()","Alias of stream_get_meta_data()"],socket_getopt:["socket_getopt()","Alias of socket_get_option()"],socket_import_stream:["socket_import_stream(resource $stream): Socket|false","Import a stream"],socket_recvmsg:["socket_recvmsg(Socket $socket, array &$message, int $flags = 0): int|false","Read a message"],socket_sendmsg:["socket_sendmsg(Socket $socket, array $message, int $flags = 0): int|false","Send a message"],socket_set_blocking:["socket_set_blocking()","Alias of stream_set_blocking()"],socket_set_timeout:["socket_set_timeout()","Alias of stream_set_timeout()"],socket_setopt:["socket_setopt()","Alias of socket_set_option()"],socket_wsaprotocol_info_export:["socket_wsaprotocol_info_export(Socket $socket, int $process_id): string|false","Exports the WSAPROTOCOL_INFO Structure"],socket_wsaprotocol_info_import:["socket_wsaprotocol_info_import(string $info_id): Socket|false","Imports a Socket from another Process"],socket_wsaprotocol_info_release:["socket_wsaprotocol_info_release(string $info_id): bool","Releases an exported WSAPROTOCOL_INFO Structure"],spl_object_id:["spl_object_id(object $object): int",""],sqlsrv_begin_transaction:["sqlsrv_begin_transaction(resource $conn): bool","Begins a database transaction"],sqlsrv_cancel:["sqlsrv_cancel(resource $stmt): bool","Cancels a statement"],sqlsrv_client_info:["sqlsrv_client_info(resource $conn): array","Returns information about the client and specified connection"],sqlsrv_close:["sqlsrv_close(resource $conn): bool","Closes an open connection and releases resourses associated with the connection"],sqlsrv_commit:["sqlsrv_commit(resource $conn): bool","Commits a transaction that was begun with sqlsrv_begin_transaction()"],sqlsrv_configure:["sqlsrv_configure(string $setting, mixed $value): bool","Changes the driver error handling and logging configurations"],sqlsrv_connect:["sqlsrv_connect(string $serverName, array $connectionInfo = ?): resource","Opens a connection to a Microsoft SQL Server database"],sqlsrv_errors:["sqlsrv_errors(int $errorsOrWarnings = ?): mixed","Returns error and warning information about the last SQLSRV operation performed"],sqlsrv_execute:["sqlsrv_execute(resource $stmt): bool","Executes a statement prepared with sqlsrv_prepare()"],sqlsrv_fetch_array:["sqlsrv_fetch_array(resource $stmt, int $fetchType = ?, int $row = ?, int $offset = ?): array","Returns a row as an array"],sqlsrv_fetch_object:["sqlsrv_fetch_object(resource $stmt, string $className = ?, array $ctorParams = ?, int $row = ?, int $offset = ?): mixed","Retrieves the next row of data in a result set as an object"],sqlsrv_fetch:["sqlsrv_fetch(resource $stmt, int $row = ?, int $offset = ?): mixed","Makes the next row in a result set available for reading"],sqlsrv_field_metadata:["sqlsrv_field_metadata(resource $stmt): mixed",""],sqlsrv_free_stmt:["sqlsrv_free_stmt(resource $stmt): bool","Frees all resources for the specified statement"],sqlsrv_get_config:["sqlsrv_get_config(string $setting): mixed","Returns the value of the specified configuration setting"],sqlsrv_get_field:["sqlsrv_get_field(resource $stmt, int $fieldIndex, int $getAsType = ?): mixed","Gets field data from the currently selected row"],sqlsrv_has_rows:["sqlsrv_has_rows(resource $stmt): bool","Indicates whether the specified statement has rows"],sqlsrv_next_result:["sqlsrv_next_result(resource $stmt): mixed","Makes the next result of the specified statement active"],sqlsrv_num_fields:["sqlsrv_num_fields(resource $stmt): mixed","Retrieves the number of fields (columns) on a statement"],sqlsrv_num_rows:["sqlsrv_num_rows(resource $stmt): mixed","Retrieves the number of rows in a result set"],sqlsrv_prepare:["sqlsrv_prepare(resource $conn, string $sql, array $params = ?, array $options = ?): mixed","Prepares a query for execution"],sqlsrv_query:["sqlsrv_query(resource $conn, string $sql, array $params = ?, array $options = ?): mixed","Prepares and executes a query"],sqlsrv_rollback:["sqlsrv_rollback(resource $conn): bool",""],sqlsrv_rows_affected:["sqlsrv_rows_affected(resource $stmt): int|false",""],sqlsrv_send_stream_data:["sqlsrv_send_stream_data(resource $stmt): bool","Sends data from parameter streams to the server"],sqlsrv_server_info:["sqlsrv_server_info(resource $conn): array","Returns information about the server"],str_contains:["str_contains(string $haystack, string $needle): bool","Determine if a string contains a given substring"],str_ends_with:["str_ends_with(string $haystack, string $needle): bool","Checks if a string ends with a given substring"],str_starts_with:["str_starts_with(string $haystack, string $needle): bool","Checks if a string starts with a given substring"],stream_isatty:["stream_isatty(resource $stream): bool","Check if a stream is a TTY"],stream_notification_callback:["stream_notification_callback(int $notification_code, int $severity, string $message, int $message_code, int $bytes_transferred, int $bytes_max): void","A callback function for the notification context parameter"],stream_register_wrapper:["stream_register_wrapper()","Alias of stream_wrapper_register()"],stream_set_chunk_size:["stream_set_chunk_size(resource $stream, int $size): int","Set the stream chunk size"],stream_set_read_buffer:["stream_set_read_buffer(resource $stream, int $size): int","Set read file buffering on the given stream"],tcpwrap_check:["tcpwrap_check(string $daemon, string $address, string $user = ?, bool $nodns = false): bool","Performs a tcpwrap check"],trait_exists:["trait_exists(string $trait, bool $autoload = true): bool","Checks if the trait exists"],use_soap_error_handler:["use_soap_error_handler(bool $enable = true): bool","Set whether to use the SOAP error handler"],user_error:["user_error()","Alias of trigger_error()"],yaml_emit_file:["yaml_emit_file(string $filename, mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): bool","Send the YAML representation of a value to a file"],yaml_emit:["yaml_emit(mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): string","Returns the YAML representation of a value"],yaml_parse_file:["yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed","Parse a YAML stream from a file"],yaml_parse_url:["yaml_parse_url(string $url, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed","Parse a Yaml stream from a URL"],yaml_parse:["yaml_parse(string $input, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed","Parse a YAML stream"],zlib_decode:["zlib_decode(string $data, int $max_length = 0): string|false","Uncompress any raw/gzip/zlib encoded data"],zlib_encode:["zlib_encode(string $data, int $encoding, int $level = -1): string|false","Compress data with the specified encoding"]},i={$_COOKIE:{type:"array"},$_ENV:{type:"array"},$_FILES:{type:"array"},$_GET:{type:"array"},$_POST:{type:"array"},$_REQUEST:{type:"array"},$_SERVER:{type:"array",value:{DOCUMENT_ROOT:1,GATEWAY_INTERFACE:1,HTTP_ACCEPT:1,HTTP_ACCEPT_CHARSET:1,HTTP_ACCEPT_ENCODING:1,HTTP_ACCEPT_LANGUAGE:1,HTTP_CONNECTION:1,HTTP_HOST:1,HTTP_REFERER:1,HTTP_USER_AGENT:1,PATH_TRANSLATED:1,PHP_SELF:1,QUERY_STRING:1,REMOTE_ADDR:1,REMOTE_PORT:1,REQUEST_METHOD:1,REQUEST_URI:1,SCRIPT_FILENAME:1,SCRIPT_NAME:1,SERVER_ADMIN:1,SERVER_NAME:1,SERVER_PORT:1,SERVER_PROTOCOL:1,SERVER_SIGNATURE:1,SERVER_SOFTWARE:1,argv:1,argc:1}},$_SESSION:{type:"array"},$GLOBALS:{type:"array"},$argv:{type:"array"},$argc:{type:"int"}},o=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(i.type==="support.php_tag"&&i.value==="0){var o=t.getTokenAt(n.row,i.start);if(o.type==="support.php_tag")return this.getTagCompletions(e,t,n,r)}return this.getFunctionCompletions(e,t,n,r)}if(s(i,"variable"))return this.getVariableCompletions(e,t,n,r);var u=t.getLine(n.row).substr(0,n.column);return i.type==="string"&&/(\$[\w]*)\[["']([^'"]*)$/i.test(u)?this.getArrayKeyCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return[{caption:"php",value:"php",meta:"php tag",score:1e6},{caption:"=",value:"=",meta:"php tag",score:1e6}]},this.getFunctionCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+"($0)",meta:"php function",score:1e6,docHTML:r[e][1]}})},this.getVariableCompletions=function(e,t,n,r){var s=Object.keys(i);return s.map(function(e){return{caption:e,value:e,meta:"php variable",score:1e6}})},this.getArrayKeyCompletions=function(e,t,n,r){var s=t.getLine(n.row).substr(0,n.column),o=s.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1];if(!i[o])return[];var u=[];return i[o].type==="array"&&i[o].value&&(u=Object.keys(i[o].value)),u.map(function(e){return{caption:e,value:e,meta:"php array key",score:1e6}})}}).call(o.prototype),t.PhpCompletions=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.indentKeywords={"if":1,"while":1,"for":1,foreach:1,"switch":1,"else":0,elseif:0,endif:-1,endwhile:-1,endfor:-1,endforeach:-1,endswitch:-1},this.foldingStartMarkerPhp=/(?:\s|^)(if|else|elseif|while|for|foreach|switch).*\:/i,this.foldingStopMarkerPhp=/(?:\s|^)(endif|endwhile|endfor|endforeach|endswitch)\;/i,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarkerPhp.exec(r);if(i)return this.phpBlock(e,n,i.index+2);var i=this.foldingStopMarkerPhp.exec(r);return i?this.phpBlock(e,n,i.index+2):this.getFoldWidgetRangeBase(e,t,n)},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarkerPhp.test(r),s=this.foldingStopMarkerPhp.test(r);if(i&&!s){var o=this.foldingStartMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"start"}}if(s&&t==="markbeginend"){var o=this.foldingStopMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"end"}}return this.getFoldWidgetBase(e,t,n)},this.phpBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword")return;var a=u.value,f=[a],l=this.indentKeywords[a];if(a==="else"||a==="elseif")l=1;if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(u.type!=="keyword")continue;var p=l*this.indentKeywords[u.value];if(p>0)f.unshift(u.value);else if(p<=0){f.shift();if(!f.length)break;p===0&&f.unshift(u.value)}}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/php","ace/unicode","ace/mode/folding/mixed","ace/mode/folding/html","ace/mode/folding/cstyle","ace/mode/html","ace/mode/javascript","ace/mode/css"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./php_highlight_rules").PhpHighlightRules,o=e("./php_highlight_rules").PhpLangHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./php_completions").PhpCompletions,l=e("./folding/php").FoldMode,c=e("../unicode"),h=e("./folding/mixed").FoldMode,p=e("./folding/html").FoldMode,d=e("./folding/cstyle").FoldMode,v=e("./html").Mode,m=e("./javascript").Mode,g=e("./css").Mode,y=function(e){this.HighlightRules=o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.$completer=new f,this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(y,i),function(){this.tokenRe=new RegExp("^["+c.wordChars+"_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"_]|\\s])+","g"),this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[:]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o!="doc-start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/php-inline"}.call(y.prototype);var b=function(e){if(e&&e.inline){var t=new y;return t.createWorker=this.createWorker,t.inlinePhp=!0,t}v.call(this),this.HighlightRules=s,this.createModeDelegates({"js-":m,"css-":g,"php-":y}),this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(b,v),function(){this.createWorker=function(e){var t=new a(["ace"],"ace/mode/php_worker","PhpWorker");return t.attachToDocument(e.getDocument()),this.inlinePhp&&t.call("setOptions",[{inline:!0}]),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/php",this.snippetFileId="ace/snippets/php"}.call(b.prototype),t.Mode=b}); (function() { + ace.require(["ace/mode/php"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-php_laravel_blade.js b/mixly/common/modules/web-modules/ace/mode-php_laravel_blade.js new file mode 100644 index 00000000..466345bd --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-php_laravel_blade.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(){var e=s,t=i.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_column|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|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_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|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_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")),n=i.arrayToMap("abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|finally|for|foreach|function|global|goto|if|implements|instanceof|insteadof|interface|namespace|new|or|private|protected|public|static|switch|throw|trait|try|use|var|while|xor|yield".split("|")),r=i.arrayToMap("__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),o=i.arrayToMap("true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__".split("|")),u=i.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),a=i.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),f=i.arrayToMap("cfunction|old_function".split("|")),l=i.arrayToMap([]);this.$rules={start:[{token:"comment",regex:/(?:#|\/\/)(?:[^?]|\?[^>])*/},e.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"'",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},{token:["keyword","text","support.class"],regex:"\\b(new)(\\s+)(\\w+)"},{token:["support.class","keyword.operator"],regex:"\\b(\\w+)(::)"},{token:"constant.language",regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},{token:function(e){return n.hasOwnProperty(e)?"keyword":o.hasOwnProperty(e)?"constant.language":u.hasOwnProperty(e)?"variable.language":l.hasOwnProperty(e)?"invalid.illegal":t.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":e.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)?"variable":"identifier"},regex:/[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{onMatch:function(e,t,n){e=e.substr(3);if(e[0]=="'"||e[0]=='"')e=e.slice(1,-1);return n.unshift(this.next,e),"markup.list"},regex:/<<<(?:\w+|'\w+'|"\w+")$/,next:"heredoc"},{token:"keyword.operator",regex:"::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|\\.=|=|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:/[,;]/},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],heredoc:[{onMatch:function(e,t,n){return n[1]!=e?(this.next="","string"):(n.shift(),n.shift(),this.next=this.nextState,"markup.list")},regex:"^\\w+(?=;?$)",nextState:"start"},{token:"string",regex:".*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"constant.language.escape",regex:'\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},{token:"variable",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable",regex:/\$\{[^"\}]+\}?/},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}]},this.embedRules(s,"doc-",[s.getEndRule("start")])};r.inherits(a,o);var f=function(){u.call(this);var e=[{token:"support.php_tag",regex:"<\\?(?:php|=)?",push:"php-start"}],t=[{token:"support.php_tag",regex:"\\?>",next:"pop"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(a,"php-",t,["start"]),this.normalizeRules()};r.inherits(f,u),t.PhpHighlightRules=f,t.PhpLangHighlightRules=a}),ace.define("ace/mode/php_laravel_blade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/php_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./php_highlight_rules").PhpHighlightRules,s=function(){i.call(this);var e={start:[{include:"bladeComments"},{include:"directives"},{include:"parenthesis"}],comments:[{include:"bladeComments"},{token:"punctuation.definition.comment.blade",regex:"(\\/\\/(.)*)|(\\#(.)*)"},{token:"punctuation.definition.comment.begin.php",regex:"(?:\\/\\*)",push:[{token:"punctuation.definition.comment.end.php",regex:"(?:\\*\\/)",next:"pop"},{defaultToken:"comment.block.blade"}]}],bladeComments:[{token:"punctuation.definition.comment.begin.blade",regex:"(?:\\{\\{\\-\\-)",push:[{token:"punctuation.definition.comment.end.blade",regex:"(?:\\-\\-\\}\\})",next:"pop"},{defaultToken:"comment.block.blade"}]}],parenthesis:[{token:"parenthesis.begin.blade",regex:"\\(",push:[{token:"parenthesis.end.blade",regex:"\\)",next:"pop"},{include:"strings"},{include:"variables"},{include:"lang"},{include:"parenthesis"},{include:"comments"},{defaultToken:"source.blade"}]}],directives:[{token:["directive.declaration.blade","keyword.directives.blade"],regex:"(@)(endunless|endisset|endempty|endauth|endguest|endcomponent|endslot|endalert|endverbatim|endsection|show|php|endphp|endpush|endprepend|endenv|endforelse|isset|empty|component|slot|alert|json|verbatim|section|auth|guest|hasSection|forelse|includeIf|includeWhen|includeFirst|each|push|stack|prepend|inject|env|elseenv|unless|yield|extends|parent|include|acfrepeater|block|can|cannot|choice|debug|elsecan|elsecannot|embed|hipchat|lang|layout|macro|macrodef|minify|partial|render|servers|set|slack|story|task|unset|wpposts|acfend|after|append|breakpoint|endafter|endcan|endcannot|endembed|endmacro|endmarkdown|endminify|endpartial|endsetup|endstory|endtask|endunless|markdown|overwrite|setup|stop|wpempty|wpend|wpquery)"},{token:["directive.declaration.blade","keyword.control.blade"],regex:"(@)(if|else|elseif|endif|foreach|endforeach|switch|case|break|default|endswitch|for|endfor|while|endwhile|continue)"},{token:["directive.ignore.blade","injections.begin.blade"],regex:"(@?)(\\{\\{)",push:[{token:"injections.end.blade",regex:"\\}\\}",next:"pop"},{include:"strings"},{include:"variables"},{include:"comments"},{defaultToken:"source.blade"}]},{token:"injections.unescaped.begin.blade",regex:"\\{\\!\\!",push:[{token:"injections.unescaped.end.blade",regex:"\\!\\!\\}",next:"pop"},{include:"strings"},{include:"variables"},{defaultToken:"source.blade"}]}],lang:[{token:"keyword.operator.blade",regex:"(?:!=|!|<=|>=|<|>|===|==|=|\\+\\+|\\;|\\,|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod|as)\\b"},{token:"constant.language.blade",regex:"\\b(?:TRUE|FALSE|true|false)\\b"}],strings:[{token:"punctuation.definition.string.begin.blade",regex:'"',push:[{token:"punctuation.definition.string.end.blade",regex:'"',next:"pop"},{token:"string.character.escape.blade",regex:"\\\\."},{defaultToken:"string.quoted.single.blade"}]},{token:"punctuation.definition.string.begin.blade",regex:"'",push:[{token:"punctuation.definition.string.end.blade",regex:"'",next:"pop"},{token:"string.character.escape.blade",regex:"\\\\."},{defaultToken:"string.quoted.double.blade"}]}],variables:[{token:"variable.blade",regex:"\\$([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:["keyword.operator.blade","constant.other.property.blade"],regex:"(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:["keyword.operator.blade","meta.function-call.object.blade","punctuation.definition.variable.blade","variable.blade","punctuation.definition.variable.blade"],regex:"(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))"}]},t=e.start;for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],t);Object.keys(e).forEach(function(t){this.$rules[t]||(this.$rules[t]=e[t])},this),this.normalizeRules()};r.inherits(s,i),t.PHPLaravelBladeHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/php_completions",["require","exports","module"],function(e,t,n){"use strict";function s(e,t){return e.type.lastIndexOf(t)>-1}var r={abs:["int abs(int number)","Return the absolute value of the number"],acos:["float acos(float number)","Return the arc cosine of the number in radians"],acosh:["float acosh(float number)","Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number"],addGlob:["bool addGlob(string pattern[,int flags [, array options]])","Add files matching the glob pattern. See php's glob for the pattern syntax."],addPattern:["bool addPattern(string pattern[, string path [, array options]])","Add files matching the pcre pattern. See php's pcre for the pattern syntax."],addcslashes:["string addcslashes(string str, string charlist)","Escapes all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\\n', '\\r', '\\t' etc...)"],addslashes:["string addslashes(string str)","Escapes single quote, double quotes and backslash characters in a string with backslashes"],apache_child_terminate:["bool apache_child_terminate()","Terminate apache process after this request"],apache_get_modules:["array apache_get_modules()","Get a list of loaded Apache modules"],apache_get_version:["string apache_get_version()","Fetch Apache version"],apache_getenv:["bool apache_getenv(string variable [, bool walk_to_top])","Get an Apache subprocess_env variable"],apache_lookup_uri:["object apache_lookup_uri(string URI)","Perform a partial request of the given URI to obtain information about it"],apache_note:["string apache_note(string note_name [, string note_value])","Get and set Apache request notes"],apache_request_auth_name:["string apache_request_auth_name()",""],apache_request_auth_type:["string apache_request_auth_type()",""],apache_request_discard_request_body:["long apache_request_discard_request_body()",""],apache_request_err_headers_out:["array apache_request_err_headers_out([{string name|array list} [, string value [, bool replace = false]]])","* fetch all headers that go out in case of an error or a subrequest"],apache_request_headers:["array apache_request_headers()","Fetch all HTTP request headers"],apache_request_headers_in:["array apache_request_headers_in()","* fetch all incoming request headers"],apache_request_headers_out:["array apache_request_headers_out([{string name|array list} [, string value [, bool replace = false]]])","* fetch all outgoing request headers"],apache_request_is_initial_req:["bool apache_request_is_initial_req()",""],apache_request_log_error:["bool apache_request_log_error(string message, [long facility])",""],apache_request_meets_conditions:["long apache_request_meets_conditions()",""],apache_request_remote_host:["int apache_request_remote_host([int type])",""],apache_request_run:["long apache_request_run()","This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status."],apache_request_satisfies:["long apache_request_satisfies()",""],apache_request_server_port:["int apache_request_server_port()",""],apache_request_set_etag:["void apache_request_set_etag()",""],apache_request_set_last_modified:["void apache_request_set_last_modified()",""],apache_request_some_auth_required:["bool apache_request_some_auth_required()",""],apache_request_sub_req_lookup_file:["object apache_request_sub_req_lookup_file(string file)","Returns sub-request for the specified file. You would need to run it yourself with run()."],apache_request_sub_req_lookup_uri:["object apache_request_sub_req_lookup_uri(string uri)","Returns sub-request for the specified uri. You would need to run it yourself with run()"],apache_request_sub_req_method_uri:["object apache_request_sub_req_method_uri(string method, string uri)","Returns sub-request for the specified file. You would need to run it yourself with run()."],apache_request_update_mtime:["long apache_request_update_mtime([int dependency_mtime])",""],apache_reset_timeout:["bool apache_reset_timeout()","Reset the Apache write timer"],apache_response_headers:["array apache_response_headers()","Fetch all HTTP response headers"],apache_setenv:["bool apache_setenv(string variable, string value [, bool walk_to_top])","Set an Apache subprocess_env variable"],array_change_key_case:["array array_change_key_case(array input [, int case=CASE_LOWER])","Retuns an array with all string keys lowercased [or uppercased]"],array_chunk:["array array_chunk(array input, int size [, bool preserve_keys])","Split array into chunks"],array_combine:["array array_combine(array keys, array values)","Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values"],array_count_values:["array array_count_values(array input)","Return the value as key and the frequency of that value in input as value"],array_diff:["array array_diff(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are not present in any of the others arguments."],array_diff_assoc:["array array_diff_assoc(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal"],array_diff_key:["array array_diff_key(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have keys which are not present in any of the others arguments. This function is like array_diff() but works on the keys instead of the values. The associativity is preserved."],array_diff_uassoc:["array array_diff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Elements are compared by user supplied function."],array_diff_ukey:["array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)","Returns the entries of arr1 that have keys which are not present in any of the others arguments. User supplied function is used for comparing the keys. This function is like array_udiff() but works on the keys instead of the values. The associativity is preserved."],array_fill:["array array_fill(int start_key, int num, mixed val)","Create an array containing num elements starting with index start_key each initialized to val"],array_fill_keys:["array array_fill_keys(array keys, mixed val)","Create an array using the elements of the first parameter as keys each initialized to val"],array_filter:["array array_filter(array input [, mixed callback])","Filters elements from the array via the callback."],array_flip:["array array_flip(array input)","Return array with key <-> value flipped"],array_intersect:["array array_intersect(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are present in all the other arguments"],array_intersect_assoc:["array array_intersect_assoc(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check"],array_intersect_key:["array array_intersect_key(array arr1, array arr2 [, array ...])","Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). Equivalent of array_intersect_assoc() but does not do compare of the data."],array_intersect_uassoc:["array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check and they are compared by using an user-supplied callback."],array_intersect_ukey:["array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)","Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). The comparison of the keys is performed by a user supplied function. Equivalent of array_intersect_uassoc() but does not do compare of the data."],array_key_exists:["bool array_key_exists(mixed key, array search)","Checks if the given key or index exists in the array"],array_keys:["array array_keys(array input [, mixed search_value[, bool strict]])","Return just the keys from the input array, optionally only for the specified search_value"],array_key_first:["mixed array_key_first(array arr)","Returns the first key of arr if the array is not empty; NULL otherwise"],array_key_last:["mixed array_key_last(array arr)","Returns the last key of arr if the array is not empty; NULL otherwise"],array_map:["array array_map(mixed callback, array input1 [, array input2 ,...])","Applies the callback to the elements in given arrays."],array_merge:["array array_merge(array arr1, array arr2 [, array ...])","Merges elements from passed arrays into one array"],array_merge_recursive:["array array_merge_recursive(array arr1, array arr2 [, array ...])","Recursively merges elements from passed arrays into one array"],array_multisort:["bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])","Sort multiple arrays at once similar to how ORDER BY clause works in SQL"],array_pad:["array array_pad(array input, int pad_size, mixed pad_value)","Returns a copy of input array padded with pad_value to size pad_size"],array_pop:["mixed array_pop(array stack)","Pops an element off the end of the array"],array_product:["mixed array_product(array input)","Returns the product of the array entries"],array_push:["int array_push(array stack, mixed var [, mixed ...])","Pushes elements onto the end of the array"],array_rand:["mixed array_rand(array input [, int num_req])","Return key/keys for random entry/entries in the array"],array_reduce:["mixed array_reduce(array input, mixed callback [, mixed initial])","Iteratively reduce the array to a single value via the callback."],array_replace:["array array_replace(array arr1, array arr2 [, array ...])","Replaces elements from passed arrays into one array"],array_replace_recursive:["array array_replace_recursive(array arr1, array arr2 [, array ...])","Recursively replaces elements from passed arrays into one array"],array_reverse:["array array_reverse(array input [, bool preserve keys])","Return input as a new array with the order of the entries reversed"],array_search:["mixed array_search(mixed needle, array haystack [, bool strict])","Searches the array for a given value and returns the corresponding key if successful"],array_shift:["mixed array_shift(array stack)","Pops an element off the beginning of the array"],array_slice:["array array_slice(array input, int offset [, int length [, bool preserve_keys]])","Returns elements specified by offset and length"],array_splice:["array array_splice(array input, int offset [, int length [, array replacement]])","Removes the elements designated by offset and length and replace them with supplied array"],array_sum:["mixed array_sum(array input)","Returns the sum of the array entries"],array_udiff:["array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function."],array_udiff_assoc:["array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function."],array_udiff_uassoc:["array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)","Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions."],array_uintersect:["array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback."],array_uintersect_assoc:["array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Data is compared by using an user-supplied callback."],array_uintersect_uassoc:["array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)","Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks."],array_unique:["array array_unique(array input [, int sort_flags])","Removes duplicate values from array"],array_unshift:["int array_unshift(array stack, mixed var [, mixed ...])","Pushes elements onto the beginning of the array"],array_values:["array array_values(array input)","Return just the values from the input array"],array_walk:["bool array_walk(array input, string funcname [, mixed userdata])","Apply a user function to every member of an array"],array_walk_recursive:["bool array_walk_recursive(array input, string funcname [, mixed userdata])","Apply a user function recursively to every member of an array"],arsort:["bool arsort(array &array_arg [, int sort_flags])","Sort an array in reverse order and maintain index association"],asin:["float asin(float number)","Returns the arc sine of the number in radians"],asinh:["float asinh(float number)","Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number"],asort:["bool asort(array &array_arg [, int sort_flags])","Sort an array and maintain index association"],assert:["int assert(string|bool assertion)","Checks if assertion is false"],assert_options:["mixed assert_options(int what [, mixed value])","Set/get the various assert flags"],atan:["float atan(float number)","Returns the arc tangent of the number in radians"],atan2:["float atan2(float y, float x)","Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x"],atanh:["float atanh(float number)","Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number"],attachIterator:["void attachIterator(Iterator iterator[, mixed info])","Attach a new iterator"],base64_decode:["string base64_decode(string str[, bool strict])","Decodes string using MIME base64 algorithm"],base64_encode:["string base64_encode(string str)","Encodes string using MIME base64 algorithm"],base_convert:["string base_convert(string number, int frombase, int tobase)","Converts a number in a string from any base <= 36 to any base <= 36"],basename:["string basename(string path [, string suffix])","Returns the filename component of the path"],bcadd:["string bcadd(string left_operand, string right_operand [, int scale])","Returns the sum of two arbitrary precision numbers"],bccomp:["int bccomp(string left_operand, string right_operand [, int scale])","Compares two arbitrary precision numbers"],bcdiv:["string bcdiv(string left_operand, string right_operand [, int scale])","Returns the quotient of two arbitrary precision numbers (division)"],bcmod:["string bcmod(string left_operand, string right_operand)","Returns the modulus of the two arbitrary precision operands"],bcmul:["string bcmul(string left_operand, string right_operand [, int scale])","Returns the multiplication of two arbitrary precision numbers"],bcpow:["string bcpow(string x, string y [, int scale])","Returns the value of an arbitrary precision number raised to the power of another"],bcpowmod:["string bcpowmod(string x, string y, string mod [, int scale])","Returns the value of an arbitrary precision number raised to the power of another reduced by a modulous"],bcscale:["bool bcscale(int scale)","Sets default scale parameter for all bc math functions"],bcsqrt:["string bcsqrt(string operand [, int scale])","Returns the square root of an arbitray precision number"],bcsub:["string bcsub(string left_operand, string right_operand [, int scale])","Returns the difference between two arbitrary precision numbers"],bin2hex:["string bin2hex(string data)","Converts the binary representation of data to hex"],bind_textdomain_codeset:["string bind_textdomain_codeset (string domain, string codeset)","Specify the character encoding in which the messages from the DOMAIN message catalog will be returned."],bindec:["int bindec(string binary_number)","Returns the decimal equivalent of the binary number"],bindtextdomain:["string bindtextdomain(string domain_name, string dir)","Bind to the text domain domain_name, looking for translations in dir. Returns the current domain"],birdstep_autocommit:["bool birdstep_autocommit(int index)",""],birdstep_close:["bool birdstep_close(int id)",""],birdstep_commit:["bool birdstep_commit(int index)",""],birdstep_connect:["int birdstep_connect(string server, string user, string pass)",""],birdstep_exec:["int birdstep_exec(int index, string exec_str)",""],birdstep_fetch:["bool birdstep_fetch(int index)",""],birdstep_fieldname:["string birdstep_fieldname(int index, int col)",""],birdstep_fieldnum:["int birdstep_fieldnum(int index)",""],birdstep_freeresult:["bool birdstep_freeresult(int index)",""],birdstep_off_autocommit:["bool birdstep_off_autocommit(int index)",""],birdstep_result:["mixed birdstep_result(int index, mixed col)",""],birdstep_rollback:["bool birdstep_rollback(int index)",""],bzcompress:["string bzcompress(string source [, int blocksize100k [, int workfactor]])","Compresses a string into BZip2 encoded data"],bzdecompress:["string bzdecompress(string source [, int small])","Decompresses BZip2 compressed data"],bzerrno:["int bzerrno(resource bz)","Returns the error number"],bzerror:["array bzerror(resource bz)","Returns the error number and error string in an associative array"],bzerrstr:["string bzerrstr(resource bz)","Returns the error string"],bzopen:["resource bzopen(string|int file|fp, string mode)","Opens a new BZip2 stream"],bzread:["string bzread(resource bz[, int length])","Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified"],cal_days_in_month:["int cal_days_in_month(int calendar, int month, int year)","Returns the number of days in a month for a given year and calendar"],cal_from_jd:["array cal_from_jd(int jd, int calendar)","Converts from Julian Day Count to a supported calendar and return extended information"],cal_info:["array cal_info([int calendar])","Returns information about a particular calendar"],cal_to_jd:["int cal_to_jd(int calendar, int month, int day, int year)","Converts from a supported calendar to Julian Day Count"],call_user_func:["mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])","Call a user function which is the first parameter"],call_user_func_array:["mixed call_user_func_array(string function_name, array parameters)","Call a user function which is the first parameter with the arguments contained in array"],call_user_method:["mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])","Call a user method on a specific object or class"],call_user_method_array:["mixed call_user_method_array(string method_name, mixed object, array params)","Call a user method on a specific object or class using a parameter array"],ceil:["float ceil(float number)","Returns the next highest integer value of the number"],chdir:["bool chdir(string directory)","Change the current directory"],checkdate:["bool checkdate(int month, int day, int year)","Returns true(1) if it is a valid date in gregorian calendar"],chgrp:["bool chgrp(string filename, mixed group)","Change file group"],chmod:["bool chmod(string filename, int mode)","Change file mode"],chown:["bool chown(string filename, mixed user)","Change file owner"],chr:["string chr(int ascii)","Converts ASCII code to a character"],chroot:["bool chroot(string directory)","Change root directory"],chunk_split:["string chunk_split(string str [, int chunklen [, string ending]])","Returns split line"],class_alias:["bool class_alias(string user_class_name , string alias_name [, bool autoload])","Creates an alias for user defined class"],class_exists:["bool class_exists(string classname [, bool autoload])","Checks if the class exists"],class_implements:["array class_implements(mixed what [, bool autoload ])","Return all classes and interfaces implemented by SPL"],class_parents:["array class_parents(object instance [, bool autoload = true])","Return an array containing the names of all parent classes"],clearstatcache:["void clearstatcache([bool clear_realpath_cache[, string filename]])","Clear file stat cache"],closedir:["void closedir([resource dir_handle])","Close directory connection identified by the dir_handle"],closelog:["bool closelog()","Close connection to system logger"],collator_asort:["bool collator_asort( Collator $coll, array(string) $arr )","* Sort array using specified collator, maintaining index association."],collator_compare:["int collator_compare( Collator $coll, string $str1, string $str2 )","* Compare two strings."],collator_create:["Collator collator_create( string $locale )","* Create collator."],collator_get_attribute:["int collator_get_attribute( Collator $coll, int $attr )","* Get collation attribute value."],collator_get_error_code:["int collator_get_error_code( Collator $coll )","* Get collator's last error code."],collator_get_error_message:["string collator_get_error_message( Collator $coll )","* Get text description for collator's last error code."],collator_get_locale:["string collator_get_locale( Collator $coll, int $type )","* Gets the locale name of the collator."],collator_get_sort_key:["bool collator_get_sort_key( Collator $coll, string $str )","* Get a sort key for a string from a Collator. }}}"],collator_get_strength:["int collator_get_strength(Collator coll)","* Returns the current collation strength."],collator_set_attribute:["bool collator_set_attribute( Collator $coll, int $attr, int $val )","* Set collation attribute."],collator_set_strength:["bool collator_set_strength(Collator coll, int strength)","* Set the collation strength."],collator_sort:["bool collator_sort( Collator $coll, array(string) $arr [, int $sort_flags] )","* Sort array using specified collator."],collator_sort_with_sort_keys:["bool collator_sort_with_sort_keys( Collator $coll, array(string) $arr )","* Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance."],com_create_guid:["string com_create_guid()","Generate a globally unique identifier (GUID)"],com_event_sink:["bool com_event_sink(object comobject, object sinkobject [, mixed sinkinterface])","Connect events from a COM object to a PHP object"],com_get_active_object:["object com_get_active_object(string progid [, int code_page ])","Returns a handle to an already running instance of a COM object"],com_load_typelib:["bool com_load_typelib(string typelib_name [, int case_insensitive])","Loads a Typelibrary and registers its constants"],com_message_pump:["bool com_message_pump([int timeoutms])","Process COM messages, sleeping for up to timeoutms milliseconds"],com_print_typeinfo:["bool com_print_typeinfo(object comobject | string typelib, string dispinterface, bool wantsink)","Print out a PHP class definition for a dispatchable interface"],compact:["array compact(mixed var_names [, mixed ...])","Creates a hash containing variables and their values"],compose_locale:["static string compose_locale($array)","* Creates a locale by combining the parts of locale-ID passed * }}}"],confirm_extname_compiled:["string confirm_extname_compiled(string arg)","Return a string to confirm that the module is compiled in"],connection_aborted:["int connection_aborted()","Returns true if client disconnected"],connection_status:["int connection_status()","Returns the connection status bitfield"],constant:["mixed constant(string const_name)","Given the name of a constant this function will return the constant's associated value"],convert_cyr_string:["string convert_cyr_string(string str, string from, string to)","Convert from one Cyrillic character set to another"],convert_uudecode:["string convert_uudecode(string data)","decode a uuencoded string"],convert_uuencode:["string convert_uuencode(string data)","uuencode a string"],copy:["bool copy(string source_file, string destination_file [, resource context])","Copy a file"],cos:["float cos(float number)","Returns the cosine of the number in radians"],cosh:["float cosh(float number)","Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2"],count:["int count(mixed var [, int mode])","Count the number of elements in a variable (usually an array)"],count_chars:["mixed count_chars(string input [, int mode])","Returns info about what characters are used in input"],crc32:["string crc32(string str)","Calculate the crc32 polynomial of a string"],create_function:["string create_function(string args, string code)","Creates an anonymous function, and returns its name"],crypt:["string crypt(string str [, string salt])","Hash a string"],ctype_alnum:["bool ctype_alnum(mixed c)","Checks for alphanumeric character(s)"],ctype_alpha:["bool ctype_alpha(mixed c)","Checks for alphabetic character(s)"],ctype_cntrl:["bool ctype_cntrl(mixed c)","Checks for control character(s)"],ctype_digit:["bool ctype_digit(mixed c)","Checks for numeric character(s)"],ctype_graph:["bool ctype_graph(mixed c)","Checks for any printable character(s) except space"],ctype_lower:["bool ctype_lower(mixed c)","Checks for lowercase character(s)"],ctype_print:["bool ctype_print(mixed c)","Checks for printable character(s)"],ctype_punct:["bool ctype_punct(mixed c)","Checks for any printable character which is not whitespace or an alphanumeric character"],ctype_space:["bool ctype_space(mixed c)","Checks for whitespace character(s)"],ctype_upper:["bool ctype_upper(mixed c)","Checks for uppercase character(s)"],ctype_xdigit:["bool ctype_xdigit(mixed c)","Checks for character(s) representing a hexadecimal digit"],curl_close:["void curl_close(resource ch)","Close a cURL session"],curl_copy_handle:["resource curl_copy_handle(resource ch)","Copy a cURL handle along with all of it's preferences"],curl_errno:["int curl_errno(resource ch)","Return an integer containing the last error number"],curl_error:["string curl_error(resource ch)","Return a string contain the last error for the current session"],curl_exec:["bool curl_exec(resource ch)","Perform a cURL session"],curl_getinfo:["mixed curl_getinfo(resource ch [, int option])","Get information regarding a specific transfer"],curl_init:["resource curl_init([string url])","Initialize a cURL session"],curl_multi_add_handle:["int curl_multi_add_handle(resource mh, resource ch)","Add a normal cURL handle to a cURL multi handle"],curl_multi_close:["void curl_multi_close(resource mh)","Close a set of cURL handles"],curl_multi_exec:["int curl_multi_exec(resource mh, int &still_running)","Run the sub-connections of the current cURL handle"],curl_multi_getcontent:["string curl_multi_getcontent(resource ch)","Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set"],curl_multi_info_read:["array curl_multi_info_read(resource mh [, long msgs_in_queue])","Get information about the current transfers"],curl_multi_init:["resource curl_multi_init()","Returns a new cURL multi handle"],curl_multi_remove_handle:["int curl_multi_remove_handle(resource mh, resource ch)","Remove a multi handle from a set of cURL handles"],curl_multi_select:["int curl_multi_select(resource mh[, double timeout])",'Get all the sockets associated with the cURL extension, which can then be "selected"'],curl_setopt:["bool curl_setopt(resource ch, int option, mixed value)","Set an option for a cURL transfer"],curl_setopt_array:["bool curl_setopt_array(resource ch, array options)","Set an array of option for a cURL transfer"],curl_version:["array curl_version([int version])","Return cURL version information."],current:["mixed current(array array_arg)","Return the element currently pointed to by the internal array pointer"],date:["string date(string format [, long timestamp])","Format a local date/time"],date_add:["DateTime date_add(DateTime object, DateInterval interval)","Adds an interval to the current date in object."],date_create:["DateTime date_create([string time[, DateTimeZone object]])","Returns new DateTime object"],date_create_from_format:["DateTime date_create_from_format(string format, string time[, DateTimeZone object])","Returns new DateTime object formatted according to the specified format"],date_date_set:["DateTime date_date_set(DateTime object, long year, long month, long day)","Sets the date."],date_default_timezone_get:["string date_default_timezone_get()","Gets the default timezone used by all date/time functions in a script"],date_default_timezone_set:["bool date_default_timezone_set(string timezone_identifier)","Sets the default timezone used by all date/time functions in a script"],date_diff:["DateInterval date_diff(DateTime object [, bool absolute])","Returns the difference between two DateTime objects."],date_format:["string date_format(DateTime object, string format)","Returns date formatted according to given format"],date_get_last_errors:["array date_get_last_errors()","Returns the warnings and errors found while parsing a date/time string."],date_interval_create_from_date_string:["DateInterval date_interval_create_from_date_string(string time)","Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string"],date_interval_format:["string date_interval_format(DateInterval object, string format)","Formats the interval."],date_isodate_set:["DateTime date_isodate_set(DateTime object, long year, long week[, long day])","Sets the ISO date."],date_modify:["DateTime date_modify(DateTime object, string modify)","Alters the timestamp."],date_offset_get:["long date_offset_get(DateTime object)","Returns the DST offset."],date_parse:["array date_parse(string date)","Returns associative array with detailed info about given date"],date_parse_from_format:["array date_parse_from_format(string format, string date)","Returns associative array with detailed info about given date"],date_sub:["DateTime date_sub(DateTime object, DateInterval interval)","Subtracts an interval to the current date in object."],date_sun_info:["array date_sun_info(long time, float latitude, float longitude)","Returns an array with information about sun set/rise and twilight begin/end"],date_sunrise:["mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])","Returns time of sunrise for a given day and location"],date_sunset:["mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])","Returns time of sunset for a given day and location"],date_time_set:["DateTime date_time_set(DateTime object, long hour, long minute[, long second])","Sets the time."],date_timestamp_get:["long date_timestamp_get(DateTime object)","Gets the Unix timestamp."],date_timestamp_set:["DateTime date_timestamp_set(DateTime object, long unixTimestamp)","Sets the date and time based on an Unix timestamp."],date_timezone_get:["DateTimeZone date_timezone_get(DateTime object)","Return new DateTimeZone object relative to give DateTime"],date_timezone_set:["DateTime date_timezone_set(DateTime object, DateTimeZone object)","Sets the timezone for the DateTime object."],datefmt_create:["IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )","* Create formatter."],datefmt_format:["string datefmt_format( [mixed]int $args or array $args )","* Format the time value as a string. }}}"],datefmt_get_calendar:["string datefmt_get_calendar( IntlDateFormatter $mf )","* Get formatter calendar."],datefmt_get_datetype:["string datefmt_get_datetype( IntlDateFormatter $mf )","* Get formatter datetype."],datefmt_get_error_code:["int datefmt_get_error_code( IntlDateFormatter $nf )","* Get formatter's last error code."],datefmt_get_error_message:["string datefmt_get_error_message( IntlDateFormatter $coll )","* Get text description for formatter's last error code."],datefmt_get_locale:["string datefmt_get_locale(IntlDateFormatter $mf)","* Get formatter locale."],datefmt_get_pattern:["string datefmt_get_pattern( IntlDateFormatter $mf )","* Get formatter pattern."],datefmt_get_timetype:["string datefmt_get_timetype( IntlDateFormatter $mf )","* Get formatter timetype."],datefmt_get_timezone_id:["string datefmt_get_timezone_id( IntlDateFormatter $mf )","* Get formatter timezone_id."],datefmt_isLenient:["string datefmt_isLenient(IntlDateFormatter $mf)","* Get formatter locale."],datefmt_localtime:["integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse[, int $parse_pos ])","* Parse the string $value to a localtime array }}}"],datefmt_parse:["integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse [, int $parse_pos] )","* Parse the string $value starting at parse_pos to a Unix timestamp -int }}}"],datefmt_setLenient:["string datefmt_setLenient(IntlDateFormatter $mf)","* Set formatter lenient."],datefmt_set_calendar:["bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )","* Set formatter calendar."],datefmt_set_pattern:["bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern )","* Set formatter pattern."],datefmt_set_timezone_id:["bool datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)","* Set formatter timezone_id."],dba_close:["void dba_close(resource handle)","Closes database"],dba_delete:["bool dba_delete(string key, resource handle)","Deletes the entry associated with key If inifile: remove all other key lines"],dba_exists:["bool dba_exists(string key, resource handle)","Checks, if the specified key exists"],dba_fetch:["string dba_fetch(string key, [int skip ,] resource handle)","Fetches the data associated with key"],dba_firstkey:["string dba_firstkey(resource handle)","Resets the internal key pointer and returns the first key"],dba_handlers:["array dba_handlers([bool full_info])","List configured database handlers"],dba_insert:["bool dba_insert(string key, string value, resource handle)","If not inifile: Insert value as key, return false, if key exists already If inifile: Add vakue as key (next instance of key)"],dba_key_split:["array|false dba_key_split(string key)","Splits an inifile key into an array of the form array(0=>group,1=>value_name) but returns false if input is false or null"],dba_list:["array dba_list()","List opened databases"],dba_nextkey:["string dba_nextkey(resource handle)","Returns the next key"],dba_open:["resource dba_open(string path, string mode [, string handlername, string ...])","Opens path using the specified handler in mode"],dba_optimize:["bool dba_optimize(resource handle)","Optimizes (e.g. clean up, vacuum) database"],dba_popen:["resource dba_popen(string path, string mode [, string handlername, string ...])","Opens path using the specified handler in mode persistently"],dba_replace:["bool dba_replace(string key, string value, resource handle)","Inserts value as key, replaces key, if key exists already If inifile: remove all other key lines"],dba_sync:["bool dba_sync(resource handle)","Synchronizes database"],dcgettext:["string dcgettext(string domain_name, string msgid, long category)","Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist"],dcngettext:["string dcngettext(string domain, string msgid1, string msgid2, int n, int category)","Plural version of dcgettext()"],debug_backtrace:["array debug_backtrace([bool provide_object])","Return backtrace as array"],debug_print_backtrace:["void debug_print_backtrace()","Prints a PHP backtrace"],debug_zval_dump:["void debug_zval_dump(mixed var)","Dumps a string representation of an internal Zend value to output"],decbin:["string decbin(int decimal_number)","Returns a string containing a binary representation of the number"],dechex:["string dechex(int decimal_number)","Returns a string containing a hexadecimal representation of the given number"],decoct:["string decoct(int decimal_number)","Returns a string containing an octal representation of the given number"],define:["bool define(string constant_name, mixed value, bool case_insensitive=false)","Define a new constant"],define_syslog_variables:["void define_syslog_variables()","Initializes all syslog-related variables"],defined:["bool defined(string constant_name)","Check whether a constant exists"],deg2rad:["float deg2rad(float number)","Converts the number in degrees to the radian equivalent"],dgettext:["string dgettext(string domain_name, string msgid)","Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist"],die:["void die([mixed status])","Output a message and terminate the current script"],dir:["object dir(string directory[, resource context])","Directory class with properties, handle and class and methods read, rewind and close"],dirname:["string dirname(string path)","Returns the directory name component of the path"],disk_free_space:["float disk_free_space(string path)","Get free disk space for filesystem that path is on"],disk_total_space:["float disk_total_space(string path)","Get total disk space for filesystem that path is on"],display_disabled_function:["void display_disabled_function()","Dummy function which displays an error when a disabled function is called."],dl:["int dl(string extension_filename)","Load a PHP extension at runtime"],dngettext:["string dngettext(string domain, string msgid1, string msgid2, int count)","Plural version of dgettext()"],dns_check_record:["bool dns_check_record(string host [, string type])","Check DNS records corresponding to a given Internet host name or IP address"],dns_get_mx:["bool dns_get_mx(string hostname, array mxhosts [, array weight])","Get MX records corresponding to a given Internet host name"],dns_get_record:["array|false dns_get_record(string hostname [, int type[, array authns, array addtl]])","Get any Resource Record corresponding to a given Internet host name"],dom_attr_is_id:["bool dom_attr_is_id()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-isId Since: DOM Level 3"],dom_characterdata_append_data:["void dom_characterdata_append_data(string arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-32791A2F Since:"],dom_characterdata_delete_data:["void dom_characterdata_delete_data(int offset, int count)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7C603781 Since:"],dom_characterdata_insert_data:["void dom_characterdata_insert_data(int offset, string arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3EDB695F Since:"],dom_characterdata_replace_data:["void dom_characterdata_replace_data(int offset, int count, string arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-E5CBA7FB Since:"],dom_characterdata_substring_data:["string dom_characterdata_substring_data(int offset, int count)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6531BCCF Since:"],dom_document_adopt_node:["DOMNode dom_document_adopt_node(DOMNode source)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-adoptNode Since: DOM Level 3"],dom_document_create_attribute:["DOMAttr dom_document_create_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198 Since:"],dom_document_create_attribute_ns:["DOMAttr dom_document_create_attribute_ns(string namespaceURI, string qualifiedName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrAttrNS Since: DOM Level 2"],dom_document_create_cdatasection:["DOMCdataSection dom_document_create_cdatasection(string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8 Since:"],dom_document_create_comment:["DOMComment dom_document_create_comment(string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328 Since:"],dom_document_create_document_fragment:["DOMDocumentFragment dom_document_create_document_fragment()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5 Since:"],dom_document_create_element:["DOMElement dom_document_create_element(string tagName [, string value])","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547 Since:"],dom_document_create_element_ns:["DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value])","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS Since: DOM Level 2"],dom_document_create_entity_reference:["DOMEntityReference dom_document_create_entity_reference(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE Since:"],dom_document_create_processing_instruction:["DOMProcessingInstruction dom_document_create_processing_instruction(string target, string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439 Since:"],dom_document_create_text_node:["DOMText dom_document_create_text_node(string data)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127 Since:"],dom_document_get_element_by_id:["DOMElement dom_document_get_element_by_id(string elementId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBId Since: DOM Level 2"],dom_document_get_elements_by_tag_name:["DOMNodeList dom_document_get_elements_by_tag_name(string tagname)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094 Since:"],dom_document_get_elements_by_tag_name_ns:["DOMNodeList dom_document_get_elements_by_tag_name_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBTNNS Since: DOM Level 2"],dom_document_import_node:["DOMNode dom_document_import_node(DOMNode importedNode, bool deep)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Core-Document-importNode Since: DOM Level 2"],dom_document_load:["DOMNode dom_document_load(string source [, int options])","URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load Since: DOM Level 3"],dom_document_load_html:["DOMNode dom_document_load_html(string source)","Since: DOM extended"],dom_document_load_html_file:["DOMNode dom_document_load_html_file(string source)","Since: DOM extended"],dom_document_loadxml:["DOMNode dom_document_loadxml(string source [, int options])","URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-loadXML Since: DOM Level 3"],dom_document_normalize_document:["void dom_document_normalize_document()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-normalizeDocument Since: DOM Level 3"],dom_document_relaxNG_validate_file:["bool dom_document_relaxNG_validate_file(string filename); */","PHP_FUNCTION(dom_document_relaxNG_validate_file) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file"],dom_document_relaxNG_validate_xml:["bool dom_document_relaxNG_validate_xml(string source); */","PHP_FUNCTION(dom_document_relaxNG_validate_xml) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_relaxNG_validate_xml"],dom_document_rename_node:["DOMNode dom_document_rename_node(node n, string namespaceURI, string qualifiedName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-renameNode Since: DOM Level 3"],dom_document_save:["int dom_document_save(string file)","Convenience method to save to file"],dom_document_save_html:["string dom_document_save_html()","Convenience method to output as html"],dom_document_save_html_file:["int dom_document_save_html_file(string file)","Convenience method to save to file as html"],dom_document_savexml:["string dom_document_savexml([node n])","URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3"],dom_document_schema_validate:["bool dom_document_schema_validate(string source); */","PHP_FUNCTION(dom_document_schema_validate_xml) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_schema_validate"],dom_document_schema_validate_file:["bool dom_document_schema_validate_file(string filename); */","PHP_FUNCTION(dom_document_schema_validate_file) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file"],dom_document_validate:["bool dom_document_validate()","Since: DOM extended"],dom_document_xinclude:["int dom_document_xinclude([int options])","Substitutues xincludes in a DomDocument"],dom_domconfiguration_can_set_parameter:["bool dom_domconfiguration_can_set_parameter(string name, domuserdata value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter Since:"],dom_domconfiguration_get_parameter:["domdomuserdata dom_domconfiguration_get_parameter(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:"],dom_domconfiguration_set_parameter:["dom_void dom_domconfiguration_set_parameter(string name, domuserdata value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:"],dom_domerrorhandler_handle_error:["dom_bool dom_domerrorhandler_handle_error(domerror error)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:"],dom_domimplementation_create_document:["DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2"],dom_domimplementation_create_document_type:["DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2"],dom_domimplementation_get_feature:["DOMNode dom_domimplementation_get_feature(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3"],dom_domimplementation_has_feature:["bool dom_domimplementation_has_feature(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:"],dom_domimplementationlist_item:["domdomimplementation dom_domimplementationlist_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:"],dom_domimplementationsource_get_domimplementation:["domdomimplementation dom_domimplementationsource_get_domimplementation(string features)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:"],dom_domimplementationsource_get_domimplementations:["domimplementationlist dom_domimplementationsource_get_domimplementations(string features)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:"],dom_domstringlist_item:["domstring dom_domstringlist_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:"],dom_element_get_attribute:["string dom_element_get_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:"],dom_element_get_attribute_node:["DOMAttr dom_element_get_attribute_node(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-217A91B8 Since:"],dom_element_get_attribute_node_ns:["DOMAttr dom_element_get_attribute_node_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAtNodeNS Since: DOM Level 2"],dom_element_get_attribute_ns:["string dom_element_get_attribute_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAttrNS Since: DOM Level 2"],dom_element_get_elements_by_tag_name:["DOMNodeList dom_element_get_elements_by_tag_name(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D Since:"],dom_element_get_elements_by_tag_name_ns:["DOMNodeList dom_element_get_elements_by_tag_name_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C90942 Since: DOM Level 2"],dom_element_has_attribute:["bool dom_element_has_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttr Since: DOM Level 2"],dom_element_has_attribute_ns:["bool dom_element_has_attribute_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttrNS Since: DOM Level 2"],dom_element_remove_attribute:["void dom_element_remove_attribute(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D6AC0F9 Since:"],dom_element_remove_attribute_node:["DOMAttr dom_element_remove_attribute_node(DOMAttr oldAttr)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D589198 Since:"],dom_element_remove_attribute_ns:["void dom_element_remove_attribute_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElRemAtNS Since: DOM Level 2"],dom_element_set_attribute:["void dom_element_set_attribute(string name, string value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68F082 Since:"],dom_element_set_attribute_node:["DOMAttr dom_element_set_attribute_node(DOMAttr newAttr)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-887236154 Since:"],dom_element_set_attribute_node_ns:["DOMAttr dom_element_set_attribute_node_ns(DOMAttr newAttr)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAtNodeNS Since: DOM Level 2"],dom_element_set_attribute_ns:["void dom_element_set_attribute_ns(string namespaceURI, string qualifiedName, string value)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAttrNS Since: DOM Level 2"],dom_element_set_id_attribute:["void dom_element_set_id_attribute(string name, bool isId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttr Since: DOM Level 3"],dom_element_set_id_attribute_node:["void dom_element_set_id_attribute_node(attr idAttr, bool isId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNode Since: DOM Level 3"],dom_element_set_id_attribute_ns:["void dom_element_set_id_attribute_ns(string namespaceURI, string localName, bool isId)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNS Since: DOM Level 3"],dom_import_simplexml:["somNode dom_import_simplexml(sxeobject node)","Get a simplexml_element object from dom to allow for processing"],dom_namednodemap_get_named_item:["DOMNode dom_namednodemap_get_named_item(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549 Since:"],dom_namednodemap_get_named_item_ns:["DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS Since: DOM Level 2"],dom_namednodemap_item:["DOMNode dom_namednodemap_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9 Since:"],dom_namednodemap_remove_named_item:["DOMNode dom_namednodemap_remove_named_item(string name)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193 Since:"],dom_namednodemap_remove_named_item_ns:["DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS Since: DOM Level 2"],dom_namednodemap_set_named_item:["DOMNode dom_namednodemap_set_named_item(DOMNode arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788 Since:"],dom_namednodemap_set_named_item_ns:["DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS Since: DOM Level 2"],dom_namelist_get_name:["string dom_namelist_get_name(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName Since:"],dom_namelist_get_namespace_uri:["string dom_namelist_get_namespace_uri(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI Since:"],dom_node_append_child:["DomNode dom_node_append_child(DomNode newChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107 Since:"],dom_node_clone_node:["DomNode dom_node_clone_node(bool deep)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4 Since:"],dom_node_compare_document_position:["short dom_node_compare_document_position(DomNode other)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition Since: DOM Level 3"],dom_node_get_feature:["DomNode dom_node_get_feature(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature Since: DOM Level 3"],dom_node_get_user_data:["mixed dom_node_get_user_data(string key)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData Since: DOM Level 3"],dom_node_has_attributes:["bool dom_node_has_attributes()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs Since: DOM Level 2"],dom_node_has_child_nodes:["bool dom_node_has_child_nodes()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187 Since:"],dom_node_insert_before:["domnode dom_node_insert_before(DomNode newChild, DomNode refChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727 Since:"],dom_node_is_default_namespace:["bool dom_node_is_default_namespace(string namespaceURI)","URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace Since: DOM Level 3"],dom_node_is_equal_node:["bool dom_node_is_equal_node(DomNode arg)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode Since: DOM Level 3"],dom_node_is_same_node:["bool dom_node_is_same_node(DomNode other)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode Since: DOM Level 3"],dom_node_is_supported:["bool dom_node_is_supported(string feature, string version)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Level-2-Core-Node-supports Since: DOM Level 2"],dom_node_lookup_namespace_uri:["string dom_node_lookup_namespace_uri(string prefix)","URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI Since: DOM Level 3"],dom_node_lookup_prefix:["string dom_node_lookup_prefix(string namespaceURI)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix Since: DOM Level 3"],dom_node_normalize:["void dom_node_normalize()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize Since:"],dom_node_remove_child:["DomNode dom_node_remove_child(DomNode oldChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066 Since:"],dom_node_replace_child:["DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307 Since:"],dom_node_set_user_data:["mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData Since: DOM Level 3"],dom_nodelist_item:["DOMNode dom_nodelist_item(int index)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-844377136 Since:"],dom_string_extend_find_offset16:["int dom_string_extend_find_offset16(int offset32)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16 Since:"],dom_string_extend_find_offset32:["int dom_string_extend_find_offset32(int offset16)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32 Since:"],dom_text_is_whitespace_in_element_content:["bool dom_text_is_whitespace_in_element_content()","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3"],dom_text_replace_whole_text:["DOMText dom_text_replace_whole_text(string content)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3"],dom_text_split_text:["DOMText dom_text_split_text(int offset)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since:"],dom_userdatahandler_handle:["dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst)","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent Since:"],dom_xpath_evaluate:["mixed dom_xpath_evaluate(string expr [,DOMNode context])",""],dom_xpath_query:["DOMNodeList dom_xpath_query(string expr [,DOMNode context])",""],dom_xpath_register_ns:["bool dom_xpath_register_ns(string prefix, string uri)",""],dom_xpath_register_php_functions:["void dom_xpath_register_php_functions()",""],each:["array each(array arr)","Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element"],easter_date:["int easter_date([int year])","Return the timestamp of midnight on Easter of a given year (defaults to current year)"],easter_days:["int easter_days([int year, [int method]])","Return the number of days after March 21 that Easter falls on for a given year (defaults to current year)"],echo:["void echo(string arg1 [, string ...])","Output one or more strings"],empty:["bool empty(mixed var)","Determine whether a variable is empty"],enchant_broker_describe:["array enchant_broker_describe(resource broker)","Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo()"],enchant_broker_dict_exists:["bool enchant_broker_dict_exists(resource broker, string tag)","Whether a dictionary exists or not. Using non-empty tag"],enchant_broker_free:["bool enchant_broker_free(resource broker)","Destroys the broker object and its dictionnaries"],enchant_broker_free_dict:["resource enchant_broker_free_dict(resource dict)","Free the dictionary resource"],enchant_broker_get_dict_path:["string enchant_broker_get_dict_path(resource broker, int dict_type)","Get the directory path for a given backend, works with ispell and myspell"],enchant_broker_get_error:["string enchant_broker_get_error(resource broker)","Returns the last error of the broker"],enchant_broker_init:["resource enchant_broker_init()","create a new broker object capable of requesting"],enchant_broker_list_dicts:["string enchant_broker_list_dicts(resource broker)","Lists the dictionaries available for the given broker"],enchant_broker_request_dict:["resource enchant_broker_request_dict(resource broker, string tag)",'create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for ("en_US", "de_DE", ...)'],enchant_broker_request_pwl_dict:["resource enchant_broker_request_pwl_dict(resource broker, string filename)","creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call."],enchant_broker_set_dict_path:["bool enchant_broker_set_dict_path(resource broker, int dict_type, string value)","Set the directory path for a given backend, works with ispell and myspell"],enchant_broker_set_ordering:["bool enchant_broker_set_ordering(resource broker, string tag, string ordering)","Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the \"*\" tag can be used as a language tag to declare a default ordering for any language that does not explictly declare an ordering."],enchant_dict_add_to_personal:["void enchant_dict_add_to_personal(resource dict, string word)","add 'word' to personal word list"],enchant_dict_add_to_session:["void enchant_dict_add_to_session(resource dict, string word)","add 'word' to this spell-checking session"],enchant_dict_check:["bool enchant_dict_check(resource dict, string word)","If the word is correctly spelled return true, otherwise return false"],enchant_dict_describe:["array enchant_dict_describe(resource dict)","Describes an individual dictionary 'dict'"],enchant_dict_get_error:["string enchant_dict_get_error(resource dict)","Returns the last error of the current spelling-session"],enchant_dict_is_in_session:["bool enchant_dict_is_in_session(resource dict, string word)","whether or not 'word' exists in this spelling-session"],enchant_dict_quick_check:["bool enchant_dict_quick_check(resource dict, string word [, array &suggestions])","If the word is correctly spelled return true, otherwise return false, if suggestions variable is provided, fill it with spelling alternatives."],enchant_dict_store_replacement:["void enchant_dict_store_replacement(resource dict, string mis, string cor)","add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list."],enchant_dict_suggest:["array enchant_dict_suggest(resource dict, string word)","Will return a list of values if any of those pre-conditions are not met."],end:["mixed end(array array_arg)","Advances array argument's internal pointer to the last element and return it"],ereg:["int ereg(string pattern, string string [, array registers])","Regular expression match"],ereg_replace:["string ereg_replace(string pattern, string replacement, string string)","Replace regular expression"],eregi:["int eregi(string pattern, string string [, array registers])","Case-insensitive regular expression match"],eregi_replace:["string eregi_replace(string pattern, string replacement, string string)","Case insensitive replace regular expression"],error_get_last:["array error_get_last()","Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet."],error_log:["bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])","Send an error message somewhere"],error_reporting:["int error_reporting([int new_error_level])","Return the current error_reporting level, and if an argument was passed - change to the new level"],escapeshellarg:["string escapeshellarg(string arg)","Quote and escape an argument for use in a shell command"],escapeshellcmd:["string escapeshellcmd(string command)","Escape shell metacharacters"],exec:["string exec(string command [, array &output [, int &return_value]])","Execute an external program"],exif_imagetype:["int exif_imagetype(string imagefile)","Get the type of an image"],exif_read_data:["array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])","Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails"],exif_tagname:["string exif_tagname(index)","Get headername for index or false if not defined"],exif_thumbnail:["string exif_thumbnail(string filename [, &width, &height [, &imagetype]])","Reads the embedded thumbnail"],exit:["void exit([mixed status])","Output a message and terminate the current script"],exp:["float exp(float number)","Returns e raised to the power of the number"],explode:["array explode(string separator, string str [, int limit])","Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned."],expm1:["float expm1(float number)","Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero"],extension_loaded:["bool extension_loaded(string extension_name)","Returns true if the named extension is loaded"],extract:["int extract(array var_array [, int extract_type [, string prefix]])","Imports variables into symbol table from an array"],ezmlm_hash:["int ezmlm_hash(string addr)","Calculate EZMLM list hash value."],fclose:["bool fclose(resource fp)","Close an open file pointer"],feof:["bool feof(resource fp)","Test for end-of-file on a file pointer"],fflush:["bool fflush(resource fp)","Flushes output"],fgetc:["string fgetc(resource fp)","Get a character from file pointer"],fgetcsv:["array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])","Get line from file pointer and parse for CSV fields"],fgets:["string fgets(resource fp[, int length])","Get a line from file pointer"],fgetss:["string fgetss(resource fp [, int length [, string allowable_tags]])","Get a line from file pointer and strip HTML tags"],file:["array file(string filename [, int flags[, resource context]])","Read entire file into an array"],file_exists:["bool file_exists(string filename)","Returns true if filename exists"],file_get_contents:["string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])","Read the entire file into a string"],file_put_contents:["int file_put_contents(string file, mixed data [, int flags [, resource context]])","Write/Create a file with contents data and return the number of bytes written"],fileatime:["int fileatime(string filename)","Get last access time of file"],filectime:["int filectime(string filename)","Get inode modification time of file"],filegroup:["int filegroup(string filename)","Get file group"],fileinode:["int fileinode(string filename)","Get file inode"],filemtime:["int filemtime(string filename)","Get last modification time of file"],fileowner:["int fileowner(string filename)","Get file owner"],fileperms:["int fileperms(string filename)","Get file permissions"],filesize:["int filesize(string filename)","Get file size"],filetype:["string filetype(string filename)","Get file type"],filter_has_var:["mixed filter_has_var(constant type, string variable_name)","* Returns true if the variable with the name 'name' exists in source."],filter_input:["mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])","* Returns the filtered variable 'name'* from source `type`."],filter_input_array:["mixed filter_input_array(constant type, [, mixed options]])","* Returns an array with all arguments defined in 'definition'."],filter_var:["mixed filter_var(mixed variable [, long filter [, mixed options]])","* Returns the filtered version of the vriable."],filter_var_array:["mixed filter_var_array(array data, [, mixed options]])","* Returns an array with all arguments defined in 'definition'."],finfo_buffer:["string finfo_buffer(resource finfo, char *string [, int options [, resource context]])","Return infromation about a string buffer."],finfo_close:["resource finfo_close(resource finfo)","Close fileinfo resource."],finfo_file:["string finfo_file(resource finfo, char *file_name [, int options [, resource context]])","Return information about a file."],finfo_open:["resource finfo_open([int options [, string arg]])","Create a new fileinfo resource."],finfo_set_flags:["bool finfo_set_flags(resource finfo, int options)","Set libmagic configuration options."],floatval:["float floatval(mixed var)","Get the float value of a variable"],flock:["bool flock(resource fp, int operation [, int &wouldblock])","Portable file locking"],floor:["float floor(float number)","Returns the next lowest integer value from the number"],flush:["void flush()","Flush the output buffer"],fmod:["float fmod(float x, float y)","Returns the remainder of dividing x by y as a float"],fnmatch:["bool fnmatch(string pattern, string filename [, int flags])","Match filename against pattern"],fopen:["resource fopen(string filename, string mode [, bool use_include_path [, resource context]])","Open a file or a URL and return a file pointer"],forward_static_call:["mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...])","Call a user function which is the first parameter"],fpassthru:["int fpassthru(resource fp)","Output all remaining data from a file pointer"],fprintf:["int fprintf(resource stream, string format [, mixed arg1 [, mixed ...]])","Output a formatted string into a stream"],fputcsv:["int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]])","Format line as CSV and write to file pointer"],fread:["string fread(resource fp, int length)","Binary-safe file read"],frenchtojd:["int frenchtojd(int month, int day, int year)","Converts a french republic calendar date to julian day count"],fscanf:["mixed fscanf(resource stream, string format [, string ...])","Implements a mostly ANSI compatible fscanf()"],fseek:["int fseek(resource fp, int offset [, int whence])","Seek on a file pointer"],fsockopen:["resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])","Open Internet or Unix domain socket connection"],fstat:["array fstat(resource fp)","Stat() on a filehandle"],ftell:["int ftell(resource fp)","Get file pointer's read/write position"],ftok:["int ftok(string pathname, string proj)","Convert a pathname and a project identifier to a System V IPC key"],ftp_alloc:["bool ftp_alloc(resource stream, int size[, &response])","Attempt to allocate space on the remote FTP server"],ftp_cdup:["bool ftp_cdup(resource stream)","Changes to the parent directory"],ftp_chdir:["bool ftp_chdir(resource stream, string directory)","Changes directories"],ftp_chmod:["int ftp_chmod(resource stream, int mode, string filename)","Sets permissions on a file"],ftp_close:["bool ftp_close(resource stream)","Closes the FTP stream"],ftp_connect:["resource ftp_connect(string host [, int port [, int timeout]])","Opens a FTP stream"],ftp_delete:["bool ftp_delete(resource stream, string file)","Deletes a file"],ftp_exec:["bool ftp_exec(resource stream, string command)","Requests execution of a program on the FTP server"],ftp_fget:["bool ftp_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])","Retrieves a file from the FTP server and writes it to an open file"],ftp_fput:["bool ftp_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])","Stores a file from an open file to the FTP server"],ftp_get:["bool ftp_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])","Retrieves a file from the FTP server and writes it to a local file"],ftp_get_option:["mixed ftp_get_option(resource stream, int option)","Gets an FTP option"],ftp_login:["bool ftp_login(resource stream, string username, string password)","Logs into the FTP server"],ftp_mdtm:["int ftp_mdtm(resource stream, string filename)","Returns the last modification time of the file, or -1 on error"],ftp_mkdir:["string ftp_mkdir(resource stream, string directory)","Creates a directory and returns the absolute path for the new directory or false on error"],ftp_nb_continue:["int ftp_nb_continue(resource stream)","Continues retrieving/sending a file nbronously"],ftp_nb_fget:["int ftp_nb_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])","Retrieves a file from the FTP server asynchronly and writes it to an open file"],ftp_nb_fput:["int ftp_nb_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])","Stores a file from an open file to the FTP server nbronly"],ftp_nb_get:["int ftp_nb_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])","Retrieves a file from the FTP server nbhronly and writes it to a local file"],ftp_nb_put:["int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])","Stores a file on the FTP server"],ftp_nlist:["array ftp_nlist(resource stream, string directory)","Returns an array of filenames in the given directory"],ftp_pasv:["bool ftp_pasv(resource stream, bool pasv)","Turns passive mode on or off"],ftp_put:["bool ftp_put(resource stream, string remote_file, string local_file, int mode[, int startpos])","Stores a file on the FTP server"],ftp_pwd:["string ftp_pwd(resource stream)","Returns the present working directory"],ftp_raw:["array ftp_raw(resource stream, string command)","Sends a literal command to the FTP server"],ftp_rawlist:["array ftp_rawlist(resource stream, string directory [, bool recursive])","Returns a detailed listing of a directory as an array of output lines"],ftp_rename:["bool ftp_rename(resource stream, string src, string dest)","Renames the given file to a new path"],ftp_rmdir:["bool ftp_rmdir(resource stream, string directory)","Removes a directory"],ftp_set_option:["bool ftp_set_option(resource stream, int option, mixed value)","Sets an FTP option"],ftp_site:["bool ftp_site(resource stream, string cmd)","Sends a SITE command to the server"],ftp_size:["int ftp_size(resource stream, string filename)","Returns the size of the file, or -1 on error"],ftp_ssl_connect:["resource ftp_ssl_connect(string host [, int port [, int timeout]])","Opens a FTP-SSL stream"],ftp_systype:["string ftp_systype(resource stream)","Returns the system type identifier"],ftruncate:["bool ftruncate(resource fp, int size)","Truncate file to 'size' length"],func_get_arg:["mixed func_get_arg(int arg_num)","Get the $arg_num'th argument that was passed to the function"],func_get_args:["array func_get_args()","Get an array of the arguments that were passed to the function"],func_num_args:["int func_num_args()","Get the number of arguments that were passed to the function"],"function ":["",""],"foreach ":["",""],function_exists:["bool function_exists(string function_name)","Checks if the function exists"],fwrite:["int fwrite(resource fp, string str [, int length])","Binary-safe file write"],gc_collect_cycles:["int gc_collect_cycles()","Forces collection of any existing garbage cycles. Returns number of freed zvals"],gc_disable:["void gc_disable()","Deactivates the circular reference collector"],gc_enable:["void gc_enable()","Activates the circular reference collector"],gc_enabled:["void gc_enabled()","Returns status of the circular reference collector"],gd_info:["array gd_info()",""],getKeywords:["static array getKeywords(string $locale) {","* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array * }}}"],get_browser:["mixed get_browser([string browser_name [, bool return_array]])","Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array."],get_called_class:["string get_called_class()",'Retrieves the "Late Static Binding" class name'],get_cfg_var:["mixed get_cfg_var(string option_name)","Get the value of a PHP configuration option"],get_class:["string get_class([object object])","Retrieves the class name"],get_class_methods:["array get_class_methods(mixed class)","Returns an array of method names for class or class instance."],get_class_vars:["array get_class_vars(string class_name)","Returns an array of default properties of the class."],get_current_user:["string get_current_user()","Get the name of the owner of the current PHP script"],get_declared_classes:["array get_declared_classes()","Returns an array of all declared classes."],get_declared_interfaces:["array get_declared_interfaces()","Returns an array of all declared interfaces."],get_defined_constants:["array get_defined_constants([bool categorize])","Return an array containing the names and values of all defined constants"],get_defined_functions:["array get_defined_functions()","Returns an array of all defined functions"],get_defined_vars:["array get_defined_vars()","Returns an associative array of names and values of all currently defined variable names (variables in the current scope)"],get_display_language:["static string get_display_language($locale[, $in_locale = null])","* gets the language for the $locale in $in_locale or default_locale"],get_display_name:["static string get_display_name($locale[, $in_locale = null])","* gets the name for the $locale in $in_locale or default_locale"],get_display_region:["static string get_display_region($locale, $in_locale = null)","* gets the region for the $locale in $in_locale or default_locale"],get_display_script:["static string get_display_script($locale, $in_locale = null)","* gets the script for the $locale in $in_locale or default_locale"],get_extension_funcs:["array get_extension_funcs(string extension_name)","Returns an array with the names of functions belonging to the named extension"],get_headers:["array get_headers(string url[, int format])","fetches all the headers sent by the server in response to a HTTP request"],get_html_translation_table:["array get_html_translation_table([int table [, int quote_style]])","Returns the internal translation table used by htmlspecialchars and htmlentities"],get_include_path:["string get_include_path()","Get the current include_path configuration option"],get_included_files:["array get_included_files()","Returns an array with the file names that were include_once()'d"],get_loaded_extensions:["array get_loaded_extensions([bool zend_extensions])","Return an array containing names of loaded extensions"],get_magic_quotes_gpc:["int get_magic_quotes_gpc()","Get the current active configuration setting of magic_quotes_gpc"],get_magic_quotes_runtime:["int get_magic_quotes_runtime()","Get the current active configuration setting of magic_quotes_runtime"],get_meta_tags:["array get_meta_tags(string filename [, bool use_include_path])","Extracts all meta tag content attributes from a file and returns an array"],get_object_vars:["array get_object_vars(object obj)","Returns an array of object properties"],get_parent_class:["string get_parent_class([mixed object])","Retrieves the parent class name for object or class or current scope."],get_resource_type:["string get_resource_type(resource res)","Get the resource type name for a given resource"],getallheaders:["array getallheaders()",""],getcwd:["mixed getcwd()","Gets the current directory"],getdate:["array getdate([int timestamp])","Get date/time information"],getenv:["string getenv(string varname)","Get the value of an environment variable"],gethostbyaddr:["string gethostbyaddr(string ip_address)","Get the Internet host name corresponding to a given IP address"],gethostbyname:["string gethostbyname(string hostname)","Get the IP address corresponding to a given Internet host name"],gethostbynamel:["array gethostbynamel(string hostname)","Return a list of IP addresses that a given hostname resolves to."],gethostname:["string gethostname()","Get the host name of the current machine"],getimagesize:["array getimagesize(string imagefile [, array info])","Get the size of an image as 4-element array"],getlastmod:["int getlastmod()","Get time of last page modification"],getmygid:["int getmygid()","Get PHP script owner's GID"],getmyinode:["int getmyinode()","Get the inode of the current script being parsed"],getmypid:["int getmypid()","Get current process ID"],getmyuid:["int getmyuid()","Get PHP script owner's UID"],getopt:["array getopt(string options [, array longopts])","Get options from the command line argument list"],getprotobyname:["int getprotobyname(string name)","Returns protocol number associated with name as per /etc/protocols"],getprotobynumber:["string getprotobynumber(int proto)","Returns protocol name associated with protocol number proto"],getrandmax:["int getrandmax()","Returns the maximum value a random number can have"],getrusage:["array getrusage([int who])","Returns an array of usage statistics"],getservbyname:["int getservbyname(string service, string protocol)",'Returns port associated with service. Protocol must be "tcp" or "udp"'],getservbyport:["string getservbyport(int port, string protocol)",'Returns service name associated with port. Protocol must be "tcp" or "udp"'],gettext:["string gettext(string msgid)","Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist"],gettimeofday:["array gettimeofday([bool get_as_float])","Returns the current time as array"],gettype:["string gettype(mixed var)","Returns the type of the variable"],glob:["array glob(string pattern [, int flags])","Find pathnames matching a pattern"],gmdate:["string gmdate(string format [, long timestamp])","Format a GMT date/time"],gmmktime:["int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])","Get UNIX timestamp for a GMT date"],gmp_abs:["resource gmp_abs(resource a)","Calculates absolute value"],gmp_add:["resource gmp_add(resource a, resource b)","Add a and b"],gmp_and:["resource gmp_and(resource a, resource b)","Calculates logical AND of a and b"],gmp_clrbit:["void gmp_clrbit(resource &a, int index)","Clears bit in a"],gmp_cmp:["int gmp_cmp(resource a, resource b)","Compares two numbers"],gmp_com:["resource gmp_com(resource a)","Calculates one's complement of a"],gmp_div_q:["resource gmp_div_q(resource a, resource b [, int round])","Divide a by b, returns quotient only"],gmp_div_qr:["array gmp_div_qr(resource a, resource b [, int round])","Divide a by b, returns quotient and reminder"],gmp_div_r:["resource gmp_div_r(resource a, resource b [, int round])","Divide a by b, returns reminder only"],gmp_divexact:["resource gmp_divexact(resource a, resource b)","Divide a by b using exact division algorithm"],gmp_fact:["resource gmp_fact(int a)","Calculates factorial function"],gmp_gcd:["resource gmp_gcd(resource a, resource b)","Computes greatest common denominator (gcd) of a and b"],gmp_gcdext:["array gmp_gcdext(resource a, resource b)","Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)"],gmp_hamdist:["int gmp_hamdist(resource a, resource b)","Calculates hamming distance between a and b"],gmp_init:["resource gmp_init(mixed number [, int base])","Initializes GMP number"],gmp_intval:["int gmp_intval(resource gmpnumber)","Gets signed long value of GMP number"],gmp_invert:["resource gmp_invert(resource a, resource b)","Computes the inverse of a modulo b"],gmp_jacobi:["int gmp_jacobi(resource a, resource b)","Computes Jacobi symbol"],gmp_legendre:["int gmp_legendre(resource a, resource b)","Computes Legendre symbol"],gmp_mod:["resource gmp_mod(resource a, resource b)","Computes a modulo b"],gmp_mul:["resource gmp_mul(resource a, resource b)","Multiply a and b"],gmp_neg:["resource gmp_neg(resource a)","Negates a number"],gmp_nextprime:["resource gmp_nextprime(resource a)","Finds next prime of a"],gmp_or:["resource gmp_or(resource a, resource b)","Calculates logical OR of a and b"],gmp_perfect_square:["bool gmp_perfect_square(resource a)","Checks if a is an exact square"],gmp_popcount:["int gmp_popcount(resource a)","Calculates the population count of a"],gmp_pow:["resource gmp_pow(resource base, int exp)","Raise base to power exp"],gmp_powm:["resource gmp_powm(resource base, resource exp, resource mod)","Raise base to power exp and take result modulo mod"],gmp_prob_prime:["int gmp_prob_prime(resource a[, int reps])",'Checks if a is "probably prime"'],gmp_random:["resource gmp_random([int limiter])","Gets random number"],gmp_scan0:["int gmp_scan0(resource a, int start)","Finds first zero bit"],gmp_scan1:["int gmp_scan1(resource a, int start)","Finds first non-zero bit"],gmp_setbit:["void gmp_setbit(resource &a, int index[, bool set_clear])","Sets or clear bit in a"],gmp_sign:["int gmp_sign(resource a)","Gets the sign of the number"],gmp_sqrt:["resource gmp_sqrt(resource a)","Takes integer part of square root of a"],gmp_sqrtrem:["array gmp_sqrtrem(resource a)","Square root with remainder"],gmp_strval:["string gmp_strval(resource gmpnumber [, int base])","Gets string representation of GMP number"],gmp_sub:["resource gmp_sub(resource a, resource b)","Subtract b from a"],gmp_testbit:["bool gmp_testbit(resource a, int index)","Tests if bit is set in a"],gmp_xor:["resource gmp_xor(resource a, resource b)","Calculates logical exclusive OR of a and b"],gmstrftime:["string gmstrftime(string format [, int timestamp])","Format a GMT/UCT time/date according to locale settings"],grapheme_extract:["string grapheme_extract(string str, int size[, int extract_type[, int start[, int next]]])","Function to extract a sequence of default grapheme clusters"],grapheme_stripos:["int grapheme_stripos(string haystack, string needle [, int offset ])","Find position of first occurrence of a string within another, ignoring case differences"],grapheme_stristr:["string grapheme_stristr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another"],grapheme_strlen:["int grapheme_strlen(string str)","Get number of graphemes in a string"],grapheme_strpos:["int grapheme_strpos(string haystack, string needle [, int offset ])","Find position of first occurrence of a string within another"],grapheme_strripos:["int grapheme_strripos(string haystack, string needle [, int offset])","Find position of last occurrence of a string within another, ignoring case"],grapheme_strrpos:["int grapheme_strrpos(string haystack, string needle [, int offset])","Find position of last occurrence of a string within another"],grapheme_strstr:["string grapheme_strstr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another"],grapheme_substr:["string grapheme_substr(string str, int start [, int length])","Returns part of a string"],gregoriantojd:["int gregoriantojd(int month, int day, int year)","Converts a gregorian calendar date to julian day count"],gzcompress:["string gzcompress(string data [, int level])","Gzip-compress a string"],gzdeflate:["string gzdeflate(string data [, int level])","Gzip-compress a string"],gzencode:["string gzencode(string data [, int level [, int encoding_mode]])","GZ encode a string"],gzfile:["array gzfile(string filename [, int use_include_path])","Read und uncompress entire .gz-file into an array"],gzinflate:["string gzinflate(string data [, int length])","Unzip a gzip-compressed string"],gzopen:["resource gzopen(string filename, string mode [, int use_include_path])","Open a .gz-file and return a .gz-file pointer"],gzuncompress:["string gzuncompress(string data [, int length])","Unzip a gzip-compressed string"],hash:["string hash(string algo, string data[, bool raw_output = false])","Generate a hash of a given input string Returns lowercase hexits by default"],hash_algos:["array hash_algos()","Return a list of registered hashing algorithms"],hash_copy:["resource hash_copy(resource context)","Copy hash resource"],hash_file:["string hash_file(string algo, string filename[, bool raw_output = false])","Generate a hash of a given file Returns lowercase hexits by default"],hash_final:["string hash_final(resource context[, bool raw_output=false])","Output resulting digest"],hash_hmac:["string hash_hmac(string algo, string data, string key[, bool raw_output = false])","Generate a hash of a given input string with a key using HMAC Returns lowercase hexits by default"],hash_hmac_file:["string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])","Generate a hash of a given file with a key using HMAC Returns lowercase hexits by default"],hash_init:["resource hash_init(string algo[, int options, string key])","Initialize a hashing context"],hash_update:["bool hash_update(resource context, string data)","Pump data into the hashing algorithm"],hash_update_file:["bool hash_update_file(resource context, string filename[, resource context])","Pump data into the hashing algorithm from a file"],hash_update_stream:["int hash_update_stream(resource context, resource handle[, integer length])","Pump data into the hashing algorithm from an open stream"],header:["void header(string header [, bool replace, [int http_response_code]])","Sends a raw HTTP header"],header_remove:["void header_remove([string name])","Removes an HTTP header previously set using header()"],headers_list:["array headers_list()","Return list of headers to be sent / already sent"],headers_sent:["bool headers_sent([string &$file [, int &$line]])","Returns true if headers have already been sent, false otherwise"],hebrev:["string hebrev(string str [, int max_chars_per_line])","Converts logical Hebrew text to visual text"],hebrevc:["string hebrevc(string str [, int max_chars_per_line])","Converts logical Hebrew text to visual text with newline conversion"],hexdec:["int hexdec(string hexadecimal_number)","Returns the decimal equivalent of the hexadecimal number"],highlight_file:["bool highlight_file(string file_name [, bool return] )","Syntax highlight a source file"],highlight_string:["bool highlight_string(string string [, bool return] )","Syntax highlight a string or optionally return it"],html_entity_decode:["string html_entity_decode(string string [, int quote_style][, string charset])","Convert all HTML entities to their applicable characters"],htmlentities:["string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])","Convert all applicable characters to HTML entities"],htmlspecialchars:["string htmlspecialchars(string string [, int quote_style[, string charset[, bool double_encode]]])","Convert special characters to HTML entities"],htmlspecialchars_decode:["string htmlspecialchars_decode(string string [, int quote_style])","Convert special HTML entities back to characters"],http_build_query:["string http_build_query(mixed formdata [, string prefix [, string arg_separator]])","Generates a form-encoded query string from an associative array or object."],hypot:["float hypot(float num1, float num2)","Returns sqrt(num1*num1 + num2*num2)"],ibase_add_user:["bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])","Add a user to security database"],ibase_affected_rows:["int ibase_affected_rows( [ resource link_identifier ] )","Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement"],ibase_backup:["mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]])","Initiates a backup task in the service manager and returns immediately"],ibase_blob_add:["bool ibase_blob_add(resource blob_handle, string data)","Add data into created blob"],ibase_blob_cancel:["bool ibase_blob_cancel(resource blob_handle)","Cancel creating blob"],ibase_blob_close:["string ibase_blob_close(resource blob_handle)","Close blob"],ibase_blob_create:["resource ibase_blob_create([resource link_identifier])","Create blob for adding data"],ibase_blob_echo:["bool ibase_blob_echo([ resource link_identifier, ] string blob_id)","Output blob contents to browser"],ibase_blob_get:["string ibase_blob_get(resource blob_handle, int len)","Get len bytes data from open blob"],ibase_blob_import:["string ibase_blob_import([ resource link_identifier, ] resource file)","Create blob, copy file in it, and close it"],ibase_blob_info:["array ibase_blob_info([ resource link_identifier, ] string blob_id)","Return blob length and other useful info"],ibase_blob_open:["resource ibase_blob_open([ resource link_identifier, ] string blob_id)","Open blob for retrieving data parts"],ibase_close:["bool ibase_close([resource link_identifier])","Close an InterBase connection"],ibase_commit:["bool ibase_commit( resource link_identifier )","Commit transaction"],ibase_commit_ret:["bool ibase_commit_ret( resource link_identifier )","Commit transaction and retain the transaction context"],ibase_connect:["resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])","Open a connection to an InterBase database"],ibase_db_info:["string ibase_db_info(resource service_handle, string db, int action [, int argument])","Request statistics about a database"],ibase_delete_user:["bool ibase_delete_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])","Delete a user from security database"],ibase_drop_db:["bool ibase_drop_db([resource link_identifier])","Drop an InterBase database"],ibase_errcode:["int ibase_errcode()","Return error code"],ibase_errmsg:["string ibase_errmsg()","Return error message"],ibase_execute:["mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]])","Execute a previously prepared query"],ibase_fetch_assoc:["array ibase_fetch_assoc(resource result [, int fetch_flags])","Fetch a row from the results of a query"],ibase_fetch_object:["object ibase_fetch_object(resource result [, int fetch_flags])","Fetch a object from the results of a query"],ibase_fetch_row:["array ibase_fetch_row(resource result [, int fetch_flags])","Fetch a row from the results of a query"],ibase_field_info:["array ibase_field_info(resource query_result, int field_number)","Get information about a field"],ibase_free_event_handler:["bool ibase_free_event_handler(resource event)","Frees the event handler set by ibase_set_event_handler()"],ibase_free_query:["bool ibase_free_query(resource query)","Free memory used by a query"],ibase_free_result:["bool ibase_free_result(resource result)","Free the memory used by a result"],ibase_gen_id:["int ibase_gen_id(string generator [, int increment [, resource link_identifier ]])","Increments the named generator and returns its new value"],ibase_maintain_db:["bool ibase_maintain_db(resource service_handle, string db, int action [, int argument])","Execute a maintenance command on the database server"],ibase_modify_user:["bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])","Modify a user in security database"],ibase_name_result:["bool ibase_name_result(resource result, string name)","Assign a name to a result for use with ... WHERE CURRENT OF statements"],ibase_num_fields:["int ibase_num_fields(resource query_result)","Get the number of fields in result"],ibase_num_params:["int ibase_num_params(resource query)","Get the number of params in a prepared query"],ibase_num_rows:["int ibase_num_rows( resource result_identifier )","Return the number of rows that are available in a result"],ibase_param_info:["array ibase_param_info(resource query, int field_number)","Get information about a parameter"],ibase_pconnect:["resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])","Open a persistent connection to an InterBase database"],ibase_prepare:["resource ibase_prepare(resource link_identifier[, string query [, resource trans_identifier ]])","Prepare a query for later execution"],ibase_query:["mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]])","Execute a query"],ibase_restore:["mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]])","Initiates a restore task in the service manager and returns immediately"],ibase_rollback:["bool ibase_rollback( resource link_identifier )","Rollback transaction"],ibase_rollback_ret:["bool ibase_rollback_ret( resource link_identifier )","Rollback transaction and retain the transaction context"],ibase_server_info:["string ibase_server_info(resource service_handle, int action)","Request information about a database server"],ibase_service_attach:["resource ibase_service_attach(string host, string dba_username, string dba_password)","Connect to the service manager"],ibase_service_detach:["bool ibase_service_detach(resource service_handle)","Disconnect from the service manager"],ibase_set_event_handler:["resource ibase_set_event_handler([resource link_identifier,] callback handler, string event [, string event [, ...]])","Register the callback for handling each of the named events"],ibase_trans:["resource ibase_trans([int trans_args [, resource link_identifier [, ... ], int trans_args [, resource link_identifier [, ... ]] [, ...]]])","Start a transaction over one or several databases"],ibase_wait_event:["string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]])","Waits for any one of the passed Interbase events to be posted by the database, and returns its name"],iconv:["string iconv(string in_charset, string out_charset, string str)","Returns str converted to the out_charset character set"],iconv_get_encoding:["mixed iconv_get_encoding([string type])","Get internal encoding and output encoding for ob_iconv_handler()"],iconv_mime_decode:["string iconv_mime_decode(string encoded_string [, int mode, string charset])","Decodes a mime header field"],iconv_mime_decode_headers:["array iconv_mime_decode_headers(string headers [, int mode, string charset])","Decodes multiple mime header fields"],iconv_mime_encode:["string iconv_mime_encode(string field_name, string field_value [, array preference])","Composes a mime header field with field_name and field_value in a specified scheme"],iconv_set_encoding:["bool iconv_set_encoding(string type, string charset)","Sets internal encoding and output encoding for ob_iconv_handler()"],iconv_strlen:["int iconv_strlen(string str [, string charset])","Returns the character count of str"],iconv_strpos:["int iconv_strpos(string haystack, string needle [, int offset [, string charset]])","Finds position of first occurrence of needle within part of haystack beginning with offset"],iconv_strrpos:["int iconv_strrpos(string haystack, string needle [, string charset])","Finds position of last occurrence of needle within part of haystack beginning with offset"],iconv_substr:["string iconv_substr(string str, int offset, [int length, string charset])","Returns specified part of a string"],idate:["int idate(string format [, int timestamp])","Format a local time/date as integer"],idn_to_ascii:["int idn_to_ascii(string domain[, int options])","Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC"],idn_to_utf8:["int idn_to_utf8(string domain[, int options])","Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC"],ignore_user_abort:["int ignore_user_abort([string value])","Set whether we want to ignore a user abort event or not"],image2wbmp:["bool image2wbmp(resource im [, string filename [, int threshold]])","Output WBMP image to browser or file"],image_type_to_extension:["string image_type_to_extension(int imagetype [, bool include_dot])","Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype"],image_type_to_mime_type:["string image_type_to_mime_type(int imagetype)","Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype"],imagealphablending:["bool imagealphablending(resource im, bool on)","Turn alpha blending mode on or off for the given image"],imageantialias:["bool imageantialias(resource im, bool on)","Should antialiased functions used or not"],imagearc:["bool imagearc(resource im, int cx, int cy, int w, int h, int s, int e, int col)","Draw a partial ellipse"],imagechar:["bool imagechar(resource im, int font, int x, int y, string c, int col)","Draw a character"],imagecharup:["bool imagecharup(resource im, int font, int x, int y, string c, int col)","Draw a character rotated 90 degrees counter-clockwise"],imagecolorallocate:["int imagecolorallocate(resource im, int red, int green, int blue)","Allocate a color for an image"],imagecolorallocatealpha:["int imagecolorallocatealpha(resource im, int red, int green, int blue, int alpha)","Allocate a color with an alpha level. Works for true color and palette based images"],imagecolorat:["int imagecolorat(resource im, int x, int y)","Get the index of the color of a pixel"],imagecolorclosest:["int imagecolorclosest(resource im, int red, int green, int blue)","Get the index of the closest color to the specified color"],imagecolorclosestalpha:["int imagecolorclosestalpha(resource im, int red, int green, int blue, int alpha)","Find the closest matching colour with alpha transparency"],imagecolorclosesthwb:["int imagecolorclosesthwb(resource im, int red, int green, int blue)","Get the index of the color which has the hue, white and blackness nearest to the given color"],imagecolordeallocate:["bool imagecolordeallocate(resource im, int index)","De-allocate a color for an image"],imagecolorexact:["int imagecolorexact(resource im, int red, int green, int blue)","Get the index of the specified color"],imagecolorexactalpha:["int imagecolorexactalpha(resource im, int red, int green, int blue, int alpha)","Find exact match for colour with transparency"],imagecolormatch:["bool imagecolormatch(resource im1, resource im2)","Makes the colors of the palette version of an image more closely match the true color version"],imagecolorresolve:["int imagecolorresolve(resource im, int red, int green, int blue)","Get the index of the specified color or its closest possible alternative"],imagecolorresolvealpha:["int imagecolorresolvealpha(resource im, int red, int green, int blue, int alpha)","Resolve/Allocate a colour with an alpha level. Works for true colour and palette based images"],imagecolorset:["void imagecolorset(resource im, int col, int red, int green, int blue)","Set the color for the specified palette index"],imagecolorsforindex:["array imagecolorsforindex(resource im, int col)","Get the colors for an index"],imagecolorstotal:["int imagecolorstotal(resource im)","Find out the number of colors in an image's palette"],imagecolortransparent:["int imagecolortransparent(resource im [, int col])","Define a color as transparent"],imageconvolution:["resource imageconvolution(resource src_im, array matrix3x3, double div, double offset)","Apply a 3x3 convolution matrix, using coefficient div and offset"],imagecopy:["bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)","Copy part of an image"],imagecopymerge:["bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)","Merge one part of an image with another"],imagecopymergegray:["bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)","Merge one part of an image with another"],imagecopyresampled:["bool imagecopyresampled(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)","Copy and resize part of an image using resampling to help ensure clarity"],imagecopyresized:["bool imagecopyresized(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)","Copy and resize part of an image"],imagecreate:["resource imagecreate(int x_size, int y_size)","Create a new image"],imagecreatefromgd:["resource imagecreatefromgd(string filename)","Create a new image from GD file or URL"],imagecreatefromgd2:["resource imagecreatefromgd2(string filename)","Create a new image from GD2 file or URL"],imagecreatefromgd2part:["resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height)","Create a new image from a given part of GD2 file or URL"],imagecreatefromgif:["resource imagecreatefromgif(string filename)","Create a new image from GIF file or URL"],imagecreatefromjpeg:["resource imagecreatefromjpeg(string filename)","Create a new image from JPEG file or URL"],imagecreatefrompng:["resource imagecreatefrompng(string filename)","Create a new image from PNG file or URL"],imagecreatefromstring:["resource imagecreatefromstring(string image)","Create a new image from the image stream in the string"],imagecreatefromwbmp:["resource imagecreatefromwbmp(string filename)","Create a new image from WBMP file or URL"],imagecreatefromxbm:["resource imagecreatefromxbm(string filename)","Create a new image from XBM file or URL"],imagecreatefromxpm:["resource imagecreatefromxpm(string filename)","Create a new image from XPM file or URL"],imagecreatetruecolor:["resource imagecreatetruecolor(int x_size, int y_size)","Create a new true color image"],imagedashedline:["bool imagedashedline(resource im, int x1, int y1, int x2, int y2, int col)","Draw a dashed line"],imagedestroy:["bool imagedestroy(resource im)","Destroy an image"],imageellipse:["bool imageellipse(resource im, int cx, int cy, int w, int h, int color)","Draw an ellipse"],imagefill:["bool imagefill(resource im, int x, int y, int col)","Flood fill"],imagefilledarc:["bool imagefilledarc(resource im, int cx, int cy, int w, int h, int s, int e, int col, int style)","Draw a filled partial ellipse"],imagefilledellipse:["bool imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)","Draw an ellipse"],imagefilledpolygon:["bool imagefilledpolygon(resource im, array point, int num_points, int col)","Draw a filled polygon"],imagefilledrectangle:["bool imagefilledrectangle(resource im, int x1, int y1, int x2, int y2, int col)","Draw a filled rectangle"],imagefilltoborder:["bool imagefilltoborder(resource im, int x, int y, int border, int col)","Flood fill to specific color"],imagefilter:["bool imagefilter(resource src_im, int filtertype, [args] )","Applies Filter an image using a custom angle"],imagefontheight:["int imagefontheight(int font)","Get font height"],imagefontwidth:["int imagefontwidth(int font)","Get font width"],imageftbbox:["array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])","Give the bounding box of a text using fonts via freetype2"],imagefttext:["array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])","Write text to the image using fonts via freetype2"],imagegammacorrect:["bool imagegammacorrect(resource im, float inputgamma, float outputgamma)","Apply a gamma correction to a GD image"],imagegd:["bool imagegd(resource im [, string filename])","Output GD image to browser or file"],imagegd2:["bool imagegd2(resource im [, string filename, [, int chunk_size, [, int type]]])","Output GD2 image to browser or file"],imagegif:["bool imagegif(resource im [, string filename])","Output GIF image to browser or file"],imagegrabscreen:["resource imagegrabscreen()","Grab a screenshot"],imagegrabwindow:["resource imagegrabwindow(int window_handle [, int client_area])","Grab a window or its client area using a windows handle (HWND property in COM instance)"],imageinterlace:["int imageinterlace(resource im [, int interlace])","Enable or disable interlace"],imageistruecolor:["bool imageistruecolor(resource im)","return true if the image uses truecolor"],imagejpeg:["bool imagejpeg(resource im [, string filename [, int quality]])","Output JPEG image to browser or file"],imagelayereffect:["bool imagelayereffect(resource im, int effect)","Set the alpha blending flag to use the bundled libgd layering effects"],imageline:["bool imageline(resource im, int x1, int y1, int x2, int y2, int col)","Draw a line"],imageloadfont:["int imageloadfont(string filename)","Load a new font"],imagepalettecopy:["void imagepalettecopy(resource dst, resource src)","Copy the palette from the src image onto the dst image"],imagepng:["bool imagepng(resource im [, string filename])","Output PNG image to browser or file"],imagepolygon:["bool imagepolygon(resource im, array point, int num_points, int col)","Draw a polygon"],imagepsbbox:["array imagepsbbox(string text, resource font, int size [, int space, int tightness, float angle])","Return the bounding box needed by a string if rasterized"],imagepscopyfont:["int imagepscopyfont(int font_index)","Make a copy of a font for purposes like extending or reenconding"],imagepsencodefont:["bool imagepsencodefont(resource font_index, string filename)","To change a fonts character encoding vector"],imagepsextendfont:["bool imagepsextendfont(resource font_index, float extend)","Extend or or condense if (extend < 1) a font"],imagepsfreefont:["bool imagepsfreefont(resource font_index)","Free memory used by a font"],imagepsloadfont:["resource imagepsloadfont(string pathname)","Load a new font from specified file"],imagepsslantfont:["bool imagepsslantfont(resource font_index, float slant)","Slant a font"],imagepstext:["array imagepstext(resource image, string text, resource font, int size, int foreground, int background, int xcoord, int ycoord [, int space [, int tightness [, float angle [, int antialias])","Rasterize a string over an image"],imagerectangle:["bool imagerectangle(resource im, int x1, int y1, int x2, int y2, int col)","Draw a rectangle"],imagerotate:["resource imagerotate(resource src_im, float angle, int bgdcolor [, int ignoretransparent])","Rotate an image using a custom angle"],imagesavealpha:["bool imagesavealpha(resource im, bool on)","Include alpha channel to a saved image"],imagesetbrush:["bool imagesetbrush(resource image, resource brush)",'Set the brush image to $brush when filling $image with the "IMG_COLOR_BRUSHED" color'],imagesetpixel:["bool imagesetpixel(resource im, int x, int y, int col)","Set a single pixel"],imagesetstyle:["bool imagesetstyle(resource im, array styles)","Set the line drawing styles for use with imageline and IMG_COLOR_STYLED."],imagesetthickness:["bool imagesetthickness(resource im, int thickness)","Set line thickness for drawing lines, ellipses, rectangles, polygons etc."],imagesettile:["bool imagesettile(resource image, resource tile)",'Set the tile image to $tile when filling $image with the "IMG_COLOR_TILED" color'],imagestring:["bool imagestring(resource im, int font, int x, int y, string str, int col)","Draw a string horizontally"],imagestringup:["bool imagestringup(resource im, int font, int x, int y, string str, int col)","Draw a string vertically - rotated 90 degrees counter-clockwise"],imagesx:["int imagesx(resource im)","Get image width"],imagesy:["int imagesy(resource im)","Get image height"],imagetruecolortopalette:["void imagetruecolortopalette(resource im, bool ditherFlag, int colorsWanted)","Convert a true colour image to a palette based image with a number of colours, optionally using dithering."],imagettfbbox:["array imagettfbbox(float size, float angle, string font_file, string text)","Give the bounding box of a text using TrueType fonts"],imagettftext:["array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)","Write text to the image using a TrueType font"],imagetypes:["int imagetypes()","Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM"],imagewbmp:["bool imagewbmp(resource im [, string filename, [, int foreground]])","Output WBMP image to browser or file"],imagexbm:["int imagexbm(int im, string filename [, int foreground])","Output XBM image to browser or file"],imap_8bit:["string imap_8bit(string text)","Convert an 8-bit string to a quoted-printable string"],imap_alerts:["array imap_alerts()","Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called."],imap_append:["bool imap_append(resource stream_id, string folder, string message [, string options [, string internal_date]])","Append a new message to a specified mailbox"],imap_base64:["string imap_base64(string text)","Decode BASE64 encoded text"],imap_binary:["string imap_binary(string text)","Convert an 8bit string to a base64 string"],imap_body:["string imap_body(resource stream_id, int msg_no [, int options])","Read the message body"],imap_bodystruct:["object imap_bodystruct(resource stream_id, int msg_no, string section)","Read the structure of a specified body section of a specific message"],imap_check:["object imap_check(resource stream_id)","Get mailbox properties"],imap_clearflag_full:["bool imap_clearflag_full(resource stream_id, string sequence, string flag [, int options])","Clears flags on messages"],imap_close:["bool imap_close(resource stream_id [, int options])","Close an IMAP stream"],imap_createmailbox:["bool imap_createmailbox(resource stream_id, string mailbox)","Create a new mailbox"],imap_delete:["bool imap_delete(resource stream_id, int msg_no [, int options])","Mark a message for deletion"],imap_deletemailbox:["bool imap_deletemailbox(resource stream_id, string mailbox)","Delete a mailbox"],imap_errors:["array imap_errors()","Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called."],imap_expunge:["bool imap_expunge(resource stream_id)","Permanently delete all messages marked for deletion"],imap_fetch_overview:["array imap_fetch_overview(resource stream_id, string sequence [, int options])","Read an overview of the information in the headers of the given message sequence"],imap_fetchbody:["string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])","Get a specific body section"],imap_fetchheader:["string imap_fetchheader(resource stream_id, int msg_no [, int options])","Get the full unfiltered header for a message"],imap_fetchstructure:["object imap_fetchstructure(resource stream_id, int msg_no [, int options])","Read the full structure of a message"],imap_gc:["bool imap_gc(resource stream_id, int flags)","This function garbage collects (purges) the cache of entries of a specific type."],imap_get_quota:["array imap_get_quota(resource stream_id, string qroot)","Returns the quota set to the mailbox account qroot"],imap_get_quotaroot:["array imap_get_quotaroot(resource stream_id, string mbox)","Returns the quota set to the mailbox account mbox"],imap_getacl:["array imap_getacl(resource stream_id, string mailbox)","Gets the ACL for a given mailbox"],imap_getmailboxes:["array imap_getmailboxes(resource stream_id, string ref, string pattern)","Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter"],imap_getsubscribed:["array imap_getsubscribed(resource stream_id, string ref, string pattern)","Return a list of subscribed mailboxes, in the same format as imap_getmailboxes()"],imap_headerinfo:["object imap_headerinfo(resource stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])","Read the headers of the message"],imap_headers:["array imap_headers(resource stream_id)","Returns headers for all messages in a mailbox"],imap_last_error:["string imap_last_error()","Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call."],imap_list:["array imap_list(resource stream_id, string ref, string pattern)","Read the list of mailboxes"],imap_listscan:["array imap_listscan(resource stream_id, string ref, string pattern, string content)","Read list of mailboxes containing a certain string"],imap_lsub:["array imap_lsub(resource stream_id, string ref, string pattern)","Return a list of subscribed mailboxes"],imap_mail:["bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])","Send an email message"],imap_mail_compose:["string imap_mail_compose(array envelope, array body)","Create a MIME message based on given envelope and body sections"],imap_mail_copy:["bool imap_mail_copy(resource stream_id, string msglist, string mailbox [, int options])","Copy specified message to a mailbox"],imap_mail_move:["bool imap_mail_move(resource stream_id, string sequence, string mailbox [, int options])","Move specified message to a mailbox"],imap_mailboxmsginfo:["object imap_mailboxmsginfo(resource stream_id)","Returns info about the current mailbox"],imap_mime_header_decode:["array imap_mime_header_decode(string str)","Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text'"],imap_msgno:["int imap_msgno(resource stream_id, int unique_msg_id)","Get the sequence number associated with a UID"],imap_mutf7_to_utf8:["string imap_mutf7_to_utf8(string in)","Decode a modified UTF-7 string to UTF-8"],imap_num_msg:["int imap_num_msg(resource stream_id)","Gives the number of messages in the current mailbox"],imap_num_recent:["int imap_num_recent(resource stream_id)","Gives the number of recent messages in current mailbox"],imap_open:["resource imap_open(string mailbox, string user, string password [, int options [, int n_retries]])","Open an IMAP stream to a mailbox"],imap_ping:["bool imap_ping(resource stream_id)","Check if the IMAP stream is still active"],imap_qprint:["string imap_qprint(string text)","Convert a quoted-printable string to an 8-bit string"],imap_renamemailbox:["bool imap_renamemailbox(resource stream_id, string old_name, string new_name)","Rename a mailbox"],imap_reopen:["bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]])","Reopen an IMAP stream to a new mailbox"],imap_rfc822_parse_adrlist:["array imap_rfc822_parse_adrlist(string address_string, string default_host)","Parses an address string"],imap_rfc822_parse_headers:["object imap_rfc822_parse_headers(string headers [, string default_host])","Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo()"],imap_rfc822_write_address:["string imap_rfc822_write_address(string mailbox, string host, string personal)","Returns a properly formatted email address given the mailbox, host, and personal info"],imap_savebody:['bool imap_savebody(resource stream_id, string|resource file, int msg_no[, string section = ""[, int options = 0]])',"Save a specific body section to a file"],imap_search:["array imap_search(resource stream_id, string criteria [, int options [, string charset]])","Return a list of messages matching the given criteria"],imap_set_quota:["bool imap_set_quota(resource stream_id, string qroot, int mailbox_size)","Will set the quota for qroot mailbox"],imap_setacl:["bool imap_setacl(resource stream_id, string mailbox, string id, string rights)","Sets the ACL for a given mailbox"],imap_setflag_full:["bool imap_setflag_full(resource stream_id, string sequence, string flag [, int options])","Sets flags on messages"],imap_sort:["array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]])","Sort an array of message headers, optionally including only messages that meet specified criteria."],imap_status:["object imap_status(resource stream_id, string mailbox, int options)","Get status info from a mailbox"],imap_subscribe:["bool imap_subscribe(resource stream_id, string mailbox)","Subscribe to a mailbox"],imap_thread:["array imap_thread(resource stream_id [, int options])","Return threaded by REFERENCES tree"],imap_timeout:["mixed imap_timeout(int timeout_type [, int timeout])","Set or fetch imap timeout"],imap_uid:["int imap_uid(resource stream_id, int msg_no)","Get the unique message id associated with a standard sequential message number"],imap_undelete:["bool imap_undelete(resource stream_id, int msg_no [, int flags])","Remove the delete flag from a message"],imap_unsubscribe:["bool imap_unsubscribe(resource stream_id, string mailbox)","Unsubscribe from a mailbox"],imap_utf7_decode:["string imap_utf7_decode(string buf)","Decode a modified UTF-7 string"],imap_utf7_encode:["string imap_utf7_encode(string buf)","Encode a string in modified UTF-7"],imap_utf8:["string imap_utf8(string mime_encoded_text)","Convert a mime-encoded text to UTF-8"],imap_utf8_to_mutf7:["string imap_utf8_to_mutf7(string in)","Encode a UTF-8 string to modified UTF-7"],implode:["string implode([string glue,] array pieces)","Joins array elements placing glue string between items and return one string"],import_request_variables:["bool import_request_variables(string types [, string prefix])","Import GET/POST/Cookie variables into the global scope"],in_array:["bool in_array(mixed needle, array haystack [, bool strict])","Checks if the given value exists in the array"],include:["bool include(string path)","Includes and evaluates the specified file"],include_once:["bool include_once(string path)","Includes and evaluates the specified file"],inet_ntop:["string inet_ntop(string in_addr)","Converts a packed inet address to a human readable IP address string"],inet_pton:["string inet_pton(string ip_address)","Converts a human readable IP address to a packed binary string"],ini_get:["string ini_get(string varname)","Get a configuration option"],ini_get_all:["array ini_get_all([string extension[, bool details = true]])","Get all configuration options"],ini_restore:["void ini_restore(string varname)","Restore the value of a configuration option specified by varname"],ini_set:["string ini_set(string varname, string newvalue)","Set a configuration option, returns false on error and the old value of the configuration option on success"],interface_exists:["bool interface_exists(string classname [, bool autoload])","Checks if the class exists"],intl_error_name:["string intl_error_name()","* Return a string for a given error code. * The string will be the same as the name of the error code constant."],intl_get_error_code:["int intl_get_error_code()","* Get code of the last occured error."],intl_get_error_message:["string intl_get_error_message()","* Get text description of the last occured error."],intl_is_failure:["bool intl_is_failure()","* Check whether the given error code indicates a failure. * Returns true if it does, and false if the code * indicates success or a warning."],intval:["int intval(mixed var [, int base])","Get the integer value of a variable using the optional base for the conversion"],ip2long:["int ip2long(string ip_address)","Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address"],iptcembed:["array iptcembed(string iptcdata, string jpeg_file_name [, int spool])","Embed binary IPTC data into a JPEG image."],iptcparse:["array iptcparse(string iptcdata)","Parse binary IPTC-data into associative array"],is_a:["bool is_a(object object, string class_name)","Returns true if the object is of this class or has this class as one of its parents"],is_array:["bool is_array(mixed var)","Returns true if variable is an array"],is_bool:["bool is_bool(mixed var)","Returns true if variable is a boolean"],is_callable:["bool is_callable(mixed var [, bool syntax_only [, string callable_name]])","Returns true if var is callable."],is_countable:["bool is_countable(mixed var)","Returns true if var is countable, false otherwise"],is_dir:["bool is_dir(string filename)","Returns true if file is directory"],is_executable:["bool is_executable(string filename)","Returns true if file is executable"],is_file:["bool is_file(string filename)","Returns true if file is a regular file"],is_finite:["bool is_finite(float val)","Returns whether argument is finite"],is_float:["bool is_float(mixed var)","Returns true if variable is float point"],is_infinite:["bool is_infinite(float val)","Returns whether argument is infinite"],is_link:["bool is_link(string filename)","Returns true if file is symbolic link"],is_long:["bool is_long(mixed var)","Returns true if variable is a long (integer)"],is_nan:["bool is_nan(float val)","Returns whether argument is not a number"],is_null:["bool is_null(mixed var)","Returns true if variable is null"],is_numeric:["bool is_numeric(mixed value)","Returns true if value is a number or a numeric string"],is_object:["bool is_object(mixed var)","Returns true if variable is an object"],is_readable:["bool is_readable(string filename)","Returns true if file can be read"],is_resource:["bool is_resource(mixed var)","Returns true if variable is a resource"],is_scalar:["bool is_scalar(mixed value)","Returns true if value is a scalar"],is_string:["bool is_string(mixed var)","Returns true if variable is a string"],is_subclass_of:["bool is_subclass_of(object object, string class_name)","Returns true if the object has this class as one of its parents"],is_uploaded_file:["bool is_uploaded_file(string path)","Check if file was created by rfc1867 upload"],is_writable:["bool is_writable(string filename)","Returns true if file can be written"],isset:["bool isset(mixed var [, mixed var])","Determine whether a variable is set"],iterator_apply:["int iterator_apply(Traversable iterator, callable function [, array args = null)","Calls a function for every element in an iterator"],iterator_count:["int iterator_count(Traversable iterator)","Count the elements in an iterator"],iterator_to_array:["array iterator_to_array(Traversable iterator [, bool use_keys = true])","Copy the iterator into an array"],jddayofweek:["mixed jddayofweek(int juliandaycount [, int mode])","Returns name or number of day of week from julian day count"],jdmonthname:["string jdmonthname(int juliandaycount, int mode)","Returns name of month for julian day count"],jdtofrench:["string jdtofrench(int juliandaycount)","Converts a julian day count to a french republic calendar date"],jdtogregorian:["string jdtogregorian(int juliandaycount)","Converts a julian day count to a gregorian calendar date"],jdtojewish:["string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])","Converts a julian day count to a jewish calendar date"],jdtojulian:["string jdtojulian(int juliandaycount)","Convert a julian day count to a julian calendar date"],jdtounix:["int jdtounix(int jday)","Convert Julian Day to UNIX timestamp"],jewishtojd:["int jewishtojd(int month, int day, int year)","Converts a jewish calendar date to a julian day count"],join:["string join([string glue,] array pieces)","Returns a string containing a string representation of all the arrayelements in the same order, with the glue string between each element"],jpeg2wbmp:["bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)","Convert JPEG image to WBMP image"],json_decode:["mixed json_decode(string json [, bool assoc [, long depth]])","Decodes the JSON representation into a PHP value"],json_encode:["string json_encode(mixed data [, int options])","Returns the JSON representation of a value"],json_last_error:["int json_last_error()","Returns the error code of the last json_decode()."],juliantojd:["int juliantojd(int month, int day, int year)","Converts a julian calendar date to julian day count"],key:["mixed key(array array_arg)","Return the key of the element currently pointed to by the internal array pointer"],krsort:["bool krsort(array &array_arg [, int sort_flags])","Sort an array by key value in reverse order"],ksort:["bool ksort(array &array_arg [, int sort_flags])","Sort an array by key"],lcfirst:["string lcfirst(string str)","Make a string's first character lowercase"],lcg_value:["float lcg_value()","Returns a value from the combined linear congruential generator"],lchgrp:["bool lchgrp(string filename, mixed group)","Change symlink group"],ldap_8859_to_t61:["string ldap_8859_to_t61(string value)","Translate 8859 characters to t61 characters"],ldap_add:["bool ldap_add(resource link, string dn, array entry)","Add entries to LDAP directory"],ldap_bind:["bool ldap_bind(resource link [, string dn [, string password]])","Bind to LDAP directory"],ldap_compare:["bool ldap_compare(resource link, string dn, string attr, string value)","Determine if an entry has a specific value for one of its attributes"],ldap_connect:["resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])","Connect to an LDAP server"],ldap_count_entries:["int ldap_count_entries(resource link, resource result)","Count the number of entries in a search result"],ldap_delete:["bool ldap_delete(resource link, string dn)","Delete an entry from a directory"],ldap_dn2ufn:["string ldap_dn2ufn(string dn)","Convert DN to User Friendly Naming format"],ldap_err2str:["string ldap_err2str(int errno)","Convert error number to error string"],ldap_errno:["int ldap_errno(resource link)","Get the current ldap error number"],ldap_error:["string ldap_error(resource link)","Get the current ldap error string"],ldap_explode_dn:["array ldap_explode_dn(string dn, int with_attrib)","Splits DN into its component parts"],ldap_first_attribute:["string ldap_first_attribute(resource link, resource result_entry)","Return first attribute"],ldap_first_entry:["resource ldap_first_entry(resource link, resource result)","Return first result id"],ldap_first_reference:["resource ldap_first_reference(resource link, resource result)","Return first reference"],ldap_free_result:["bool ldap_free_result(resource result)","Free result memory"],ldap_get_attributes:["array ldap_get_attributes(resource link, resource result_entry)","Get attributes from a search result entry"],ldap_get_dn:["string ldap_get_dn(resource link, resource result_entry)","Get the DN of a result entry"],ldap_get_entries:["array ldap_get_entries(resource link, resource result)","Get all result entries"],ldap_get_option:["bool ldap_get_option(resource link, int option, mixed retval)","Get the current value of various session-wide parameters"],ldap_get_values_len:["array ldap_get_values_len(resource link, resource result_entry, string attribute)","Get all values with lengths from a result entry"],ldap_list:["resource ldap_list(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])","Single-level search"],ldap_mod_add:["bool ldap_mod_add(resource link, string dn, array entry)","Add attribute values to current"],ldap_mod_del:["bool ldap_mod_del(resource link, string dn, array entry)","Delete attribute values"],ldap_mod_replace:["bool ldap_mod_replace(resource link, string dn, array entry)","Replace attribute values with new ones"],ldap_next_attribute:["string ldap_next_attribute(resource link, resource result_entry)","Get the next attribute in result"],ldap_next_entry:["resource ldap_next_entry(resource link, resource result_entry)","Get next result entry"],ldap_next_reference:["resource ldap_next_reference(resource link, resource reference_entry)","Get next reference"],ldap_parse_reference:["bool ldap_parse_reference(resource link, resource reference_entry, array referrals)","Extract information from reference entry"],ldap_parse_result:["bool ldap_parse_result(resource link, resource result, int errcode, string matcheddn, string errmsg, array referrals)","Extract information from result"],ldap_read:["resource ldap_read(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])","Read an entry"],ldap_rename:["bool ldap_rename(resource link, string dn, string newrdn, string newparent, bool deleteoldrdn)","Modify the name of an entry"],ldap_sasl_bind:["bool ldap_sasl_bind(resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, string sasl_authz_id [, string props]]]]]]])","Bind to LDAP directory using SASL"],ldap_search:["resource ldap_search(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])","Search LDAP tree under base_dn"],ldap_set_option:["bool ldap_set_option(resource link, int option, mixed newval)","Set the value of various session-wide parameters"],ldap_set_rebind_proc:["bool ldap_set_rebind_proc(resource link, string callback)","Set a callback function to do re-binds on referral chasing."],ldap_sort:["bool ldap_sort(resource link, resource result, string sortfilter)","Sort LDAP result entries"],ldap_start_tls:["bool ldap_start_tls(resource link)","Start TLS"],ldap_t61_to_8859:["string ldap_t61_to_8859(string value)","Translate t61 characters to 8859 characters"],ldap_unbind:["bool ldap_unbind(resource link)","Unbind from LDAP directory"],leak:["void leak(int num_bytes=3)","Cause an intentional memory leak, for testing/debugging purposes"],levenshtein:["int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])","Calculate Levenshtein distance between two strings"],libxml_clear_errors:["void libxml_clear_errors()","Clear last error from libxml"],libxml_disable_entity_loader:["bool libxml_disable_entity_loader([bool disable])","Disable/Enable ability to load external entities"],libxml_get_errors:["object libxml_get_errors()","Retrieve array of errors"],libxml_get_last_error:["object libxml_get_last_error()","Retrieve last error from libxml"],libxml_set_streams_context:["void libxml_set_streams_context(resource streams_context)","Set the streams context for the next libxml document load or write"],libxml_use_internal_errors:["bool libxml_use_internal_errors([bool use_errors])","Disable libxml errors and allow user to fetch error information as needed"],link:["int link(string target, string link)","Create a hard link"],linkinfo:["int linkinfo(string filename)","Returns the st_dev field of the UNIX C stat structure describing the link"],litespeed_request_headers:["array litespeed_request_headers()","Fetch all HTTP request headers"],litespeed_response_headers:["array litespeed_response_headers()","Fetch all HTTP response headers"],locale_accept_from_http:["string locale_accept_from_http(string $http_accept)",null],locale_canonicalize:["static string locale_canonicalize(Locale $loc, string $locale)","* @param string $locale The locale string to canonicalize"],locale_filter_matches:["bool locale_filter_matches(string $langtag, string $locale[, bool $canonicalize])","* Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm"],locale_get_all_variants:["static array locale_get_all_variants($locale)","* gets an array containing the list of variants, or null"],locale_get_default:["static string locale_get_default( )","Get default locale"],locale_get_keywords:["static array locale_get_keywords(string $locale) {","* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array"],locale_get_primary_language:["static string locale_get_primary_language($locale)","* gets the primary language for the $locale"],locale_get_region:["static string locale_get_region($locale)","* gets the region for the $locale"],locale_get_script:["static string locale_get_script($locale)","* gets the script for the $locale"],locale_lookup:["string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])","* Searchs the items in $langtag for the best match to the language * range"],locale_set_default:["static string locale_set_default( string $locale )","Set default locale"],localeconv:["array localeconv()","Returns numeric formatting information based on the current locale"],localtime:["array localtime([int timestamp [, bool associative_array]])","Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array"],log:["float log(float number, [float base])","Returns the natural logarithm of the number, or the base log if base is specified"],log10:["float log10(float number)","Returns the base-10 logarithm of the number"],log1p:["float log1p(float number)","Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero"],long2ip:["string long2ip(int proper_address)","Converts an (IPv4) Internet network address into a string in Internet standard dotted format"],lstat:["array lstat(string filename)","Give information about a file or symbolic link"],ltrim:["string ltrim(string str [, string character_mask])","Strips whitespace from the beginning of a string"],mail:["int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])","Send an email message"],max:["mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])","Return the highest value in an array or a series of arguments"],mb_check_encoding:["bool mb_check_encoding([string var[, string encoding]])","Check if the string is valid for the specified encoding"],mb_convert_case:["string mb_convert_case(string sourcestring, int mode [, string encoding])","Returns a case-folded version of sourcestring"],mb_convert_encoding:["string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])","Returns converted string in desired encoding"],mb_convert_kana:["string mb_convert_kana(string str [, string option] [, string encoding])","Conversion between full-width character and half-width character (Japanese)"],mb_convert_variables:["string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...])","Converts the string resource in variables to desired encoding"],mb_decode_mimeheader:["string mb_decode_mimeheader(string string)",'Decodes the MIME "encoded-word" in the string'],mb_decode_numericentity:["string mb_decode_numericentity(string string, array convmap [, string encoding])","Converts HTML numeric entities to character code"],mb_detect_encoding:["string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]])","Encodings of the given string is returned (as a string)"],mb_detect_order:["bool|array mb_detect_order([mixed encoding-list])","Sets the current detect_order or Return the current detect_order as a array"],mb_encode_mimeheader:["string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])",'Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?='],mb_encode_numericentity:["string mb_encode_numericentity(string string, array convmap [, string encoding])","Converts specified characters to HTML numeric entities"],mb_encoding_aliases:["array mb_encoding_aliases(string encoding)","Returns an array of the aliases of a given encoding name"],mb_ereg:["int mb_ereg(string pattern, string string [, array registers])","Regular expression match for multibyte string"],mb_ereg_match:["bool mb_ereg_match(string pattern, string string [,string option])","Regular expression match for multibyte string"],mb_ereg_replace:["string mb_ereg_replace(string pattern, string replacement, string string [, string option])","Replace regular expression for multibyte string"],mb_ereg_search:["bool mb_ereg_search([string pattern[, string option]])","Regular expression search for multibyte string"],mb_ereg_search_getpos:["int mb_ereg_search_getpos()","Get search start position"],mb_ereg_search_getregs:["array mb_ereg_search_getregs()","Get matched substring of the last time"],mb_ereg_search_init:["bool mb_ereg_search_init(string string [, string pattern[, string option]])","Initialize string and regular expression for search."],mb_ereg_search_pos:["array mb_ereg_search_pos([string pattern[, string option]])","Regular expression search for multibyte string"],mb_ereg_search_regs:["array mb_ereg_search_regs([string pattern[, string option]])","Regular expression search for multibyte string"],mb_ereg_search_setpos:["bool mb_ereg_search_setpos(int position)","Set search start position"],mb_eregi:["int mb_eregi(string pattern, string string [, array registers])","Case-insensitive regular expression match for multibyte string"],mb_eregi_replace:["string mb_eregi_replace(string pattern, string replacement, string string)","Case insensitive replace regular expression for multibyte string"],mb_get_info:["mixed mb_get_info([string type])","Returns the current settings of mbstring"],mb_http_input:["mixed mb_http_input([string type])","Returns the input encoding"],mb_http_output:["string mb_http_output([string encoding])","Sets the current output_encoding or returns the current output_encoding as a string"],mb_internal_encoding:["string mb_internal_encoding([string encoding])","Sets the current internal encoding or Returns the current internal encoding as a string"],mb_language:["string mb_language([string language])","Sets the current language or Returns the current language as a string"],mb_list_encodings:["mixed mb_list_encodings()","Returns an array of all supported entity encodings"],mb_output_handler:["string mb_output_handler(string contents, int status)","Returns string in output buffer converted to the http_output encoding"],mb_parse_str:["bool mb_parse_str(string encoded_string [, array result])","Parses GET/POST/COOKIE data and sets global variables"],mb_preferred_mime_name:["string mb_preferred_mime_name(string encoding)","Return the preferred MIME name (charset) as a string"],mb_regex_encoding:["string mb_regex_encoding([string encoding])","Returns the current encoding for regex as a string."],mb_regex_set_options:["string mb_regex_set_options([string options])","Set or get the default options for mbregex functions"],mb_send_mail:["int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])","* Sends an email message with MIME scheme"],mb_split:["array mb_split(string pattern, string string [, int limit])","split multibyte string into array by regular expression"],mb_strcut:["string mb_strcut(string str, int start [, int length [, string encoding]])","Returns part of a string"],mb_strimwidth:["string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])","Trim the string in terminal width"],mb_stripos:["int mb_stripos(string haystack, string needle [, int offset [, string encoding]])","Finds position of first occurrence of a string within another, case insensitive"],mb_stristr:["string mb_stristr(string haystack, string needle[, bool part[, string encoding]])","Finds first occurrence of a string within another, case insensitive"],mb_strlen:["int mb_strlen(string str [, string encoding])","Get character numbers of a string"],mb_strpos:["int mb_strpos(string haystack, string needle [, int offset [, string encoding]])","Find position of first occurrence of a string within another"],mb_strrchr:["string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])","Finds the last occurrence of a character in a string within another"],mb_strrichr:["string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])","Finds the last occurrence of a character in a string within another, case insensitive"],mb_strripos:["int mb_strripos(string haystack, string needle [, int offset [, string encoding]])","Finds position of last occurrence of a string within another, case insensitive"],mb_strrpos:["int mb_strrpos(string haystack, string needle [, int offset [, string encoding]])","Find position of last occurrence of a string within another"],mb_strstr:["string mb_strstr(string haystack, string needle[, bool part[, string encoding]])","Finds first occurrence of a string within another"],mb_strtolower:["string mb_strtolower(string sourcestring [, string encoding])","* Returns a lowercased version of sourcestring"],mb_strtoupper:["string mb_strtoupper(string sourcestring [, string encoding])","* Returns a uppercased version of sourcestring"],mb_strwidth:["int mb_strwidth(string str [, string encoding])","Gets terminal width of a string"],mb_substitute_character:["mixed mb_substitute_character([mixed substchar])","Sets the current substitute_character or returns the current substitute_character"],mb_substr:["string mb_substr(string str, int start [, int length [, string encoding]])","Returns part of a string"],mb_substr_count:["int mb_substr_count(string haystack, string needle [, string encoding])","Count the number of substring occurrences"],mcrypt_cbc:["string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)","CBC crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_cfb:["string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)","CFB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_create_iv:["string mcrypt_create_iv(int size, int source)","Create an initialization vector (IV)"],mcrypt_decrypt:["string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)","OFB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_ecb:["string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)","ECB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_enc_get_algorithms_name:["string mcrypt_enc_get_algorithms_name(resource td)","Returns the name of the algorithm specified by the descriptor td"],mcrypt_enc_get_block_size:["int mcrypt_enc_get_block_size(resource td)","Returns the block size of the cipher specified by the descriptor td"],mcrypt_enc_get_iv_size:["int mcrypt_enc_get_iv_size(resource td)","Returns the size of the IV in bytes of the algorithm specified by the descriptor td"],mcrypt_enc_get_key_size:["int mcrypt_enc_get_key_size(resource td)","Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td"],mcrypt_enc_get_modes_name:["string mcrypt_enc_get_modes_name(resource td)","Returns the name of the mode specified by the descriptor td"],mcrypt_enc_get_supported_key_sizes:["array mcrypt_enc_get_supported_key_sizes(resource td)","This function decrypts the crypttext"],mcrypt_enc_is_block_algorithm:["bool mcrypt_enc_is_block_algorithm(resource td)","Returns TRUE if the alrogithm is a block algorithms"],mcrypt_enc_is_block_algorithm_mode:["bool mcrypt_enc_is_block_algorithm_mode(resource td)","Returns TRUE if the mode is for use with block algorithms"],mcrypt_enc_is_block_mode:["bool mcrypt_enc_is_block_mode(resource td)","Returns TRUE if the mode outputs blocks"],mcrypt_enc_self_test:["int mcrypt_enc_self_test(resource td)","This function runs the self test on the algorithm specified by the descriptor td"],mcrypt_encrypt:["string mcrypt_encrypt(string cipher, string key, string data, string mode, string iv)","OFB crypt/decrypt data using key key with cipher cipher starting with iv"],mcrypt_generic:["string mcrypt_generic(resource td, string data)","This function encrypts the plaintext"],mcrypt_generic_deinit:["bool mcrypt_generic_deinit(resource td)","This function terminates encrypt specified by the descriptor td"],mcrypt_generic_init:["int mcrypt_generic_init(resource td, string key, string iv)","This function initializes all buffers for the specific module"],mcrypt_get_block_size:["int mcrypt_get_block_size(string cipher, string module)","Get the key size of cipher"],mcrypt_get_cipher_name:["string mcrypt_get_cipher_name(string cipher)","Get the key size of cipher"],mcrypt_get_iv_size:["int mcrypt_get_iv_size(string cipher, string module)","Get the IV size of cipher (Usually the same as the blocksize)"],mcrypt_get_key_size:["int mcrypt_get_key_size(string cipher, string module)","Get the key size of cipher"],mcrypt_list_algorithms:["array mcrypt_list_algorithms([string lib_dir])",'List all algorithms in "module_dir"'],mcrypt_list_modes:["array mcrypt_list_modes([string lib_dir])",'List all modes "module_dir"'],mcrypt_module_close:["bool mcrypt_module_close(resource td)","Free the descriptor td"],mcrypt_module_get_algo_block_size:["int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir])","Returns the block size of the algorithm"],mcrypt_module_get_algo_key_size:["int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir])","Returns the maximum supported key size of the algorithm"],mcrypt_module_get_supported_key_sizes:["array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir])","This function decrypts the crypttext"],mcrypt_module_is_block_algorithm:["bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir])","Returns TRUE if the algorithm is a block algorithm"],mcrypt_module_is_block_algorithm_mode:["bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir])","Returns TRUE if the mode is for use with block algorithms"],mcrypt_module_is_block_mode:["bool mcrypt_module_is_block_mode(string mode [, string lib_dir])","Returns TRUE if the mode outputs blocks of bytes"],mcrypt_module_open:["resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory)","Opens the module of the algorithm and the mode to be used"],mcrypt_module_self_test:["bool mcrypt_module_self_test(string algorithm [, string lib_dir])",'Does a self test of the module "module"'],mcrypt_ofb:["string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)","OFB crypt/decrypt data using key key with cipher cipher starting with iv"],md5:["string md5(string str, [ bool raw_output])","Calculate the md5 hash of a string"],md5_file:["string md5_file(string filename [, bool raw_output])","Calculate the md5 hash of given filename"],mdecrypt_generic:["string mdecrypt_generic(resource td, string data)","This function decrypts the plaintext"],memory_get_peak_usage:["int memory_get_peak_usage([real_usage])","Returns the peak allocated by PHP memory"],memory_get_usage:["int memory_get_usage([real_usage])","Returns the allocated by PHP memory"],metaphone:["string metaphone(string text[, int phones])","Break english phrases down into their phonemes"],method_exists:["bool method_exists(object object, string method)","Checks if the class method exists"],mhash:["string mhash(int hash, string data [, string key])","Hash data with hash"],mhash_count:["int mhash_count()","Gets the number of available hashes"],mhash_get_block_size:["int mhash_get_block_size(int hash)","Gets the block size of hash"],mhash_get_hash_name:["string mhash_get_hash_name(int hash)","Gets the name of hash"],mhash_keygen_s2k:["string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)","Generates a key using hash functions"],microtime:["mixed microtime([bool get_as_float])","Returns either a string or a float containing the current time in seconds and microseconds"],mime_content_type:["string mime_content_type(string filename|resource stream)","Return content-type for file"],min:["mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])","Return the lowest value in an array or a series of arguments"],mkdir:["bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])","Create a directory"],mktime:["int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])","Get UNIX timestamp for a date"],money_format:["string money_format(string format , float value)","Convert monetary value(s) to string"],move_uploaded_file:["bool move_uploaded_file(string path, string new_path)","Move a file if and only if it was created by an upload"],msg_get_queue:["resource msg_get_queue(int key [, int perms])","Attach to a message queue"],msg_queue_exists:["bool msg_queue_exists(int key)","Check whether a message queue exists"],msg_receive:["mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])","Send a message of type msgtype (must be > 0) to a message queue"],msg_remove_queue:["bool msg_remove_queue(resource queue)","Destroy the queue"],msg_send:["bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])","Send a message of type msgtype (must be > 0) to a message queue"],msg_set_queue:["bool msg_set_queue(resource queue, array data)","Set information for a message queue"],msg_stat_queue:["array msg_stat_queue(resource queue)","Returns information about a message queue"],msgfmt_create:["MessageFormatter msgfmt_create( string $locale, string $pattern )","* Create formatter."],msgfmt_format:["mixed msgfmt_format( MessageFormatter $nf, array $args )","* Format a message."],msgfmt_format_message:["mixed msgfmt_format_message( string $locale, string $pattern, array $args )","* Format a message."],msgfmt_get_error_code:["int msgfmt_get_error_code( MessageFormatter $nf )","* Get formatter's last error code."],msgfmt_get_error_message:["string msgfmt_get_error_message( MessageFormatter $coll )","* Get text description for formatter's last error code."],msgfmt_get_locale:["string msgfmt_get_locale(MessageFormatter $mf)","* Get formatter locale."],msgfmt_get_pattern:["string msgfmt_get_pattern( MessageFormatter $mf )","* Get formatter pattern."],msgfmt_parse:["array msgfmt_parse( MessageFormatter $nf, string $source )","* Parse a message."],msgfmt_set_pattern:["bool msgfmt_set_pattern( MessageFormatter $mf, string $pattern )","* Set formatter pattern."],mssql_bind:["bool mssql_bind(resource stmt, string param_name, mixed var, int type [, bool is_output [, bool is_null [, int maxlen]]])","Adds a parameter to a stored procedure or a remote stored procedure"],mssql_close:["bool mssql_close([resource conn_id])","Closes a connection to a MS-SQL server"],mssql_connect:["int mssql_connect([string servername [, string username [, string password [, bool new_link]]]])","Establishes a connection to a MS-SQL server"],mssql_data_seek:["bool mssql_data_seek(resource result_id, int offset)","Moves the internal row pointer of the MS-SQL result associated with the specified result identifier to pointer to the specified row number"],mssql_execute:["mixed mssql_execute(resource stmt [, bool skip_results = false])","Executes a stored procedure on a MS-SQL server database"],mssql_fetch_array:["array mssql_fetch_array(resource result_id [, int result_type])","Returns an associative array of the current row in the result set specified by result_id"],mssql_fetch_assoc:["array mssql_fetch_assoc(resource result_id)","Returns an associative array of the current row in the result set specified by result_id"],mssql_fetch_batch:["int mssql_fetch_batch(resource result_index)","Returns the next batch of records"],mssql_fetch_field:["object mssql_fetch_field(resource result_id [, int offset])","Gets information about certain fields in a query result"],mssql_fetch_object:["object mssql_fetch_object(resource result_id)","Returns a pseudo-object of the current row in the result set specified by result_id"],mssql_fetch_row:["array mssql_fetch_row(resource result_id)","Returns an array of the current row in the result set specified by result_id"],mssql_field_length:["int mssql_field_length(resource result_id [, int offset])","Get the length of a MS-SQL field"],mssql_field_name:["string mssql_field_name(resource result_id [, int offset])","Returns the name of the field given by offset in the result set given by result_id"],mssql_field_seek:["bool mssql_field_seek(resource result_id, int offset)","Seeks to the specified field offset"],mssql_field_type:["string mssql_field_type(resource result_id [, int offset])","Returns the type of a field"],mssql_free_result:["bool mssql_free_result(resource result_index)","Free a MS-SQL result index"],mssql_free_statement:["bool mssql_free_statement(resource result_index)","Free a MS-SQL statement index"],mssql_get_last_message:["string mssql_get_last_message()","Gets the last message from the MS-SQL server"],mssql_guid_string:["string mssql_guid_string(string binary [,bool short_format])","Converts a 16 byte binary GUID to a string"],mssql_init:["int mssql_init(string sp_name [, resource conn_id])","Initializes a stored procedure or a remote stored procedure"],mssql_min_error_severity:["void mssql_min_error_severity(int severity)","Sets the lower error severity"],mssql_min_message_severity:["void mssql_min_message_severity(int severity)","Sets the lower message severity"],mssql_next_result:["bool mssql_next_result(resource result_id)","Move the internal result pointer to the next result"],mssql_num_fields:["int mssql_num_fields(resource mssql_result_index)","Returns the number of fields fetched in from the result id specified"],mssql_num_rows:["int mssql_num_rows(resource mssql_result_index)","Returns the number of rows fetched in from the result id specified"],mssql_pconnect:["int mssql_pconnect([string servername [, string username [, string password [, bool new_link]]]])","Establishes a persistent connection to a MS-SQL server"],mssql_query:["resource mssql_query(string query [, resource conn_id [, int batch_size]])","Perform an SQL query on a MS-SQL server database"],mssql_result:["string mssql_result(resource result_id, int row, mixed field)","Returns the contents of one cell from a MS-SQL result set"],mssql_rows_affected:["int mssql_rows_affected(resource conn_id)","Returns the number of records affected by the query"],mssql_select_db:["bool mssql_select_db(string database_name [, resource conn_id])","Select a MS-SQL database"],mt_getrandmax:["int mt_getrandmax()","Returns the maximum value a random number from Mersenne Twister can have"],mt_rand:["int mt_rand([int min, int max])","Returns a random number from Mersenne Twister"],mt_srand:["void mt_srand([int seed])","Seeds Mersenne Twister random number generator"],mysql_affected_rows:["int mysql_affected_rows([int link_identifier])","Gets number of affected rows in previous MySQL operation"],mysql_client_encoding:["string mysql_client_encoding([int link_identifier])","Returns the default character set for the current connection"],mysql_close:["bool mysql_close([int link_identifier])","Close a MySQL connection"],mysql_connect:["resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])","Opens a connection to a MySQL Server"],mysql_create_db:["bool mysql_create_db(string database_name [, int link_identifier])","Create a MySQL database"],mysql_data_seek:["bool mysql_data_seek(resource result, int row_number)","Move internal result pointer"],mysql_db_query:["resource mysql_db_query(string database_name, string query [, int link_identifier])","Sends an SQL query to MySQL"],mysql_drop_db:["bool mysql_drop_db(string database_name [, int link_identifier])","Drops (delete) a MySQL database"],mysql_errno:["int mysql_errno([int link_identifier])","Returns the number of the error message from previous MySQL operation"],mysql_error:["string mysql_error([int link_identifier])","Returns the text of the error message from previous MySQL operation"],mysql_escape_string:["string mysql_escape_string(string to_be_escaped)","Escape string for mysql query"],mysql_fetch_array:["array mysql_fetch_array(resource result [, int result_type])","Fetch a result row as an array (associative, numeric or both)"],mysql_fetch_assoc:["array mysql_fetch_assoc(resource result)","Fetch a result row as an associative array"],mysql_fetch_field:["object mysql_fetch_field(resource result [, int field_offset])","Gets column information from a result and return as an object"],mysql_fetch_lengths:["array mysql_fetch_lengths(resource result)","Gets max data size of each column in a result"],mysql_fetch_object:["object mysql_fetch_object(resource result [, string class_name [, NULL|array ctor_params]])","Fetch a result row as an object"],mysql_fetch_row:["array mysql_fetch_row(resource result)","Gets a result row as an enumerated array"],mysql_field_flags:["string mysql_field_flags(resource result, int field_offset)","Gets the flags associated with the specified field in a result"],mysql_field_len:["int mysql_field_len(resource result, int field_offset)","Returns the length of the specified field"],mysql_field_name:["string mysql_field_name(resource result, int field_index)","Gets the name of the specified field in a result"],mysql_field_seek:["bool mysql_field_seek(resource result, int field_offset)","Sets result pointer to a specific field offset"],mysql_field_table:["string mysql_field_table(resource result, int field_offset)","Gets name of the table the specified field is in"],mysql_field_type:["string mysql_field_type(resource result, int field_offset)","Gets the type of the specified field in a result"],mysql_free_result:["bool mysql_free_result(resource result)","Free result memory"],mysql_get_client_info:["string mysql_get_client_info()","Returns a string that represents the client library version"],mysql_get_host_info:["string mysql_get_host_info([int link_identifier])","Returns a string describing the type of connection in use, including the server host name"],mysql_get_proto_info:["int mysql_get_proto_info([int link_identifier])","Returns the protocol version used by current connection"],mysql_get_server_info:["string mysql_get_server_info([int link_identifier])","Returns a string that represents the server version number"],mysql_info:["string mysql_info([int link_identifier])","Returns a string containing information about the most recent query"],mysql_insert_id:["int mysql_insert_id([int link_identifier])","Gets the ID generated from the previous INSERT operation"],mysql_list_dbs:["resource mysql_list_dbs([int link_identifier])","List databases available on a MySQL server"],mysql_list_fields:["resource mysql_list_fields(string database_name, string table_name [, int link_identifier])","List MySQL result fields"],mysql_list_processes:["resource mysql_list_processes([int link_identifier])","Returns a result set describing the current server threads"],mysql_list_tables:["resource mysql_list_tables(string database_name [, int link_identifier])","List tables in a MySQL database"],mysql_num_fields:["int mysql_num_fields(resource result)","Gets number of fields in a result"],mysql_num_rows:["int mysql_num_rows(resource result)","Gets number of rows in a result"],mysql_pconnect:["resource mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])","Opens a persistent connection to a MySQL Server"],mysql_ping:["bool mysql_ping([int link_identifier])","Ping a server connection. If no connection then reconnect."],mysql_query:["resource mysql_query(string query [, int link_identifier])","Sends an SQL query to MySQL"],mysql_real_escape_string:["string mysql_real_escape_string(string to_be_escaped [, int link_identifier])","Escape special characters in a string for use in a SQL statement, taking into account the current charset of the connection"],mysql_result:["mixed mysql_result(resource result, int row [, mixed field])","Gets result data"],mysql_select_db:["bool mysql_select_db(string database_name [, int link_identifier])","Selects a MySQL database"],mysql_set_charset:["bool mysql_set_charset(string csname [, int link_identifier])","sets client character set"],mysql_stat:["string mysql_stat([int link_identifier])","Returns a string containing status information"],mysql_thread_id:["int mysql_thread_id([int link_identifier])","Returns the thread id of current connection"],mysql_unbuffered_query:["resource mysql_unbuffered_query(string query [, int link_identifier])","Sends an SQL query to MySQL, without fetching and buffering the result rows"],mysqli_affected_rows:["mixed mysqli_affected_rows(object link)","Get number of affected rows in previous MySQL operation"],mysqli_autocommit:["bool mysqli_autocommit(object link, bool mode)","Turn auto commit on or of"],mysqli_cache_stats:["array mysqli_cache_stats()","Returns statistics about the zval cache"],mysqli_change_user:["bool mysqli_change_user(object link, string user, string password, string database)","Change logged-in user of the active connection"],mysqli_character_set_name:["string mysqli_character_set_name(object link)","Returns the name of the character set used for this connection"],mysqli_close:["bool mysqli_close(object link)","Close connection"],mysqli_commit:["bool mysqli_commit(object link)","Commit outstanding actions and close transaction"],mysqli_connect:["object mysqli_connect([string hostname [,string username [,string passwd [,string dbname [,int port [,string socket]]]]]])","Open a connection to a mysql server"],mysqli_connect_errno:["int mysqli_connect_errno()","Returns the numerical value of the error message from last connect command"],mysqli_connect_error:["string mysqli_connect_error()","Returns the text of the error message from previous MySQL operation"],mysqli_data_seek:["bool mysqli_data_seek(object result, int offset)","Move internal result pointer"],mysqli_debug:["void mysqli_debug(string debug)",""],mysqli_dump_debug_info:["bool mysqli_dump_debug_info(object link)",""],mysqli_embedded_server_end:["void mysqli_embedded_server_end()",""],mysqli_embedded_server_start:["bool mysqli_embedded_server_start(bool start, array arguments, array groups)","initialize and start embedded server"],mysqli_errno:["int mysqli_errno(object link)","Returns the numerical value of the error message from previous MySQL operation"],mysqli_error:["string mysqli_error(object link)","Returns the text of the error message from previous MySQL operation"],mysqli_fetch_all:["mixed mysqli_fetch_all(object result [,int resulttype])","Fetches all result rows as an associative array, a numeric array, or both"],mysqli_fetch_array:["mixed mysqli_fetch_array(object result [,int resulttype])","Fetch a result row as an associative array, a numeric array, or both"],mysqli_fetch_assoc:["mixed mysqli_fetch_assoc(object result)","Fetch a result row as an associative array"],mysqli_fetch_field:["mixed mysqli_fetch_field(object result)","Get column information from a result and return as an object"],mysqli_fetch_field_direct:["mixed mysqli_fetch_field_direct(object result, int offset)","Fetch meta-data for a single field"],mysqli_fetch_fields:["mixed mysqli_fetch_fields(object result)","Return array of objects containing field meta-data"],mysqli_fetch_lengths:["mixed mysqli_fetch_lengths(object result)","Get the length of each output in a result"],mysqli_fetch_object:["mixed mysqli_fetch_object(object result [, string class_name [, NULL|array ctor_params]])","Fetch a result row as an object"],mysqli_fetch_row:["array mysqli_fetch_row(object result)","Get a result row as an enumerated array"],mysqli_field_count:["int mysqli_field_count(object link)","Fetch the number of fields returned by the last query for the given link"],mysqli_field_seek:["int mysqli_field_seek(object result, int fieldnr)","Set result pointer to a specified field offset"],mysqli_field_tell:["int mysqli_field_tell(object result)","Get current field offset of result pointer"],mysqli_free_result:["void mysqli_free_result(object result)","Free query result memory for the given result handle"],mysqli_get_charset:["object mysqli_get_charset(object link)","returns a character set object"],mysqli_get_client_info:["string mysqli_get_client_info()","Get MySQL client info"],mysqli_get_client_stats:["array mysqli_get_client_stats()","Returns statistics about the zval cache"],mysqli_get_client_version:["int mysqli_get_client_version()","Get MySQL client info"],mysqli_get_connection_stats:["array mysqli_get_connection_stats()","Returns statistics about the zval cache"],mysqli_get_host_info:["string mysqli_get_host_info(object link)","Get MySQL host info"],mysqli_get_proto_info:["int mysqli_get_proto_info(object link)","Get MySQL protocol information"],mysqli_get_server_info:["string mysqli_get_server_info(object link)","Get MySQL server info"],mysqli_get_server_version:["int mysqli_get_server_version(object link)","Return the MySQL version for the server referenced by the given link"],mysqli_get_warnings:["object mysqli_get_warnings(object link)",""],mysqli_info:["string mysqli_info(object link)","Get information about the most recent query"],mysqli_init:["resource mysqli_init()","Initialize mysqli and return a resource for use with mysql_real_connect"],mysqli_insert_id:["mixed mysqli_insert_id(object link)","Get the ID generated from the previous INSERT operation"],mysqli_kill:["bool mysqli_kill(object link, int processid)","Kill a mysql process on the server"],mysqli_link_construct:["object mysqli_link_construct()",""],mysqli_more_results:["bool mysqli_more_results(object link)","check if there any more query results from a multi query"],mysqli_multi_query:["bool mysqli_multi_query(object link, string query)","allows to execute multiple queries"],mysqli_next_result:["bool mysqli_next_result(object link)","read next result from multi_query"],mysqli_num_fields:["int mysqli_num_fields(object result)","Get number of fields in result"],mysqli_num_rows:["mixed mysqli_num_rows(object result)","Get number of rows in result"],mysqli_options:["bool mysqli_options(object link, int flags, mixed values)","Set options"],mysqli_ping:["bool mysqli_ping(object link)","Ping a server connection or reconnect if there is no connection"],mysqli_poll:["int mysqli_poll(array read, array write, array error, long sec [, long usec])","Poll connections"],mysqli_prepare:["mixed mysqli_prepare(object link, string query)","Prepare a SQL statement for execution"],mysqli_query:["mixed mysqli_query(object link, string query [,int resultmode])",""],mysqli_real_connect:["bool mysqli_real_connect(object link [,string hostname [,string username [,string passwd [,string dbname [,int port [,string socket [,int flags]]]]]]])","Open a connection to a mysql server"],mysqli_real_escape_string:["string mysqli_real_escape_string(object link, string escapestr)","Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection"],mysqli_real_query:["bool mysqli_real_query(object link, string query)","Binary-safe version of mysql_query()"],mysqli_reap_async_query:["int mysqli_reap_async_query(object link)","Poll connections"],mysqli_refresh:["bool mysqli_refresh(object link, long options)","Flush tables or caches, or reset replication server information"],mysqli_report:["bool mysqli_report(int flags)","sets report level"],mysqli_rollback:["bool mysqli_rollback(object link)","Undo actions from current transaction"],mysqli_select_db:["bool mysqli_select_db(object link, string dbname)","Select a MySQL database"],mysqli_set_charset:["bool mysqli_set_charset(object link, string csname)","sets client character set"],mysqli_set_local_infile_default:["void mysqli_set_local_infile_default(object link)","unsets user defined handler for load local infile command"],mysqli_set_local_infile_handler:["bool mysqli_set_local_infile_handler(object link, callback read_func)","Set callback functions for LOAD DATA LOCAL INFILE"],mysqli_sqlstate:["string mysqli_sqlstate(object link)","Returns the SQLSTATE error from previous MySQL operation"],mysqli_ssl_set:["bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])",""],mysqli_stat:["mixed mysqli_stat(object link)","Get current system status"],mysqli_stmt_affected_rows:["mixed mysqli_stmt_affected_rows(object stmt)","Return the number of rows affected in the last query for the given link"],mysqli_stmt_attr_get:["int mysqli_stmt_attr_get(object stmt, long attr)",""],mysqli_stmt_attr_set:["int mysqli_stmt_attr_set(object stmt, long attr, long mode)",""],mysqli_stmt_bind_param:["bool mysqli_stmt_bind_param(object stmt, string types, mixed variable [,mixed,....])","Bind variables to a prepared statement as parameters"],mysqli_stmt_bind_result:["bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])","Bind variables to a prepared statement for result storage"],mysqli_stmt_close:["bool mysqli_stmt_close(object stmt)","Close statement"],mysqli_stmt_data_seek:["void mysqli_stmt_data_seek(object stmt, int offset)","Move internal result pointer"],mysqli_stmt_errno:["int mysqli_stmt_errno(object stmt)",""],mysqli_stmt_error:["string mysqli_stmt_error(object stmt)",""],mysqli_stmt_execute:["bool mysqli_stmt_execute(object stmt)","Execute a prepared statement"],mysqli_stmt_fetch:["mixed mysqli_stmt_fetch(object stmt)","Fetch results from a prepared statement into the bound variables"],mysqli_stmt_field_count:["int mysqli_stmt_field_count(object stmt) {","Return the number of result columns for the given statement"],mysqli_stmt_free_result:["void mysqli_stmt_free_result(object stmt)","Free stored result memory for the given statement handle"],mysqli_stmt_get_result:["object mysqli_stmt_get_result(object link)","Buffer result set on client"],mysqli_stmt_get_warnings:["object mysqli_stmt_get_warnings(object link)",""],mysqli_stmt_init:["mixed mysqli_stmt_init(object link)","Initialize statement object"],mysqli_stmt_insert_id:["mixed mysqli_stmt_insert_id(object stmt)","Get the ID generated from the previous INSERT operation"],mysqli_stmt_next_result:["bool mysqli_stmt_next_result(object link)","read next result from multi_query"],mysqli_stmt_num_rows:["mixed mysqli_stmt_num_rows(object stmt)","Return the number of rows in statements result set"],mysqli_stmt_param_count:["int mysqli_stmt_param_count(object stmt)","Return the number of parameter for the given statement"],mysqli_stmt_prepare:["bool mysqli_stmt_prepare(object stmt, string query)","prepare server side statement with query"],mysqli_stmt_reset:["bool mysqli_stmt_reset(object stmt)","reset a prepared statement"],mysqli_stmt_result_metadata:["mixed mysqli_stmt_result_metadata(object stmt)","return result set from statement"],mysqli_stmt_send_long_data:["bool mysqli_stmt_send_long_data(object stmt, int param_nr, string data)",""],mysqli_stmt_sqlstate:["string mysqli_stmt_sqlstate(object stmt)",""],mysqli_stmt_store_result:["bool mysqli_stmt_store_result(stmt)",""],mysqli_store_result:["object mysqli_store_result(object link)","Buffer result set on client"],mysqli_thread_id:["int mysqli_thread_id(object link)","Return the current thread ID"],mysqli_thread_safe:["bool mysqli_thread_safe()","Return whether thread safety is given or not"],mysqli_use_result:["mixed mysqli_use_result(object link)","Directly retrieve query results - do not buffer results on client side"],mysqli_warning_count:["int mysqli_warning_count(object link)","Return number of warnings from the last query for the given link"],natcasesort:["void natcasesort(array &array_arg)","Sort an array using case-insensitive natural sort"],natsort:["void natsort(array &array_arg)","Sort an array using natural sort"],next:["mixed next(array array_arg)","Move array argument's internal pointer to the next element and return it"],ngettext:["string ngettext(string MSGID1, string MSGID2, int N)","Plural version of gettext()"],nl2br:["string nl2br(string str [, bool is_xhtml])","Converts newlines to HTML line breaks"],nl_langinfo:["string nl_langinfo(int item)","Query language and locale information"],normalizer_is_normalize:["bool normalizer_is_normalize( string $input [, string $form = FORM_C] )","* Test if a string is in a given normalization form."],normalizer_normalize:["string normalizer_normalize( string $input [, string $form = FORM_C] )","* Normalize a string."],nsapi_request_headers:["array nsapi_request_headers()","Get all headers from the request"],nsapi_response_headers:["array nsapi_response_headers()","Get all headers from the response"],nsapi_virtual:["bool nsapi_virtual(string uri)","Perform an NSAPI sub-request"],number_format:["string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])","Formats a number with grouped thousands"],numfmt_create:["NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )","* Create number formatter."],numfmt_format:["mixed numfmt_format( NumberFormatter $nf, mixed $num[, int type] )","* Format a number."],numfmt_format_currency:["mixed numfmt_format_currency( NumberFormatter $nf, double $num, string $currency )","* Format a number as currency."],numfmt_get_attribute:["mixed numfmt_get_attribute( NumberFormatter $nf, int $attr )","* Get formatter attribute value."],numfmt_get_error_code:["int numfmt_get_error_code( NumberFormatter $nf )","* Get formatter's last error code."],numfmt_get_error_message:["string numfmt_get_error_message( NumberFormatter $nf )","* Get text description for formatter's last error code."],numfmt_get_locale:["string numfmt_get_locale( NumberFormatter $nf[, int type] )","* Get formatter locale."],numfmt_get_pattern:["string numfmt_get_pattern( NumberFormatter $nf )","* Get formatter pattern."],numfmt_get_symbol:["string numfmt_get_symbol( NumberFormatter $nf, int $attr )","* Get formatter symbol value."],numfmt_get_text_attribute:["string numfmt_get_text_attribute( NumberFormatter $nf, int $attr )","* Get formatter attribute value."],numfmt_parse:["mixed numfmt_parse( NumberFormatter $nf, string $str[, int $type, int &$position ])","* Parse a number."],numfmt_parse_currency:["double numfmt_parse_currency( NumberFormatter $nf, string $str, string $¤cy[, int $&position] )","* Parse a number as currency."],numfmt_parse_message:["array numfmt_parse_message( string $locale, string $pattern, string $source )","* Parse a message."],numfmt_set_attribute:["bool numfmt_set_attribute( NumberFormatter $nf, int $attr, mixed $value )","* Get formatter attribute value."],numfmt_set_pattern:["bool numfmt_set_pattern( NumberFormatter $nf, string $pattern )","* Set formatter pattern."],numfmt_set_symbol:["bool numfmt_set_symbol( NumberFormatter $nf, int $attr, string $symbol )","* Set formatter symbol value."],numfmt_set_text_attribute:["bool numfmt_set_text_attribute( NumberFormatter $nf, int $attr, string $value )","* Get formatter attribute value."],ob_clean:["bool ob_clean()","Clean (delete) the current output buffer"],ob_end_clean:["bool ob_end_clean()","Clean the output buffer, and delete current output buffer"],ob_end_flush:["bool ob_end_flush()","Flush (send) the output buffer, and delete current output buffer"],ob_flush:["bool ob_flush()","Flush (send) contents of the output buffer. The last buffer content is sent to next buffer"],ob_get_clean:["bool ob_get_clean()","Get current buffer contents and delete current output buffer"],ob_get_contents:["string ob_get_contents()","Return the contents of the output buffer"],ob_get_flush:["bool ob_get_flush()","Get current buffer contents, flush (send) the output buffer, and delete current output buffer"],ob_get_length:["int ob_get_length()","Return the length of the output buffer"],ob_get_level:["int ob_get_level()","Return the nesting level of the output buffer"],ob_get_status:["false|array ob_get_status([bool full_status])","Return the status of the active or all output buffers"],ob_gzhandler:["string ob_gzhandler(string str, int mode)","Encode str based on accept-encoding setting - designed to be called from ob_start()"],ob_iconv_handler:["string ob_iconv_handler(string contents, int status)","Returns str in output buffer converted to the iconv.output_encoding character set"],ob_implicit_flush:["void ob_implicit_flush([int flag])","Turn implicit flush on/off and is equivalent to calling flush() after every output call"],ob_list_handlers:["false|array ob_list_handlers()","* List all output_buffers in an array"],ob_start:["bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])","Turn on Output Buffering (specifying an optional output handler)."],oci_bind_array_by_name:["bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]])","Bind a PHP array to an Oracle PL/SQL type by name"],oci_bind_by_name:["bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]])","Bind a PHP variable to an Oracle placeholder by name"],oci_cancel:["bool oci_cancel(resource stmt)","Cancel reading from a cursor"],oci_close:["bool oci_close(resource connection)","Disconnect from database"],oci_collection_append:["bool oci_collection_append(string value)","Append an object to the collection"],oci_collection_assign:["bool oci_collection_assign(object from)","Assign a collection from another existing collection"],oci_collection_element_assign:["bool oci_collection_element_assign(int index, string val)","Assign element val to collection at index ndx"],oci_collection_element_get:["string oci_collection_element_get(int ndx)","Retrieve the value at collection index ndx"],oci_collection_max:["int oci_collection_max()","Return the max value of a collection. For a varray this is the maximum length of the array"],oci_collection_size:["int oci_collection_size()","Return the size of a collection"],oci_collection_trim:["bool oci_collection_trim(int num)","Trim num elements from the end of a collection"],oci_commit:["bool oci_commit(resource connection)","Commit the current context"],oci_connect:["resource oci_connect(string user, string pass [, string db [, string charset [, int session_mode ]])","Connect to an Oracle database and log on. Returns a new session."],oci_define_by_name:["bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])","Define a PHP variable to an Oracle column by name"],oci_error:["array oci_error([resource stmt|connection|global])","Return the last error of stmt|connection|global. If no error happened returns false."],oci_execute:["bool oci_execute(resource stmt [, int mode])","Execute a parsed statement"],oci_fetch:["bool oci_fetch(resource stmt)","Prepare a new row of data for reading"],oci_fetch_all:["int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]])","Fetch all rows of result data into an array"],oci_fetch_array:["array oci_fetch_array( resource stmt [, int mode ])","Fetch a result row as an array"],oci_fetch_assoc:["array oci_fetch_assoc( resource stmt )","Fetch a result row as an associative array"],oci_fetch_object:["object oci_fetch_object( resource stmt )","Fetch a result row as an object"],oci_fetch_row:["array oci_fetch_row( resource stmt )","Fetch a result row as an enumerated array"],oci_field_is_null:["bool oci_field_is_null(resource stmt, int col)","Tell whether a column is NULL"],oci_field_name:["string oci_field_name(resource stmt, int col)","Tell the name of a column"],oci_field_precision:["int oci_field_precision(resource stmt, int col)","Tell the precision of a column"],oci_field_scale:["int oci_field_scale(resource stmt, int col)","Tell the scale of a column"],oci_field_size:["int oci_field_size(resource stmt, int col)","Tell the maximum data size of a column"],oci_field_type:["mixed oci_field_type(resource stmt, int col)","Tell the data type of a column"],oci_field_type_raw:["int oci_field_type_raw(resource stmt, int col)","Tell the raw oracle data type of a column"],oci_free_collection:["bool oci_free_collection()","Deletes collection object"],oci_free_descriptor:["bool oci_free_descriptor()","Deletes large object description"],oci_free_statement:["bool oci_free_statement(resource stmt)","Free all resources associated with a statement"],oci_internal_debug:["void oci_internal_debug(int onoff)","Toggle internal debugging output for the OCI extension"],oci_lob_append:["bool oci_lob_append( object lob )","Appends data from a LOB to another LOB"],oci_lob_close:["bool oci_lob_close()","Closes lob descriptor"],oci_lob_copy:["bool oci_lob_copy( object lob_to, object lob_from [, int length ] )","Copies data from a LOB to another LOB"],oci_lob_eof:["bool oci_lob_eof()","Checks if EOF is reached"],oci_lob_erase:["int oci_lob_erase( [ int offset [, int length ] ] )","Erases a specified portion of the internal LOB, starting at a specified offset"],oci_lob_export:["bool oci_lob_export([string filename [, int start [, int length]]])","Writes a large object into a file"],oci_lob_flush:["bool oci_lob_flush( [ int flag ] )","Flushes the LOB buffer"],oci_lob_import:["bool oci_lob_import( string filename )","Loads file into a LOB"],oci_lob_is_equal:["bool oci_lob_is_equal( object lob1, object lob2 )","Tests to see if two LOB/FILE locators are equal"],oci_lob_load:["string oci_lob_load()","Loads a large object"],oci_lob_read:["string oci_lob_read( int length )","Reads particular part of a large object"],oci_lob_rewind:["bool oci_lob_rewind()","Rewind pointer of a LOB"],oci_lob_save:["bool oci_lob_save( string data [, int offset ])","Saves a large object"],oci_lob_seek:["bool oci_lob_seek( int offset [, int whence ])","Moves the pointer of a LOB"],oci_lob_size:["int oci_lob_size()","Returns size of a large object"],oci_lob_tell:["int oci_lob_tell()","Tells LOB pointer position"],oci_lob_truncate:["bool oci_lob_truncate( [ int length ])","Truncates a LOB"],oci_lob_write:["int oci_lob_write( string string [, int length ])","Writes data to current position of a LOB"],oci_lob_write_temporary:["bool oci_lob_write_temporary(string var [, int lob_type])","Writes temporary blob"],oci_new_collection:["object oci_new_collection(resource connection, string tdo [, string schema])","Initialize a new collection"],oci_new_connect:["resource oci_new_connect(string user, string pass [, string db])","Connect to an Oracle database and log on. Returns a new session."],oci_new_cursor:["resource oci_new_cursor(resource connection)","Return a new cursor (Statement-Handle) - use this to bind ref-cursors!"],oci_new_descriptor:["object oci_new_descriptor(resource connection [, int type])","Initialize a new empty descriptor LOB/FILE (LOB is default)"],oci_num_fields:["int oci_num_fields(resource stmt)","Return the number of result columns in a statement"],oci_num_rows:["int oci_num_rows(resource stmt)","Return the row count of an OCI statement"],oci_parse:["resource oci_parse(resource connection, string query)","Parse a query and return a statement"],oci_password_change:["bool oci_password_change(resource connection, string username, string old_password, string new_password)","Changes the password of an account"],oci_pconnect:["resource oci_pconnect(string user, string pass [, string db [, string charset ]])","Connect to an Oracle database using a persistent connection and log on. Returns a new session."],oci_result:["string oci_result(resource stmt, mixed column)","Return a single column of result data"],oci_rollback:["bool oci_rollback(resource connection)","Rollback the current context"],oci_server_version:["string oci_server_version(resource connection)","Return a string containing server version information"],oci_set_action:["bool oci_set_action(resource connection, string value)","Sets the action attribute on the connection"],oci_set_client_identifier:["bool oci_set_client_identifier(resource connection, string value)","Sets the client identifier attribute on the connection"],oci_set_client_info:["bool oci_set_client_info(resource connection, string value)","Sets the client info attribute on the connection"],oci_set_edition:["bool oci_set_edition(string value)","Sets the edition attribute for all subsequent connections created"],oci_set_module_name:["bool oci_set_module_name(resource connection, string value)","Sets the module attribute on the connection"],oci_set_prefetch:["bool oci_set_prefetch(resource stmt, int prefetch_rows)","Sets the number of rows to be prefetched on execute to prefetch_rows for stmt"],oci_statement_type:["string oci_statement_type(resource stmt)","Return the query type of an OCI statement"],ocifetchinto:["int ocifetchinto(resource stmt, array &output [, int mode])","Fetch a row of result data into an array"],ocigetbufferinglob:["bool ocigetbufferinglob()","Returns current state of buffering for a LOB"],ocisetbufferinglob:["bool ocisetbufferinglob( bool flag )","Enables/disables buffering for a LOB"],octdec:["int octdec(string octal_number)","Returns the decimal equivalent of an octal string"],odbc_autocommit:["mixed odbc_autocommit(resource connection_id [, int OnOff])","Toggle autocommit mode or get status"],odbc_binmode:["bool odbc_binmode(int result_id, int mode)","Handle binary column data"],odbc_close:["void odbc_close(resource connection_id)","Close an ODBC connection"],odbc_close_all:["void odbc_close_all()","Close all ODBC connections"],odbc_columnprivileges:["resource odbc_columnprivileges(resource connection_id, string catalog, string schema, string table, string column)","Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table"],odbc_columns:["resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])","Returns a result identifier that can be used to fetch a list of column names in specified tables"],odbc_commit:["bool odbc_commit(resource connection_id)","Commit an ODBC transaction"],odbc_connect:["resource odbc_connect(string DSN, string user, string password [, int cursor_option])","Connect to a datasource"],odbc_cursor:["string odbc_cursor(resource result_id)","Get cursor name"],odbc_data_source:["array odbc_data_source(resource connection_id, int fetch_type)","Return information about the currently connected data source"],odbc_error:["string odbc_error([resource connection_id])","Get the last error code"],odbc_errormsg:["string odbc_errormsg([resource connection_id])","Get the last error message"],odbc_exec:["resource odbc_exec(resource connection_id, string query [, int flags])","Prepare and execute an SQL statement"],odbc_execute:["bool odbc_execute(resource result_id [, array parameters_array])","Execute a prepared statement"],odbc_fetch_array:["array odbc_fetch_array(int result [, int rownumber])","Fetch a result row as an associative array"],odbc_fetch_into:["int odbc_fetch_into(resource result_id, array &result_array, [, int rownumber])","Fetch one result row into an array"],odbc_fetch_object:["object odbc_fetch_object(int result [, int rownumber])","Fetch a result row as an object"],odbc_fetch_row:["bool odbc_fetch_row(resource result_id [, int row_number])","Fetch a row"],odbc_field_len:["int odbc_field_len(resource result_id, int field_number)","Get the length (precision) of a column"],odbc_field_name:["string odbc_field_name(resource result_id, int field_number)","Get a column name"],odbc_field_num:["int odbc_field_num(resource result_id, string field_name)","Return column number"],odbc_field_scale:["int odbc_field_scale(resource result_id, int field_number)","Get the scale of a column"],odbc_field_type:["string odbc_field_type(resource result_id, int field_number)","Get the datatype of a column"],odbc_foreignkeys:["resource odbc_foreignkeys(resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)","Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table"],odbc_free_result:["bool odbc_free_result(resource result_id)","Free resources associated with a result"],odbc_gettypeinfo:["resource odbc_gettypeinfo(resource connection_id [, int data_type])","Returns a result identifier containing information about data types supported by the data source"],odbc_longreadlen:["bool odbc_longreadlen(int result_id, int length)","Handle LONG columns"],odbc_next_result:["bool odbc_next_result(resource result_id)","Checks if multiple results are avaiable"],odbc_num_fields:["int odbc_num_fields(resource result_id)","Get number of columns in a result"],odbc_num_rows:["int odbc_num_rows(resource result_id)","Get number of rows in a result"],odbc_pconnect:["resource odbc_pconnect(string DSN, string user, string password [, int cursor_option])","Establish a persistent connection to a datasource"],odbc_prepare:["resource odbc_prepare(resource connection_id, string query)","Prepares a statement for execution"],odbc_primarykeys:["resource odbc_primarykeys(resource connection_id, string qualifier, string owner, string table)","Returns a result identifier listing the column names that comprise the primary key for a table"],odbc_procedurecolumns:["resource odbc_procedurecolumns(resource connection_id [, string qualifier, string owner, string proc, string column])","Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures"],odbc_procedures:["resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])","Returns a result identifier containg the list of procedure names in a datasource"],odbc_result:["mixed odbc_result(resource result_id, mixed field)","Get result data"],odbc_result_all:["int odbc_result_all(resource result_id [, string format])","Print result as HTML table"],odbc_rollback:["bool odbc_rollback(resource connection_id)","Rollback a transaction"],odbc_setoption:["bool odbc_setoption(resource conn_id|result_id, int which, int option, int value)","Sets connection or statement options"],odbc_specialcolumns:["resource odbc_specialcolumns(resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)","Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction"],odbc_statistics:["resource odbc_statistics(resource connection_id, string qualifier, string owner, string name, int unique, int accuracy)","Returns a result identifier that contains statistics about a single table and the indexes associated with the table"],odbc_tableprivileges:["resource odbc_tableprivileges(resource connection_id, string qualifier, string owner, string name)","Returns a result identifier containing a list of tables and the privileges associated with each table"],odbc_tables:["resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])","Call the SQLTables function"],opendir:["mixed opendir(string path[, resource context])","Open a directory and return a dir_handle"],openlog:["bool openlog(string ident, int option, int facility)","Open connection to system logger"],openssl_csr_export:["bool openssl_csr_export(resource csr, string &out [, bool notext=true])","Exports a CSR to file or a var"],openssl_csr_export_to_file:["bool openssl_csr_export_to_file(resource csr, string outfilename [, bool notext=true])","Exports a CSR to file"],openssl_csr_get_public_key:["mixed openssl_csr_get_public_key(mixed csr)","Returns the subject of a CERT or FALSE on error"],openssl_csr_get_subject:["mixed openssl_csr_get_subject(mixed csr)","Returns the subject of a CERT or FALSE on error"],openssl_csr_new:["bool openssl_csr_new(array dn, resource &privkey [, array configargs [, array extraattribs]])","Generates a privkey and CSR"],openssl_csr_sign:["resource openssl_csr_sign(mixed csr, mixed x509, mixed priv_key, long days [, array config_args [, long serial]])","Signs a cert with another CERT"],openssl_decrypt:["string openssl_decrypt(string data, string method, string password [, bool raw_input=false])","Takes raw or base64 encoded string and dectupt it using given method and key"],openssl_dh_compute_key:["string openssl_dh_compute_key(string pub_key, resource dh_key)","Computes shared sicret for public value of remote DH key and local DH key"],openssl_digest:["string openssl_digest(string data, string method [, bool raw_output=false])","Computes digest hash value for given data using given method, returns raw or binhex encoded string"],openssl_encrypt:["string openssl_encrypt(string data, string method, string password [, bool raw_output=false])","Encrypts given data with given method and key, returns raw or base64 encoded string"],openssl_error_string:["mixed openssl_error_string()","Returns a description of the last error, and alters the index of the error messages. Returns false when the are no more messages"],openssl_get_cipher_methods:["array openssl_get_cipher_methods([bool aliases = false])","Return array of available cipher methods"],openssl_get_md_methods:["array openssl_get_md_methods([bool aliases = false])","Return array of available digest methods"],openssl_open:["bool openssl_open(string data, &string opendata, string ekey, mixed privkey)","Opens data"],openssl_pkcs12_export:["bool openssl_pkcs12_export(mixed x509, string &out, mixed priv_key, string pass[, array args])","Creates and exports a PKCS12 to a var"],openssl_pkcs12_export_to_file:["bool openssl_pkcs12_export_to_file(mixed x509, string filename, mixed priv_key, string pass[, array args])","Creates and exports a PKCS to file"],openssl_pkcs12_read:["bool openssl_pkcs12_read(string PKCS12, array &certs, string pass)","Parses a PKCS12 to an array"],openssl_pkcs7_decrypt:["bool openssl_pkcs7_decrypt(string infilename, string outfilename, mixed recipcert [, mixed recipkey])","Decrypts the S/MIME message in the file name infilename and output the results to the file name outfilename. recipcert is a CERT for one of the recipients. recipkey specifies the private key matching recipcert, if recipcert does not include the key"],openssl_pkcs7_encrypt:["bool openssl_pkcs7_encrypt(string infile, string outfile, mixed recipcerts, array headers [, long flags [, long cipher]])","Encrypts the message in the file named infile with the certificates in recipcerts and output the result to the file named outfile"],openssl_pkcs7_sign:["bool openssl_pkcs7_sign(string infile, string outfile, mixed signcert, mixed signkey, array headers [, long flags [, string extracertsfilename]])","Signs the MIME message in the file named infile with signcert/signkey and output the result to file name outfile. headers lists plain text headers to exclude from the signed portion of the message, and should include to, from and subject as a minimum"],openssl_pkcs7_verify:["bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])","Verifys that the data block is intact, the signer is who they say they are, and returns the CERTs of the signers"],openssl_pkey_export:["bool openssl_pkey_export(mixed key, &mixed out [, string passphrase [, array config_args]])","Gets an exportable representation of a key into a string or file"],openssl_pkey_export_to_file:["bool openssl_pkey_export_to_file(mixed key, string outfilename [, string passphrase, array config_args)","Gets an exportable representation of a key into a file"],openssl_pkey_free:["void openssl_pkey_free(int key)","Frees a key"],openssl_pkey_get_details:["resource openssl_pkey_get_details(resource key)","returns an array with the key details (bits, pkey, type)"],openssl_pkey_get_private:["int openssl_pkey_get_private(string key [, string passphrase])","Gets private keys"],openssl_pkey_get_public:["int openssl_pkey_get_public(mixed cert)","Gets public key from X.509 certificate"],openssl_pkey_new:["resource openssl_pkey_new([array configargs])","Generates a new private key"],openssl_private_decrypt:["bool openssl_private_decrypt(string data, string &decrypted, mixed key [, int padding])","Decrypts data with private key"],openssl_private_encrypt:["bool openssl_private_encrypt(string data, string &crypted, mixed key [, int padding])","Encrypts data with private key"],openssl_public_decrypt:["bool openssl_public_decrypt(string data, string &crypted, resource key [, int padding])","Decrypts data with public key"],openssl_public_encrypt:["bool openssl_public_encrypt(string data, string &crypted, mixed key [, int padding])","Encrypts data with public key"],openssl_random_pseudo_bytes:["string openssl_random_pseudo_bytes(integer length [, &bool returned_strong_result])","Returns a string of the length specified filled with random pseudo bytes"],openssl_seal:["int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys)","Seals data"],openssl_sign:["bool openssl_sign(string data, &string signature, mixed key[, mixed method])","Signs data"],openssl_verify:["int openssl_verify(string data, string signature, mixed key[, mixed method])","Verifys data"],openssl_x509_check_private_key:["bool openssl_x509_check_private_key(mixed cert, mixed key)","Checks if a private key corresponds to a CERT"],openssl_x509_checkpurpose:["int openssl_x509_checkpurpose(mixed x509cert, int purpose, array cainfo [, string untrustedfile])","Checks the CERT to see if it can be used for the purpose in purpose. cainfo holds information about trusted CAs"],openssl_x509_export:["bool openssl_x509_export(mixed x509, string &out [, bool notext = true])","Exports a CERT to file or a var"],openssl_x509_export_to_file:["bool openssl_x509_export_to_file(mixed x509, string outfilename [, bool notext = true])","Exports a CERT to file or a var"],openssl_x509_free:["void openssl_x509_free(resource x509)","Frees X.509 certificates"],openssl_x509_parse:["array openssl_x509_parse(mixed x509 [, bool shortnames=true])","Returns an array of the fields/values of the CERT"],openssl_x509_read:["resource openssl_x509_read(mixed cert)","Reads X.509 certificates"],ord:["int ord(string character)","Returns ASCII value of character"],output_add_rewrite_var:["bool output_add_rewrite_var(string name, string value)","Add URL rewriter values"],output_reset_rewrite_vars:["bool output_reset_rewrite_vars()","Reset(clear) URL rewriter values"],pack:["string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])","Takes one or more arguments and packs them into a binary string according to the format argument"],parse_ini_file:["array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])","Parse configuration file"],parse_ini_string:["array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])","Parse configuration string"],parse_locale:["static array parse_locale($locale)","* parses a locale-id into an array the different parts of it"],parse_str:["void parse_str(string encoded_string [, array result])","Parses GET/POST/COOKIE data and sets global variables"],parse_url:["mixed parse_url(string url, [int url_component])","Parse a URL and return its components"],passthru:["void passthru(string command [, int &return_value])","Execute an external program and display raw output"],pathinfo:["array pathinfo(string path[, int options])","Returns information about a certain string"],pclose:["int pclose(resource fp)","Close a file pointer opened by popen()"],pcnlt_sigwaitinfo:["int pcnlt_sigwaitinfo(array set[, array &siginfo])","Synchronously wait for queued signals"],pcntl_alarm:["int pcntl_alarm(int seconds)","Set an alarm clock for delivery of a signal"],pcntl_exec:["bool pcntl_exec(string path [, array args [, array envs]])","Executes specified program in current process space as defined by exec(2)"],pcntl_fork:["int pcntl_fork()","Forks the currently running process following the same behavior as the UNIX fork() system call"],pcntl_getpriority:["int pcntl_getpriority([int pid [, int process_identifier]])","Get the priority of any process"],pcntl_setpriority:["bool pcntl_setpriority(int priority [, int pid [, int process_identifier]])","Change the priority of any process"],pcntl_signal:["bool pcntl_signal(int signo, callback handle [, bool restart_syscalls])","Assigns a system signal handler to a PHP function"],pcntl_signal_dispatch:["bool pcntl_signal_dispatch()","Dispatch signals to signal handlers"],pcntl_sigprocmask:["bool pcntl_sigprocmask(int how, array set[, array &oldset])","Examine and change blocked signals"],pcntl_sigtimedwait:["int pcntl_sigtimedwait(array set[, array &siginfo[, int seconds[, int nanoseconds]]])","Wait for queued signals"],pcntl_wait:["int pcntl_wait(int &status)","Waits on or returns the status of a forked child as defined by the waitpid() system call"],pcntl_waitpid:["int pcntl_waitpid(int pid, int &status, int options)","Waits on or returns the status of a forked child as defined by the waitpid() system call"],pcntl_wexitstatus:["int pcntl_wexitstatus(int status)","Returns the status code of a child's exit"],pcntl_wifexited:["bool pcntl_wifexited(int status)","Returns true if the child status code represents a successful exit"],pcntl_wifsignaled:["bool pcntl_wifsignaled(int status)","Returns true if the child status code represents a process that was terminated due to a signal"],pcntl_wifstopped:["bool pcntl_wifstopped(int status)","Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid)"],pcntl_wstopsig:["int pcntl_wstopsig(int status)","Returns the number of the signal that caused the process to stop who's status code is passed"],pcntl_wtermsig:["int pcntl_wtermsig(int status)","Returns the number of the signal that terminated the process who's status code is passed"],pdo_drivers:["array pdo_drivers()","Return array of available PDO drivers"],pfsockopen:["resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])","Open persistent Internet or Unix domain socket connection"],pg_affected_rows:["int pg_affected_rows(resource result)","Returns the number of affected tuples"],pg_cancel_query:["bool pg_cancel_query(resource connection)","Cancel request"],pg_client_encoding:["string pg_client_encoding([resource connection])","Get the current client encoding"],pg_close:["bool pg_close([resource connection])","Close a PostgreSQL connection"],pg_connect:["resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database)","Open a PostgreSQL connection"],pg_connection_busy:["bool pg_connection_busy(resource connection)","Get connection is busy or not"],pg_connection_reset:["bool pg_connection_reset(resource connection)","Reset connection (reconnect)"],pg_connection_status:["int pg_connection_status(resource connnection)","Get connection status"],pg_convert:["array pg_convert(resource db, string table, array values[, int options])","Check and convert values for PostgreSQL SQL statement"],pg_copy_from:["bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]])","Copy table from array"],pg_copy_to:["array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]])","Copy table to array"],pg_dbname:["string pg_dbname([resource connection])","Get the database name"],pg_delete:["mixed pg_delete(resource db, string table, array ids[, int options])","Delete records has ids (id => value)"],pg_end_copy:["bool pg_end_copy([resource connection])","Sync with backend. Completes the Copy command"],pg_escape_bytea:["string pg_escape_bytea([resource connection,] string data)","Escape binary for bytea type"],pg_escape_string:["string pg_escape_string([resource connection,] string data)","Escape string for text/char type"],pg_execute:["resource pg_execute([resource connection,] string stmtname, array params)","Execute a prepared query"],pg_fetch_all:["array pg_fetch_all(resource result)","Fetch all rows into array"],pg_fetch_all_columns:["array pg_fetch_all_columns(resource result [, int column_number])","Fetch all rows into array"],pg_fetch_array:["array pg_fetch_array(resource result [, int row [, int result_type]])","Fetch a row as an array"],pg_fetch_assoc:["array pg_fetch_assoc(resource result [, int row])","Fetch a row as an assoc array"],pg_fetch_object:["object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]])","Fetch a row as an object"],pg_fetch_result:["mixed pg_fetch_result(resource result, [int row_number,] mixed field_name)","Returns values from a result identifier"],pg_fetch_row:["array pg_fetch_row(resource result [, int row [, int result_type]])","Get a row as an enumerated array"],pg_field_is_null:["int pg_field_is_null(resource result, [int row,] mixed field_name_or_number)","Test if a field is NULL"],pg_field_name:["string pg_field_name(resource result, int field_number)","Returns the name of the field"],pg_field_num:["int pg_field_num(resource result, string field_name)","Returns the field number of the named field"],pg_field_prtlen:["int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number)","Returns the printed length"],pg_field_size:["int pg_field_size(resource result, int field_number)","Returns the internal size of the field"],pg_field_table:["mixed pg_field_table(resource result, int field_number[, bool oid_only])","Returns the name of the table field belongs to, or table's oid if oid_only is true"],pg_field_type:["string pg_field_type(resource result, int field_number)","Returns the type name for the given field"],pg_field_type_oid:["string pg_field_type_oid(resource result, int field_number)","Returns the type oid for the given field"],pg_free_result:["bool pg_free_result(resource result)","Free result memory"],pg_get_notify:["array pg_get_notify([resource connection[, result_type]])","Get asynchronous notification"],pg_get_pid:["int pg_get_pid([resource connection)","Get backend(server) pid"],pg_get_result:["resource pg_get_result(resource connection)","Get asynchronous query result"],pg_host:["string pg_host([resource connection])","Returns the host name associated with the connection"],pg_insert:["mixed pg_insert(resource db, string table, array values[, int options])","Insert values (filed => value) to table"],pg_last_error:["string pg_last_error([resource connection])","Get the error message string"],pg_last_notice:["string pg_last_notice(resource connection)","Returns the last notice set by the backend"],pg_last_oid:["string pg_last_oid(resource result)","Returns the last object identifier"],pg_lo_close:["bool pg_lo_close(resource large_object)","Close a large object"],pg_lo_create:["mixed pg_lo_create([resource connection],[mixed large_object_oid])","Create a large object"],pg_lo_export:["bool pg_lo_export([resource connection, ] int objoid, string filename)","Export large object direct to filesystem"],pg_lo_import:["int pg_lo_import([resource connection, ] string filename [, mixed oid])","Import large object direct from filesystem"],pg_lo_open:["resource pg_lo_open([resource connection,] int large_object_oid, string mode)","Open a large object and return fd"],pg_lo_read:["string pg_lo_read(resource large_object [, int len])","Read a large object"],pg_lo_read_all:["int pg_lo_read_all(resource large_object)","Read a large object and send straight to browser"],pg_lo_seek:["bool pg_lo_seek(resource large_object, int offset [, int whence])","Seeks position of large object"],pg_lo_tell:["int pg_lo_tell(resource large_object)","Returns current position of large object"],pg_lo_unlink:["bool pg_lo_unlink([resource connection,] string large_object_oid)","Delete a large object"],pg_lo_write:["int pg_lo_write(resource large_object, string buf [, int len])","Write a large object"],pg_meta_data:["array pg_meta_data(resource db, string table)","Get meta_data"],pg_num_fields:["int pg_num_fields(resource result)","Return the number of fields in the result"],pg_num_rows:["int pg_num_rows(resource result)","Return the number of rows in the result"],pg_options:["string pg_options([resource connection])","Get the options associated with the connection"],pg_parameter_status:["string|false pg_parameter_status([resource connection,] string param_name)","Returns the value of a server parameter"],pg_pconnect:["resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database)","Open a persistent PostgreSQL connection"],pg_ping:["bool pg_ping([resource connection])","Ping database. If connection is bad, try to reconnect."],pg_port:["int pg_port([resource connection])","Return the port number associated with the connection"],pg_prepare:["resource pg_prepare([resource connection,] string stmtname, string query)","Prepare a query for future execution"],pg_put_line:["bool pg_put_line([resource connection,] string query)","Send null-terminated string to backend server"],pg_query:["resource pg_query([resource connection,] string query)","Execute a query"],pg_query_params:["resource pg_query_params([resource connection,] string query, array params)","Execute a query"],pg_result_error:["string pg_result_error(resource result)","Get error message associated with result"],pg_result_error_field:["string pg_result_error_field(resource result, int fieldcode)","Get error message field associated with result"],pg_result_seek:["bool pg_result_seek(resource result, int offset)","Set internal row offset"],pg_result_status:["mixed pg_result_status(resource result[, long result_type])","Get status of query result"],pg_select:["mixed pg_select(resource db, string table, array ids[, int options])","Select records that has ids (id => value)"],pg_send_execute:["bool pg_send_execute(resource connection, string stmtname, array params)","Executes prevriously prepared stmtname asynchronously"],pg_send_prepare:["bool pg_send_prepare(resource connection, string stmtname, string query)","Asynchronously prepare a query for future execution"],pg_send_query:["bool pg_send_query(resource connection, string query)","Send asynchronous query"],pg_send_query_params:["bool pg_send_query_params(resource connection, string query, array params)","Send asynchronous parameterized query"],pg_set_client_encoding:["int pg_set_client_encoding([resource connection,] string encoding)","Set client encoding"],pg_set_error_verbosity:["int pg_set_error_verbosity([resource connection,] int verbosity)","Set error verbosity"],pg_trace:["bool pg_trace(string filename [, string mode [, resource connection]])","Enable tracing a PostgreSQL connection"],pg_transaction_status:["int pg_transaction_status(resource connnection)","Get transaction status"],pg_tty:["string pg_tty([resource connection])","Return the tty name associated with the connection"],pg_unescape_bytea:["string pg_unescape_bytea(string data)","Unescape binary for bytea type"],pg_untrace:["bool pg_untrace([resource connection])","Disable tracing of a PostgreSQL connection"],pg_update:["mixed pg_update(resource db, string table, array fields, array ids[, int options])","Update table using values (field => value) and ids (id => value)"],pg_version:["array pg_version([resource connection])","Returns an array with client, protocol and server version (when available)"],php_egg_logo_guid:["string php_egg_logo_guid()","Return the special ID used to request the PHP logo in phpinfo screens"],php_ini_loaded_file:["string php_ini_loaded_file()","Return the actual loaded ini filename"],php_ini_scanned_files:["string php_ini_scanned_files()","Return comma-separated string of .ini files parsed from the additional ini dir"],php_logo_guid:["string php_logo_guid()","Return the special ID used to request the PHP logo in phpinfo screens"],php_real_logo_guid:["string php_real_logo_guid()","Return the special ID used to request the PHP logo in phpinfo screens"],php_sapi_name:["string php_sapi_name()","Return the current SAPI module name"],php_snmpv3:["void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st)","* * Generic SNMPv3 object fetcher * From here is passed on the the common internal object fetcher. * * st=SNMP_CMD_GET snmp3_get() - query an agent and return a single value. * st=SNMP_CMD_GETNEXT snmp3_getnext() - query an agent and return the next single value. * st=SNMP_CMD_WALK snmp3_walk() - walk the mib and return a single dimensional array * containing the values. * st=SNMP_CMD_REALWALK snmp3_real_walk() - walk the mib and return an * array of oid,value pairs. * st=SNMP_CMD_SET snmp3_set() - query an agent and set a single value *"],php_strip_whitespace:["string php_strip_whitespace(string file_name)","Return source with stripped comments and whitespace"],php_uname:["string php_uname()","Return information about the system PHP was built on"],phpcredits:["void phpcredits([int flag])","Prints the list of people who've contributed to the PHP project"],phpinfo:["void phpinfo([int what])","Output a page of useful information about PHP and the current request"],phpversion:["string phpversion([string extension])","Return the current PHP version"],pi:["float pi()","Returns an approximation of pi"],png2wbmp:["bool png2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)","Convert PNG image to WBMP image"],popen:["resource popen(string command, string mode)","Execute a command and open either a read or a write pipe to it"],posix_access:["bool posix_access(string file [, int mode])","Determine accessibility of a file (POSIX.1 5.6.3)"],posix_ctermid:["string posix_ctermid()","Generate terminal path name (POSIX.1, 4.7.1)"],posix_get_last_error:["int posix_get_last_error()","Retrieve the error number set by the last posix function which failed."],posix_getcwd:["string posix_getcwd()","Get working directory pathname (POSIX.1, 5.2.2)"],posix_getegid:["int posix_getegid()","Get the current effective group id (POSIX.1, 4.2.1)"],posix_geteuid:["int posix_geteuid()","Get the current effective user id (POSIX.1, 4.2.1)"],posix_getgid:["int posix_getgid()","Get the current group id (POSIX.1, 4.2.1)"],posix_getgrgid:["array posix_getgrgid(long gid)","Group database access (POSIX.1, 9.2.1)"],posix_getgrnam:["array posix_getgrnam(string groupname)","Group database access (POSIX.1, 9.2.1)"],posix_getgroups:["array posix_getgroups()","Get supplementary group id's (POSIX.1, 4.2.3)"],posix_getlogin:["string posix_getlogin()","Get user name (POSIX.1, 4.2.4)"],posix_getpgid:["int posix_getpgid()","Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)"],posix_getpgrp:["int posix_getpgrp()","Get current process group id (POSIX.1, 4.3.1)"],posix_getpid:["int posix_getpid()","Get the current process id (POSIX.1, 4.1.1)"],posix_getppid:["int posix_getppid()","Get the parent process id (POSIX.1, 4.1.1)"],posix_getpwnam:["array posix_getpwnam(string groupname)","User database access (POSIX.1, 9.2.2)"],posix_getpwuid:["array posix_getpwuid(long uid)","User database access (POSIX.1, 9.2.2)"],posix_getrlimit:["array posix_getrlimit()","Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally)"],posix_getsid:["int posix_getsid()","Get process group id of session leader (This is not a POSIX function, but a SVR4ism, so be compile conditionally)"],posix_getuid:["int posix_getuid()","Get the current user id (POSIX.1, 4.2.1)"],posix_initgroups:["bool posix_initgroups(string name, int base_group_id)","Calculate the group access list for the user specified in name."],posix_isatty:["bool posix_isatty(int fd)","Determine if filedesc is a tty (POSIX.1, 4.7.1)"],posix_kill:["bool posix_kill(int pid, int sig)","Send a signal to a process (POSIX.1, 3.3.2)"],posix_mkfifo:["bool posix_mkfifo(string pathname, int mode)","Make a FIFO special file (POSIX.1, 5.4.2)"],posix_mknod:["bool posix_mknod(string pathname, int mode [, int major [, int minor]])","Make a special or ordinary file (POSIX.1)"],posix_setegid:["bool posix_setegid(long uid)","Set effective group id"],posix_seteuid:["bool posix_seteuid(long uid)","Set effective user id"],posix_setgid:["bool posix_setgid(int uid)","Set group id (POSIX.1, 4.2.2)"],posix_setpgid:["bool posix_setpgid(int pid, int pgid)","Set process group id for job control (POSIX.1, 4.3.3)"],posix_setsid:["int posix_setsid()","Create session and set process group id (POSIX.1, 4.3.2)"],posix_setuid:["bool posix_setuid(long uid)","Set user id (POSIX.1, 4.2.2)"],posix_strerror:["string posix_strerror(int errno)","Retrieve the system error message associated with the given errno."],posix_times:["array posix_times()","Get process times (POSIX.1, 4.5.2)"],posix_ttyname:["string posix_ttyname(int fd)","Determine terminal device name (POSIX.1, 4.7.2)"],posix_uname:["array posix_uname()","Get system name (POSIX.1, 4.4.1)"],pow:["number pow(number base, number exponent)","Returns base raised to the power of exponent. Returns integer result when possible"],preg_filter:["mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])","Perform Perl-style regular expression replacement and only return matches."],preg_grep:["array preg_grep(string regex, array input [, int flags])","Searches array and returns entries which match regex"],preg_last_error:["int preg_last_error()","Returns the error code of the last regexp execution."],preg_match:["int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])","Perform a Perl-style regular expression match"],preg_match_all:["int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]])","Perform a Perl-style global regular expression match"],preg_quote:["string preg_quote(string str [, string delim_char])","Quote regular expression characters plus an optional character"],preg_replace:["mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])","Perform Perl-style regular expression replacement."],preg_replace_callback:["mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])","Perform Perl-style regular expression replacement using replacement callback."],preg_split:["array preg_split(string pattern, string subject [, int limit [, int flags]])","Split string into an array using a perl-style regular expression as a delimiter"],prev:["mixed prev(array array_arg)","Move array argument's internal pointer to the previous element and return it"],print:["int print(string arg)","Output a string"],print_r:["mixed print_r(mixed var [, bool return])","Prints out or returns information about the specified variable"],printf:["int printf(string format [, mixed arg1 [, mixed ...]])","Output a formatted string"],proc_close:["int proc_close(resource process)","close a process opened by proc_open"],proc_get_status:["array proc_get_status(resource process)","get information about a process opened by proc_open"],proc_nice:["bool proc_nice(int priority)","Change the priority of the current process"],proc_open:["resource proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]])","Run a process with more control over it's file descriptors"],proc_terminate:["bool proc_terminate(resource process [, long signal])","kill a process opened by proc_open"],property_exists:["bool property_exists(mixed object_or_class, string property_name)","Checks if the object or class has a property"],pspell_add_to_personal:["bool pspell_add_to_personal(int pspell, string word)","Adds a word to a personal list"],pspell_add_to_session:["bool pspell_add_to_session(int pspell, string word)","Adds a word to the current session"],pspell_check:["bool pspell_check(int pspell, string word)","Returns true if word is valid"],pspell_clear_session:["bool pspell_clear_session(int pspell)","Clears the current session"],pspell_config_create:["int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])","Create a new config to be used later to create a manager"],pspell_config_data_dir:["bool pspell_config_data_dir(int conf, string directory)","location of language data files"],pspell_config_dict_dir:["bool pspell_config_dict_dir(int conf, string directory)","location of the main word list"],pspell_config_ignore:["bool pspell_config_ignore(int conf, int ignore)","Ignore words <= n chars"],pspell_config_mode:["bool pspell_config_mode(int conf, long mode)","Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS)"],pspell_config_personal:["bool pspell_config_personal(int conf, string personal)","Use a personal dictionary for this config"],pspell_config_repl:["bool pspell_config_repl(int conf, string repl)","Use a personal dictionary with replacement pairs for this config"],pspell_config_runtogether:["bool pspell_config_runtogether(int conf, bool runtogether)","Consider run-together words as valid components"],pspell_config_save_repl:["bool pspell_config_save_repl(int conf, bool save)","Save replacement pairs when personal list is saved for this config"],pspell_new:["int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])","Load a dictionary"],pspell_new_config:["int pspell_new_config(int config)","Load a dictionary based on the given config"],pspell_new_personal:["int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])","Load a dictionary with a personal wordlist"],pspell_save_wordlist:["bool pspell_save_wordlist(int pspell)","Saves the current (personal) wordlist"],pspell_store_replacement:["bool pspell_store_replacement(int pspell, string misspell, string correct)","Notify the dictionary of a user-selected replacement"],pspell_suggest:["array pspell_suggest(int pspell, string word)","Returns array of suggestions"],putenv:["bool putenv(string setting)","Set the value of an environment variable"],quoted_printable_decode:["string quoted_printable_decode(string str)","Convert a quoted-printable string to an 8 bit string"],quoted_printable_encode:["string quoted_printable_encode(string str)",""],quotemeta:["string quotemeta(string str)","Quotes meta characters"],rad2deg:["float rad2deg(float number)","Converts the radian number to the equivalent number in degrees"],rand:["int rand([int min, int max])","Returns a random number"],range:["array range(mixed low, mixed high[, int step])","Create an array containing the range of integers or characters from low to high (inclusive)"],rawurldecode:["string rawurldecode(string str)","Decodes URL-encodes string"],rawurlencode:["string rawurlencode(string str)","URL-encodes string"],readdir:["string readdir([resource dir_handle])","Read directory entry from dir_handle"],readfile:["int readfile(string filename [, bool use_include_path[, resource context]])","Output a file or a URL"],readgzfile:["int readgzfile(string filename [, int use_include_path])","Output a .gz-file"],readline:["string readline([string prompt])","Reads a line"],readline_add_history:["bool readline_add_history(string prompt)","Adds a line to the history"],readline_callback_handler_install:["void readline_callback_handler_install(string prompt, mixed callback)","Initializes the readline callback interface and terminal, prints the prompt and returns immediately"],readline_callback_handler_remove:["bool readline_callback_handler_remove()","Removes a previously installed callback handler and restores terminal settings"],readline_callback_read_char:["void readline_callback_read_char()","Informs the readline callback interface that a character is ready for input"],readline_clear_history:["bool readline_clear_history()","Clears the history"],readline_completion_function:["bool readline_completion_function(string funcname)","Readline completion function?"],readline_info:["mixed readline_info([string varname [, string newvalue]])","Gets/sets various internal readline variables."],readline_list_history:["array readline_list_history()","Lists the history"],readline_on_new_line:["void readline_on_new_line()","Inform readline that the cursor has moved to a new line"],readline_read_history:["bool readline_read_history([string filename])","Reads the history"],readline_redisplay:["void readline_redisplay()","Ask readline to redraw the display"],readline_write_history:["bool readline_write_history([string filename])","Writes the history"],readlink:["string readlink(string filename)","Return the target of a symbolic link"],realpath:["string realpath(string path)","Return the resolved path"],realpath_cache_get:["bool realpath_cache_get()","Get current size of realpath cache"],realpath_cache_size:["bool realpath_cache_size()","Get current size of realpath cache"],recode_file:["bool recode_file(string request, resource input, resource output)","Recode file input into file output according to request"],recode_string:["string recode_string(string request, string str)","Recode string str according to request string"],register_shutdown_function:["void register_shutdown_function(string function_name)","Register a user-level function to be called on request termination"],register_tick_function:["bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])","Registers a tick callback function"],rename:["bool rename(string old_name, string new_name[, resource context])","Rename a file"],require:["bool require(string path)","Includes and evaluates the specified file, erroring if the file cannot be included"],require_once:["bool require_once(string path)","Includes and evaluates the specified file, erroring if the file cannot be included"],reset:["mixed reset(array array_arg)","Set array argument's internal pointer to the first element and return it"],restore_error_handler:["void restore_error_handler()","Restores the previously defined error handler function"],restore_exception_handler:["void restore_exception_handler()","Restores the previously defined exception handler function"],restore_include_path:["void restore_include_path()","Restore the value of the include_path configuration option"],rewind:["bool rewind(resource fp)","Rewind the position of a file pointer"],rewinddir:["void rewinddir([resource dir_handle])","Rewind dir_handle back to the start"],rmdir:["bool rmdir(string dirname[, resource context])","Remove a directory"],round:["float round(float number [, int precision [, int mode]])","Returns the number rounded to specified precision"],rsort:["bool rsort(array &array_arg [, int sort_flags])","Sort an array in reverse order"],rtrim:["string rtrim(string str [, string character_mask])","Removes trailing whitespace"],scandir:["array scandir(string dir [, int sorting_order [, resource context]])","List files & directories inside the specified path"],sem_acquire:["bool sem_acquire(resource id)","Acquires the semaphore with the given id, blocking if necessary"],sem_get:["resource sem_get(int key [, int max_acquire [, int perm [, int auto_release]])","Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously"],sem_release:["bool sem_release(resource id)","Releases the semaphore with the given id"],sem_remove:["bool sem_remove(resource id)","Removes semaphore from Unix systems"],serialize:["string serialize(mixed variable)","Returns a string representation of variable (which can later be unserialized)"],session_cache_expire:["int session_cache_expire([int new_cache_expire])","Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire"],session_cache_limiter:["string session_cache_limiter([string new_cache_limiter])","Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter"],session_decode:["bool session_decode(string data)","Deserializes data and reinitializes the variables"],session_destroy:["bool session_destroy()","Destroy the current session and all data associated with it"],session_encode:["string session_encode()","Serializes the current setup and returns the serialized representation"],session_get_cookie_params:["array session_get_cookie_params()","Return the session cookie parameters"],session_id:["string session_id([string newid])","Return the current session id. If newid is given, the session id is replaced with newid"],session_is_registered:["bool session_is_registered(string varname)","Checks if a variable is registered in session"],session_module_name:["string session_module_name([string newname])","Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname"],session_name:["string session_name([string newname])","Return the current session name. If newname is given, the session name is replaced with newname"],session_regenerate_id:["bool session_regenerate_id([bool delete_old_session])","Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session."],session_register:["bool session_register(mixed var_names [, mixed ...])","Adds varname(s) to the list of variables which are freezed at the session end"],session_save_path:["string session_save_path([string newname])","Return the current save path passed to module_name. If newname is given, the save path is replaced with newname"],session_set_cookie_params:["void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])","Set session cookie parameters"],session_set_save_handler:["void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc)","Sets user-level functions"],session_start:["bool session_start()","Begin session - reinitializes freezed variables, registers browsers etc"],session_unregister:["bool session_unregister(string varname)","Removes varname from the list of variables which are freezed at the session end"],session_unset:["void session_unset()","Unset all registered variables"],session_write_close:["void session_write_close()","Write session data and end session"],set_error_handler:["string set_error_handler(string error_handler [, int error_types])","Sets a user-defined error handler function. Returns the previously defined error handler, or false on error"],set_exception_handler:["string set_exception_handler(callable exception_handler)","Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error"],set_include_path:["string set_include_path(string new_include_path)","Sets the include_path configuration option"],set_magic_quotes_runtime:["bool set_magic_quotes_runtime(int new_setting)","Set the current active configuration setting of magic_quotes_runtime and return previous"],set_time_limit:["bool set_time_limit(int seconds)","Sets the maximum time a script can run"],setcookie:["bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])","Send a cookie"],setlocale:["string setlocale(mixed category, string locale [, string ...])","Set locale information"],setrawcookie:["bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])","Send a cookie with no url encoding of the value"],settype:["bool settype(mixed var, string type)","Set the type of the variable"],sha1:["string sha1(string str [, bool raw_output])","Calculate the sha1 hash of a string"],sha1_file:["string sha1_file(string filename [, bool raw_output])","Calculate the sha1 hash of given filename"],shell_exec:["string shell_exec(string cmd)","Execute command via shell and return complete output as string"],shm_attach:["int shm_attach(int key [, int memsize [, int perm]])","Creates or open a shared memory segment"],shm_detach:["bool shm_detach(resource shm_identifier)","Disconnects from shared memory segment"],shm_get_var:["mixed shm_get_var(resource id, int variable_key)","Returns a variable from shared memory"],shm_has_var:["bool shm_has_var(resource id, int variable_key)","Checks whether a specific entry exists"],shm_put_var:["bool shm_put_var(resource shm_identifier, int variable_key, mixed variable)","Inserts or updates a variable in shared memory"],shm_remove:["bool shm_remove(resource shm_identifier)","Removes shared memory from Unix systems"],shm_remove_var:["bool shm_remove_var(resource id, int variable_key)","Removes variable from shared memory"],shmop_close:["void shmop_close(int shmid)","closes a shared memory segment"],shmop_delete:["bool shmop_delete(int shmid)","mark segment for deletion"],shmop_open:["int shmop_open(int key, string flags, int mode, int size)","gets and attaches a shared memory segment"],shmop_read:["string shmop_read(int shmid, int start, int count)","reads from a shm segment"],shmop_size:["int shmop_size(int shmid)","returns the shm size"],shmop_write:["int shmop_write(int shmid, string data, int offset)","writes to a shared memory segment"],shuffle:["bool shuffle(array array_arg)","Randomly shuffle the contents of an array"],similar_text:["int similar_text(string str1, string str2 [, float percent])","Calculates the similarity between two strings"],simplexml_import_dom:["simplemxml_element simplexml_import_dom(domNode node [, string class_name])","Get a simplexml_element object from dom to allow for processing"],simplexml_load_file:["simplemxml_element simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]])","Load a filename and return a simplexml_element object to allow for processing"],simplexml_load_string:["simplemxml_element simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]])","Load a string and return a simplexml_element object to allow for processing"],sin:["float sin(float number)","Returns the sine of the number in radians"],sinh:["float sinh(float number)","Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2"],sleep:["void sleep(int seconds)","Delay for a given number of seconds"],smfi_addheader:["bool smfi_addheader(string headerf, string headerv)","Adds a header to the current message."],smfi_addrcpt:["bool smfi_addrcpt(string rcpt)","Add a recipient to the message envelope."],smfi_chgheader:["bool smfi_chgheader(string headerf, string headerv)","Changes a header's value for the current message."],smfi_delrcpt:["bool smfi_delrcpt(string rcpt)","Removes the named recipient from the current message's envelope."],smfi_getsymval:["string smfi_getsymval(string macro)","Returns the value of the given macro or NULL if the macro is not defined."],smfi_replacebody:["bool smfi_replacebody(string body)","Replaces the body of the current message. If called more than once, subsequent calls result in data being appended to the new body."],smfi_setflags:["void smfi_setflags(long flags)","Sets the flags describing the actions the filter may take."],smfi_setreply:["bool smfi_setreply(string rcode, string xcode, string message)","Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter."],smfi_settimeout:["void smfi_settimeout(long timeout)","Sets the number of seconds libmilter will wait for an MTA connection before timing out a socket."],snmp2_get:["string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmp2_getnext:["string snmp2_getnext(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmp2_real_walk:["array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects including their respective object id withing the specified one"],snmp2_set:["int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])","Set the value of a SNMP object"],snmp2_walk:["array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects under the specified object id"],snmp3_get:["int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_getnext:["int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_real_walk:["int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_set:["int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed value [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp3_walk:["int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])","Fetch the value of a SNMP object"],snmp_get_quick_print:["bool snmp_get_quick_print()","Return the current status of quick_print"],snmp_get_valueretrieval:["int snmp_get_valueretrieval()","Return the method how the SNMP values will be returned"],snmp_read_mib:["int snmp_read_mib(string filename)","Reads and parses a MIB file into the active MIB tree."],snmp_set_enum_print:["void snmp_set_enum_print(int enum_print)","Return all values that are enums with their enum value instead of the raw integer"],snmp_set_oid_output_format:["void snmp_set_oid_output_format(int oid_format)","Set the OID output format."],snmp_set_quick_print:["void snmp_set_quick_print(int quick_print)","Return all objects including their respective object id withing the specified one"],snmp_set_valueretrieval:["void snmp_set_valueretrieval(int method)","Specify the method how the SNMP values will be returned"],snmpget:["string snmpget(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmpgetnext:["string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]])","Fetch a SNMP object"],snmprealwalk:["array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects including their respective object id withing the specified one"],snmpset:["int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])","Set the value of a SNMP object"],snmpwalk:["array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])","Return all objects under the specified object id"],socket_accept:["resource socket_accept(resource socket)","Accepts a connection on the listening socket fd"],socket_bind:["bool socket_bind(resource socket, string addr [, int port])","Binds an open socket to a listening port, port is only specified in AF_INET family."],socket_clear_error:["void socket_clear_error([resource socket])","Clears the error on the socket or the last error code."],socket_close:["void socket_close(resource socket)","Closes a file descriptor"],socket_connect:["bool socket_connect(resource socket, string addr [, int port])","Opens a connection to addr:port on the socket specified by socket"],socket_create:["resource socket_create(int domain, int type, int protocol)","Creates an endpoint for communication in the domain specified by domain, of type specified by type"],socket_create_listen:["resource socket_create_listen(int port[, int backlog])","Opens a socket on port to accept connections"],socket_create_pair:["bool socket_create_pair(int domain, int type, int protocol, array &fd)","Creates a pair of indistinguishable sockets and stores them in fds."],socket_get_option:["mixed socket_get_option(resource socket, int level, int optname)","Gets socket options for the socket"],socket_getpeername:["bool socket_getpeername(resource socket, string &addr[, int &port])","Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type."],socket_getsockname:["bool socket_getsockname(resource socket, string &addr[, int &port])","Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type."],socket_last_error:["int socket_last_error([resource socket])","Returns the last socket error (either the last used or the provided socket resource)"],socket_listen:["bool socket_listen(resource socket[, int backlog])","Sets the maximum number of connections allowed to be waited for on the socket specified by fd"],socket_read:["string socket_read(resource socket, int length [, int type])","Reads a maximum of length bytes from socket"],socket_recv:["int socket_recv(resource socket, string &buf, int len, int flags)","Receives data from a connected socket"],socket_recvfrom:["int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name [, int &port])","Receives data from a socket, connected or not"],socket_select:["int socket_select(array &read_fds, array &write_fds, array &except_fds, int tv_sec[, int tv_usec])","Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and tv_usec"],socket_send:["int socket_send(resource socket, string buf, int len, int flags)","Sends data to a connected socket"],socket_sendto:["int socket_sendto(resource socket, string buf, int len, int flags, string addr [, int port])","Sends a message to a socket, whether it is connected or not"],socket_set_block:["bool socket_set_block(resource socket)","Sets blocking mode on a socket resource"],socket_set_nonblock:["bool socket_set_nonblock(resource socket)","Sets nonblocking mode on a socket resource"],socket_set_option:["bool socket_set_option(resource socket, int level, int optname, int|array optval)","Sets socket options for the socket"],socket_shutdown:["bool socket_shutdown(resource socket[, int how])","Shuts down a socket for receiving, sending, or both."],socket_strerror:["string socket_strerror(int errno)","Returns a string describing an error"],socket_write:["int socket_write(resource socket, string buf[, int length])","Writes the buffer to the socket resource, length is optional"],solid_fetch_prev:["bool solid_fetch_prev(resource result_id)",""],sort:["bool sort(array &array_arg [, int sort_flags])","Sort an array"],soundex:["string soundex(string str)","Calculate the soundex key of a string"],spl_autoload:["void spl_autoload(string class_name [, string file_extensions])","Default implementation for __autoload()"],spl_autoload_call:["void spl_autoload_call(string class_name)","Try all registerd autoload function to load the requested class"],spl_autoload_extensions:["string spl_autoload_extensions([string file_extensions])","Register and return default file extensions for spl_autoload"],spl_autoload_functions:["false|array spl_autoload_functions()","Return all registered __autoload() functionns"],spl_autoload_register:['bool spl_autoload_register([mixed autoload_function = "spl_autoload" [, throw = true [, prepend]]])',"Register given function as __autoload() implementation"],spl_autoload_unregister:["bool spl_autoload_unregister(mixed autoload_function)","Unregister given function as __autoload() implementation"],spl_classes:["array spl_classes()","Return an array containing the names of all clsses and interfaces defined in SPL"],spl_object_hash:["string spl_object_hash(object obj)","Return hash id for given object"],split:["array split(string pattern, string string [, int limit])","Split string into array by regular expression"],spliti:["array spliti(string pattern, string string [, int limit])","Split string into array by regular expression case-insensitive"],sprintf:["string sprintf(string format [, mixed arg1 [, mixed ...]])","Return a formatted string"],sql_regcase:["string sql_regcase(string string)","Make regular expression for case insensitive match"],sqlite_array_query:["array sqlite_array_query(resource db, string query [ , int result_type [, bool decode_binary]])","Executes a query against a given database and returns an array of arrays."],sqlite_busy_timeout:["void sqlite_busy_timeout(resource db, int ms)","Set busy timeout duration. If ms <= 0, all busy handlers are disabled."],sqlite_changes:["int sqlite_changes(resource db)","Returns the number of rows that were changed by the most recent SQL statement."],sqlite_close:["void sqlite_close(resource db)","Closes an open sqlite database."],sqlite_column:["mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary])","Fetches a column from the current row of a result set."],sqlite_create_aggregate:["bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args])","Registers an aggregate function for queries."],sqlite_create_function:["bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args])",'Registers a "regular" function for queries.'],sqlite_current:["array sqlite_current(resource result [, int result_type [, bool decode_binary]])","Fetches the current row from a result set as an array."],sqlite_error_string:["string sqlite_error_string(int error_code)","Returns the textual description of an error code."],sqlite_escape_string:["string sqlite_escape_string(string item)","Escapes a string for use as a query parameter."],sqlite_exec:["bool sqlite_exec(string query, resource db[, string &error_message])","Executes a result-less query against a given database"],sqlite_factory:["object sqlite_factory(string filename [, int mode [, string &error_message]])","Opens a SQLite database and creates an object for it. Will create the database if it does not exist."],sqlite_fetch_all:["array sqlite_fetch_all(resource result [, int result_type [, bool decode_binary]])","Fetches all rows from a result set as an array of arrays."],sqlite_fetch_array:["array sqlite_fetch_array(resource result [, int result_type [, bool decode_binary]])","Fetches the next row from a result set as an array."],sqlite_fetch_column_types:["resource sqlite_fetch_column_types(string table_name, resource db [, int result_type])","Return an array of column types from a particular table."],sqlite_fetch_object:["object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]])","Fetches the next row from a result set as an object."],sqlite_fetch_single:["string sqlite_fetch_single(resource result [, bool decode_binary])","Fetches the first column of a result set as a string."],sqlite_field_name:["string sqlite_field_name(resource result, int field_index)","Returns the name of a particular field of a result set."],sqlite_has_prev:["bool sqlite_has_prev(resource result)","* Returns whether a previous row is available."],sqlite_key:["int sqlite_key(resource result)","Return the current row index of a buffered result."],sqlite_last_error:["int sqlite_last_error(resource db)","Returns the error code of the last error for a database."],sqlite_last_insert_rowid:["int sqlite_last_insert_rowid(resource db)","Returns the rowid of the most recently inserted row."],sqlite_libencoding:["string sqlite_libencoding()","Returns the encoding (iso8859 or UTF-8) of the linked SQLite library."],sqlite_libversion:["string sqlite_libversion()","Returns the version of the linked SQLite library."],sqlite_next:["bool sqlite_next(resource result)","Seek to the next row number of a result set."],sqlite_num_fields:["int sqlite_num_fields(resource result)","Returns the number of fields in a result set."],sqlite_num_rows:["int sqlite_num_rows(resource result)","Returns the number of rows in a buffered result set."],sqlite_open:["resource sqlite_open(string filename [, int mode [, string &error_message]])","Opens a SQLite database. Will create the database if it does not exist."],sqlite_popen:["resource sqlite_popen(string filename [, int mode [, string &error_message]])","Opens a persistent handle to a SQLite database. Will create the database if it does not exist."],sqlite_prev:["bool sqlite_prev(resource result)","* Seek to the previous row number of a result set."],sqlite_query:["resource sqlite_query(string query, resource db [, int result_type [, string &error_message]])","Executes a query against a given database and returns a result handle."],sqlite_rewind:["bool sqlite_rewind(resource result)","Seek to the first row number of a buffered result set."],sqlite_seek:["bool sqlite_seek(resource result, int row)","Seek to a particular row number of a buffered result set."],sqlite_single_query:["array sqlite_single_query(resource db, string query [, bool first_row_only [, bool decode_binary]])","Executes a query and returns either an array for one single column or the value of the first row."],sqlite_udf_decode_binary:["string sqlite_udf_decode_binary(string data)","Decode binary encoding on a string parameter passed to an UDF."],sqlite_udf_encode_binary:["string sqlite_udf_encode_binary(string data)","Apply binary encoding (if required) to a string to return from an UDF."],sqlite_unbuffered_query:["resource sqlite_unbuffered_query(string query, resource db [ , int result_type [, string &error_message]])","Executes a query that does not prefetch and buffer all data."],sqlite_valid:["bool sqlite_valid(resource result)","Returns whether more rows are available."],sqrt:["float sqrt(float number)","Returns the square root of the number"],srand:["void srand([int seed])","Seeds random number generator"],sscanf:["mixed sscanf(string str, string format [, string ...])","Implements an ANSI C compatible sscanf"],stat:["array stat(string filename)","Give information about a file"],str_getcsv:["array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])","Parse a CSV string into an array"],str_ireplace:["mixed str_ireplace(mixed search, mixed replace, mixed subject [, int &replace_count])","Replaces all occurrences of search in haystack with replace / case-insensitive"],str_pad:["string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])","Returns input string padded on the left or right to specified length with pad_string"],str_repeat:["string str_repeat(string input, int mult)","Returns the input string repeat mult times"],str_replace:["mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count])","Replaces all occurrences of search in haystack with replace"],str_rot13:["string str_rot13(string str)","Perform the rot13 transform on a string"],str_shuffle:["void str_shuffle(string str)","Shuffles string. One permutation of all possible is created"],str_split:["array str_split(string str [, int split_length])","Convert a string to an array. If split_length is specified, break the string down into chunks each split_length characters long."],str_word_count:["mixed str_word_count(string str, [int format [, string charlist]])",'Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, \'word\' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with "\'" and "-" characters.'],strcasecmp:["int strcasecmp(string str1, string str2)","Binary safe case-insensitive string comparison"],strchr:["string strchr(string haystack, string needle)","An alias for strstr"],strcmp:["int strcmp(string str1, string str2)","Binary safe string comparison"],strcoll:["int strcoll(string str1, string str2)","Compares two strings using the current locale"],strcspn:["int strcspn(string str, string mask [, start [, len]])","Finds length of initial segment consisting entirely of characters not found in mask. If start or/and length is provide works like strcspn(substr($s,$start,$len),$bad_chars)"],stream_bucket_append:["void stream_bucket_append(resource brigade, resource bucket)","Append bucket to brigade"],stream_bucket_make_writeable:["object stream_bucket_make_writeable(resource brigade)","Return a bucket object from the brigade for operating on"],stream_bucket_new:["resource stream_bucket_new(resource stream, string buffer)","Create a new bucket for use on the current stream"],stream_bucket_prepend:["void stream_bucket_prepend(resource brigade, resource bucket)","Prepend bucket to brigade"],stream_context_create:["resource stream_context_create([array options[, array params]])","Create a file context and optionally set parameters"],stream_context_get_default:["resource stream_context_get_default([array options])","Get a handle on the default file/stream context and optionally set parameters"],stream_context_get_options:["array stream_context_get_options(resource context|resource stream)","Retrieve options for a stream/wrapper/context"],stream_context_get_params:["array stream_context_get_params(resource context|resource stream)","Get parameters of a file context"],stream_context_set_default:["resource stream_context_set_default(array options)","Set default file/stream context, returns the context as a resource"],stream_context_set_option:["bool stream_context_set_option(resource context|resource stream, string wrappername, string optionname, mixed value)","Set an option for a wrapper"],stream_context_set_params:["bool stream_context_set_params(resource context|resource stream, array options)","Set parameters for a file context"],stream_copy_to_stream:["long stream_copy_to_stream(resource source, resource dest [, long maxlen [, long pos]])","Reads up to maxlen bytes from source stream and writes them to dest stream."],stream_filter_append:["resource stream_filter_append(resource stream, string filtername[, int read_write[, string filterparams]])","Append a filter to a stream"],stream_filter_prepend:["resource stream_filter_prepend(resource stream, string filtername[, int read_write[, string filterparams]])","Prepend a filter to a stream"],stream_filter_register:["bool stream_filter_register(string filtername, string classname)","Registers a custom filter handler class"],stream_filter_remove:["bool stream_filter_remove(resource stream_filter)","Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource"],stream_get_contents:["string stream_get_contents(resource source [, long maxlen [, long offset]])","Reads all remaining bytes (or up to maxlen bytes) from a stream and returns them as a string."],stream_get_filters:["array stream_get_filters()","Returns a list of registered filters"],stream_get_line:["string stream_get_line(resource stream, int maxlen [, string ending])","Read up to maxlen bytes from a stream or until the ending string is found"],stream_get_meta_data:["array stream_get_meta_data(resource fp)","Retrieves header/meta data from streams/file pointers"],stream_get_transports:["array stream_get_transports()","Retrieves list of registered socket transports"],stream_get_wrappers:["array stream_get_wrappers()","Retrieves list of registered stream wrappers"],stream_is_local:["bool stream_is_local(resource stream|string url)",""],stream_resolve_include_path:["string stream_resolve_include_path(string filename)","Determine what file will be opened by calls to fopen() with a relative path"],stream_select:["int stream_select(array &read_streams, array &write_streams, array &except_streams, int tv_sec[, int tv_usec])","Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec"],stream_set_blocking:["bool stream_set_blocking(resource socket, int mode)","Set blocking/non-blocking mode on a socket or stream"],stream_set_timeout:["bool stream_set_timeout(resource stream, int seconds [, int microseconds])","Set timeout on stream read to seconds + microseonds"],stream_set_write_buffer:["int stream_set_write_buffer(resource fp, int buffer)","Set file write buffer"],stream_socket_accept:["resource stream_socket_accept(resource serverstream, [ double timeout [, string &peername ]])","Accept a client connection from a server socket"],stream_socket_client:["resource stream_socket_client(string remoteaddress [, long &errcode [, string &errstring [, double timeout [, long flags [, resource context]]]]])","Open a client connection to a remote address"],stream_socket_enable_crypto:["int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]])","Enable or disable a specific kind of crypto on the stream"],stream_socket_get_name:["string stream_socket_get_name(resource stream, bool want_peer)","Returns either the locally bound or remote name for a socket stream"],stream_socket_pair:["array stream_socket_pair(int domain, int type, int protocol)","Creates a pair of connected, indistinguishable socket streams"],stream_socket_recvfrom:["string stream_socket_recvfrom(resource stream, long amount [, long flags [, string &remote_addr]])","Receives data from a socket stream"],stream_socket_sendto:["long stream_socket_sendto(resouce stream, string data [, long flags [, string target_addr]])","Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format"],stream_socket_server:["resource stream_socket_server(string localaddress [, long &errcode [, string &errstring [, long flags [, resource context]]]])","Create a server socket bound to localaddress"],stream_socket_shutdown:["int stream_socket_shutdown(resource stream, int how)","causes all or part of a full-duplex connection on the socket associated with stream to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed."],stream_supports_lock:["bool stream_supports_lock(resource stream)","Tells whether the stream supports locking through flock()."],stream_wrapper_register:["bool stream_wrapper_register(string protocol, string classname[, integer flags])","Registers a custom URL protocol handler class"],stream_wrapper_restore:["bool stream_wrapper_restore(string protocol)","Restore the original protocol handler, overriding if necessary"],stream_wrapper_unregister:["bool stream_wrapper_unregister(string protocol)","Unregister a wrapper for the life of the current request."],strftime:["string strftime(string format [, int timestamp])","Format a local time/date according to locale settings"],strip_tags:["string strip_tags(string str [, string allowable_tags])","Strips HTML and PHP tags from a string"],stripcslashes:["string stripcslashes(string str)","Strips backslashes from a string. Uses C-style conventions"],stripos:["int stripos(string haystack, string needle [, int offset])","Finds position of first occurrence of a string within another, case insensitive"],stripslashes:["string stripslashes(string str)","Strips backslashes from a string"],stristr:["string stristr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another, case insensitive"],strlen:["int strlen(string str)","Get string length"],strnatcasecmp:["int strnatcasecmp(string s1, string s2)","Returns the result of case-insensitive string comparison using 'natural' algorithm"],strnatcmp:["int strnatcmp(string s1, string s2)","Returns the result of string comparison using 'natural' algorithm"],strncasecmp:["int strncasecmp(string str1, string str2, int len)","Binary safe string comparison"],strncmp:["int strncmp(string str1, string str2, int len)","Binary safe string comparison"],strpbrk:["array strpbrk(string haystack, string char_list)","Search a string for any of a set of characters"],strpos:["int strpos(string haystack, string needle [, int offset])","Finds position of first occurrence of a string within another"],strptime:["string strptime(string timestamp, string format)","Parse a time/date generated with strftime()"],strrchr:["string strrchr(string haystack, string needle)","Finds the last occurrence of a character in a string within another"],strrev:["string strrev(string str)","Reverse a string"],strripos:["int strripos(string haystack, string needle [, int offset])","Finds position of last occurrence of a string within another string"],strrpos:["int strrpos(string haystack, string needle [, int offset])","Finds position of last occurrence of a string within another string"],strspn:["int strspn(string str, string mask [, start [, len]])","Finds length of initial segment consisting entirely of characters found in mask. If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)"],strstr:["string strstr(string haystack, string needle[, bool part])","Finds first occurrence of a string within another"],strtok:["string strtok([string str,] string token)","Tokenize a string"],strtolower:["string strtolower(string str)","Makes a string lowercase"],strtotime:["int strtotime(string time [, int now ])","Convert string representation of date and time to a timestamp"],strtoupper:["string strtoupper(string str)","Makes a string uppercase"],strtr:["string strtr(string str, string from[, string to])","Translates characters in str using given translation tables"],strval:["string strval(mixed var)","Get the string value of a variable"],substr:["string substr(string str, int start [, int length])","Returns part of a string"],substr_compare:["int substr_compare(string main_str, string str, int offset [, int length [, bool case_sensitivity]])","Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters"],substr_count:["int substr_count(string haystack, string needle [, int offset [, int length]])","Returns the number of times a substring occurs in the string"],substr_replace:["mixed substr_replace(mixed str, mixed repl, mixed start [, mixed length])","Replaces part of a string with another string"],sybase_affected_rows:["int sybase_affected_rows([resource link_id])","Get number of affected rows in last query"],sybase_close:["bool sybase_close([resource link_id])","Close Sybase connection"],sybase_connect:["int sybase_connect([string host [, string user [, string password [, string charset [, string appname [, bool new]]]]]])","Open Sybase server connection"],sybase_data_seek:["bool sybase_data_seek(resource result, int offset)","Move internal row pointer"],sybase_deadlock_retry_count:["void sybase_deadlock_retry_count(int retry_count)","Sets deadlock retry count"],sybase_fetch_array:["array sybase_fetch_array(resource result)","Fetch row as array"],sybase_fetch_assoc:["array sybase_fetch_assoc(resource result)","Fetch row as array without numberic indices"],sybase_fetch_field:["object sybase_fetch_field(resource result [, int offset])","Get field information"],sybase_fetch_object:["object sybase_fetch_object(resource result [, mixed object])","Fetch row as object"],sybase_fetch_row:["array sybase_fetch_row(resource result)","Get row as enumerated array"],sybase_field_seek:["bool sybase_field_seek(resource result, int offset)","Set field offset"],sybase_free_result:["bool sybase_free_result(resource result)","Free result memory"],sybase_get_last_message:["string sybase_get_last_message()","Returns the last message from server (over min_message_severity)"],sybase_min_client_severity:["void sybase_min_client_severity(int severity)","Sets minimum client severity"],sybase_min_server_severity:["void sybase_min_server_severity(int severity)","Sets minimum server severity"],sybase_num_fields:["int sybase_num_fields(resource result)","Get number of fields in result"],sybase_num_rows:["int sybase_num_rows(resource result)","Get number of rows in result"],sybase_pconnect:["int sybase_pconnect([string host [, string user [, string password [, string charset [, string appname]]]]])","Open persistent Sybase connection"],sybase_query:["int sybase_query(string query [, resource link_id])","Send Sybase query"],sybase_result:["string sybase_result(resource result, int row, mixed field)","Get result data"],sybase_select_db:["bool sybase_select_db(string database [, resource link_id])","Select Sybase database"],sybase_set_message_handler:["bool sybase_set_message_handler(mixed error_func [, resource connection])","Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted"],sybase_unbuffered_query:["int sybase_unbuffered_query(string query [, resource link_id])","Send Sybase query"],symlink:["int symlink(string target, string link)","Create a symbolic link"],sys_get_temp_dir:["string sys_get_temp_dir()","Returns directory path used for temporary files"],sys_getloadavg:["array sys_getloadavg()",""],syslog:["bool syslog(int priority, string message)","Generate a system log message"],system:["int system(string command [, int &return_value])","Execute an external program and display output"],tan:["float tan(float number)","Returns the tangent of the number in radians"],tanh:["float tanh(float number)","Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number)"],tempnam:["string tempnam(string dir, string prefix)","Create a unique filename in a directory"],textdomain:["string textdomain(string domain)",'Set the textdomain to "domain". Returns the current domain'],tidy_access_count:["int tidy_access_count()","Returns the Number of Tidy accessibility warnings encountered for specified document."],tidy_clean_repair:["bool tidy_clean_repair()","Execute configured cleanup and repair operations on parsed markup"],tidy_config_count:["int tidy_config_count()","Returns the Number of Tidy configuration errors encountered for specified document."],tidy_diagnose:["bool tidy_diagnose()","Run configured diagnostics on parsed and repaired markup."],tidy_error_count:["int tidy_error_count()","Returns the Number of Tidy errors encountered for specified document."],tidy_get_body:["TidyNode tidy_get_body(resource tidy)","Returns a TidyNode Object starting from the tag of the tidy parse tree"],tidy_get_config:["array tidy_get_config()","Get current Tidy configuarion"],tidy_get_error_buffer:["string tidy_get_error_buffer([bool detailed])","Return warnings and errors which occured parsing the specified document"],tidy_get_head:["TidyNode tidy_get_head()","Returns a TidyNode Object starting from the tag of the tidy parse tree"],tidy_get_html:["TidyNode tidy_get_html()","Returns a TidyNode Object starting from the tag of the tidy parse tree"],tidy_get_html_ver:["int tidy_get_html_ver()","Get the Detected HTML version for the specified document."],tidy_get_opt_doc:["string tidy_get_opt_doc(tidy resource, string optname)","Returns the documentation for the given option name"],tidy_get_output:["string tidy_get_output()","Return a string representing the parsed tidy markup"],tidy_get_release:["string tidy_get_release()","Get release date (version) for Tidy library"],tidy_get_root:["TidyNode tidy_get_root()","Returns a TidyNode Object representing the root of the tidy parse tree"],tidy_get_status:["int tidy_get_status()","Get status of specfied document."],tidy_getopt:["mixed tidy_getopt(string option)","Returns the value of the specified configuration option for the tidy document."],tidy_is_xhtml:["bool tidy_is_xhtml()","Indicates if the document is a XHTML document."],tidy_is_xml:["bool tidy_is_xml()","Indicates if the document is a generic (non HTML/XHTML) XML document."],tidy_parse_file:["bool tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])","Parse markup in file or URI"],tidy_parse_string:["bool tidy_parse_string(string input [, mixed config_options [, string encoding]])","Parse a document stored in a string"],tidy_repair_file:["bool tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])","Repair a file using an optionally provided configuration file"],tidy_repair_string:["bool tidy_repair_string(string data [, mixed config_file [, string encoding]])","Repair a string using an optionally provided configuration file"],tidy_warning_count:["int tidy_warning_count()","Returns the Number of Tidy warnings encountered for specified document."],time:["int time()","Return current UNIX timestamp"],time_nanosleep:["mixed time_nanosleep(long seconds, long nanoseconds)","Delay for a number of seconds and nano seconds"],time_sleep_until:["mixed time_sleep_until(float timestamp)","Make the script sleep until the specified time"],timezone_abbreviations_list:["array timezone_abbreviations_list()","Returns associative array containing dst, offset and the timezone name"],timezone_identifiers_list:["array timezone_identifiers_list([long what[, string country]])","Returns numerically index array with all timezone identifiers."],timezone_location_get:["array timezone_location_get()","Returns location information for a timezone, including country code, latitude/longitude and comments"],timezone_name_from_abbr:["string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])","Returns the timezone name from abbrevation"],timezone_name_get:["string timezone_name_get(DateTimeZone object)","Returns the name of the timezone."],timezone_offset_get:["long timezone_offset_get(DateTimeZone object, DateTime object)","Returns the timezone offset."],timezone_open:["DateTimeZone timezone_open(string timezone)","Returns new DateTimeZone object"],timezone_transitions_get:["array timezone_transitions_get(DateTimeZone object [, long timestamp_begin [, long timestamp_end ]])","Returns numerically indexed array containing associative array for all transitions in the specified range for the timezone."],timezone_version_get:["array timezone_version_get()","Returns the Olson database version number."],tmpfile:["resource tmpfile()","Create a temporary file that will be deleted automatically after use"],token_get_all:["array token_get_all(string source)",""],token_name:["string token_name(int type)",""],touch:["bool touch(string filename [, int time [, int atime]])","Set modification time of file"],trigger_error:["void trigger_error(string messsage [, int error_type])","Generates a user-level error/warning/notice message"],trim:["string trim(string str [, string character_mask])","Strips whitespace from the beginning and end of a string"],uasort:["bool uasort(array array_arg, string cmp_function)","Sort an array with a user-defined comparison function and maintain index association"],ucfirst:["string ucfirst(string str)","Make a string's first character lowercase"],ucwords:["string ucwords(string str)","Uppercase the first character of every word in a string"],uksort:["bool uksort(array array_arg, string cmp_function)","Sort an array by keys using a user-defined comparison function"],umask:["int umask([int mask])","Return or change the umask"],uniqid:["string uniqid([string prefix [, bool more_entropy]])","Generates a unique ID"],unixtojd:["int unixtojd([int timestamp])","Convert UNIX timestamp to Julian Day"],unlink:["bool unlink(string filename[, context context])","Delete a file"],unpack:["array unpack(string format, string input)","Unpack binary string into named array elements according to format argument"],unregister_tick_function:["void unregister_tick_function(string function_name)","Unregisters a tick callback function"],unserialize:["mixed unserialize(string variable_representation)","Takes a string representation of variable and recreates it"],unset:["void unset(mixed var [, mixed var])","Unset a given variable"],urldecode:["string urldecode(string str)","Decodes URL-encoded string"],urlencode:["string urlencode(string str)","URL-encodes string"],usleep:["void usleep(int micro_seconds)","Delay for a given number of micro seconds"],usort:["bool usort(array array_arg, string cmp_function)","Sort an array by values using a user-defined comparison function"],utf8_decode:["string utf8_decode(string data)","Converts a UTF-8 encoded string to ISO-8859-1"],utf8_encode:["string utf8_encode(string data)","Encodes an ISO-8859-1 string to UTF-8"],var_dump:["void var_dump(mixed var)","Dumps a string representation of variable to output"],var_export:["string var_export(mixed var [, bool return])","Outputs or returns a string representation of a variable"],variant_abs:["mixed variant_abs(mixed left)","Returns the absolute value of a variant"],variant_add:["mixed variant_add(mixed left, mixed right)",'"Adds" two variant values together and returns the result'],variant_and:["mixed variant_and(mixed left, mixed right)","performs a bitwise AND operation between two variants and returns the result"],variant_cast:["object variant_cast(object variant, int type)","Convert a variant into a new variant object of another type"],variant_cat:["mixed variant_cat(mixed left, mixed right)","concatenates two variant values together and returns the result"],variant_cmp:["int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])","Compares two variants"],variant_date_from_timestamp:["object variant_date_from_timestamp(int timestamp)","Returns a variant date representation of a unix timestamp"],variant_date_to_timestamp:["int variant_date_to_timestamp(object variant)","Converts a variant date/time value to unix timestamp"],variant_div:["mixed variant_div(mixed left, mixed right)","Returns the result from dividing two variants"],variant_eqv:["mixed variant_eqv(mixed left, mixed right)","Performs a bitwise equivalence on two variants"],variant_fix:["mixed variant_fix(mixed left)","Returns the integer part ? of a variant"],variant_get_type:["int variant_get_type(object variant)","Returns the VT_XXX type code for a variant"],variant_idiv:["mixed variant_idiv(mixed left, mixed right)","Converts variants to integers and then returns the result from dividing them"],variant_imp:["mixed variant_imp(mixed left, mixed right)","Performs a bitwise implication on two variants"],variant_int:["mixed variant_int(mixed left)","Returns the integer portion of a variant"],variant_mod:["mixed variant_mod(mixed left, mixed right)","Divides two variants and returns only the remainder"],variant_mul:["mixed variant_mul(mixed left, mixed right)","multiplies the values of the two variants and returns the result"],variant_neg:["mixed variant_neg(mixed left)","Performs logical negation on a variant"],variant_not:["mixed variant_not(mixed left)","Performs bitwise not negation on a variant"],variant_or:["mixed variant_or(mixed left, mixed right)","Performs a logical disjunction on two variants"],variant_pow:["mixed variant_pow(mixed left, mixed right)","Returns the result of performing the power function with two variants"],variant_round:["mixed variant_round(mixed left, int decimals)","Rounds a variant to the specified number of decimal places"],variant_set:["void variant_set(object variant, mixed value)","Assigns a new value for a variant object"],variant_set_type:["void variant_set_type(object variant, int type)",'Convert a variant into another type. Variant is modified "in-place"'],variant_sub:["mixed variant_sub(mixed left, mixed right)","subtracts the value of the right variant from the left variant value and returns the result"],variant_xor:["mixed variant_xor(mixed left, mixed right)","Performs a logical exclusion on two variants"],version_compare:["int version_compare(string ver1, string ver2 [, string oper])",'Compares two "PHP-standardized" version number strings'],vfprintf:["int vfprintf(resource stream, string format, array args)","Output a formatted string into a stream"],virtual:["bool virtual(string filename)","Perform an Apache sub-request"],vprintf:["int vprintf(string format, array args)","Output a formatted string"],vsprintf:["string vsprintf(string format, array args)","Return a formatted string"],wddx_add_vars:["int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])","Serializes given variables and adds them to packet given by packet_id"],wddx_deserialize:["mixed wddx_deserialize(mixed packet)","Deserializes given packet and returns a PHP value"],wddx_packet_end:["string wddx_packet_end(resource packet_id)","Ends specified WDDX packet and returns the string containing the packet"],wddx_packet_start:["resource wddx_packet_start([string comment])","Starts a WDDX packet with optional comment and returns the packet id"],wddx_serialize_value:["string wddx_serialize_value(mixed var [, string comment])","Creates a new packet and serializes the given value"],wddx_serialize_vars:["string wddx_serialize_vars(mixed var_name [, mixed ...])","Creates a new packet and serializes given variables into a struct"],wordwrap:["string wordwrap(string str [, int width [, string break [, bool cut]]])","Wraps buffer to selected number of characters using string break char"],xml_error_string:["string xml_error_string(int code)","Get XML parser error string"],xml_get_current_byte_index:["int xml_get_current_byte_index(resource parser)","Get current byte index for an XML parser"],xml_get_current_column_number:["int xml_get_current_column_number(resource parser)","Get current column number for an XML parser"],xml_get_current_line_number:["int xml_get_current_line_number(resource parser)","Get current line number for an XML parser"],xml_get_error_code:["int xml_get_error_code(resource parser)","Get XML parser error code"],xml_parse:["int xml_parse(resource parser, string data [, int isFinal])","Start parsing an XML document"],xml_parse_into_struct:["int xml_parse_into_struct(resource parser, string data, array &values [, array &index ])","Parsing a XML document"],xml_parser_create:["resource xml_parser_create([string encoding])","Create an XML parser"],xml_parser_create_ns:["resource xml_parser_create_ns([string encoding [, string sep]])","Create an XML parser"],xml_parser_free:["int xml_parser_free(resource parser)","Free an XML parser"],xml_parser_get_option:["int xml_parser_get_option(resource parser, int option)","Get options from an XML parser"],xml_parser_set_option:["int xml_parser_set_option(resource parser, int option, mixed value)","Set options in an XML parser"],xml_set_character_data_handler:["int xml_set_character_data_handler(resource parser, string hdl)","Set up character data handler"],xml_set_default_handler:["int xml_set_default_handler(resource parser, string hdl)","Set up default handler"],xml_set_element_handler:["int xml_set_element_handler(resource parser, string shdl, string ehdl)","Set up start and end element handlers"],xml_set_end_namespace_decl_handler:["int xml_set_end_namespace_decl_handler(resource parser, string hdl)","Set up character data handler"],xml_set_external_entity_ref_handler:["int xml_set_external_entity_ref_handler(resource parser, string hdl)","Set up external entity reference handler"],xml_set_notation_decl_handler:["int xml_set_notation_decl_handler(resource parser, string hdl)","Set up notation declaration handler"],xml_set_object:["int xml_set_object(resource parser, object &obj)","Set up object which should be used for callbacks"],xml_set_processing_instruction_handler:["int xml_set_processing_instruction_handler(resource parser, string hdl)","Set up processing instruction (PI) handler"],xml_set_start_namespace_decl_handler:["int xml_set_start_namespace_decl_handler(resource parser, string hdl)","Set up character data handler"],xml_set_unparsed_entity_decl_handler:["int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)","Set up unparsed entity declaration handler"],xmlrpc_decode:["array xmlrpc_decode(string xml [, string encoding])","Decodes XML into native PHP types"],xmlrpc_decode_request:["array xmlrpc_decode_request(string xml, string& method [, string encoding])","Decodes XML into native PHP types"],xmlrpc_encode:["string xmlrpc_encode(mixed value)","Generates XML for a PHP value"],xmlrpc_encode_request:["string xmlrpc_encode_request(string method, mixed params [, array output_options])","Generates XML for a method request"],xmlrpc_get_type:["string xmlrpc_get_type(mixed value)","Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings"],xmlrpc_is_fault:["bool xmlrpc_is_fault(array)","Determines if an array value represents an XMLRPC fault."],xmlrpc_parse_method_descriptions:["array xmlrpc_parse_method_descriptions(string xml)","Decodes XML into a list of method descriptions"],xmlrpc_server_add_introspection_data:["int xmlrpc_server_add_introspection_data(resource server, array desc)","Adds introspection documentation"],xmlrpc_server_call_method:["mixed xmlrpc_server_call_method(resource server, string xml, mixed user_data [, array output_options])","Parses XML requests and call methods"],xmlrpc_server_create:["resource xmlrpc_server_create()","Creates an xmlrpc server"],xmlrpc_server_destroy:["int xmlrpc_server_destroy(resource server)","Destroys server resources"],xmlrpc_server_register_introspection_callback:["bool xmlrpc_server_register_introspection_callback(resource server, string function)","Register a PHP function to generate documentation"],xmlrpc_server_register_method:["bool xmlrpc_server_register_method(resource server, string method_name, string function)","Register a PHP function to handle method matching method_name"],xmlrpc_set_type:["bool xmlrpc_set_type(string value, string type)","Sets xmlrpc type, base64 or datetime, for a PHP string value"],xmlwriter_end_attribute:["bool xmlwriter_end_attribute(resource xmlwriter)","End attribute - returns FALSE on error"],xmlwriter_end_cdata:["bool xmlwriter_end_cdata(resource xmlwriter)","End current CDATA - returns FALSE on error"],xmlwriter_end_comment:["bool xmlwriter_end_comment(resource xmlwriter)","Create end comment - returns FALSE on error"],xmlwriter_end_document:["bool xmlwriter_end_document(resource xmlwriter)","End current document - returns FALSE on error"],xmlwriter_end_dtd:["bool xmlwriter_end_dtd(resource xmlwriter)","End current DTD - returns FALSE on error"],xmlwriter_end_dtd_attlist:["bool xmlwriter_end_dtd_attlist(resource xmlwriter)","End current DTD AttList - returns FALSE on error"],xmlwriter_end_dtd_element:["bool xmlwriter_end_dtd_element(resource xmlwriter)","End current DTD element - returns FALSE on error"],xmlwriter_end_dtd_entity:["bool xmlwriter_end_dtd_entity(resource xmlwriter)","End current DTD Entity - returns FALSE on error"],xmlwriter_end_element:["bool xmlwriter_end_element(resource xmlwriter)","End current element - returns FALSE on error"],xmlwriter_end_pi:["bool xmlwriter_end_pi(resource xmlwriter)","End current PI - returns FALSE on error"],xmlwriter_flush:["mixed xmlwriter_flush(resource xmlwriter [,bool empty])","Output current buffer"],xmlwriter_full_end_element:["bool xmlwriter_full_end_element(resource xmlwriter)","End current element - returns FALSE on error"],xmlwriter_open_memory:["resource xmlwriter_open_memory()","Create new xmlwriter using memory for string output"],xmlwriter_open_uri:["resource xmlwriter_open_uri(resource xmlwriter, string source)","Create new xmlwriter using source uri for output"],xmlwriter_output_memory:["string xmlwriter_output_memory(resource xmlwriter [,bool flush])","Output current buffer as string"],xmlwriter_set_indent:["bool xmlwriter_set_indent(resource xmlwriter, bool indent)","Toggle indentation on/off - returns FALSE on error"],xmlwriter_set_indent_string:["bool xmlwriter_set_indent_string(resource xmlwriter, string indentString)","Set string used for indenting - returns FALSE on error"],xmlwriter_start_attribute:["bool xmlwriter_start_attribute(resource xmlwriter, string name)","Create start attribute - returns FALSE on error"],xmlwriter_start_attribute_ns:["bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri)","Create start namespaced attribute - returns FALSE on error"],xmlwriter_start_cdata:["bool xmlwriter_start_cdata(resource xmlwriter)","Create start CDATA tag - returns FALSE on error"],xmlwriter_start_comment:["bool xmlwriter_start_comment(resource xmlwriter)","Create start comment - returns FALSE on error"],xmlwriter_start_document:["bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone)","Create document tag - returns FALSE on error"],xmlwriter_start_dtd:["bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid)","Create start DTD tag - returns FALSE on error"],xmlwriter_start_dtd_attlist:["bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)","Create start DTD AttList - returns FALSE on error"],xmlwriter_start_dtd_element:["bool xmlwriter_start_dtd_element(resource xmlwriter, string name)","Create start DTD element - returns FALSE on error"],xmlwriter_start_dtd_entity:["bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)","Create start DTD Entity - returns FALSE on error"],xmlwriter_start_element:["bool xmlwriter_start_element(resource xmlwriter, string name)","Create start element tag - returns FALSE on error"],xmlwriter_start_element_ns:["bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri)","Create start namespaced element tag - returns FALSE on error"],xmlwriter_start_pi:["bool xmlwriter_start_pi(resource xmlwriter, string target)","Create start PI tag - returns FALSE on error"],xmlwriter_text:["bool xmlwriter_text(resource xmlwriter, string content)","Write text - returns FALSE on error"],xmlwriter_write_attribute:["bool xmlwriter_write_attribute(resource xmlwriter, string name, string content)","Write full attribute - returns FALSE on error"],xmlwriter_write_attribute_ns:["bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content)","Write full namespaced attribute - returns FALSE on error"],xmlwriter_write_cdata:["bool xmlwriter_write_cdata(resource xmlwriter, string content)","Write full CDATA tag - returns FALSE on error"],xmlwriter_write_comment:["bool xmlwriter_write_comment(resource xmlwriter, string content)","Write full comment tag - returns FALSE on error"],xmlwriter_write_dtd:["bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset)","Write full DTD tag - returns FALSE on error"],xmlwriter_write_dtd_attlist:["bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content)","Write full DTD AttList tag - returns FALSE on error"],xmlwriter_write_dtd_element:["bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content)","Write full DTD element tag - returns FALSE on error"],xmlwriter_write_dtd_entity:["bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])","Write full DTD Entity tag - returns FALSE on error"],xmlwriter_write_element:["bool xmlwriter_write_element(resource xmlwriter, string name[, string content])","Write full element tag - returns FALSE on error"],xmlwriter_write_element_ns:["bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])","Write full namespaced element tag - returns FALSE on error"],xmlwriter_write_pi:["bool xmlwriter_write_pi(resource xmlwriter, string target, string content)","Write full PI tag - returns FALSE on error"],xmlwriter_write_raw:["bool xmlwriter_write_raw(resource xmlwriter, string content)","Write text - returns FALSE on error"],xsl_xsltprocessor_get_parameter:["string xsl_xsltprocessor_get_parameter(string namespace, string name)",""],xsl_xsltprocessor_has_exslt_support:["bool xsl_xsltprocessor_has_exslt_support()",""],xsl_xsltprocessor_import_stylesheet:["void xsl_xsltprocessor_import_stylesheet(domdocument doc)",""],xsl_xsltprocessor_register_php_functions:["void xsl_xsltprocessor_register_php_functions([mixed $restrict])",""],xsl_xsltprocessor_remove_parameter:["bool xsl_xsltprocessor_remove_parameter(string namespace, string name)",""],xsl_xsltprocessor_set_parameter:["bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value])",""],xsl_xsltprocessor_set_profiling:["bool xsl_xsltprocessor_set_profiling(string filename)",""],xsl_xsltprocessor_transform_to_doc:["domdocument xsl_xsltprocessor_transform_to_doc(domnode doc)",""],xsl_xsltprocessor_transform_to_uri:["int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri)",""],xsl_xsltprocessor_transform_to_xml:["string xsl_xsltprocessor_transform_to_xml(domdocument doc)",""],zend_logo_guid:["string zend_logo_guid()","Return the special ID used to request the Zend logo in phpinfo screens"],zend_version:["string zend_version()","Get the version of the Zend Engine"],zip_close:["void zip_close(resource zip)","Close a Zip archive"],zip_entry_close:["void zip_entry_close(resource zip_ent)","Close a zip entry"],zip_entry_compressedsize:["int zip_entry_compressedsize(resource zip_entry)","Return the compressed size of a ZZip entry"],zip_entry_compressionmethod:["string zip_entry_compressionmethod(resource zip_entry)","Return a string containing the compression method used on a particular entry"],zip_entry_filesize:["int zip_entry_filesize(resource zip_entry)","Return the actual filesize of a ZZip entry"],zip_entry_name:["string zip_entry_name(resource zip_entry)","Return the name given a ZZip entry"],zip_entry_open:["bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])","Open a Zip File, pointed by the resource entry"],zip_entry_read:["mixed zip_entry_read(resource zip_entry [, int len])","Read from an open directory entry"],zip_open:["resource zip_open(string filename)","Create new zip using source uri for output"],zip_read:["resource zip_read(resource zip)","Returns the next file in the archive"],zlib_get_coding_type:["string zlib_get_coding_type()","Returns the coding type used for output compression"],array_column:["array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array","Return the values from a single column in the input array"],boolval:["boolval(mixed $value): bool","Get the boolean value of a variable"],bzclose:["bzclose(resource $bz): bool","Close a bzip2 file"],bzflush:["bzflush(resource $bz): bool","Do nothing"],bzwrite:["bzwrite(resource $bz, string $data, ?int $length = null): int|false","Binary safe bzip2 file write"],checkdnsrr:["checkdnsrr(string $hostname, string $type = "MX"): bool","Check DNS records corresponding to a given Internet host name or IP address"],chop:["chop()","Alias of rtrim()"],class_uses:["class_uses(object|string $object_or_class, bool $autoload = true): array|false",""],curl_escape:["curl_escape(CurlHandle $handle, string $string): string|false","URL encodes the given string"],curl_file_create:["curl_file_create()","Create a CURLFile object"],curl_multi_errno:["curl_multi_errno(CurlMultiHandle $multi_handle): int","Return the last multi curl error number"],curl_multi_setopt:["curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value): bool","Set an option for the cURL multi handle"],curl_multi_strerror:["curl_multi_strerror(int $error_code): ?string","Return string describing error code"],curl_pause:["curl_pause(CurlHandle $handle, int $flags): int","Pause and unpause a connection"],curl_reset:["curl_reset(CurlHandle $handle): void","Reset all options of a libcurl session handle"],curl_share_close:["curl_share_close(CurlShareHandle $share_handle): void","Close a cURL share handle"],curl_share_errno:["curl_share_errno(CurlShareHandle $share_handle): int","Return the last share curl error number"],curl_share_init:["curl_share_init(): CurlShareHandle","Initialize a cURL share handle"],curl_share_setopt:["curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool","Set an option for a cURL share handle"],curl_share_strerror:["curl_share_strerror(int $error_code): ?string","Return string describing the given error code"],curl_strerror:["curl_strerror(int $error_code): ?string","Return string describing the given error code"],curl_unescape:["curl_unescape(CurlHandle $handle, string $string): string|false","Decodes the given URL encoded string"],date_create_immutable_from_format:["date_create_immutable_from_format()","Alias of DateTimeImmutable::createFromFormat()"],date_create_immutable:["date_create_immutable()","Alias of DateTimeImmutable::__construct()"],deflate_add:["deflate_add(DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false","Incrementally deflate data"],deflate_init:["deflate_init(int $encoding, array $options = []): DeflateContext|false","Initialize an incremental deflate context"],"delete":["delete()","See unlink()"],diskfreespace:["diskfreespace()","Alias of disk_free_space()"],doubleval:["doubleval()","Alias of floatval()"],enchant_dict_add:["enchant_dict_add(EnchantDictionary $dictionary, string $word): void","Add a word to personal word list"],enchant_dict_is_added:["enchant_dict_is_added(EnchantDictionary $dictionary, string $word): bool","Whether or not 'word' exists in this spelling-session"],error_clear_last:["error_clear_last(): void","Clear the most recent error"],eval:["eval(string $code): mixed","Evaluate a string as PHP code"],expect_expectl:["expect_expectl(resource $expect, array $cases, array &$match = ?): int",""],expect_popen:["expect_popen(string $command): resource",""],fdiv:["fdiv(float $num1, float $num2): float","Divides two numbers, according to IEEE 754"],filter_id:["filter_id(string $name): int|false","Returns the filter ID belonging to a named filter"],filter_list:["filter_list(): array","Returns a list of all supported filters"],forward_static_call_array:["forward_static_call_array(callable $callback, array $args): mixed","Call a static method and pass the arguments as array"],fputs:["fputs()","Alias of fwrite()"],ftp_append:["ftp_append(FTP\\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool","Append the contents of a file to another file on the FTP server"],ftp_mlsd:["ftp_mlsd(FTP\\Connection $ftp, string $directory): array|false","Returns a list of files in the given directory"],ftp_quit:["ftp_quit()","Alias of ftp_close()"],gc_mem_caches:["gc_mem_caches(): int",""],gc_status:["gc_status(): array","Gets information about the garbage collector"],get_debug_type:["get_debug_type(mixed $value): string","Gets the type name of a variable in a way that is suitable for debugging"],get_declared_traits:["get_declared_traits(): array","Returns an array of all declared traits"],get_required_files:["get_required_files()","Alias of get_included_files()"],get_resource_id:["get_resource_id(resource $resource): int",""],get_resources:["get_resources(?string $type = null): array","Returns active resources"],getimagesizefromstring:["getimagesizefromstring(string $string, array &$image_info = null): array|false","Get the size of an image from a string"],getmxrr:["getmxrr(string $hostname, array &$hosts, array &$weights = null): bool","Get MX records corresponding to a given Internet host name"],gmp_binomial:["gmp_binomial(GMP|int|string $n, int $k): GMP","Calculates binomial coefficient"],gmp_div:["gmp_div()","Alias of gmp_div_q()"],gmp_export:["gmp_export(GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string","Export to a binary string"],gmp_import:["gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP","Import from a binary string"],gmp_kronecker:["gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int","Kronecker symbol"],gmp_lcm:["gmp_lcm(GMP|int|string $num1, GMP|int|string $num2): GMP","Calculate LCM"],gmp_perfect_power:["gmp_perfect_power(GMP|int|string $num): bool","Perfect power check"],gmp_random_bits:["gmp_random_bits(int $bits): GMP","Random number"],gmp_random_range:["gmp_random_range(GMP|int|string $min, GMP|int|string $max): GMP","Random number"],gmp_random_seed:["gmp_random_seed(GMP|int|string $seed): void","Sets the RNG seed"],gmp_root:["gmp_root(GMP|int|string $num, int $nth): GMP","Take the integer part of nth root"],gmp_rootrem:["gmp_rootrem(GMP|int|string $num, int $nth): array","Take the integer part and remainder of nth root"],gzclose:["gzclose(resource $stream): bool","Close an open gz-file pointer"],gzdecode:["gzdecode(string $data, int $max_length = 0): string|false","Decodes a gzip compressed string"],gzeof:["gzeof(resource $stream): bool","Test for EOF on a gz-file pointer"],gzgetc:["gzgetc(resource $stream): string|false","Get character from gz-file pointer"],gzgets:["gzgets(resource $stream, ?int $length = null): string|false","Get line from file pointer"],gzgetss:["gzgetss(resource $zp, int $length, string $allowable_tags = ?): string",""],gzpassthru:["gzpassthru(resource $stream): int",""],gzputs:["gzputs()","Alias of gzwrite()"],gzread:["gzread(resource $stream, int $length): string|false","Binary-safe gz-file read"],gzrewind:["gzrewind(resource $stream): bool","Rewind the position of a gz-file pointer"],gzseek:["gzseek(resource $stream, int $offset, int $whence = SEEK_SET): int","Seek on a gz-file pointer"],gztell:["gztell(resource $stream): int|false","Tell gz-file pointer read/write position"],gzwrite:["gzwrite(resource $stream, string $data, ?int $length = null): int|false","Binary-safe gz-file write"],halt_compiler:["__halt_compiler(): void",""],hash_equals:["hash_equals(string $known_string, string $user_string): bool","Timing attack safe string comparison"],hash_hkdf:['hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string',"Generate a HKDF key derivation of a supplied key input"],hash_hmac_algos:["hash_hmac_algos(): array","Return a list of registered hashing algorithms suitable for hash_hmac"],hash_pbkdf2:["hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string","Generate a PBKDF2 key derivation of a supplied password"],header_register_callback:["header_register_callback(callable $callback): bool","Call a header function"],hex2bin:["hex2bin(string $string): string|false","Decodes a hexadecimally encoded binary string"],hrtime:["hrtime(bool $as_number = false): array|int|float|false","Get the system's high resolution time"],http_response_code:["http_response_code(int $response_code = 0): int|bool","Get or Set the HTTP response code"],imageaffine:["imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false","Return an image containing the affine transformed src image, using an optional clipping area"],imageaffinematrixconcat:["imageaffinematrixconcat(array $matrix1, array $matrix2): array|false","Concatenate two affine transformation matrices"],imageaffinematrixget:["imageaffinematrixget(int $type, array|float $options): array|false","Get an affine transformation matrix"],imagebmp:["imagebmp(GdImage $image, resource|string|null $file = null, bool $compressed = true): bool","Output a BMP image to browser or file"],imagecreatefrombmp:["imagecreatefrombmp(string $filename): GdImage|false","Create a new image from file or URL"],imagecreatefromwebp:["imagecreatefromwebp(string $filename): GdImage|false","Create a new image from file or URL"],imagecrop:["imagecrop(GdImage $image, array $rectangle): GdImage|false","Crop an image to the given rectangle"],imagecropauto:["imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false","Crop an image automatically using one of the available modes"],imageflip:["imageflip(GdImage $image, int $mode): bool","Flips an image using a given mode"],imagegetclip:["imagegetclip(GdImage $image): array","Get the clipping rectangle"],imagegetinterpolation:["imagegetinterpolation(GdImage $image): int","Get the interpolation method"],imageopenpolygon:["imageopenpolygon(GdImage $image, array $points, int $color): bool","Draws an open polygon"],imagepalettetotruecolor:["imagepalettetotruecolor(GdImage $image): bool","Converts a palette based image to true color"],imageresolution:["imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool","Get or set the resolution of the image"],imagescale:["imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false","Scale an image using the given new width and height"],imagesetclip:["imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool","Set the clipping rectangle"],imagesetinterpolation:["imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool","Set the interpolation method"],imagewebp:["imagewebp(GdImage $image, resource|string|null $file = null, int $quality = -1): bool","Output a WebP image to browser or file"],imap_create:["","Alias of imap_createmailbox()"],imap_fetchmime:["imap_fetchmime(IMAP\\Connection $imap, int $message_num, string $section, int $flags = 0): string|false","Fetch MIME headers for a particular section of the message"],imap_fetchtext:["imap_fetchtext()","Alias of imap_body()"],imap_header:["imap_header()","Alias of imap_headerinfo()"],imap_listmailbox:["imap_listmailbox()","Alias of imap_list()"],imap_listsubscribed:["imap_listsubscribed()","Alias of imap_lsub()"],imap_rename:["imap_rename()","Alias of imap_renamemailbox()"],imap_scan:["imap_scan()","Alias of imap_listscan()"],imap_scanmailbox:["imap_scanmailbox()","Alias of imap_listscan()"],ini_alter:["ini_alter()","Alias of ini_set()"],intdiv:["intdiv(int $num1, int $num2): int","Integer division"],is_double:["is_double()","Alias of is_float()"],is_int:["is_int(mixed $value): bool","Find whether the type of a variable is integer"],is_integer:["is_integer()","Alias of is_int()"],is_iterable:["is_iterable(mixed $value): bool",""],is_real:["is_real()","Alias of is_float()"],is_soap_fault:["is_soap_fault(mixed $object): bool","Checks if a SOAP call has failed"],is_tainted:["is_tainted(string $string): bool","Checks whether a string is tainted"],is_writeable:["is_writeable()","Alias of is_writable()"],json_last_error_msg:["json_last_error_msg(): string","Returns the error string of the last json_encode() or json_decode() call"],key_exists:["key_exists()","Alias of array_key_exists()"],lchown:["lchown(string $filename, string|int $user): bool","Changes user ownership of symlink"],libxml_set_external_entity_loader:["libxml_set_external_entity_loader(?callable $resolver_function): bool","Changes the default external entity loader"],mb_chr:["mb_chr(int $codepoint, ?string $encoding = null): string|false","Return character by Unicode code point value"],mb_ereg_replace_callback:["mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null",""],mb_ord:["mb_ord(string $string, ?string $encoding = null): int|false","Get Unicode code point of character"],mb_scrub:["mb_scrub(string $string, ?string $encoding = null): string","Description"],mb_str_split:["mb_str_split(string $string, int $length = 1, ?string $encoding = null): array","Given a multibyte string, return an array of its characters"],memcache_debug:["memcache_debug(bool $on_off): bool","Turn debug output on/off"],mysql_db_name:["mysql_db_name(resource $result, int $row, mixed $field = NULL): string","Retrieves database name from the call to mysql_list_dbs()"],mysql_tablename:["mysql_tablename(resource $result, int $i): string|false","Get table name of field"],mysql_xdevapi_expression:["mysql_xdevapi\\expression(string $expression): object","Bind prepared statement variables as parameters"],mysql_xdevapi_getsession:["mysql_xdevapi\\getSession(string $uri): mysql_xdevapi\\Session","Connect to a MySQL server"],mysqli_escape_string:["mysqli_escape_string()","Alias of mysqli_real_escape_string()"],mysqli_execute:["mysqli_execute()","Alias for mysqli_stmt_execute()"],mysqli_get_links_stats:["mysqli_get_links_stats(): array","Return information about open and cached links"],mysqli_set_opt:["mysqli_set_opt()","Alias of mysqli_options()"],ob_tidyhandler:["ob_tidyhandler(string $input, int $mode = ?): string","ob_start callback function to repair the buffer"],odbc_do:["odbc_do()","Alias of odbc_exec()"],odbc_field_precision:["odbc_field_precision()","Alias of odbc_field_len()"],opcache_compile_file:["opcache_compile_file(string $filename): bool","Compiles and caches a PHP script without executing it"],opcache_get_configuration:["opcache_get_configuration(): array|false","Get configuration information about the cache"],opcache_get_status:["opcache_get_status(bool $include_scripts = true): array|false","Get status information about the cache"],opcache_invalidate:["opcache_invalidate(string $filename, bool $force = false): bool","Invalidates a cached script"],opcache_is_script_cached:["opcache_is_script_cached(string $filename): bool","Tells whether a script is cached in OPCache"],opcache_reset:["opcache_reset(): bool","Resets the contents of the opcode cache"],password_algos:["password_algos(): array","Get available password hashing algorithm IDs"],password_get_info:["password_get_info(string $hash): array","Returns information about the given hash"],password_hash:["password_hash(string $password, string|int|null $algo, array $options = []): string","Creates a password hash"],password_needs_rehash:["password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool","Checks if the given hash matches the given options"],password_verify:["password_verify(string $password, string $hash): bool","Verifies that a password matches a hash"],pcntl_async_signals:["pcntl_async_signals(?bool $enable = null): bool","Enable/disable asynchronous signal handling or return the old setting"],pcntl_errno:["pcntl_errno()","Alias of pcntl_get_last_error()"],pcntl_get_last_error:["pcntl_get_last_error(): int","Retrieve the error number set by the last pcntl function which failed"],pcntl_signal_get_handler:["pcntl_signal_get_handler(int $signal): callable|int","Get the current handler for specified signal"],pcntl_sigwaitinfo:["pcntl_sigwaitinfo(array $signals, array &$info = []): int|false","Waits for signals"],pcntl_strerror:["pcntl_strerror(int $error_code): string","Retrieve the system error message associated with the given errno"],pg_connect_poll:["pg_connect_poll(PgSql\\Connection $connection): int",""],pg_consume_input:["pg_consume_input(PgSql\\Connection $connection): bool","Reads input on the connection"],pg_escape_identifier:["pg_escape_identifier(PgSql\\Connection $connection = ?, string $data): string",""],pg_escape_literal:["pg_escape_literal(PgSql\\Connection $connection = ?, string $data): string",""],pg_flush:["pg_flush(PgSql\\Connection $connection): int|bool","Flush outbound query data on the connection"],pg_lo_truncate:["pg_lo_truncate(PgSql\\Lob $lob, int $size): bool",""],pg_socket:["pg_socket(PgSql\\Connection $connection): resource|false",""],pos:["pos()","Alias of current()"],posix_errno:["posix_errno()","Alias of posix_get_last_error()"],posix_setrlimit:["posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool","Set system resource limits"],preg_last_error_msg:["preg_last_error_msg(): string","Returns the error message of the last PCRE regex execution"],preg_replace_callback_array:["preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, int &$count = null, int $flags = 0): string|array|null","Perform a regular expression search and replace using callbacks"],ps_translate:["ps_translate(resource $psdoc, float $x, float $y): bool","Sets translation"],random_bytes:["random_bytes(int $length): string","Generates cryptographically secure pseudo-random bytes"],random_int:["random_int(int $min, int $max): int","Generates cryptographically secure pseudo-random integers"],read_exif_data:["read_exif_data()","Alias of exif_read_data()"],recode:["recode()","Alias of recode_string()"],session_abort:["session_abort(): bool","Discard session array changes and finish session"],session_commit:["session_commit()","Alias of session_write_close()"],session_create_id:['session_create_id(string $prefix = ""): string|false',"Create new session id"],session_gc:["session_gc(): int|false","Perform session data garbage collection"],session_register_shutdown:["session_register_shutdown(): void","Session shutdown function"],session_reset:["session_reset(): bool","Re-initialize session array with original values"],session_status:["session_status(): int","Returns the current session status"],set_file_buffer:["set_file_buffer()","Alias of stream_set_write_buffer()"],show_source:["show_source()","Alias of highlight_file()"],sizeof:["sizeof()","Alias of count()"],snmp_set_oid_numeric_print:["snmp_set_oid_numeric_print(int $format): bool",""],snmpwalkoid:["snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false",""],socket_addrinfo_bind:["socket_addrinfo_bind(AddressInfo $address): Socket|false","Create and bind to a socket from a given addrinfo"],socket_addrinfo_connect:["socket_addrinfo_connect(AddressInfo $address): Socket|false","Create and connect to a socket from a given addrinfo"],socket_addrinfo_explain:["socket_addrinfo_explain(AddressInfo $address): array","Get information about addrinfo"],socket_addrinfo_lookup:["socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []): array|false","Get array with contents of getaddrinfo about the given hostname"],socket_cmsg_space:["socket_cmsg_space(int $level, int $type, int $num = 0): ?int","Calculate message buffer size"],socket_export_stream:["socket_export_stream(Socket $socket): resource|false","Export a socket into a stream that encapsulates a socket"],socket_get_status:["socket_get_status()","Alias of stream_get_meta_data()"],socket_getopt:["socket_getopt()","Alias of socket_get_option()"],socket_import_stream:["socket_import_stream(resource $stream): Socket|false","Import a stream"],socket_recvmsg:["socket_recvmsg(Socket $socket, array &$message, int $flags = 0): int|false","Read a message"],socket_sendmsg:["socket_sendmsg(Socket $socket, array $message, int $flags = 0): int|false","Send a message"],socket_set_blocking:["socket_set_blocking()","Alias of stream_set_blocking()"],socket_set_timeout:["socket_set_timeout()","Alias of stream_set_timeout()"],socket_setopt:["socket_setopt()","Alias of socket_set_option()"],socket_wsaprotocol_info_export:["socket_wsaprotocol_info_export(Socket $socket, int $process_id): string|false","Exports the WSAPROTOCOL_INFO Structure"],socket_wsaprotocol_info_import:["socket_wsaprotocol_info_import(string $info_id): Socket|false","Imports a Socket from another Process"],socket_wsaprotocol_info_release:["socket_wsaprotocol_info_release(string $info_id): bool","Releases an exported WSAPROTOCOL_INFO Structure"],spl_object_id:["spl_object_id(object $object): int",""],sqlsrv_begin_transaction:["sqlsrv_begin_transaction(resource $conn): bool","Begins a database transaction"],sqlsrv_cancel:["sqlsrv_cancel(resource $stmt): bool","Cancels a statement"],sqlsrv_client_info:["sqlsrv_client_info(resource $conn): array","Returns information about the client and specified connection"],sqlsrv_close:["sqlsrv_close(resource $conn): bool","Closes an open connection and releases resourses associated with the connection"],sqlsrv_commit:["sqlsrv_commit(resource $conn): bool","Commits a transaction that was begun with sqlsrv_begin_transaction()"],sqlsrv_configure:["sqlsrv_configure(string $setting, mixed $value): bool","Changes the driver error handling and logging configurations"],sqlsrv_connect:["sqlsrv_connect(string $serverName, array $connectionInfo = ?): resource","Opens a connection to a Microsoft SQL Server database"],sqlsrv_errors:["sqlsrv_errors(int $errorsOrWarnings = ?): mixed","Returns error and warning information about the last SQLSRV operation performed"],sqlsrv_execute:["sqlsrv_execute(resource $stmt): bool","Executes a statement prepared with sqlsrv_prepare()"],sqlsrv_fetch_array:["sqlsrv_fetch_array(resource $stmt, int $fetchType = ?, int $row = ?, int $offset = ?): array","Returns a row as an array"],sqlsrv_fetch_object:["sqlsrv_fetch_object(resource $stmt, string $className = ?, array $ctorParams = ?, int $row = ?, int $offset = ?): mixed","Retrieves the next row of data in a result set as an object"],sqlsrv_fetch:["sqlsrv_fetch(resource $stmt, int $row = ?, int $offset = ?): mixed","Makes the next row in a result set available for reading"],sqlsrv_field_metadata:["sqlsrv_field_metadata(resource $stmt): mixed",""],sqlsrv_free_stmt:["sqlsrv_free_stmt(resource $stmt): bool","Frees all resources for the specified statement"],sqlsrv_get_config:["sqlsrv_get_config(string $setting): mixed","Returns the value of the specified configuration setting"],sqlsrv_get_field:["sqlsrv_get_field(resource $stmt, int $fieldIndex, int $getAsType = ?): mixed","Gets field data from the currently selected row"],sqlsrv_has_rows:["sqlsrv_has_rows(resource $stmt): bool","Indicates whether the specified statement has rows"],sqlsrv_next_result:["sqlsrv_next_result(resource $stmt): mixed","Makes the next result of the specified statement active"],sqlsrv_num_fields:["sqlsrv_num_fields(resource $stmt): mixed","Retrieves the number of fields (columns) on a statement"],sqlsrv_num_rows:["sqlsrv_num_rows(resource $stmt): mixed","Retrieves the number of rows in a result set"],sqlsrv_prepare:["sqlsrv_prepare(resource $conn, string $sql, array $params = ?, array $options = ?): mixed","Prepares a query for execution"],sqlsrv_query:["sqlsrv_query(resource $conn, string $sql, array $params = ?, array $options = ?): mixed","Prepares and executes a query"],sqlsrv_rollback:["sqlsrv_rollback(resource $conn): bool",""],sqlsrv_rows_affected:["sqlsrv_rows_affected(resource $stmt): int|false",""],sqlsrv_send_stream_data:["sqlsrv_send_stream_data(resource $stmt): bool","Sends data from parameter streams to the server"],sqlsrv_server_info:["sqlsrv_server_info(resource $conn): array","Returns information about the server"],str_contains:["str_contains(string $haystack, string $needle): bool","Determine if a string contains a given substring"],str_ends_with:["str_ends_with(string $haystack, string $needle): bool","Checks if a string ends with a given substring"],str_starts_with:["str_starts_with(string $haystack, string $needle): bool","Checks if a string starts with a given substring"],stream_isatty:["stream_isatty(resource $stream): bool","Check if a stream is a TTY"],stream_notification_callback:["stream_notification_callback(int $notification_code, int $severity, string $message, int $message_code, int $bytes_transferred, int $bytes_max): void","A callback function for the notification context parameter"],stream_register_wrapper:["stream_register_wrapper()","Alias of stream_wrapper_register()"],stream_set_chunk_size:["stream_set_chunk_size(resource $stream, int $size): int","Set the stream chunk size"],stream_set_read_buffer:["stream_set_read_buffer(resource $stream, int $size): int","Set read file buffering on the given stream"],tcpwrap_check:["tcpwrap_check(string $daemon, string $address, string $user = ?, bool $nodns = false): bool","Performs a tcpwrap check"],trait_exists:["trait_exists(string $trait, bool $autoload = true): bool","Checks if the trait exists"],use_soap_error_handler:["use_soap_error_handler(bool $enable = true): bool","Set whether to use the SOAP error handler"],user_error:["user_error()","Alias of trigger_error()"],yaml_emit_file:["yaml_emit_file(string $filename, mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): bool","Send the YAML representation of a value to a file"],yaml_emit:["yaml_emit(mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): string","Returns the YAML representation of a value"],yaml_parse_file:["yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed","Parse a YAML stream from a file"],yaml_parse_url:["yaml_parse_url(string $url, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed","Parse a Yaml stream from a URL"],yaml_parse:["yaml_parse(string $input, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed","Parse a YAML stream"],zlib_decode:["zlib_decode(string $data, int $max_length = 0): string|false","Uncompress any raw/gzip/zlib encoded data"],zlib_encode:["zlib_encode(string $data, int $encoding, int $level = -1): string|false","Compress data with the specified encoding"]},i={$_COOKIE:{type:"array"},$_ENV:{type:"array"},$_FILES:{type:"array"},$_GET:{type:"array"},$_POST:{type:"array"},$_REQUEST:{type:"array"},$_SERVER:{type:"array",value:{DOCUMENT_ROOT:1,GATEWAY_INTERFACE:1,HTTP_ACCEPT:1,HTTP_ACCEPT_CHARSET:1,HTTP_ACCEPT_ENCODING:1,HTTP_ACCEPT_LANGUAGE:1,HTTP_CONNECTION:1,HTTP_HOST:1,HTTP_REFERER:1,HTTP_USER_AGENT:1,PATH_TRANSLATED:1,PHP_SELF:1,QUERY_STRING:1,REMOTE_ADDR:1,REMOTE_PORT:1,REQUEST_METHOD:1,REQUEST_URI:1,SCRIPT_FILENAME:1,SCRIPT_NAME:1,SERVER_ADMIN:1,SERVER_NAME:1,SERVER_PORT:1,SERVER_PROTOCOL:1,SERVER_SIGNATURE:1,SERVER_SOFTWARE:1,argv:1,argc:1}},$_SESSION:{type:"array"},$GLOBALS:{type:"array"},$argv:{type:"array"},$argc:{type:"int"}},o=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(i.type==="support.php_tag"&&i.value==="0){var o=t.getTokenAt(n.row,i.start);if(o.type==="support.php_tag")return this.getTagCompletions(e,t,n,r)}return this.getFunctionCompletions(e,t,n,r)}if(s(i,"variable"))return this.getVariableCompletions(e,t,n,r);var u=t.getLine(n.row).substr(0,n.column);return i.type==="string"&&/(\$[\w]*)\[["']([^'"]*)$/i.test(u)?this.getArrayKeyCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return[{caption:"php",value:"php",meta:"php tag",score:1e6},{caption:"=",value:"=",meta:"php tag",score:1e6}]},this.getFunctionCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+"($0)",meta:"php function",score:1e6,docHTML:r[e][1]}})},this.getVariableCompletions=function(e,t,n,r){var s=Object.keys(i);return s.map(function(e){return{caption:e,value:e,meta:"php variable",score:1e6}})},this.getArrayKeyCompletions=function(e,t,n,r){var s=t.getLine(n.row).substr(0,n.column),o=s.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1];if(!i[o])return[];var u=[];return i[o].type==="array"&&i[o].value&&(u=Object.keys(i[o].value)),u.map(function(e){return{caption:e,value:e,meta:"php array key",score:1e6}})}}).call(o.prototype),t.PhpCompletions=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.indentKeywords={"if":1,"while":1,"for":1,foreach:1,"switch":1,"else":0,elseif:0,endif:-1,endwhile:-1,endfor:-1,endforeach:-1,endswitch:-1},this.foldingStartMarkerPhp=/(?:\s|^)(if|else|elseif|while|for|foreach|switch).*\:/i,this.foldingStopMarkerPhp=/(?:\s|^)(endif|endwhile|endfor|endforeach|endswitch)\;/i,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarkerPhp.exec(r);if(i)return this.phpBlock(e,n,i.index+2);var i=this.foldingStopMarkerPhp.exec(r);return i?this.phpBlock(e,n,i.index+2):this.getFoldWidgetRangeBase(e,t,n)},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarkerPhp.test(r),s=this.foldingStopMarkerPhp.test(r);if(i&&!s){var o=this.foldingStartMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"start"}}if(s&&t==="markbeginend"){var o=this.foldingStopMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"end"}}return this.getFoldWidgetBase(e,t,n)},this.phpBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword")return;var a=u.value,f=[a],l=this.indentKeywords[a];if(a==="else"||a==="elseif")l=1;if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(u.type!=="keyword")continue;var p=l*this.indentKeywords[u.value];if(p>0)f.unshift(u.value);else if(p<=0){f.shift();if(!f.length)break;p===0&&f.unshift(u.value)}}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/php","ace/unicode","ace/mode/folding/mixed","ace/mode/folding/html","ace/mode/folding/cstyle","ace/mode/html","ace/mode/javascript","ace/mode/css"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./php_highlight_rules").PhpHighlightRules,o=e("./php_highlight_rules").PhpLangHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./php_completions").PhpCompletions,l=e("./folding/php").FoldMode,c=e("../unicode"),h=e("./folding/mixed").FoldMode,p=e("./folding/html").FoldMode,d=e("./folding/cstyle").FoldMode,v=e("./html").Mode,m=e("./javascript").Mode,g=e("./css").Mode,y=function(e){this.HighlightRules=o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.$completer=new f,this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(y,i),function(){this.tokenRe=new RegExp("^["+c.wordChars+"_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"_]|\\s])+","g"),this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[:]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o!="doc-start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/php-inline"}.call(y.prototype);var b=function(e){if(e&&e.inline){var t=new y;return t.createWorker=this.createWorker,t.inlinePhp=!0,t}v.call(this),this.HighlightRules=s,this.createModeDelegates({"js-":m,"css-":g,"php-":y}),this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(b,v),function(){this.createWorker=function(e){var t=new a(["ace"],"ace/mode/php_worker","PhpWorker");return t.attachToDocument(e.getDocument()),this.inlinePhp&&t.call("setOptions",[{inline:!0}]),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/php",this.snippetFileId="ace/snippets/php"}.call(b.prototype),t.Mode=b}),ace.define("ace/mode/php_laravel_blade",["require","exports","module","ace/lib/oop","ace/mode/php_laravel_blade_highlight_rules","ace/mode/php","ace/mode/javascript","ace/mode/css","ace/mode/html"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./php_laravel_blade_highlight_rules").PHPLaravelBladeHighlightRules,s=e("./php").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html").Mode,f=function(){s.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":o,"css-":u,"html-":a})};r.inherits(f,s),function(){this.$id="ace/mode/php_laravel_blade"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/php_laravel_blade"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-pig.js b/mixly/common/modules/web-modules/ace/mode-pig.js new file mode 100644 index 00000000..746cd949 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-pig.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/pig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.block.pig",regex:/\/\*/,push:[{token:"comment.block.pig",regex:/\*\//,next:"pop"},{defaultToken:"comment.block.pig"}]},{token:"comment.line.double-dash.asciidoc",regex:/--.*$/},{token:"keyword.control.pig",regex:/\b(?:ASSERT|LOAD|STORE|DUMP|FILTER|DISTINCT|FOREACH|GENERATE|STREAM|JOIN|COGROUP|GROUP|CROSS|ORDER|LIMIT|UNION|SPLIT|DESCRIBE|EXPLAIN|ILLUSTRATE|AS|BY|INTO|USING|LIMIT|PARALLEL|OUTER|INNER|DEFAULT|LEFT|SAMPLE|RANK|CUBE|ALL|KILL|QUIT|MAPREDUCE|ASC|DESC|THROUGH|SHIP|CACHE|DECLARE|CASE|WHEN|THEN|END|IN|PARTITION|FULL|IMPORT|IF|ONSCHEMA|INPUT|OUTPUT)\b/,caseInsensitive:!0},{token:"storage.datatypes.pig",regex:/\b(?:int|long|float|double|chararray|bytearray|boolean|datetime|biginteger|bigdecimal|tuple|bag|map)\b/,caseInsensitive:!0},{token:"support.function.storage.pig",regex:/\b(?:PigStorage|BinStorage|BinaryStorage|PigDump|HBaseStorage|JsonLoader|JsonStorage|AvroStorage|TextLoader|PigStreaming|TrevniStorage|AccumuloStorage)\b/},{token:"support.function.udf.pig",regex:/\b(?:DIFF|TOBAG|TOMAP|TOP|TOTUPLE|RANDOM|FLATTEN|flatten|CUBE|ROLLUP|IsEmpty|ARITY|PluckTuple|SUBTRACT|BagToString)\b/},{token:"support.function.udf.math.pig",regex:/\b(?:ABS|ACOS|ASIN|ATAN|CBRT|CEIL|COS|COSH|EXP|FLOOR|LOG|LOG10|ROUND|ROUND_TO|SIN|SINH|SQRT|TAN|TANH|AVG|COUNT|COUNT_STAR|MAX|MIN|SUM|COR|COV)\b/},{token:"support.function.udf.string.pig",regex:/\b(?:CONCAT|INDEXOF|LAST_INDEX_OF|LCFIRST|LOWER|REGEX_EXTRACT|REGEX_EXTRACT_ALL|REPLACE|SIZE|STRSPLIT|SUBSTRING|TOKENIZE|TRIM|UCFIRST|UPPER|LTRIM|RTRIM|ENDSWITH|STARTSWITH|TRIM)\b/},{token:"support.function.udf.datetime.pig",regex:/\b(?:AddDuration|CurrentTime|DaysBetween|GetDay|GetHour|GetMilliSecond|GetMinute|GetMonth|GetSecond|GetWeek|GetWeekYear|GetYear|HoursBetween|MilliSecondsBetween|MinutesBetween|MonthsBetween|SecondsBetween|SubtractDuration|ToDate|WeeksBetween|YearsBetween|ToMilliSeconds|ToString|ToUnixTime)\b/},{token:"support.function.command.pig",regex:/\b(?:cat|cd|copyFromLocal|copyToLocal|cp|ls|mkdir|mv|pwd|rm)\b/},{token:"variable.pig",regex:/\$[a_zA-Z0-9_]+/},{token:"constant.language.pig",regex:/\b(?:NULL|true|false|stdin|stdout|stderr)\b/,caseInsensitive:!0},{token:"constant.numeric.pig",regex:/\b\d+(?:\.\d+)?\b/},{token:"keyword.operator.comparison.pig",regex:/!=|==|<|>|<=|>=|\b(?:MATCHES|IS|OR|AND|NOT)\b/,caseInsensitive:!0},{token:"keyword.operator.arithmetic.pig",regex:/\+|\-|\*|\/|\%|\?|:|::|\.\.|#/},{token:"string.quoted.double.pig",regex:/"/,push:[{token:"string.quoted.double.pig",regex:/"/,next:"pop"},{token:"constant.character.escape.pig",regex:/\\./},{defaultToken:"string.quoted.double.pig"}]},{token:"string.quoted.single.pig",regex:/'/,push:[{token:"string.quoted.single.pig",regex:/'/,next:"pop"},{token:"constant.character.escape.pig",regex:/\\./},{defaultToken:"string.quoted.single.pig"}]},{todo:{token:["text","keyword.parameter.pig","text","storage.type.parameter.pig"],regex:/^(\s*)(set)(\s+)(\S+)/,caseInsensitive:!0,push:[{token:"text",regex:/$/,next:"pop"},{include:"$self"}]}},{token:["text","keyword.alias.pig","text","storage.type.alias.pig"],regex:/(\s*)(DEFINE|DECLARE|REGISTER)(\s+)(\S+)/,caseInsensitive:!0,push:[{token:"text",regex:/;?$/,next:"pop"}]}]},this.normalizeRules()};s.metaData={fileTypes:["pig"],name:"Pig",scopeName:"source.pig"},r.inherits(s,i),t.PigHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pig_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./pig_highlight_rules").PigHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/pig"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/pig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-plain_text.js b/mixly/common/modules/web-modules/ace/mode-plain_text.js new file mode 100644 index 00000000..40add1b0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-plain_text.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/plain_text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-plsql.js b/mixly/common/modules/web-modules/ace/mode-plsql.js new file mode 100644 index 00000000..cb002322 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-plsql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/plsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="all|alter|and|any|array|arrow|as|asc|at|begin|between|by|case|check|clusters|cluster|colauth|columns|compress|connect|crash|create|cross|current|database|declare|default|delete|desc|distinct|drop|else|end|exception|exclusive|exists|fetch|form|for|foreign|from|goto|grant|group|having|identified|if|in|inner|indexes|index|insert|intersect|into|is|join|key|left|like|lock|minus|mode|natural|nocompress|not|nowait|null|of|on|option|or|order,overlaps|outer|primary|prior|procedure|public|range|record|references|resource|revoke|right|select|share|size|sql|start|subtype|tabauth|table|then|to|type|union|unique|update|use|values|view|views|when|where|with",t="true|false",n="abs|acos|add_months|ascii|asciistr|asin|atan|atan2|avg|bfilename|bin_to_num|bitand|cardinality|case|cast|ceil|chartorowid|chr|coalesce|compose|concat|convert|corr|cos|cosh|count|covar_pop|covar_samp|cume_dist|current_date|current_timestamp|dbtimezone|decode|decompose|dense_rank|dump|empty_blob|empty_clob|exp|extract|first_value|floor|from_tz|greatest|group_id|hextoraw|initcap|instr|instr2|instr4|instrb|instrc|lag|last_day|last_value|lead|least|length|length2|length4|lengthb|lengthc|listagg|ln|lnnvl|localtimestamp|log|lower|lpad|ltrim|max|median|min|mod|months_between|nanvl|nchr|new_time|next_day|nth_value|nullif|numtodsinterval|numtoyminterval|nvl|nvl2|power|rank|rawtohex|regexp_count|regexp_instr|regexp_replace|regexp_substr|remainder|replace|round|rownum|rpad|rtrim|sessiontimezone|sign|sin|sinh|soundex|sqrt|stddev|substr|sum|sys_context|sysdate|systimestamp|tan|tanh|to_char|to_clob|to_date|to_dsinterval|to_lob|to_multi_byte|to_nclob|to_number|to_single_byte|to_timestamp|to_timestamp_tz|to_yminterval|translate|trim|trunc|tz_offset|uid|upper|user|userenv|var_pop|var_samp|variance|vsize",r="char|nchar|nvarchar2|varchar2|long|raw|number|numeric|float|dec|decimal|integer|int|smallint|real|double|precision|date|timestamp|interval|year|day|bfile|blob|clob|nclob|rowid|urowid",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.plsqlHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=t.FoldMode=function(){};r.inherits(s,i),function(){}.call(s.prototype)}),ace.define("ace/mode/plsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/plsql_highlight_rules","ace/mode/folding/sql"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./plsql_highlight_rules").plsqlHighlightRules,o=e("./folding/sql").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/plsql"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/plsql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-powershell.js b/mixly/common/modules/web-modules/ace/mode-powershell.js new file mode 100644 index 00000000..918118c4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-powershell.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="[a-zA-Z\\?_\u00a1-\uffff][a-zA-Z\\d\\?_\u00a1-\uffff]*",t="begin|break|catch|class|continue|data|define|do|dynamicparam|else|elseif|end|enum|exit|filter|finally|for|foreach|from|function|if|in|inlinescript|hidden|parallel|param|process|return|static|sequence|switch|throw|trap|try|until|using|while|workflow|var",n="Get-AppBackgroundTask|Start-AppBackgroundTask|Unregister-AppBackgroundTask|Disable-AppBackgroundTaskDiagnosticLog|Enable-AppBackgroundTaskDiagnosticLog|Set-AppBackgroundTaskResourcePolicy|Get-AppLockerFileInformation|Get-AppLockerPolicy|New-AppLockerPolicy|Set-AppLockerPolicy|Test-AppLockerPolicy|Add-AppvClientConnectionGroup|Add-AppvClientPackage|Add-AppvPublishingServer|Disable-Appv|Disable-AppvClientConnectionGroup|Disable-AppvClientMode|Disable-AppvPublishingServer|Enable-Appv|Enable-AppvClientConnectionGroup|Enable-AppvClientMode|Enable-AppvPublishingServer|Get-AppvClientApplication|Get-AppvClientConfiguration|Get-AppvClientConnectionGroup|Get-AppvClientMode|Get-AppvClientPackage|Get-AppvClientPackageStatus|Get-AppvClientPackageVersion|Get-AppvClientPackageVersionHistory|Get-AppvClientPackageVersionStatus|Get-AppvClientPublishingServer|Get-AppvClientSFTFileSystem|Get-AppvClientStatus|Get-AppvPublishingServer|Get-AppvVirtualProcess|Publish-AppvClientPackage|Remove-AppvClientConnectionGroup|Remove-AppvClientPackage|Remove-AppvPublishingServer|Set-AppvClientConfiguration|Set-AppvClientMode|Set-AppvClientPackage|Set-AppvClientPublishingServer|Set-AppvVirtualProcess|Sync-AppvPublishingServer|Get-AppvStatus|Mount-AppvClientConnectionGroup|Repair-AppvClientConnectionGroup|Repair-AppvClientPackage|Send-AppvClientReport|Set-AppvPublishingServer|Start-AppvVirtualProcess|Stop-AppvClientConnectionGroup|Stop-AppvClientPackage|Unpublish-AppvClientPackage|Expand-AppvSequencerPackage|New-AppvPackageAccelerator|New-AppvSequencerPackage|Update-AppvSequencerPackage|Add-AppSharedPackageContainer|Add-AppxPackage|Add-AppxVolume|Dismount-AppxVolume|Get-AppSharedPackageContainer|Get-AppxDefaultVolume|Get-AppxLastError|Get-AppxLog|Get-AppxPackage|Get-AppxPackageAutoUpdateSettings|Get-AppxPackageManifest|Get-AppxVolume|Invoke-CommandInDesktopPackage|Mount-AppxVolume|Move-AppxPackage|Remove-AppSharedPackageContainer|Remove-AppxPackage|Remove-AppxPackageAutoUpdateSettings|Remove-AppxVolume|Reset-AppSharedPackageContainer|Reset-AppxPackage|Set-AppxDefaultVolume|Set-AppxPackageAutoUpdateSettings|Clear-AssignedAccess|Get-AssignedAccess|Set-AssignedAccess|Get-BpaModel|Get-BpaResult|Invoke-BpaModel|Set-BpaResult|Add-BitLockerKeyProtector|Backup-BitLockerKeyProtector|BackupToAAD-BitLockerKeyProtector|Clear-BitLockerAutoUnlock|Disable-BitLocker|Disable-BitLockerAutoUnlock|Enable-BitLocker|Enable-BitLockerAutoUnlock|Get-BitLockerVolume|Lock-BitLocker|Remove-BitLockerKeyProtector|Resume-BitLocker|Suspend-BitLocker|Unlock-BitLocker|Add-BitsFile|Complete-BitsTransfer|Get-BitsTransfer|Remove-BitsTransfer|Resume-BitsTransfer|Set-BitsTransfer|Start-BitsTransfer|Suspend-BitsTransfer|Checkpoint-SbecActiveConfig|Clear-SbecProviderCache|Disable-SbecAutologger|Disable-SbecBcd|Enable-SbecAutologger|Enable-SbecBcd|Enable-SbecBootImage|Enable-SbecWdsBcd|Get-SbecActiveConfig|Get-SbecBackupConfig|Get-SbecDestination|Get-SbecForwarding|Get-SbecHistory|Get-SbecLocalizedMessage|Get-SbecLogSession|Get-SbecTraceProviders|New-SbecUnattendFragment|Redo-SbecActiveConfig|Restore-SbecBackupConfig|Save-SbecInstance|Save-SbecLogSession|Set-SbecActiveConfig|Set-SbecLogSession|Start-SbecInstance|Start-SbecLogSession|Start-SbecNtKernelLogSession|Start-SbecSimpleLogSession|Stop-SbecInstance|Stop-SbecLogSession|Test-SbecActiveConfig|Test-SbecConfig|Undo-SbecActiveConfig|Add-BCDataCacheExtension|Clear-BCCache|Disable-BC|Disable-BCDowngrading|Disable-BCServeOnBattery|Enable-BCDistributed|Enable-BCDowngrading|Enable-BCHostedClient|Enable-BCHostedServer|Enable-BCLocal|Enable-BCServeOnBattery|Export-BCCachePackage|Export-BCSecretKey|Get-BCClientConfiguration|Get-BCContentServerConfiguration|Get-BCDataCache|Get-BCDataCacheExtension|Get-BCHashCache|Get-BCHostedCacheServerConfiguration|Get-BCNetworkConfiguration|Get-BCStatus|Import-BCCachePackage|Import-BCSecretKey|Publish-BCFileContent|Publish-BCWebContent|Remove-BCDataCacheExtension|Reset-BC|Set-BCAuthentication|Set-BCCache|Set-BCDataCacheEntryMaxAge|Set-BCMinSMBLatency|Set-BCSecretKey|Add-CauClusterRole|Disable-CauClusterRole|Enable-CauClusterRole|Export-CauReport|Get-CauClusterRole|Get-CauPlugin|Get-CauReport|Get-CauRun|Invoke-CauRun|Invoke-CauScan|Register-CauPlugin|Remove-CauClusterRole|Save-CauDebugTrace|Set-CauClusterRole|Stop-CauRun|Test-CauSetup|Unregister-CauPlugin|Export-BinaryMiLog|Get-CimAssociatedInstance|Get-CimClass|Get-CimInstance|Get-CimSession|Import-BinaryMiLog|Invoke-CimMethod|New-CimInstance|New-CimSession|New-CimSessionOption|Register-CimIndicationEvent|Remove-CimInstance|Remove-CimSession|Set-CimInstance|ConvertFrom-CIPolicy|Add-SignerRule|ConvertFrom-CIPolicy|Edit-CIPolicyRule|Get-CIPolicy|Get-CIPolicyIdInfo|Get-CIPolicyInfo|Get-SystemDriver|Merge-CIPolicy|New-CIPolicy|New-CIPolicyRule|Remove-CIPolicyRule|Set-CIPolicyIdInfo|Set-CIPolicySetting|Set-CIPolicyVersion|Set-HVCIOptions|Set-RuleOption|Disable-NetQosFlowControl|Enable-NetQosFlowControl|Get-NetQosDcbxSetting|Get-NetQosFlowControl|Get-NetQosTrafficClass|New-NetQosTrafficClass|Remove-NetQosTrafficClass|Set-NetQosDcbxSetting|Set-NetQosFlowControl|Set-NetQosTrafficClass|Switch-NetQosDcbxSetting|Switch-NetQosFlowControl|Switch-NetQosTrafficClass|Disable-DedupVolume|Enable-DedupVolume|Expand-DedupFile|Get-DedupJob|Get-DedupMetadata|Get-DedupSchedule|Get-DedupStatus|Get-DedupVolume|Measure-DedupFileMetadata|New-DedupSchedule|Remove-DedupSchedule|Set-DedupSchedule|Set-DedupVolume|Start-DedupJob|Stop-DedupJob|Update-DedupStatus|Add-MpPreference|Get-MpComputerStatus|Get-MpPreference|Get-MpThreat|Get-MpThreatCatalog|Get-MpThreatDetection|Remove-MpPreference|Remove-MpThreat|Set-MpPreference|Start-MpScan|Start-MpWDOScan|Update-MpSignature|Backup-DHASConfiguration|Get-DHASActiveEncryptionCertificate|Get-DHASActiveSigningCertificate|Get-DHASCertificateChainPolicy|Get-DHASInactiveEncryptionCertificate|Get-DHASInactiveSigningCertificate|Install-DeviceHealthAttestation|Remove-DHASInactiveEncryptionCertificate|Remove-DHASInactiveSigningCertificate|Restore-DHASConfiguration|Set-DHASActiveEncryptionCertificate|Set-DHASActiveSigningCertificate|Set-DHASCertificateChainPolicy|Set-DHASSupportedAuthenticationSchema|Uninstall-DeviceHealthAttestation||Get-DfsnAccess|Get-DfsnFolder|Get-DfsnFolderTarget|Get-DfsnRoot|Get-DfsnRootTarget|Get-DfsnServerConfiguration|Grant-DfsnAccess|Move-DfsnFolder|New-DfsnFolder|New-DfsnFolderTarget|New-DfsnRoot|New-DfsnRootTarget|Remove-DfsnAccess|Remove-DfsnFolder|Remove-DfsnFolderTarget|Remove-DfsnRoot|Remove-DfsnRootTarget|Revoke-DfsnAccess|Set-DfsnFolder|Set-DfsnFolderTarget|Set-DfsnRoot|Set-DfsnRootTarget|Set-DfsnServerConfiguration|Add-DfsrConnection|Add-DfsrMember|ConvertFrom-DfsrGuid|Export-DfsrClone|Get-DfsrBacklog|Get-DfsrCloneState|Get-DfsrConnection|Get-DfsrConnectionSchedule|Get-DfsrDelegation|Get-DfsReplicatedFolder|Get-DfsReplicationGroup|Get-DfsrFileHash|Get-DfsrGroupSchedule|Get-DfsrIdRecord|Get-DfsrMember|Get-DfsrMembership|Get-DfsrPreservedFiles|Get-DfsrServiceConfiguration|Get-DfsrState|Grant-DfsrDelegation|Import-DfsrClone|New-DfsReplicatedFolder|New-DfsReplicationGroup|Remove-DfsrConnection|Remove-DfsReplicatedFolder|Remove-DfsReplicationGroup|Remove-DfsrMember|Remove-DfsrPropagationTestFile|Reset-DfsrCloneState|Restore-DfsrPreservedFiles|Revoke-DfsrDelegation|Set-DfsrConnection|Set-DfsrConnectionSchedule|Set-DfsReplicatedFolder|Set-DfsReplicationGroup|Set-DfsrGroupSchedule|Set-DfsrMember|Set-DfsrMembership|Set-DfsrServiceConfiguration|Start-DfsrPropagationTest|Suspend-DfsReplicationGroup|Sync-DfsReplicationGroup|Update-DfsrConfigurationFromAD|Write-DfsrHealthReport|Write-DfsrPropagationReport|Add-DhcpServerInDC|Add-DhcpServerSecurityGroup|Add-DhcpServerv4Class|Add-DhcpServerv4ExclusionRange|Add-DhcpServerv4Failover|Add-DhcpServerv4FailoverScope|Add-DhcpServerv4Filter|Add-DhcpServerv4Lease|Add-DhcpServerv4MulticastExclusionRange|Add-DhcpServerv4MulticastScope|Add-DhcpServerv4OptionDefinition|Add-DhcpServerv4Policy|Add-DhcpServerv4PolicyIPRange|Add-DhcpServerv4Reservation|Add-DhcpServerv4Scope|Add-DhcpServerv4Superscope|Add-DhcpServerv6Class|Add-DhcpServerv6ExclusionRange|Add-DhcpServerv6Lease|Add-DhcpServerv6OptionDefinition|Add-DhcpServerv6Reservation|Add-DhcpServerv6Scope|Backup-DhcpServer|Export-DhcpServer|Get-DhcpServerAuditLog|Get-DhcpServerDatabase|Get-DhcpServerDnsCredential|Get-DhcpServerInDC|Get-DhcpServerSetting|Get-DhcpServerv4Binding|Get-DhcpServerv4Class|Get-DhcpServerv4DnsSetting|Get-DhcpServerv4ExclusionRange|Get-DhcpServerv4Failover|Get-DhcpServerv4Filter|Get-DhcpServerv4FilterList|Get-DhcpServerv4FreeIPAddress|Get-DhcpServerv4Lease|Get-DhcpServerv4MulticastExclusionRange|Get-DhcpServerv4MulticastLease|Get-DhcpServerv4MulticastScope|Get-DhcpServerv4MulticastScopeStatistics|Get-DhcpServerv4OptionDefinition|Get-DhcpServerv4OptionValue|Get-DhcpServerv4Policy|Get-DhcpServerv4PolicyIPRange|Get-DhcpServerv4Reservation|Get-DhcpServerv4Scope|Get-DhcpServerv4ScopeStatistics|Get-DhcpServerv4Statistics|Get-DhcpServerv4Superscope|Get-DhcpServerv4SuperscopeStatistics|Get-DhcpServerv6Binding|Get-DhcpServerv6Class|Get-DhcpServerv6DnsSetting|Get-DhcpServerv6ExclusionRange|Get-DhcpServerv6FreeIPAddress|Get-DhcpServerv6Lease|Get-DhcpServerv6OptionDefinition|Get-DhcpServerv6OptionValue|Get-DhcpServerv6Reservation|Get-DhcpServerv6Scope|Get-DhcpServerv6ScopeStatistics|Get-DhcpServerv6StatelessStatistics|Get-DhcpServerv6StatelessStore|Get-DhcpServerv6Statistics|Get-DhcpServerVersion|Import-DhcpServer|Invoke-DhcpServerv4FailoverReplication|Remove-DhcpServerDnsCredential|Remove-DhcpServerInDC|Remove-DhcpServerv4Class|Remove-DhcpServerv4ExclusionRange|Remove-DhcpServerv4Failover|Remove-DhcpServerv4FailoverScope|Remove-DhcpServerv4Filter|Remove-DhcpServerv4Lease|Remove-DhcpServerv4MulticastExclusionRange|Remove-DhcpServerv4MulticastLease|Remove-DhcpServerv4MulticastScope|Remove-DhcpServerv4OptionDefinition|Remove-DhcpServerv4OptionValue|Remove-DhcpServerv4Policy|Remove-DhcpServerv4PolicyIPRange|Remove-DhcpServerv4Reservation|Remove-DhcpServerv4Scope|Remove-DhcpServerv4Superscope|Remove-DhcpServerv6Class|Remove-DhcpServerv6ExclusionRange|Remove-DhcpServerv6Lease|Remove-DhcpServerv6OptionDefinition|Remove-DhcpServerv6OptionValue|Remove-DhcpServerv6Reservation|Remove-DhcpServerv6Scope|Rename-DhcpServerv4Superscope|Repair-DhcpServerv4IPRecord|Restore-DhcpServer|Set-DhcpServerAuditLog|Set-DhcpServerDatabase|Set-DhcpServerDnsCredential|Set-DhcpServerSetting|Set-DhcpServerv4Binding|Set-DhcpServerv4Class|Set-DhcpServerv4DnsSetting|Set-DhcpServerv4Failover|Set-DhcpServerv4FilterList|Set-DhcpServerv4MulticastScope|Set-DhcpServerv4OptionDefinition|Set-DhcpServerv4OptionValue|Set-DhcpServerv4Policy|Set-DhcpServerv4Reservation|Set-DhcpServerv4Scope|Set-DhcpServerv6Binding|Set-DhcpServerv6Class|Set-DhcpServerv6DnsSetting|Set-DhcpServerv6OptionDefinition|Set-DhcpServerv6OptionValue|Set-DhcpServerv6Reservation|Set-DhcpServerv6Scope|Set-DhcpServerv6StatelessStore|Disable-DAManualEntryPointSelection|Enable-DAManualEntryPointSelection|Get-DAClientExperienceConfiguration|Get-DAEntryPointTableItem|New-DAEntryPointTableItem|Remove-DAEntryPointTableItem|Rename-DAEntryPointTableItem|Reset-DAClientExperienceConfiguration|Reset-DAEntryPointTableItem|Set-DAClientExperienceConfiguration|Set-DAEntryPointTableItem|Add-AppxProvisionedPackage|Add-WindowsCapability|Add-WindowsDriver|Add-WindowsImage|Add-WindowsPackage|Clear-WindowsCorruptMountPoint|Disable-WindowsOptionalFeature|Dismount-WindowsImage|Enable-WindowsOptionalFeature|Expand-WindowsCustomDataImage|Expand-WindowsImage|Export-WindowsCapabilitySource|Export-WindowsDriver|Export-WindowsImage|Get-AppxProvisionedPackage|Get-NonRemovableAppsPolicy|Get-WIMBootEntry|Get-WindowsCapability|Get-WindowsDriver|Get-WindowsEdition|Get-WindowsImage|Get-WindowsImageContent|Get-WindowsOptionalFeature|Get-WindowsPackage|Get-WindowsReservedStorageState|Mount-WindowsImage|New-WindowsCustomImage|New-WindowsImage|Optimize-AppXProvisionedPackages|Optimize-WindowsImage|Remove-AppxProvisionedPackage|Remove-WindowsCapability|Remove-WindowsDriver|Remove-WindowsImage|Remove-WindowsPackage|Repair-WindowsImage|Save-WindowsImage|Set-AppXProvisionedDataFile|Set-NonRemovableAppsPolicy|Set-WindowsEdition|Set-WindowsProductKey|Set-WindowsReservedStorageState|Split-WindowsImage|Start-OSUninstall|Update-WIMBootEntry|Use-WindowsUnattend|Add-DnsClientDohServerAddress|Add-DnsClientNrptRule|Clear-DnsClientCache|Get-DnsClient|Get-DnsClientCache|Get-DnsClientDohServerAddress|Get-DnsClientGlobalSetting|Get-DnsClientNrptGlobal|Get-DnsClientNrptPolicy|Get-DnsClientNrptRule|Get-DnsClientServerAddress|Register-DnsClient|Remove-DnsClientDohServerAddress|Remove-DnsClientNrptRule|Resolve-DnsName|Set-DnsClient|Set-DnsClientDohServerAddress|Set-DnsClientGlobalSetting|Set-DnsClientNrptGlobal|Set-DnsClientNrptRule|Set-DnsClientServerAddress|Add-DnsServerClientSubnet|Add-DnsServerConditionalForwarderZone|Add-DnsServerDirectoryPartition|Add-DnsServerForwarder|Add-DnsServerPrimaryZone|Add-DnsServerQueryResolutionPolicy|Add-DnsServerRecursionScope|Add-DnsServerResourceRecord|Add-DnsServerResourceRecordA|Add-DnsServerResourceRecordAAAA|Add-DnsServerResourceRecordCName|Add-DnsServerResourceRecordDnsKey|Add-DnsServerResourceRecordDS|Add-DnsServerResourceRecordMX|Add-DnsServerResourceRecordPtr|Add-DnsServerResponseRateLimitingExceptionlist|Add-DnsServerRootHint|Add-DnsServerSecondaryZone|Add-DnsServerSigningKey|Add-DnsServerStubZone|Add-DnsServerTrustAnchor|Add-DnsServerVirtualizationInstance|Add-DnsServerZoneDelegation|Add-DnsServerZoneScope|Add-DnsServerZoneTransferPolicy|Clear-DnsServerCache|Clear-DnsServerStatistics|ConvertTo-DnsServerPrimaryZone|ConvertTo-DnsServerSecondaryZone|Disable-DnsServerPolicy|Disable-DnsServerSigningKeyRollover|Enable-DnsServerPolicy|Enable-DnsServerSigningKeyRollover|Export-DnsServerDnsSecPublicKey|Export-DnsServerZone|Get-DnsServer|Get-DnsServerCache|Get-DnsServerClientSubnet|Get-DnsServerDiagnostics|Get-DnsServerDirectoryPartition|Get-DnsServerDnsSecZoneSetting|Get-DnsServerDsSetting|Get-DnsServerEDns|Get-DnsServerForwarder|Get-DnsServerGlobalNameZone|Get-DnsServerGlobalQueryBlockList|Get-DnsServerQueryResolutionPolicy|Get-DnsServerRecursion|Get-DnsServerRecursionScope|Get-DnsServerResourceRecord|Get-DnsServerResponseRateLimiting|Get-DnsServerResponseRateLimitingExceptionlist|Get-DnsServerRootHint|Get-DnsServerScavenging|Get-DnsServerSetting|Get-DnsServerSigningKey|Get-DnsServerStatistics|Get-DnsServerTrustAnchor|Get-DnsServerTrustPoint|Get-DnsServerVirtualizationInstance|Get-DnsServerZone|Get-DnsServerZoneAging|Get-DnsServerZoneDelegation|Get-DnsServerZoneScope|Get-DnsServerZoneTransferPolicy|Import-DnsServerResourceRecordDS|Import-DnsServerRootHint|Import-DnsServerTrustAnchor|Invoke-DnsServerSigningKeyRollover|Invoke-DnsServerZoneSign|Invoke-DnsServerZoneUnsign|Register-DnsServerDirectoryPartition|Remove-DnsServerClientSubnet|Remove-DnsServerDirectoryPartition|Remove-DnsServerForwarder|Remove-DnsServerQueryResolutionPolicy|Remove-DnsServerRecursionScope|Remove-DnsServerResourceRecord|Remove-DnsServerResponseRateLimitingExceptionlist|Remove-DnsServerRootHint|Remove-DnsServerSigningKey|Remove-DnsServerTrustAnchor|Remove-DnsServerVirtualizationInstance|Remove-DnsServerZone|Remove-DnsServerZoneDelegation|Remove-DnsServerZoneScope|Remove-DnsServerZoneTransferPolicy|Reset-DnsServerZoneKeyMasterRole|Restore-DnsServerPrimaryZone|Restore-DnsServerSecondaryZone|Resume-DnsServerZone|Set-DnsServer|Set-DnsServerCache|Set-DnsServerClientSubnet|Set-DnsServerConditionalForwarderZone|Set-DnsServerDiagnostics|Set-DnsServerDnsSecZoneSetting|Set-DnsServerDsSetting|Set-DnsServerEDns|Set-DnsServerForwarder|Set-DnsServerGlobalNameZone|Set-DnsServerGlobalQueryBlockList|Set-DnsServerPrimaryZone|Set-DnsServerQueryResolutionPolicy|Set-DnsServerRecursion|Set-DnsServerRecursionScope|Set-DnsServerResourceRecord|Set-DnsServerResourceRecordAging|Set-DnsServerResponseRateLimiting|Set-DnsServerResponseRateLimitingExceptionlist|Set-DnsServerRootHint|Set-DnsServerScavenging|Set-DnsServerSecondaryZone|Set-DnsServerSetting|Set-DnsServerSigningKey|Set-DnsServerStubZone|Set-DnsServerVirtualizationInstance|Set-DnsServerZoneAging|Set-DnsServerZoneDelegation|Set-DnsServerZoneTransferPolicy|Show-DnsServerCache|Show-DnsServerKeyStorageProvider|Start-DnsServerScavenging|Start-DnsServerZoneTransfer|Step-DnsServerSigningKeyRollover|Suspend-DnsServerZone|Sync-DnsServerZone|Test-DnsServer|Test-DnsServerDnsSecZoneSetting|Unregister-DnsServerDirectoryPartition|Update-DnsServerTrustPoint|Add-EtwTraceProvider|Get-AutologgerConfig|Get-EtwTraceProvider|Get-EtwTraceSession|New-AutologgerConfig|New-EtwTraceSession|Remove-AutologgerConfig|Remove-EtwTraceProvider|Save-EtwTraceSession|Send-EtwTraceSession|Set-EtwTraceProvider|Start-EtwTraceSession|Stop-EtwTraceSession|Update-AutologgerConfig|Update-EtwTraceSession|Add-ClusterCheckpoint|Add-ClusterDisk|Add-ClusterFileServerRole|Add-ClusterGenericApplicationRole|Add-ClusterGenericScriptRole|Add-ClusterGenericServiceRole|Add-ClusterGroup|Add-ClusterGroupSetDependency|Add-ClusterGroupToSet|Add-ClusteriSCSITargetServerRole|Add-ClusterNode|Add-ClusterResource|Add-ClusterResourceDependency|Add-ClusterResourceType|Add-ClusterScaleOutFileServerRole|Add-ClusterSharedVolume|Add-ClusterVirtualMachineRole|Add-ClusterVMMonitoredItem|Block-ClusterAccess|Clear-ClusterDiskReservation|Clear-ClusterNode|Disable-ClusterStorageSpacesDirect|Enable-ClusterStorageSpacesDirect|Get-Cluster|Get-ClusterAccess|Get-ClusterAvailableDisk|Get-ClusterCheckpoint|Get-ClusterDiagnosticInfo|Get-ClusterFaultDomain|Get-ClusterFaultDomainXML|Get-ClusterGroup|Get-ClusterGroupSet|Get-ClusterGroupSetDependency|Get-ClusterLog|Get-ClusterNetwork|Get-ClusterNetworkInterface|Get-ClusterNode|Get-ClusterOwnerNode|Get-ClusterParameter|Get-ClusterQuorum|Get-ClusterResource|Get-ClusterResourceDependency|Get-ClusterResourceDependencyReport|Get-ClusterResourceType|Get-ClusterSharedVolume|Get-ClusterSharedVolumeState|Get-ClusterStorageSpacesDirect|Get-ClusterVMMonitoredItem|Grant-ClusterAccess|Move-ClusterGroup|Move-ClusterResource|Move-ClusterSharedVolume|Move-ClusterVirtualMachineRole|New-Cluster|New-ClusterFaultDomain|New-ClusterGroupSet|New-ClusterNameAccount|Remove-Cluster|Remove-ClusterAccess|Remove-ClusterCheckpoint|Remove-ClusterFaultDomain|Remove-ClusterGroup|Remove-ClusterGroupFromSet|Remove-ClusterGroupSet|Remove-ClusterGroupSetDependency|Remove-ClusterNode|Remove-ClusterResource|Remove-ClusterResourceDependency|Remove-ClusterResourceType|Remove-ClusterSharedVolume|Remove-ClusterVMMonitoredItem|Repair-ClusterStorageSpacesDirect|Reset-ClusterVMMonitoredState|Resume-ClusterNode|Resume-ClusterResource|Set-ClusterFaultDomain|Set-ClusterFaultDomainXML|Set-ClusterGroupSet|Set-ClusterLog|Set-ClusterOwnerNode|Set-ClusterParameter|Set-ClusterQuorum|Set-ClusterResourceDependency|Set-ClusterStorageSpacesDirect|Set-ClusterStorageSpacesDirectDisk|Start-Cluster|Start-ClusterGroup|Start-ClusterNode|Start-ClusterResource|Stop-Cluster|Stop-ClusterGroup|Stop-ClusterNode|Stop-ClusterResource|Suspend-ClusterNode|Suspend-ClusterResource|Test-Cluster|Test-ClusterResourceFailure|Update-ClusterFunctionalLevel|Update-ClusterIPResource|Update-ClusterNetworkNameResource|Update-ClusterVirtualMachineConfiguration|Get-FsrmAdrSetting|Get-FsrmAutoQuota|Get-FsrmClassification|Get-FsrmClassificationPropertyDefinition|Get-FsrmClassificationRule|Get-FsrmEffectiveNamespace|Get-FsrmFileGroup|Get-FsrmFileManagementJob|Get-FsrmFileScreen|Get-FsrmFileScreenException|Get-FsrmFileScreenTemplate|Get-FsrmMacro|Get-FsrmMgmtProperty|Get-FsrmQuota|Get-FsrmQuotaTemplate|Get-FsrmRmsTemplate|Get-FsrmSetting|Get-FsrmStorageReport|New-FsrmAction|New-FsrmAutoQuota|New-FsrmClassificationPropertyDefinition|New-FsrmClassificationPropertyValue|New-FsrmClassificationRule|New-FsrmFileGroup|New-FsrmFileManagementJob|New-FsrmFileScreen|New-FsrmFileScreenException|New-FsrmFileScreenTemplate|New-FsrmFmjAction|New-FsrmFmjCondition|New-FsrmFMJNotification|New-FsrmFmjNotificationAction|New-FsrmQuota|New-FsrmQuotaTemplate|New-FsrmQuotaThreshold|New-FsrmScheduledTask|New-FsrmStorageReport|Remove-FsrmAutoQuota|Remove-FsrmClassificationPropertyDefinition|Remove-FsrmClassificationRule|Remove-FsrmFileGroup|Remove-FsrmFileManagementJob|Remove-FsrmFileScreen|Remove-FsrmFileScreenException|Remove-FsrmFileScreenTemplate|Remove-FsrmMgmtProperty|Remove-FsrmQuota|Remove-FsrmQuotaTemplate|Remove-FsrmStorageReport|Reset-FsrmFileScreen|Reset-FsrmQuota|Send-FsrmTestEmail|Set-FsrmAdrSetting|Set-FsrmAutoQuota|Set-FsrmClassification|Set-FsrmClassificationPropertyDefinition|Set-FsrmClassificationRule|Set-FsrmFileGroup|Set-FsrmFileManagementJob|Set-FsrmFileScreen|Set-FsrmFileScreenException|Set-FsrmFileScreenTemplate|Set-FsrmMgmtProperty|Set-FsrmQuota|Set-FsrmQuotaTemplate|Set-FsrmSetting|Set-FsrmStorageReport|Start-FsrmClassification|Start-FsrmFileManagementJob|Start-FsrmStorageReport|Stop-FsrmClassification|Stop-FsrmFileManagementJob|Stop-FsrmStorageReport|Update-FsrmAutoQuota|Update-FsrmClassificationPropertyDefinition|Update-FsrmQuota|Wait-FsrmClassification|Wait-FsrmFileManagementJob|Wait-FsrmStorageReport|Backup-GPO|Copy-GPO|Get-GPInheritance|Get-GPO|Get-GPOReport|Get-GPPermission|Get-GPPrefRegistryValue|Get-GPRegistryValue|Get-GPResultantSetOfPolicy|Get-GPStarterGPO|Import-GPO|Invoke-GPUpdate|New-GPLink|New-GPO|New-GPStarterGPO|Remove-GPLink|Remove-GPO|Remove-GPPrefRegistryValue|Remove-GPRegistryValue|Rename-GPO|Restore-GPO|Set-GPInheritance|Set-GPLink|Set-GPPermission|Set-GPPrefRegistryValue|Set-GPRegistryValue|Export-HwCertTestCollectionToXml|Import-HwCertTestCollectionFromXml|Merge-HwCertTestCollectionFromPackage|Merge-HwCertTestCollectionFromXml|New-HwCertProjectDefinitionFile|New-HwCertTestCollection|New-HwCertTestCollectionExcelReport|Add-HgsAttestationCIPolicy|Add-HgsAttestationDumpPolicy|Add-HgsAttestationHostGroup|Add-HgsAttestationTpmHost|Add-HgsAttestationTpmPolicy|Disable-HgsAttestationPolicy|Enable-HgsAttestationPolicy|Get-HgsAttestationHostGroup|Get-HgsAttestationPolicy|Get-HgsAttestationSignerCertificate|Get-HgsAttestationTpmHost|Remove-HgsAttestationHostGroup|Remove-HgsAttestationPolicy|Remove-HgsAttestationTpmHost|ConvertTo-HgsKeyProtector|Export-HgsGuardian|Get-HgsAttestationBaselinePolicy|Get-HgsClientConfiguration|Get-HgsGuardian|Grant-HgsKeyProtectorAccess|Import-HgsGuardian|New-HgsGuardian|New-HgsKeyProtector|Remove-HgsGuardian|Revoke-HgsKeyProtectorAccess|Set-HgsClientConfiguration|Test-HgsClientConfiguration|Get-HgsTrace|Get-HgsTraceFileData|New-HgsTraceTarget|Test-HgsTraceTarget|Add-HgsKeyProtectionAttestationSignerCertificate|Add-HgsKeyProtectionCertificate|Export-HgsKeyProtectionState|Get-HgsKeyProtectionAttestationSignerCertificate|Get-HgsKeyProtectionCertificate|Get-HgsKeyProtectionConfiguration|Import-HgsKeyProtectionState|Remove-HgsKeyProtectionAttestationSignerCertificate|Remove-HgsKeyProtectionCertificate|Set-HgsKeyProtectionAttestationSignerCertificatePolicy|Set-HgsKeyProtectionCertificate|Set-HgsKeyProtectionConfiguration|Clear-HgsServer|Export-HgsServerState|Get-HgsServer|Import-HgsServerState|Initialize-HgsServer|Install-HgsServer|Set-HgsServer|Test-HgsServer|Uninstall-HgsServer|Debug-SlbDatapath|Debug-VirtualMachineQueueOperation|Disable-MuxEchoResponder|Enable-MuxEchoResponder|Get-CustomerRoute|Get-NetworkControllerVipResource|Get-PACAMapping|Get-ProviderAddress|Get-VipHostMapping|Get-VMNetworkAdapterPortId|Get-VMSwitchExternalPortId|Test-DipHostReachability|Test-EncapOverheadSettings|Test-LogicalNetworkConnection|Test-LogicalNetworkSupportsJumboPacket|Test-VipReachability|Test-VirtualNetworkConnection|Get-ComputeProcess|Stop-ComputeProcess|Add-VMDvdDrive|Add-VMFibreChannelHba|Add-VMGpuPartitionAdapter|Add-VMGroupMember|Add-VMHardDiskDrive|Add-VMMigrationNetwork|Add-VMNetworkAdapter|Add-VMNetworkAdapterAcl|Add-VMNetworkAdapterExtendedAcl|Add-VmNetworkAdapterRoutingDomainMapping|Add-VMRemoteFx3dVideoAdapter|Add-VMScsiController|Add-VMStoragePath|Add-VMSwitch|Add-VMSwitchExtensionPortFeature|Add-VMSwitchExtensionSwitchFeature|Add-VMSwitchTeamMember|Checkpoint-VM|Compare-VM|Complete-VMFailover|Connect-VMNetworkAdapter|Connect-VMSan|Convert-VHD|Copy-VMFile|Debug-VM|Disable-VMConsoleSupport|Disable-VMEventing|Disable-VMIntegrationService|Disable-VMMigration|Disable-VMRemoteFXPhysicalVideoAdapter|Disable-VMResourceMetering|Disable-VMSwitchExtension|Disable-VMTPM|Disconnect-VMNetworkAdapter|Disconnect-VMSan|Dismount-VHD|Enable-VMConsoleSupport|Enable-VMEventing|Enable-VMIntegrationService|Enable-VMMigration|Enable-VMRemoteFXPhysicalVideoAdapter|Enable-VMReplication|Enable-VMResourceMetering|Enable-VMSwitchExtension|Enable-VMTPM|Export-VM|Export-VMSnapshot|Get-VHD|Get-VHDSet|Get-VHDSnapshot|Get-VM|Get-VMBios|Get-VMComPort|Get-VMConnectAccess|Get-VMDvdDrive|Get-VMFibreChannelHba|Get-VMFirmware|Get-VMFloppyDiskDrive|Get-VMGpuPartitionAdapter|Get-VMGroup|Get-VMHardDiskDrive|Get-VMHost|Get-VMHostCluster|Get-VMHostNumaNode|Get-VMHostNumaNodeStatus|Get-VMHostPartitionableGpu|Get-VMHostSupportedVersion|Get-VMIdeController|Get-VMIntegrationService|Get-VMKeyProtector|Get-VMMemory|Get-VMMigrationNetwork|Get-VMNetworkAdapter|Get-VMNetworkAdapterAcl|Get-VMNetworkAdapterExtendedAcl|Get-VMNetworkAdapterFailoverConfiguration|Get-VmNetworkAdapterIsolation|Get-VMNetworkAdapterRoutingDomainMapping|Get-VMNetworkAdapterTeamMapping|Get-VMNetworkAdapterVlan|Get-VMProcessor|Get-VMRemoteFx3dVideoAdapter|Get-VMRemoteFXPhysicalVideoAdapter|Get-VMReplication|Get-VMReplicationAuthorizationEntry|Get-VMReplicationServer|Get-VMResourcePool|Get-VMSan|Get-VMScsiController|Get-VMSecurity|Get-VMSnapshot|Get-VMStoragePath|Get-VMSwitch|Get-VMSwitchExtension|Get-VMSwitchExtensionPortData|Get-VMSwitchExtensionPortFeature|Get-VMSwitchExtensionSwitchData|Get-VMSwitchExtensionSwitchFeature|Get-VMSwitchTeam|Get-VMSystemSwitchExtension|Get-VMSystemSwitchExtensionPortFeature|Get-VMSystemSwitchExtensionSwitchFeature|Get-VMVideo|Grant-VMConnectAccess|Import-VM|Import-VMInitialReplication|Measure-VM|Measure-VMReplication|Measure-VMResourcePool|Merge-VHD|Mount-VHD|Move-VM|Move-VMStorage|New-VFD|New-VHD|New-VM|New-VMGroup|||New-VMReplicationAuthorizationEntry|New-VMResourcePool|New-VMSan|New-VMSwitch|Optimize-VHD|Optimize-VHDSet|Remove-VHDSnapshot|Remove-VM|Remove-VMDvdDrive|Remove-VMFibreChannelHba|Remove-VMGpuPartitionAdapter|Remove-VMGroup|Remove-VMGroupMember|Remove-VMHardDiskDrive|Remove-VMMigrationNetwork|Remove-VMNetworkAdapter|Remove-VMNetworkAdapterAcl|Remove-VMNetworkAdapterExtendedAcl|Remove-VMNetworkAdapterRoutingDomainMapping|Remove-VMNetworkAdapterTeamMapping|Remove-VMRemoteFx3dVideoAdapter|Remove-VMReplication|Remove-VMReplicationAuthorizationEntry|Remove-VMResourcePool|Remove-VMSan|Remove-VMSavedState|Remove-VMScsiController|Remove-VMSnapshot|Remove-VMStoragePath|Remove-VMSwitch|Remove-VMSwitchExtensionPortFeature|Remove-VMSwitchExtensionSwitchFeature|Remove-VMSwitchTeamMember|Rename-VM|Rename-VMGroup|Rename-VMNetworkAdapter|Rename-VMResourcePool|Rename-VMSan|Rename-VMSnapshot|Rename-VMSwitch|Repair-VM|Reset-VMReplicationStatistics|Reset-VMResourceMetering|Resize-VHD|Restart-VM|Restore-VMSnapshot|Resume-VM|Resume-VMReplication|Revoke-VMConnectAccess|Save-VM|Set-VHD|Set-VM|Set-VMBios|Set-VMComPort|Set-VMDvdDrive|Set-VMFibreChannelHba|Set-VMFirmware|Set-VMFloppyDiskDrive|Set-VMGpuPartitionAdapter|Set-VMHardDiskDrive|Set-VMHost|Set-VMHostCluster|Set-VMHostPartitionableGpu|Set-VMKeyProtector|Set-VMMemory|Set-VMMigrationNetwork|Set-VMNetworkAdapter|Set-VMNetworkAdapterFailoverConfiguration|Set-VmNetworkAdapterIsolation|Set-VmNetworkAdapterRoutingDomainMapping|Set-VMNetworkAdapterTeamMapping|Set-VMNetworkAdapterVlan|Set-VMProcessor|Set-VMRemoteFx3dVideoAdapter|Set-VMReplication|Set-VMReplicationAuthorizationEntry|Set-VMReplicationServer|Set-VMResourcePool|Set-VMSan|Set-VMSecurity|Set-VMSecurityPolicy|Set-VMSwitch|Set-VMSwitchExtensionPortFeature|Set-VMSwitchExtensionSwitchFeature|Set-VMSwitchTeam|Set-VMVideo|Start-VM|Start-VMFailover|Start-VMInitialReplication|Start-VMTrace|Stop-VM|Stop-VMFailover|Stop-VMInitialReplication|Stop-VMReplication|Stop-VMTrace|Suspend-VM|Suspend-VMReplication|Test-VHD|Test-VMNetworkAdapter|Test-VMReplicationConnection|Update-VMVersion|Clear-IISCentralCertProvider|Clear-IISConfigCollection|Disable-IISCentralCertProvider|Disable-IISSharedConfig|Enable-IISCentralCertProvider|Enable-IISSharedConfig|Export-IISConfiguration|Get-IISAppPool|Get-IISCentralCertProvider|Get-IISConfigAttributeValue|Get-IISConfigCollection|Get-IISConfigCollectionElement|Get-IISConfigElement|Get-IISConfigSection|Get-IISServerManager|Get-IISSharedConfig|Get-IISSite|Get-IISSiteBinding|New-IISConfigCollectionElement|New-IISSite|New-IISSiteBinding|Remove-IISConfigAttribute|Remove-IISConfigCollectionElement|Remove-IISConfigElement|Remove-IISSite|Remove-IISSiteBinding|Reset-IISServerManager|Set-IISCentralCertProvider|Set-IISCentralCertProviderCredential|Set-IISConfigAttributeValue|Start-IISCommitDelay|Start-IISSite|Stop-IISCommitDelay|Stop-IISSite|Copy-UserInternationalSettingsToSystem|Get-WinAcceptLanguageFromLanguageListOptOut|Get-WinCultureFromLanguageListOptOut|Get-WinDefaultInputMethodOverride|Get-WinHomeLocation|Get-WinLanguageBarOption|Get-WinSystemLocale|Get-WinUILanguageOverride|Get-WinUserLanguageList|New-WinUserLanguageList|Set-Culture|Set-WinAcceptLanguageFromLanguageListOptOut|Set-WinCultureFromLanguageListOptOut|Set-WinDefaultInputMethodOverride|Set-WinHomeLocation|Set-WinLanguageBarOption|Set-WinSystemLocale|Set-WinUILanguageOverride|Set-WinUserLanguageList|Add-IpamAddress|Add-IpamAddressSpace|Add-IpamBlock|Add-IpamCustomField|Add-IpamCustomFieldAssociation|Add-IpamCustomValue|Add-IpamDiscoveryDomain|Connect-IscsiTarget|Disconnect-IscsiTarget|Get-IscsiConnection|Get-IscsiSession|Get-IscsiTarget|Get-IscsiTargetPortal|New-IscsiTargetPortal|Register-IscsiSession|Remove-IscsiTargetPortal|Set-IscsiChapSecret|Unregister-IscsiSession|Update-IscsiTarget|Update-IscsiTargetPortal|Add-IscsiVirtualDiskTargetMapping|Checkpoint-IscsiVirtualDisk|Convert-IscsiVirtualDisk|Dismount-IscsiVirtualDiskSnapshot|Export-IscsiTargetServerConfiguration|Export-IscsiVirtualDiskSnapshot|Get-IscsiServerTarget|Get-IscsiTargetServerSetting|Get-IscsiVirtualDisk|Get-IscsiVirtualDiskSnapshot|Import-IscsiTargetServerConfiguration|Import-IscsiVirtualDisk|Mount-IscsiVirtualDiskSnapshot|New-IscsiServerTarget|New-IscsiVirtualDisk|Remove-IscsiServerTarget|Remove-IscsiVirtualDisk|Remove-IscsiVirtualDiskSnapshot|Remove-IscsiVirtualDiskTargetMapping|Resize-IscsiVirtualDisk|Restore-IscsiVirtualDisk|Set-IscsiServerTarget|Set-IscsiTargetServerSetting|Set-IscsiVirtualDisk|Set-IscsiVirtualDiskSnapshot|Stop-IscsiVirtualDiskOperation|Get-IseSnippet|Import-IseSnippet|New-IseSnippet|Add-KdsRootKey|Clear-KdsCache|Get-KdsConfiguration|Get-KdsRootKey|Set-KdsConfiguration|Test-KdsRootKey|Get-InstalledLanguage|Get-SystemPreferredUILanguage|Install-Language|Set-SystemPreferredUILanguage|Uninstall-Language|Find-LapsADExtendedRights|Get-LapsAADPassword|Get-LapsADPassword|Get-LapsDiagnostics|Invoke-LapsPolicyProcessing|Reset-LapsPassword|Set-LapsADAuditing|Set-LapsADComputerSelfPermission|Set-LapsADPasswordExpirationTime|Set-LapsADReadPasswordPermission|Set-LapsADResetPasswordPermission|Update-LapsADSchema|Disable-DiagnosticDataViewing|Enable-DiagnosticDataViewing|Get-DiagnosticData|Get-DiagnosticDataTypes|Get-DiagnosticDataViewingSetting|Get-DiagnosticStoreCapacity|Set-DiagnosticStoreCapacity|Compress-Archive|Expand-Archive|Export-Counter|Get-Counter|Get-WinEvent|Import-Counter|New-WinEvent|Start-Transcript|Stop-Transcript|Add-Computer|Add-Content|Checkpoint-Computer|Clear-Content|Clear-EventLog|Clear-Item|Clear-ItemProperty|Clear-RecycleBin|Complete-Transaction|Convert-Path|Copy-Item|Copy-ItemProperty|Debug-Process|Disable-ComputerRestore|Enable-ComputerRestore|Get-ChildItem|Get-Clipboard|Get-ComputerRestorePoint|Get-Content|Get-ControlPanelItem|Get-EventLog|Get-HotFix|Get-Item|Get-ItemProperty|Get-ItemPropertyValue|Get-Location|Get-Process|Get-PSDrive|Get-PSProvider|Get-Service|Get-Transaction|Get-WmiObject|Invoke-Item|Invoke-WmiMethod|Join-Path|Limit-EventLog|Move-Item|Move-ItemProperty|New-EventLog|New-Item|New-ItemProperty|New-PSDrive|New-Service|New-WebServiceProxy|Pop-Location|Push-Location|Register-WmiEvent|Remove-Computer|Remove-EventLog|Remove-Item|Remove-ItemProperty|Remove-PSDrive|Remove-WmiObject|Rename-Computer|Rename-Item|Rename-ItemProperty|Reset-ComputerMachinePassword|Resolve-Path|Restart-Computer|Restart-Service|Restore-Computer|Resume-Service|Set-Clipboard|Set-Content|Set-Item|Set-ItemProperty|Set-Location|Set-Service|Set-WmiInstance|Show-ControlPanelItem|Show-EventLog|Split-Path|Start-Process|Start-Service|Start-Transaction|Stop-Computer|Stop-Process|Stop-Service|Suspend-Service|Test-ComputerSecureChannel|Test-Connection|Test-Path|Undo-Transaction|Use-Transaction|Wait-Process|Write-EventLog|Export-ODataEndpointProxy|ConvertFrom-SecureString|ConvertTo-SecureString|Get-Acl|Get-AuthenticodeSignature|Get-CmsMessage|Get-Credential|Get-ExecutionPolicy|Get-PfxCertificate|Protect-CmsMessage|Set-Acl|Set-AuthenticodeSignature|Set-ExecutionPolicy|Unprotect-CmsMessage|ConvertFrom-SddlString|Format-Hex|Get-FileHash|Import-PowerShellDataFile|New-Guid|New-TemporaryFile|Add-Member|Add-Type|Clear-Variable|Compare-Object|ConvertFrom-Csv|ConvertFrom-Json|ConvertFrom-String|ConvertFrom-StringData|Convert-String|ConvertTo-Csv|ConvertTo-Html|ConvertTo-Json|ConvertTo-Xml|Debug-Runspace|Disable-PSBreakpoint|Disable-RunspaceDebug|Enable-PSBreakpoint|Enable-RunspaceDebug|Export-Alias|Export-Clixml|Export-Csv|Export-FormatData|Export-PSSession|Format-Custom|Format-List|Format-Table|Format-Wide|Get-Alias|Get-Culture|Get-Date|Get-Event|Get-EventSubscriber|Get-FormatData|Get-Host|Get-Member|Get-PSBreakpoint|Get-PSCallStack|Get-Random|Get-Runspace|Get-RunspaceDebug|Get-TraceSource|Get-TypeData|Get-UICulture|Get-Unique|Get-Variable|Group-Object|Import-Alias|Import-Clixml|Import-Csv|Import-LocalizedData|Import-PSSession|Invoke-Expression|Invoke-RestMethod|Invoke-WebRequest|Measure-Command|Measure-Object|New-Alias|New-Event|New-Object|New-TimeSpan|New-Variable|Out-File|Out-GridView|Out-Printer|Out-String|Read-Host|Register-EngineEvent|Register-ObjectEvent|Remove-Event|Remove-PSBreakpoint|Remove-TypeData|Remove-Variable|Select-Object|Select-String|Select-Xml|Send-MailMessage|Set-Alias|Set-Date|Set-PSBreakpoint|Set-TraceSource|Set-Variable|Show-Command|Sort-Object|Start-Sleep|Tee-Object|Trace-Command|Unblock-File|Unregister-Event|Update-FormatData|Update-List|Update-TypeData|Wait-Debugger|Wait-Event|Write-Debug|Write-Error|Write-Host|Write-Information|Write-Output|Write-Progress|Write-Verbose|Write-Warning|Connect-WSMan|Disable-WSManCredSSP|Disconnect-WSMan|Enable-WSManCredSSP|Get-WSManCredSSP|Get-WSManInstance|Invoke-WSManAction|New-WSManInstance|New-WSManSessionOption|Remove-WSManInstance|Set-WSManInstance|Set-WSManQuickConfig|Test-WSMan|Debug-MMAppPrelaunch|Disable-MMAgent|Enable-MMAgent|Get-MMAgent|Set-MMAgent|Clear-MSDSMSupportedHW|Disable-MSDSMAutomaticClaim|Enable-MSDSMAutomaticClaim|Get-MPIOAvailableHW|Get-MPIOSetting|Get-MSDSMAutomaticClaimSettings|Get-MSDSMGlobalDefaultLoadBalancePolicy|Get-MSDSMSupportedHW|New-MSDSMSupportedHW|Remove-MSDSMSupportedHW|Set-MPIOSetting|Set-MSDSMGlobalDefaultLoadBalancePolicy|Update-MPIOClaimedHW|Add-DtcClusterTMMapping|Complete-DtcDiagnosticTransaction|Get-Dtc|Get-DtcAdvancedHostSetting|Get-DtcAdvancedSetting|Get-DtcClusterDefault|Get-DtcClusterTMMapping|Get-DtcDefault|Get-DtcLog|Get-DtcNetworkSetting|Get-DtcTransaction|Get-DtcTransactionsStatistics|Get-DtcTransactionsTraceSession|Get-DtcTransactionsTraceSetting|Install-Dtc|Join-DtcDiagnosticResourceManager|New-DtcDiagnosticTransaction|Receive-DtcDiagnosticTransaction|Remove-DtcClusterTMMapping|Reset-DtcLog|Send-DtcDiagnosticTransaction|Set-DtcAdvancedHostSetting|Set-DtcAdvancedSetting|Set-DtcClusterDefault|Set-DtcClusterTMMapping|Set-DtcDefault|Set-DtcLog|Set-DtcNetworkSetting|Set-DtcTransaction|Set-DtcTransactionsTraceSession|Set-DtcTransactionsTraceSetting|Start-Dtc|Start-DtcDiagnosticResourceManager|Start-DtcTransactionsTraceSession|Stop-Dtc|Stop-DtcDiagnosticResourceManager|Stop-DtcTransactionsTraceSession|Test-Dtc|Undo-DtcDiagnosticTransaction|Uninstall-Dtc|Write-DtcTransactionsTraceSession|Clear-MSMQOutgoingQueue|Clear-MSMQQueue|Enable-MSMQCertificate|Get-MSMQCertificate|Get-MSMQOutgoingQueue|Get-MsmqQueue|Get-MsmqQueueACL|Get-MsmqQueueManager|Get-MsmqQueueManagerACL|Move-MsmqMessage|New-MsmqMessage|New-MsmqQueue|Receive-MsmqQueue|Remove-MsmqCertificate|Remove-MsmqQueue|Resume-MsmqOutgoingQueue|Send-MsmqQueue|Set-MsmqQueue|Set-MsmqQueueACL|Set-MsmqQueueManager|Set-MsmqQueueManagerACL|Suspend-MsmqOutgoingQueue|Add-WmsSystem|Clear-WmsStation|Close-WmsApp|Close-WmsSession|Disable-WmsDiskProtection|Disable-WmsScheduledUpdate|Disable-WmsWebLimiting|Disconnect-WmsSession|Enable-WmsDiskProtection|Enable-WmsScheduledUpdate|Enable-WmsWebLimiting|Get-WmsAlert|Get-WmsApp|Get-WmsDiskProtection|Get-WmsScheduledUpdate|Get-WmsSession|Get-WmsStation|Get-WmsSystem|Get-WmsUser|Get-WmsVersion|Get-WmsWebLimiting|Hide-WmsIdentifier|Join-WmsStation|Lock-WmsSession|Lock-WmsUsbStorage|New-WmsUser|Open-WmsApp|Publish-WmsDesktop|Remove-WmsSystem|Remove-WmsUser|Restart-WmsSystem|Resume-WmsDiskProtection|Search-WmsSystem|Set-WmsScheduledUpdate|Set-WmsStation|Set-WmsSystem|Set-WmsUser|Set-WmsWebLimiting|Show-WmsDesktop|Show-WmsIdentifier|Split-WmsStation|Stop-WmsSystem|Suspend-WmsDiskProtection|Unlock-WmsSession|Unlock-WmsUsbStorage|Unpublish-WmsDesktop|Update-WmsStation|Disable-WmsVirtualDesktopRole|Enable-WmsVirtualDesktopRole|Get-WmsVirtualDesktop|Import-WmsVirtualDesktop|New-WmsVirtualDesktop|New-WmsVirtualDesktopTemplate|Open-WmsVirtualDesktop|Edit-NanoServerImage|Get-NanoServerPackage|New-NanoServerImage|Disable-NetAdapter|Disable-NetAdapterBinding|Disable-NetAdapterChecksumOffload|Disable-NetAdapterEncapsulatedPacketTaskOffload|Disable-NetAdapterIPsecOffload|Disable-NetAdapterLso|Disable-NetAdapterPowerManagement|Disable-NetAdapterQos|Disable-NetAdapterRdma|Disable-NetAdapterRsc|Disable-NetAdapterRss|Disable-NetAdapterSriov|Disable-NetAdapterUso|Disable-NetAdapterVmq|Enable-NetAdapter|Enable-NetAdapterBinding|Enable-NetAdapterChecksumOffload|Enable-NetAdapterEncapsulatedPacketTaskOffload|Enable-NetAdapterIPsecOffload|Enable-NetAdapterLso|Enable-NetAdapterPowerManagement|Enable-NetAdapterQos|Enable-NetAdapterRdma|Enable-NetAdapterRsc|Enable-NetAdapterRss|Enable-NetAdapterSriov|Enable-NetAdapterUso|Enable-NetAdapterVmq|Get-NetAdapter|Get-NetAdapterAdvancedProperty|Get-NetAdapterBinding|Get-NetAdapterChecksumOffload|Get-NetAdapterDataPathConfiguration|Get-NetAdapterEncapsulatedPacketTaskOffload|Get-NetAdapterHardwareInfo|Get-NetAdapterIPsecOffload|Get-NetAdapterLso|Get-NetAdapterPowerManagement|Get-NetAdapterQos|Get-NetAdapterRdma|Get-NetAdapterRsc|Get-NetAdapterRss|Get-NetAdapterSriov|Get-NetAdapterSriovVf|Get-NetAdapterStatistics|Get-NetAdapterUso|Get-NetAdapterVmq|Get-NetAdapterVmqQueue|Get-NetAdapterVPort|New-NetAdapterAdvancedProperty|Remove-NetAdapterAdvancedProperty|Rename-NetAdapter|Reset-NetAdapterAdvancedProperty|Restart-NetAdapter|Set-NetAdapter|Set-NetAdapterAdvancedProperty|Set-NetAdapterBinding|Set-NetAdapterChecksumOffload|Set-NetAdapterDataPathConfiguration|Set-NetAdapterEncapsulatedPacketTaskOffload|Set-NetAdapterIPsecOffload|Set-NetAdapterLso|Set-NetAdapterPowerManagement|Set-NetAdapterQos|Set-NetAdapterRdma|Set-NetAdapterRsc|Set-NetAdapterRss|Set-NetAdapterSriov|Set-NetAdapterUso|Set-NetAdapterVmq|Get-NetConnectionProfile|Set-NetConnectionProfile|Add-NetEventNetworkAdapter|Add-NetEventPacketCaptureProvider|Add-NetEventProvider|Add-NetEventVFPProvider|Add-NetEventVmNetworkAdapter|Add-NetEventVmSwitch|Add-NetEventVmSwitchProvider|Add-NetEventWFPCaptureProvider|Get-NetEventNetworkAdapter|Get-NetEventPacketCaptureProvider|Get-NetEventProvider|Get-NetEventSession|Get-NetEventVFPProvider|Get-NetEventVmNetworkAdapter|Get-NetEventVmSwitch|Get-NetEventVmSwitchProvider|Get-NetEventWFPCaptureProvider|New-NetEventSession|Remove-NetEventNetworkAdapter|Remove-NetEventPacketCaptureProvider|Remove-NetEventProvider|Remove-NetEventSession|Remove-NetEventVFPProvider|Remove-NetEventVmNetworkAdapter|Remove-NetEventVmSwitch|Remove-NetEventVmSwitchProvider|Remove-NetEventWFPCaptureProvider|Set-NetEventPacketCaptureProvider|Set-NetEventProvider|Set-NetEventSession|Set-NetEventVFPProvider|Set-NetEventVmSwitchProvider|Set-NetEventWFPCaptureProvider|Start-NetEventSession|Stop-NetEventSession|Add-NetLbfoTeamMember|Add-NetLbfoTeamNic|Get-NetLbfoTeam|Get-NetLbfoTeamMember|Get-NetLbfoTeamNic|New-NetLbfoTeam|Remove-NetLbfoTeam|Remove-NetLbfoTeamMember|Remove-NetLbfoTeamNic|Rename-NetLbfoTeam|Set-NetLbfoTeam|Set-NetLbfoTeamMember|Set-NetLbfoTeamNic|Disable-NetLldpAgent|Enable-NetLldpAgent|Get-NetLldpAgent|Add-NetNatExternalAddress|Add-NetNatStaticMapping|Get-NetNat|Get-NetNatExternalAddress|Get-NetNatGlobal|Get-NetNatSession|Get-NetNatStaticMapping|New-NetNat|Remove-NetNat|Remove-NetNatExternalAddress|Remove-NetNatStaticMapping|Set-NetNat|Set-NetNatGlobal|Get-NetQosPolicy|New-NetQosPolicy|Remove-NetQosPolicy|Set-NetQosPolicy|Copy-NetFirewallRule|Copy-NetIPsecMainModeCryptoSet|Copy-NetIPsecMainModeRule|Copy-NetIPsecPhase1AuthSet|Copy-NetIPsecPhase2AuthSet|Copy-NetIPsecQuickModeCryptoSet|Copy-NetIPsecRule|Disable-NetFirewallRule|Disable-NetIPsecMainModeRule|Disable-NetIPsecRule|Enable-NetFirewallRule|Enable-NetIPsecMainModeRule|Enable-NetIPsecRule|Find-NetIPsecRule|Get-DAPolicyChange|Get-NetFirewallAddressFilter|Get-NetFirewallApplicationFilter|Get-NetFirewallDynamicKeywordAddress|Get-NetFirewallInterfaceFilter|Get-NetFirewallInterfaceTypeFilter|Get-NetFirewallPortFilter|Get-NetFirewallProfile|Get-NetFirewallRule|Get-NetFirewallSecurityFilter|Get-NetFirewallServiceFilter|Get-NetFirewallSetting|Get-NetIPsecDospSetting|Get-NetIPsecMainModeCryptoSet|Get-NetIPsecMainModeRule|Get-NetIPsecMainModeSA|Get-NetIPsecPhase1AuthSet|Get-NetIPsecPhase2AuthSet|Get-NetIPsecQuickModeCryptoSet|Get-NetIPsecQuickModeSA|Get-NetIPsecRule|New-NetFirewallDynamicKeywordAddress|New-NetFirewallRule|New-NetIPsecAuthProposal|New-NetIPsecDospSetting|New-NetIPsecMainModeCryptoProposal|New-NetIPsecMainModeCryptoSet|New-NetIPsecMainModeRule|New-NetIPsecPhase1AuthSet|New-NetIPsecPhase2AuthSet|New-NetIPsecQuickModeCryptoProposal|New-NetIPsecQuickModeCryptoSet|New-NetIPsecRule|Open-NetGPO|Remove-NetFirewallDynamicKeywordAddress|Remove-NetFirewallRule|Remove-NetIPsecDospSetting|Remove-NetIPsecMainModeCryptoSet|Remove-NetIPsecMainModeRule|Remove-NetIPsecMainModeSA|Remove-NetIPsecPhase1AuthSet|Remove-NetIPsecPhase2AuthSet|Remove-NetIPsecQuickModeCryptoSet|Remove-NetIPsecQuickModeSA|Remove-NetIPsecRule|Rename-NetFirewallRule|Rename-NetIPsecMainModeCryptoSet|Rename-NetIPsecMainModeRule|Rename-NetIPsecPhase1AuthSet|Rename-NetIPsecPhase2AuthSet|Rename-NetIPsecQuickModeCryptoSet|Rename-NetIPsecRule|Save-NetGPO|Set-NetFirewallAddressFilter|Set-NetFirewallApplicationFilter|Set-NetFirewallInterfaceFilter|Set-NetFirewallInterfaceTypeFilter|Set-NetFirewallPortFilter|Set-NetFirewallProfile|Set-NetFirewallRule|Set-NetFirewallSecurityFilter|Set-NetFirewallServiceFilter|Set-NetFirewallSetting|Set-NetIPsecDospSetting|Set-NetIPsecMainModeCryptoSet|Set-NetIPsecMainModeRule|Set-NetIPsecPhase1AuthSet|Set-NetIPsecPhase2AuthSet|Set-NetIPsecQuickModeCryptoSet|Set-NetIPsecRule|Show-NetFirewallRule|Show-NetIPsecRule|Sync-NetIPsecRule|Update-NetFirewallDynamicKeywordAddress|Update-NetIPsecRule|Add-NetSwitchTeamMember|Get-NetSwitchTeam|Get-NetSwitchTeamMember|New-NetSwitchTeam|Remove-NetSwitchTeam|Remove-NetSwitchTeamMember|Rename-NetSwitchTeam|Find-NetRoute|Get-NetCompartment|Get-NetIPAddress|Get-NetIPConfiguration|Get-NetIPInterface|Get-NetIPv4Protocol|Get-NetIPv6Protocol|Get-NetNeighbor|Get-NetOffloadGlobalSetting|Get-NetPrefixPolicy|Get-NetRoute|Get-NetTCPConnection|Get-NetTCPSetting|Get-NetTransportFilter|Get-NetUDPEndpoint|Get-NetUDPSetting|New-NetIPAddress|New-NetNeighbor|New-NetRoute|New-NetTransportFilter|Remove-NetIPAddress|Remove-NetNeighbor|Remove-NetRoute|Remove-NetTransportFilter|Set-NetIPAddress|Set-NetIPInterface|Set-NetIPv4Protocol|Set-NetIPv6Protocol|Set-NetNeighbor|Set-NetOffloadGlobalSetting|Set-NetRoute|Set-NetTCPSetting|Set-NetUDPSetting|Test-NetConnection|Get-NetVirtualizationCustomerRoute|Get-NetVirtualizationGlobal|Get-NetVirtualizationLookupRecord|Get-NetVirtualizationProviderAddress|Get-NetVirtualizationProviderRoute|New-NetVirtualizationCustomerRoute|New-NetVirtualizationLookupRecord|New-NetVirtualizationProviderAddress|New-NetVirtualizationProviderRoute|Remove-NetVirtualizationCustomerRoute|Remove-NetVirtualizationLookupRecord|Remove-NetVirtualizationProviderAddress|Remove-NetVirtualizationProviderRoute|Select-NetVirtualizationNextHop|Set-NetVirtualizationCustomerRoute|Set-NetVirtualizationGlobal|Set-NetVirtualizationLookupRecord|Set-NetVirtualizationProviderAddress|Set-NetVirtualizationProviderRoute|Get-DAConnectionStatus|Get-NCSIPolicyConfiguration|Reset-NCSIPolicyConfiguration|Set-NCSIPolicyConfiguration|Add-NetworkControllerNode|Clear-NetworkControllerNodeContent|Disable-NetworkControllerNode|Enable-NetworkControllerNode|Get-NetworkController|Get-NetworkControllerAccessControlList|Get-NetworkControllerAccessControlListRule|Get-NetworkControllerAuditingSettingsConfiguration|Get-NetworkControllerBackup|Get-NetworkControllerCluster|Get-NetworkControllerConnectivityCheck|Get-NetworkControllerConnectivityCheckResult|Get-NetworkControllerCredential|Get-NetworkControllerDiagnostic|Get-NetworkControllerDiscovery|Get-NetworkControllerFabricRoute|Get-NetworkControllerGateway|Get-NetworkControllerGatewayPool|Get-NetworkControllerIDnsServerConfiguration|Get-NetworkControllerInternalResourceInstances|Get-NetworkControllerIpPool|Get-NetworkControllerIpReservation|Get-NetworkControllerLoadBalancer|Get-NetworkControllerLoadBalancerBackendAddressPool|Get-NetworkControllerLoadBalancerConfiguration|Get-NetworkControllerLoadBalancerFrontendIpConfiguration|Get-NetworkControllerLoadBalancerInboundNatRule|Get-NetworkControllerLoadBalancerMux|Get-NetworkControllerLoadBalancerOutboundNatRule|Get-NetworkControllerLoadBalancerProbe|Get-NetworkControllerLoadBalancingRule|Get-NetworkControllerLogicalNetwork|Get-NetworkControllerLogicalSubnet|Get-NetworkControllerMacPool|Get-NetworkControllerNetworkInterface|Get-NetworkControllerNetworkInterfaceIpConfiguration|Get-NetworkControllerNode|Get-NetworkControllerPublicIpAddress|Get-NetworkControllerRestore|Get-NetworkControllerRoute|Get-NetworkControllerRouteTable|Get-NetworkControllerServer|Get-NetworkControllerServerInterface|Get-NetworkControllerServiceInsertion|Get-NetworkControllerState|Get-NetworkControllerStatistics|Get-NetworkControllerSubnetEgressReset|Get-NetworkControllerVirtualGateway|Get-NetworkControllerVirtualGatewayBgpPeer|Get-NetworkControllerVirtualGatewayBgpRouter|Get-NetworkControllerVirtualGatewayNetworkConnection|Get-NetworkControllerVirtualGatewayPolicyMap|Get-NetworkControllerVirtualNetwork|Get-NetworkControllerVirtualNetworkConfiguration|Get-NetworkControllerVirtualNetworkPeering|Get-NetworkControllerVirtualServer|Get-NetworkControllerVirtualSubnet|Get-NetworkControllerVirtualSwitchConfiguration|Install-NetworkController|Install-NetworkControllerCluster|Invoke-NetworkControllerConnectivityCheck|Invoke-NetworkControllerState|Invoke-NetworkControllerSubnetEgressReset|New-NetworkControllerAccessControlList|New-NetworkControllerAccessControlListRule|New-NetworkControllerBackup|New-NetworkControllerCredential|New-NetworkControllerFabricRoute|New-NetworkControllerGateway|New-NetworkControllerGatewayPool|New-NetworkControllerIDnsServerConfiguration|New-NetworkControllerIpPool|New-NetworkControllerIpReservation|New-NetworkControllerLoadBalancer|New-NetworkControllerLoadBalancerBackendAddressPool|New-NetworkControllerLoadBalancerConfiguration|New-NetworkControllerLoadBalancerFrontendIpConfiguration|New-NetworkControllerLoadBalancerInboundNatRule|New-NetworkControllerLoadBalancerMux|New-NetworkControllerLoadBalancerOutboundNatRule|New-NetworkControllerLoadBalancerProbe|New-NetworkControllerLoadBalancingRule|New-NetworkControllerLogicalNetwork|New-NetworkControllerLogicalSubnet|New-NetworkControllerMacPool|New-NetworkControllerNetworkInterface|New-NetworkControllerNetworkInterfaceIpConfiguration|New-NetworkControllerNodeObject|New-NetworkControllerPublicIpAddress|New-NetworkControllerRestore|New-NetworkControllerRoute|New-NetworkControllerRouteTable|New-NetworkControllerServer|New-NetworkControllerServerInterface|New-NetworkControllerServiceInsertion|New-NetworkControllerVirtualGateway|New-NetworkControllerVirtualGatewayBgpPeer|New-NetworkControllerVirtualGatewayBgpRouter|New-NetworkControllerVirtualGatewayNetworkConnection|New-NetworkControllerVirtualGatewayPolicyMap|New-NetworkControllerVirtualNetwork|New-NetworkControllerVirtualNetworkPeering|New-NetworkControllerVirtualServer|New-NetworkControllerVirtualSubnet|Remove-NetworkControllerAccessControlList|Remove-NetworkControllerAccessControlListRule|Remove-NetworkControllerBackup|Remove-NetworkControllerCredential|Remove-NetworkControllerFabricRoute|Remove-NetworkControllerGateway|Remove-NetworkControllerGatewayPool|Remove-NetworkControllerIpPool|Remove-NetworkControllerIpReservation|Remove-NetworkControllerLoadBalancer|Remove-NetworkControllerLoadBalancerBackendAddressPool|Remove-NetworkControllerLoadBalancerConfiguration|Remove-NetworkControllerLoadBalancerFrontendIpConfiguration|Remove-NetworkControllerLoadBalancerInboundNatRule|Remove-NetworkControllerLoadBalancerMux|Remove-NetworkControllerLoadBalancerOutboundNatRule|Remove-NetworkControllerLoadBalancerProbe|Remove-NetworkControllerLoadBalancingRule|Remove-NetworkControllerLogicalNetwork|Remove-NetworkControllerLogicalSubnet|Remove-NetworkControllerMacPool|Remove-NetworkControllerNetworkInterface|Remove-NetworkControllerNetworkInterfaceIpConfiguration|Remove-NetworkControllerNode|Remove-NetworkControllerPublicIpAddress|Remove-NetworkControllerRestore|Remove-NetworkControllerRoute|Remove-NetworkControllerRouteTable|Remove-NetworkControllerServer|Remove-NetworkControllerServerInterface|Remove-NetworkControllerServiceInsertion|Remove-NetworkControllerVirtualGateway|Remove-NetworkControllerVirtualGatewayBgpPeer|Remove-NetworkControllerVirtualGatewayBgpRouter|Remove-NetworkControllerVirtualGatewayNetworkConnection|Remove-NetworkControllerVirtualGatewayPolicyMap|Remove-NetworkControllerVirtualNetwork|Remove-NetworkControllerVirtualNetworkPeering|Remove-NetworkControllerVirtualServer|Remove-NetworkControllerVirtualSubnet|Repair-NetworkControllerCluster|Set-NetworkController|Set-NetworkControllerAuditingSettingsConfiguration|Set-NetworkControllerCluster|Set-NetworkControllerDiagnostic|Set-NetworkControllerNode|Set-NetworkControllerVirtualNetworkConfiguration|Set-NetworkControllerVirtualSwitchConfiguration|Uninstall-NetworkController|Uninstall-NetworkControllerCluster|Update-NetworkController|Debug-NetworkController|Debug-NetworkControllerConfigurationState|Debug-ServiceFabricNodeStatus|Get-NetworkControllerDeploymentInfo|Get-NetworkControllerManagedDevices|Get-NetworkControllerReplica|Add-NlbClusterNode|Add-NlbClusterNodeDip|Add-NlbClusterPortRule|Add-NlbClusterVip|Disable-NlbClusterPortRule|Enable-NlbClusterPortRule|Get-NlbCluster|Get-NlbClusterDriverInfo|Get-NlbClusterNode|Get-NlbClusterNodeDip|Get-NlbClusterNodeNetworkInterface|Get-NlbClusterPortRule|Get-NlbClusterVip|New-NlbCluster|New-NlbClusterIpv6Address|Remove-NlbCluster|Remove-NlbClusterNode|Remove-NlbClusterNodeDip|Remove-NlbClusterPortRule|Remove-NlbClusterVip|Resume-NlbCluster|Resume-NlbClusterNode|Set-NlbCluster|Set-NlbClusterNode|Set-NlbClusterNodeDip|Set-NlbClusterPortRule|Set-NlbClusterPortRuleNodeHandlingPriority|Set-NlbClusterPortRuleNodeWeight|Set-NlbClusterVip|Start-NlbCluster|Start-NlbClusterNode|Stop-NlbCluster|Stop-NlbClusterNode|Suspend-NlbCluster|Suspend-NlbClusterNode|Disable-NetworkSwitchEthernetPort|Disable-NetworkSwitchFeature|Disable-NetworkSwitchVlan|Enable-NetworkSwitchEthernetPort|Enable-NetworkSwitchFeature|Enable-NetworkSwitchVlan|Get-NetworkSwitchEthernetPort|Get-NetworkSwitchFeature|Get-NetworkSwitchGlobalData|Get-NetworkSwitchVlan|New-NetworkSwitchVlan|Remove-NetworkSwitchEthernetPortIPAddress|Remove-NetworkSwitchVlan|Restore-NetworkSwitchConfiguration|Save-NetworkSwitchConfiguration|Set-NetworkSwitchEthernetPortIPAddress|Set-NetworkSwitchPortMode|Set-NetworkSwitchPortProperty|Set-NetworkSwitchVlanProperty|Add-NetIPHttpsCertBinding|Disable-NetDnsTransitionConfiguration|Disable-NetIPHttpsProfile|Disable-NetNatTransitionConfiguration|Enable-NetDnsTransitionConfiguration|Enable-NetIPHttpsProfile|Enable-NetNatTransitionConfiguration|Get-Net6to4Configuration|Get-NetDnsTransitionConfiguration|Get-NetDnsTransitionMonitoring|Get-NetIPHttpsConfiguration|Get-NetIPHttpsState|Get-NetIsatapConfiguration|Get-NetNatTransitionConfiguration|Get-NetNatTransitionMonitoring|Get-NetTeredoConfiguration|Get-NetTeredoState|New-NetIPHttpsConfiguration|New-NetNatTransitionConfiguration|Remove-NetIPHttpsCertBinding|Remove-NetIPHttpsConfiguration|Remove-NetNatTransitionConfiguration|Rename-NetIPHttpsConfiguration|Reset-Net6to4Configuration|Reset-NetDnsTransitionConfiguration|Reset-NetIPHttpsConfiguration|Reset-NetIsatapConfiguration|Reset-NetTeredoConfiguration|Set-Net6to4Configuration|Set-NetDnsTransitionConfiguration|Set-NetIPHttpsConfiguration|Set-NetIsatapConfiguration|Set-NetNatTransitionConfiguration|Set-NetTeredoConfiguration|Disconnect-NfsSession|Get-NfsClientConfiguration|Get-NfsClientgroup|Get-NfsClientLock|Get-NfsMappedIdentity|Get-NfsMappingStore|Get-NfsMountedClient|Get-NfsNetgroup|Get-NfsNetgroupStore|Get-NfsOpenFile|Get-NfsServerConfiguration|Get-NfsSession|Get-NfsShare|Get-NfsSharePermission|Get-NfsStatistics|Grant-NfsSharePermission|Install-NfsMappingStore|New-NfsClientgroup|New-NfsMappedIdentity|New-NfsNetgroup|New-NfsShare|Remove-NfsClientgroup|Remove-NfsMappedIdentity|Remove-NfsNetgroup|Remove-NfsShare|Rename-NfsClientgroup|Reset-NfsStatistics|Resolve-NfsMappedIdentity|Revoke-NfsClientLock|Revoke-NfsMountedClient|Revoke-NfsOpenFile|Revoke-NfsSharePermission|Set-NfsClientConfiguration|Set-NfsClientgroup|Set-NfsMappedIdentity|Set-NfsMappingStore|Set-NfsNetgroup|Set-NfsNetgroupStore|Set-NfsServerConfiguration|Set-NfsShare|Test-NfsMappedIdentity|Test-NfsMappingStore|Export-NpsConfiguration|Get-NpsRadiusClient|Get-NpsSharedSecretTemplate|Import-NpsConfiguration|New-NpsRadiusClient|Remove-NpsRadiusClient|Set-NpsRadiusClient|Find-Package|Find-PackageProvider|Get-Package|Get-PackageProvider|Get-PackageSource|Import-PackageProvider|Install-Package|Install-PackageProvider|Register-PackageSource|Save-Package|Set-PackageSource|Uninstall-Package|Unregister-PackageSource|Clear-PcsvDeviceLog|Get-PcsvDevice|Get-PcsvDeviceLog|Restart-PcsvDevice|Set-PcsvDeviceBootConfiguration|Set-PcsvDeviceNetworkConfiguration|Set-PcsvDeviceUserPassword|Start-PcsvDevice|Stop-PcsvDevice|Get-PmemDedicatedMemory|Get-PmemDisk|Get-PmemPhysicalDevice|Get-PmemUnusedRegion|Initialize-PmemPhysicalDevice|New-PmemDedicatedMemory|New-PmemDisk|Remove-PmemDedicatedMemory|Remove-PmemDisk|AfterAll|AfterEach|Assert-MockCalled|Assert-VerifiableMocks|BeforeAll|BeforeEach|Context|Describe|Get-MockDynamicParameters|Get-TestDriveItem|In|InModuleScope|Invoke-Mock|Invoke-Pester|It|Mock|New-Fixture|Set-DynamicParameterVariables|Setup|Should|Add-CertificateEnrollmentPolicyServer|Export-Certificate|Export-PfxCertificate|Get-Certificate|Get-CertificateAutoEnrollmentPolicy|Get-CertificateEnrollmentPolicyServer|Get-CertificateNotificationTask|Get-PfxData|Import-Certificate|Import-PfxCertificate|New-CertificateNotificationTask|New-SelfSignedCertificate|Remove-CertificateEnrollmentPolicyServer|Remove-CertificateNotificationTask|Set-CertificateAutoEnrollmentPolicy|Switch-Certificate|Test-Certificate|Get-PlatformIdentifier|Disable-PnpDevice|Enable-PnpDevice|Get-PnpDevice|Get-PnpDeviceProperty|Find-DscResource|Find-Module|Find-Script|Get-InstalledModule|Get-InstalledScript|Get-PSRepository|Install-Module|Install-Script|New-ScriptFileInfo|Publish-Module|Publish-Script|Register-PSRepository|Save-Module|Save-Script|Set-PSRepository|Test-ScriptFileInfo|Uninstall-Module|Uninstall-Script|Unregister-PSRepository|Update-Module|Update-ModuleManifest|Update-Script|Update-ScriptFileInfo|Add-Printer|Add-PrinterDriver|Add-PrinterPort|Get-PrintConfiguration|Get-Printer|Get-PrinterDriver|Get-PrinterPort|Get-PrinterProperty|Get-PrintJob|Read-PrinterNfcTag|Remove-Printer|Remove-PrinterDriver|Remove-PrinterPort|Remove-PrintJob|Rename-Printer|Restart-PrintJob|Resume-PrintJob|Set-PrintConfiguration|Set-Printer|Set-PrinterProperty|Suspend-PrintJob|Write-PrinterNfcTag|ConvertTo-ProcessMitigationPolicy|Get-ProcessMitigation|Set-ProcessMitigation|Export-ProvisioningPackage|Export-Trace|Get-ProvisioningPackage|Get-TrustedProvisioningCertificate|Install-ProvisioningPackage|Install-TrustedProvisioningCertificate|Uninstall-ProvisioningPackage|Uninstall-TrustedProvisioningCertificate|Configuration|Disable-DscDebug|Enable-DscDebug|Get-DscConfiguration|Get-DscConfigurationStatus|Get-DscLocalConfigurationManager|Get-DscResource|New-DscChecksum|Remove-DscConfigurationDocument|Restore-DscConfiguration|Stop-DscConfiguration|Invoke-DscResource|Publish-DscConfiguration|Set-DscLocalConfigurationManager|Start-DscConfiguration|Test-DscConfiguration|Update-DscConfiguration|Disable-PSTrace|Disable-PSWSManCombinedTrace|Disable-WSManTrace|Enable-PSTrace|Enable-PSWSManCombinedTrace|Enable-WSManTrace|Get-LogProperties|Set-LogProperties|Start-Trace|Stop-Trace|PSConsoleHostReadline|Get-PSReadlineKeyHandler|Get-PSReadlineOption|Remove-PSReadlineKeyHandler|Set-PSReadlineKeyHandler|Set-PSReadlineOption|Add-JobTrigger|Disable-JobTrigger|Disable-ScheduledJob|Enable-JobTrigger|Enable-ScheduledJob|Get-JobTrigger|Get-ScheduledJob|Get-ScheduledJobOption|New-JobTrigger|New-ScheduledJobOption|Register-ScheduledJob|Remove-JobTrigger|Set-JobTrigger|Set-ScheduledJob|Set-ScheduledJobOption|Unregister-ScheduledJob|New-PSWorkflowSession|New-PSWorkflowExecutionOption|Invoke-AsWorkflow|Add-RDServer|Add-RDSessionHost|Add-RDVirtualDesktopToCollection|Disable-RDVirtualDesktopADMachineAccountReuse|Disconnect-RDUser|Enable-RDVirtualDesktopADMachineAccountReuse|Export-RDPersonalSessionDesktopAssignment|Export-RDPersonalVirtualDesktopAssignment|Get-RDAvailableApp|Get-RDCertificate|Get-RDConnectionBrokerHighAvailability|Get-RDDeploymentGatewayConfiguration|Get-RDFileTypeAssociation|Get-RDLicenseConfiguration|Get-RDPersonalSessionDesktopAssignment|Get-RDPersonalVirtualDesktopAssignment|Get-RDPersonalVirtualDesktopPatchSchedule|Get-RDRemoteApp|Get-RDRemoteDesktop|Get-RDServer|Get-RDSessionCollection|Get-RDSessionCollectionConfiguration|Get-RDSessionHost|Get-RDUserSession|Get-RDVirtualDesktop|Get-RDVirtualDesktopCollection|Get-RDVirtualDesktopCollectionConfiguration|Get-RDVirtualDesktopCollectionJobStatus|Get-RDVirtualDesktopConcurrency|Get-RDVirtualDesktopIdleCount|Get-RDVirtualDesktopTemplateExportPath|Get-RDWorkspace|Grant-RDOUAccess|Import-RDPersonalSessionDesktopAssignment|Import-RDPersonalVirtualDesktopAssignment|Invoke-RDUserLogoff|Move-RDVirtualDesktop|New-RDCertificate|New-RDPersonalVirtualDesktopPatchSchedule|New-RDRemoteApp|New-RDSessionCollection|New-RDSessionDeployment|New-RDVirtualDesktopCollection|New-RDVirtualDesktopDeployment|Remove-RDDatabaseConnectionString|Remove-RDPersonalSessionDesktopAssignment|Remove-RDPersonalVirtualDesktopAssignment|Remove-RDPersonalVirtualDesktopPatchSchedule|Remove-RDRemoteApp|Remove-RDServer|Remove-RDSessionCollection|Remove-RDSessionHost|Remove-RDVirtualDesktopCollection|Remove-RDVirtualDesktopFromCollection|Send-RDUserMessage|Set-RDActiveManagementServer|Set-RDCertificate|Set-RDClientAccessName|Set-RDConnectionBrokerHighAvailability|Set-RDDatabaseConnectionString|Set-RDDeploymentGatewayConfiguration|Set-RDFileTypeAssociation|Set-RDLicenseConfiguration|Set-RDPersonalSessionDesktopAssignment|Set-RDPersonalVirtualDesktopAssignment|Set-RDPersonalVirtualDesktopPatchSchedule|Set-RDRemoteApp|Set-RDRemoteDesktop|Set-RDSessionCollectionConfiguration|Set-RDSessionHost|Set-RDVirtualDesktopCollectionConfiguration|Set-RDVirtualDesktopConcurrency|Set-RDVirtualDesktopIdleCount|Set-RDVirtualDesktopTemplateExportPath|Set-RDWorkspace|Stop-RDVirtualDesktopCollectionJob|Test-RDOUAccess|Test-RDVirtualDesktopADMachineAccountReuse|Update-RDVirtualDesktopCollection|Add-BgpCustomRoute|Add-BgpPeer|Add-BgpRouteAggregate|Add-BgpRouter|Add-BgpRoutingPolicy|Add-BgpRoutingPolicyForPeer|Add-DAAppServer|Add-DAClient|Add-DAClientDnsConfiguration|Add-DAEntryPoint|Add-DAMgmtServer|Add-RemoteAccessIpFilter|Add-RemoteAccessLoadBalancerNode|Add-RemoteAccessRadius|Add-VpnIPAddressRange|Add-VpnS2SInterface|Add-VpnSstpProxyRule|Clear-BgpRouteFlapDampening|Clear-RemoteAccessInboxAccountingStore|Clear-VpnS2SInterfaceStatistics|Connect-VpnS2SInterface|Disable-BgpRouteFlapDampening|Disable-DAMultiSite|Disable-DAOtpAuthentication|Disable-RemoteAccessRoutingDomain|Disconnect-VpnS2SInterface|Disconnect-VpnUser|Enable-BgpRouteFlapDampening|Enable-DAMultiSite|Enable-DAOtpAuthentication|Enable-RemoteAccessRoutingDomain|Get-BgpCustomRoute|Get-BgpPeer|Get-BgpRouteAggregate|Get-BgpRouteFlapDampening|Get-BgpRouteInformation|Get-BgpRouter|Get-BgpRoutingPolicy|Get-BgpStatistics|Get-DAAppServer|Get-DAClient|Get-DAClientDnsConfiguration|Get-DAEntryPoint|Get-DAEntryPointDC|Get-DAMgmtServer|Get-DAMultiSite|Get-DANetworkLocationServer|Get-DAOtpAuthentication|Get-DAServer|Get-RemoteAccess|Get-RemoteAccessAccounting|Get-RemoteAccessConfiguration|Get-RemoteAccessConnectionStatistics|Get-RemoteAccessConnectionStatisticsSummary|Get-RemoteAccessHealth|Get-RemoteAccessIpFilter|Get-RemoteAccessLoadBalancer|Get-RemoteAccessRadius|Get-RemoteAccessRoutingDomain|Get-RemoteAccessUserActivity|Get-RoutingProtocolPreference|Get-VpnAuthProtocol|Get-VpnS2SInterface|Get-VpnS2SInterfaceStatistics|Get-VpnServerConfiguration|Get-VpnSstpProxyRule|Install-RemoteAccess|New-VpnSstpProxyRule|New-VpnTrafficSelector|Remove-BgpCustomRoute|Remove-BgpPeer|Remove-BgpRouteAggregate|Remove-BgpRouter|Remove-BgpRoutingPolicy|Remove-BgpRoutingPolicyForPeer|Remove-DAAppServer|Remove-DAClient|Remove-DAClientDnsConfiguration|Remove-DAEntryPoint|Remove-DAMgmtServer|Remove-RemoteAccessIpFilter|Remove-RemoteAccessLoadBalancerNode|Remove-RemoteAccessRadius|Remove-VpnIPAddressRange|Remove-VpnS2SInterface|Remove-VpnSstpProxyRule|Set-BgpPeer|Set-BgpRouteAggregate|Set-BgpRouteFlapDampening|Set-BgpRouter|Set-BgpRoutingPolicy|Set-BgpRoutingPolicyForPeer|Set-DAAppServerConnection|Set-DAClient|Set-DAClientDnsConfiguration|Set-DAEntryPoint|Set-DAEntryPointDC|Set-DAMultiSite|Set-DANetworkLocationServer|Set-DAOtpAuthentication|Set-DAServer|Set-RemoteAccess|Set-RemoteAccessAccounting|Set-RemoteAccessConfiguration|Set-RemoteAccessInboxAccountingStore|Set-RemoteAccessIpFilter|Set-RemoteAccessLoadBalancer|Set-RemoteAccessRadius|Set-RemoteAccessRoutingDomain|Set-RoutingProtocolPreference|Set-VpnAuthProtocol|Set-VpnAuthType|Set-VpnIPAddressAssignment|Set-VpnS2SInterface|Set-VpnServerConfiguration|Set-VpnSstpProxyRule|Start-BgpPeer|Stop-BgpPeer|Uninstall-RemoteAccess|Update-DAMgmtServer|Convert-License|Disable-ScheduledTask|Enable-ScheduledTask|Export-ScheduledTask|Get-ClusteredScheduledTask|Get-ScheduledTask|Get-ScheduledTaskInfo|New-ScheduledTask|New-ScheduledTaskAction|New-ScheduledTaskPrincipal|New-ScheduledTaskSettingsSet|New-ScheduledTaskTrigger|Register-ClusteredScheduledTask|Register-ScheduledTask|Set-ClusteredScheduledTask|Set-ScheduledTask|Start-ScheduledTask|Stop-ScheduledTask|Unregister-ClusteredScheduledTask|Unregister-ScheduledTask|Confirm-SecureBootUEFI|Format-SecureBootUEFI|Get-SecureBootPolicy|Get-SecureBootUEFI|Set-SecureBootUEFI|Get-DisplayResolution|Set-DisplayResolution|Disable-ServerManagerStandardUserRemoting|Enable-ServerManagerStandardUserRemoting|Get-WindowsFeature|Install-WindowsFeature|Uninstall-WindowsFeature|Get-SMCounterSample|Get-SMPerformanceCollector|Get-SMServerBpaResult|Get-SMServerClusterName|Get-SMServerEvent|Get-SMServerFeature|Get-SMServerInventory|Get-SMServerService|Remove-SMServerPerformanceLog|Start-SMPerformanceCollector|Stop-SMPerformanceCollector|Get-KeyProtectorFromShieldingDataFile|Get-ShieldedVMProvisioningStatus|Initialize-ShieldedVM|New-ShieldedVMSpecializationDataFile|Test-ShieldingDataApplicability|Import-ShieldingDataFile|New-ShieldingDataFile|New-VolumeIDQualifier|Save-ShieldedVMRecoveryKey|Save-VolumeSignatureCatalog|Unprotect-ShieldedVMRecoveryKey|Initialize-VMShieldingHelperVHD|Protect-TemplateDisk|Block-SmbShareAccess|Close-SmbOpenFile|Close-SmbSession|Disable-SmbDelegation|Enable-SmbDelegation|Get-SmbBandwidthLimit|Get-SmbClientConfiguration|Get-SmbClientNetworkInterface|Get-SmbConnection|Get-SmbDelegation|Get-SmbGlobalMapping|Get-SmbMapping|Get-SmbMultichannelConnection|Get-SmbMultichannelConstraint|Get-SmbOpenFile|Get-SmbServerCertificateMapping|Get-SmbServerCertProps|Get-SmbServerConfiguration|Get-SmbServerNetworkInterface|Get-SmbSession|Get-SmbShare|Get-SmbShareAccess|Grant-SmbShareAccess|New-SmbGlobalMapping|New-SmbMapping|New-SmbMultichannelConstraint|New-SmbServerCertificateMapping|New-SmbShare|Remove-SmbBandwidthLimit|Remove-SmbComponent|Remove-SmbGlobalMapping|Remove-SmbMapping|Remove-SmbMultichannelConstraint|Remove-SmbServerCertificateMapping|Remove-SmbShare|Reset-SmbClientConfiguration|Reset-SmbServerConfiguration|Revoke-SmbShareAccess|Set-SmbBandwidthLimit|Set-SmbClientConfiguration|Set-SmbPathAcl|Set-SmbServerCertificateMapping|Set-SmbServerConfiguration|Set-SmbShare|Unblock-SmbShareAccess|Update-SmbMultichannelConnection|Move-SmbClient|Get-SmbWitnessClient|Move-SmbWitnessClient|Register-SmisProvider|Search-SmisProvider|Unregister-SmisProvider|Get-SilComputer|Get-SilComputerIdentity|Get-SilData|Get-SilLogging|Get-SilSoftware|Get-SilUalAccess|Get-SilWindowsUpdate|Publish-SilData|Set-SilLogging|Start-SilLogging|Stop-SilLogging|Get-StartApps|Export-StartLayout|Import-StartLayout|Export-StartLayoutEdgeAssets|Add-InitiatorIdToMaskingSet|Add-PartitionAccessPath|Add-PhysicalDisk|Add-TargetPortToMaskingSet|Add-VirtualDiskToMaskingSet|Block-FileShareAccess|Clear-Disk|Clear-FileStorageTier|Connect-VirtualDisk|Debug-FileShare|Debug-StorageSubSystem|Debug-Volume|Disable-PhysicalDiskIdentification|Disable-StorageEnclosureIdentification|Disable-StorageHighAvailability|Disable-StorageMaintenanceMode|Disconnect-VirtualDisk|Dismount-DiskImage|Enable-PhysicalDiskIdentification|Enable-StorageEnclosureIdentification|Enable-StorageHighAvailability|Enable-StorageMaintenanceMode|Format-Volume|Get-DedupProperties|Get-Disk|||||Get-DiskImage|Get-DiskStorageNodeView|Get-FileIntegrity|Get-FileShare|Get-FileShareAccessControlEntry|Get-FileStorageTier|Get-InitiatorId|Get-InitiatorPort|Get-MaskingSet|Get-OffloadDataTransferSetting|Get-Partition|Get-PartitionSupportedSize|Get-PhysicalDisk|Get-PhysicalDiskStorageNodeView|Get-PhysicalExtent|Get-PhysicalExtentAssociation|Get-ResiliencySetting|Get-StorageAdvancedProperty|Get-StorageDiagnosticInfo|Get-StorageEnclosure|Get-StorageEnclosureStorageNodeView|Get-StorageEnclosureVendorData|Get-StorageFaultDomain|Get-StorageFileServer|Get-StorageFirmwareInformation|Get-StorageHealthAction|Get-StorageHealthReport|Get-StorageHealthSetting|Get-StorageJob|Get-StorageNode|Get-StoragePool|Get-StorageProvider|Get-StorageReliabilityCounter|Get-StorageSetting|Get-StorageSubSystem|Get-StorageTier|Get-StorageTierSupportedSize|Get-SupportedClusterSizes|Get-SupportedFileSystems|Get-TargetPort|Get-TargetPortal|Get-VirtualDisk|Get-VirtualDiskSupportedSize|Get-Volume|Get-VolumeCorruptionCount|Get-VolumeScrubPolicy|Grant-FileShareAccess|Hide-VirtualDisk|Initialize-Disk|Mount-DiskImage|New-FileShare|New-MaskingSet|New-Partition|New-StorageFileServer|New-StoragePool|New-StorageSubsystemVirtualDisk|New-StorageTier|New-VirtualDisk|New-VirtualDiskClone|New-VirtualDiskSnapshot|New-Volume|Optimize-StoragePool|Optimize-Volume|Register-StorageSubsystem|Remove-FileShare|Remove-InitiatorId|Remove-InitiatorIdFromMaskingSet|Remove-MaskingSet|Remove-Partition|Remove-PartitionAccessPath|Remove-PhysicalDisk|Remove-StorageFileServer|Remove-StorageHealthSetting|Remove-StoragePool|Remove-StorageTier|Remove-TargetPortFromMaskingSet|Remove-VirtualDisk|Remove-VirtualDiskFromMaskingSet|Rename-MaskingSet|Repair-FileIntegrity|Repair-VirtualDisk|Repair-Volume|Reset-PhysicalDisk|Reset-StorageReliabilityCounter|Resize-Partition|Resize-StorageTier|Resize-VirtualDisk|Revoke-FileShareAccess|Set-Disk|Set-FileIntegrity|Set-FileShare|Set-FileStorageTier|Set-InitiatorPort|Set-Partition|Set-PhysicalDisk|Set-ResiliencySetting|Set-StorageFileServer|Set-StorageHealthSetting|Set-StoragePool|Set-StorageProvider|Set-StorageSetting|Set-StorageSubSystem|Set-StorageTier|Set-VirtualDisk|Set-Volume|Set-VolumeScrubPolicy|Show-VirtualDisk|Start-StorageDiagnosticLog|Stop-StorageDiagnosticLog|Stop-StorageJob|Unblock-FileShareAccess|Unregister-StorageSubsystem|Update-Disk|Update-HostStorageCache|Update-StorageFirmware|Update-StoragePool|Update-StorageProviderCache|Write-VolumeCache|Get-StorageQoSFlow|Get-StorageQosPolicy|Get-StorageQosPolicyStore|Get-StorageQosVolume|New-StorageQosPolicy|Remove-StorageQosPolicy|Set-StorageQosPolicy|Set-StorageQosPolicyStore|Clear-SRMetadata|Dismount-SRDestination|Export-SRConfiguration|Get-SRAccess|Get-SRDelegation|Get-SRGroup|Get-SRNetworkConstraint|Get-SRPartnership|Grant-SRAccess|Grant-SRDelegation|Mount-SRDestination|New-SRGroup|New-SRPartnership|Remove-SRGroup|Remove-SRNetworkConstraint|Remove-SRPartnership|Revoke-SRAccess|Revoke-SRDelegation|Set-SRGroup|Set-SRNetworkConstraint|Set-SRPartnership|Suspend-SRGroup|Sync-SRGroup|Test-SRTopology|Disable-SyncShare|Enable-SyncShare|Get-SyncServerSetting|Get-SyncShare|Get-SyncUserStatus|New-SyncShare|Remove-SyncShare|Repair-SyncShare|Set-SyncServerSetting|Set-SyncShare|Add-InsightsCapability|Disable-InsightsCapability|Disable-InsightsCapabilitySchedule|Enable-InsightsCapability|Enable-InsightsCapabilitySchedule|Get-InsightsCapability|Get-InsightsCapabilityAction|Get-InsightsCapabilityResult|Get-InsightsCapabilitySchedule|Invoke-InsightsCapability|Remove-InsightsCapability|Remove-InsightsCapabilityAction|Set-InsightsCapabilityAction|Set-InsightsCapabilitySchedule|Update-InsightsCapability|Disable-TlsCipherSuite|Disable-TlsEccCurve|Disable-TlsSessionTicketKey|Enable-TlsCipherSuite|Enable-TlsEccCurve|Enable-TlsSessionTicketKey|Export-TlsSessionTicketKey|Get-TlsCipherSuite|Get-TlsEccCurve|New-TlsSessionTicketKey|Get-TroubleshootingPack|Invoke-TroubleshootingPack|Clear-Tpm|ConvertTo-TpmOwnerAuth|Disable-TpmAutoProvisioning|Enable-TpmAutoProvisioning|Get-Tpm|Get-TpmEndorsementKeyInfo|Get-TpmSupportedFeature|Import-TpmOwnerAuth|Initialize-Tpm|Set-TpmOwnerAuth|Unblock-Tpm|Clear-UevAppxPackage|Clear-UevConfiguration|Disable-Uev|Disable-UevAppxPackage|Disable-UevTemplate|Enable-Uev|Enable-UevAppxPackage|Enable-UevTemplate|Export-UevConfiguration|Export-UevPackage|Get-UevAppxPackage|Get-UevConfiguration|Get-UevStatus|Get-UevTemplate|Get-UevTemplateProgram|Import-UevConfiguration|Register-UevTemplate|Repair-UevTemplateIndex|Restore-UevBackup|Restore-UevUserSetting|Set-UevConfiguration|Set-UevTemplateProfile|Test-UevTemplate|Unregister-UevTemplate|Update-UevTemplate|Add-WsusComputer|Add-WsusDynamicCategory|Approve-WsusUpdate|Deny-WsusUpdate|Get-WsusClassification|Get-WsusComputer|Get-WsusDynamicCategory|Get-WsusProduct|Get-WsusServer|Get-WsusUpdate|Invoke-WsusServerCleanup|Remove-WsusDynamicCategory|Set-WsusClassification|Set-WsusDynamicCategory|Set-WsusProduct|Set-WsusServerSynchronization|Disable-Ual|Enable-Ual|Get-Ual|Get-UalDailyAccess|Get-UalDailyDeviceAccess|Get-UalDailyUserAccess|Get-UalDeviceAccess|Get-UalDns|Get-UalHyperV|Get-UalOverview|Get-UalServerDevice|Get-UalServerUser|Get-UalSystemId|Get-UalUserAccess|Add-VamtProductKey|Export-VamtData|Find-VamtManagedMachine|Get-VamtConfirmationId|Get-VamtProduct|Get-VamtProductKey|Import-VamtData|Initialize-VamtData|Install-VamtConfirmationId|Install-VamtProductActivation|Install-VamtProductKey|Update-VamtProduct|Add-VpnConnection|Add-VpnConnectionRoute|Add-VpnConnectionTriggerApplication|Add-VpnConnectionTriggerDnsConfiguration|Add-VpnConnectionTriggerTrustedNetwork|Get-VpnConnection|Get-VpnConnectionTrigger|New-EapConfiguration|New-VpnServerAddress|Remove-VpnConnection|Remove-VpnConnectionRoute|Remove-VpnConnectionTriggerApplication|Remove-VpnConnectionTriggerDnsConfiguration|Remove-VpnConnectionTriggerTrustedNetwork|Set-VpnConnection|Set-VpnConnectionIPsecConfiguration|Set-VpnConnectionProxy|Set-VpnConnectionTriggerDnsConfiguration|Set-VpnConnectionTriggerTrustedNetwork|Add-WdsDriverPackage|Approve-WdsClient|Copy-WdsInstallImage|Deny-WdsClient|Disable-WdsBootImage|Disable-WdsDriverPackage|Disable-WdsInstallImage|Disconnect-WdsMulticastClient|Enable-WdsBootImage|Enable-WdsDriverPackage|Enable-WdsInstallImage|Export-WdsBootImage|Export-WdsInstallImage|Get-WdsBootImage|Get-WdsClient|Get-WdsDriverPackage|Get-WdsInstallImage|Get-WdsInstallImageGroup|Get-WdsMulticastClient|Import-WdsBootImage|Import-WdsDriverPackage|Import-WdsInstallImage|New-WdsClient|New-WdsInstallImageGroup|Remove-WdsBootImage|Remove-WdsClient|Remove-WdsDriverPackage|Remove-WdsInstallImage|Remove-WdsInstallImageGroup|Set-WdsBootImage|Set-WdsClient|Set-WdsInstallImage|Set-WdsInstallImageGroup|Add-WebConfiguration|Add-WebConfigurationLock|Add-WebConfigurationProperty|Backup-WebConfiguration|Clear-WebCentralCertProvider|Clear-WebConfiguration|Clear-WebRequestTracingSetting|Clear-WebRequestTracingSettings|ConvertTo-WebApplication|Disable-WebCentralCertProvider|Disable-WebGlobalModule|Disable-WebRequestTracing|Enable-WebCentralCertProvider|Enable-WebGlobalModule|Enable-WebRequestTracing|Get-WebAppDomain|Get-WebApplication|Get-WebAppPoolState|Get-WebBinding|Get-WebCentralCertProvider|Get-WebConfigFile|Get-WebConfiguration|Get-WebConfigurationBackup|Get-WebConfigurationLocation|Get-WebConfigurationLock|Get-WebConfigurationProperty|Get-WebFilePath|Get-WebGlobalModule|Get-WebHandler|Get-WebItemState|Get-WebManagedModule|Get-WebRequest|Get-Website|Get-WebsiteState|Get-WebURL|Get-WebVirtualDirectory|New-WebApplication|New-WebAppPool|New-WebBinding|New-WebFtpSite|New-WebGlobalModule|New-WebHandler|New-WebManagedModule|New-Website|New-WebVirtualDirectory|Remove-WebApplication|Remove-WebAppPool|Remove-WebBinding|Remove-WebConfigurationBackup|Remove-WebConfigurationLocation|Remove-WebConfigurationLock|Remove-WebConfigurationProperty|Remove-WebGlobalModule|Remove-WebHandler|Remove-WebManagedModule|Remove-Website|Remove-WebVirtualDirectory|Rename-WebConfigurationLocation|Restart-WebAppPool|Restart-WebItem|Restore-WebConfiguration|Select-WebConfiguration|Set-WebBinding|Set-WebCentralCertProvider|Set-WebCentralCertProviderCredential|Set-WebConfiguration|Set-WebConfigurationProperty|Set-WebGlobalModule|Set-WebHandler|Set-WebManagedModule|Start-WebAppPool|Start-WebCommitDelay|Start-WebItem|Start-Website|Stop-WebAppPool|Stop-WebCommitDelay|Stop-WebItem|Stop-Website|Add-WebApplicationProxyApplication|Get-WebApplicationProxyApplication|Get-WebApplicationProxyAvailableADFSRelyingParty|Get-WebApplicationProxyConfiguration|Get-WebApplicationProxyHealth|Get-WebApplicationProxySslCertificate|Install-WebApplicationProxy|Remove-WebApplicationProxyApplication|Set-WebApplicationProxyApplication|Set-WebApplicationProxyConfiguration|Set-WebApplicationProxySslCertificate|Update-WebApplicationProxyDeviceRegistration|Get-WheaMemoryPolicy|Set-WheaMemoryPolicy|Get-WindowsDeveloperLicense|Show-WindowsDeveloperLicenseRegistration|Unregister-WindowsDeveloperLicense|Clear-WindowsDiagnosticData|Disable-WindowsErrorReporting|Enable-WindowsErrorReporting|Get-WindowsErrorReporting|Get-WindowsSearchSetting|Set-WindowsSearchSetting|Add-WBBackupTarget|Add-WBBareMetalRecovery|Add-WBFileSpec|Add-WBSystemState|Add-WBVirtualMachine|Add-WBVolume|Backup-ACL|Get-WBBackupSet|Get-WBBackupTarget|Get-WBBackupVolumeBrowsePath|Get-WBBareMetalRecovery|Get-WBDisk|Get-WBFileSpec|Get-WBJob|Get-WBPerformanceConfiguration|Get-WBPolicy|Get-WBSchedule|Get-WBSummary|Get-WBSystemState|Get-WBVirtualMachine|Get-WBVolume|Get-WBVssBackupOption|New-WBBackupTarget|New-WBFileSpec|New-WBPolicy|Remove-WBBackupSet|Remove-WBBackupTarget|Remove-WBBareMetalRecovery|Remove-WBCatalog|Remove-WBFileSpec|Remove-WBPolicy|Remove-WBSystemState|Remove-WBVirtualMachine|Remove-WBVolume|Restore-ACL|Restore-WBCatalog|Resume-WBBackup|Resume-WBVolumeRecovery|Set-WBPerformanceConfiguration|Set-WBPolicy|Set-WBSchedule|Set-WBVssBackupOption|Start-WBApplicationRecovery|Start-WBBackup|Start-WBFileRecovery|Start-WBHyperVRecovery|Start-WBSystemStateRecovery|Start-WBVolumeRecovery|Stop-WBJob|Get-WindowsUpdateLog",r=this.createKeywordMapper({"support.function":n,keyword:t},"identifier"),i="eq|ne|gt|lt|le|ge|like|notlike|match|notmatch|contains|notcontains|in|notin|band|bor|bxor|bnot|ceq|cne|cgt|clt|cle|cge|clike|cnotlike|cmatch|cnotmatch|ccontains|cnotcontains|cin|cnotin|ieq|ine|igt|ilt|ile|ige|ilike|inotlike|imatch|inotmatch|icontains|inotcontains|iin|inotin|and|or|xor|not|split|join|replace|f|csplit|creplace|isplit|ireplace|is|isnot|as|shl|shr";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.start",regex:"<#",next:"comment"},{token:"string",regex:/@'$/,push:[{token:"string",regex:/^'@/,next:"pop"},{defaultToken:"string"}]},{token:"string",regex:/@"$/,push:[{token:"string",regex:/^"@/,next:"pop"},{include:"expressions"},{include:"expandable-strings"},{defaultToken:"string"}]},{include:"strings"},{include:"variables"},{include:"statements"},{include:"expressions"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment.end",regex:"#>",next:"start"},{token:"doc.comment.tag",regex:"^\\.\\w+"},{defaultToken:"comment"}],"expandable-strings":[{token:"constant.language.escape",regex:/`./},{include:"variables"}],variables:[{token:"variable.instance",regex:"[$]"+e+"\\b"},{token:"variable.braced",regex:/\$\{/,push:[{token:"variable.braced",regex:/\}/,next:"pop"},{token:"constant.language.escape",regex:/`./},{defaultToken:"variable.braced"}]}],statements:[{token:"punctuation",regex:";"},{token:"keyword.operator",regex:"\\-(?:"+i+")"},{token:"keyword.operator",regex:"&|\\+|\\-|\\*|\\/|\\%|\\=|\\>|\\&|\\!|\\|"},{include:"constants"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"}],constants:[{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"[$](?:[Tt]rue|[Ff]alse)\\b"},{token:"constant.language",regex:"[$][Nn]ull\\b"}],strings:[{token:"string",regex:"['][^']*[']"},{token:"string",regex:/"/,push:[{token:"string",regex:/"|$/,next:"pop"},{include:"expressions"},{include:"expandable-strings"},{defaultToken:"string"}]}],expressions:[{token:"keyword.operator",regex:/[$@]\(/,push:[{token:"keyword.operator",regex:/\)/,next:"pop"},{include:"parens-block"},{include:"expressions"},{include:"strings"},{include:"variables"},{include:"statements"}]},{token:"keyword.operator",regex:/@\{/,push:[{token:"keyword.operator",regex:/\}/,next:"pop"},{include:"parens-block"},{include:"strings"},{include:"variables"},{include:"statements"}]}],"parens-block":[{token:"paren.lparen",regex:/\(/,push:[{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"parens-block"},{include:"strings"},{include:"variables"},{include:"statements"}]}]},this.normalizeRules()};r.inherits(s,i),t.PowershellHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./powershell_highlight_rules").PowershellHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u({start:"^\\s*(<#)",end:"^[#\\s]>\\s*$"})};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment={start:"<#",end:"#>"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){return null},this.$id="ace/mode/powershell"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/powershell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-praat.js b/mixly/common/modules/web-modules/ace/mode-praat.js new file mode 100644 index 00000000..41ccb376 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-praat.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="if|then|else|elsif|elif|endif|fi|endfor|endproc|while|endwhile|repeat|until|select|plus|minus|assert|asserterror",t="macintosh|windows|unix|praatVersion|praatVersion\\$pi|undefined|newline\\$|tab\\$|shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|temporaryDirectory\\$|defaultDirectory\\$",n="clearinfo|endSendPraat",r="writeInfo|writeInfoLine|appendInfo|appendInfoLine|info\\$|writeFile|writeFileLine|appendFile|appendFileLine|abs|round|floor|ceiling|min|max|imin|imax|sqrt|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi|exp|ln|lnBeta|lnGamma|log10|log2|sinh|cosh|tanh|arcsinh|arccosh|arctanh|sigmoid|invSigmoid|erf|erfc|random(?:Uniform|Integer|Gauss|Poisson|Binomial)|gaussP|gaussQ|invGaussQ|incompleteGammaP|incompleteBeta|chiSquareP|chiSquareQ|invChiSquareQ|studentP|studentQ|invStudentQ|fisherP|fisherQ|invFisherQ|binomialP|binomialQ|invBinomialP|invBinomialQ|hertzToBark|barkToHerz|hertzToMel|melToHertz|hertzToSemitones|semitonesToHerz|erb|hertzToErb|erbToHertz|phonToDifferenceLimens|differenceLimensToPhon|soundPressureToPhon|beta|beta2|besselI|besselK|numberOfColumns|numberOfRows|selected|selected\\$|numberOfSelected|variableExists|index|rindex|startsWith|endsWith|index_regex|rindex_regex|replace_regex\\$|length|extractWord\\$|extractLine\\$|extractNumber|left\\$|right\\$|mid\\$|replace\\$|date\\$|fixed\\$|percent\\$|zero#|linear#|randomUniform#|randomInteger#|randomGauss#|beginPause|endPause|demoShow|demoWindowTitle|demoInput|demoWaitForInput|demoClicked|demoClickedIn|demoX|demoY|demoKeyPressed|demoKey\\$|demoExtraControlKeyPressed|demoShiftKeyPressed|demoCommandKeyPressed|demoOptionKeyPressed|environment\\$|chooseReadFile\\$|chooseDirectory\\$|createDirectory|fileReadable|deleteFile|selectObject|removeObject|plusObject|minusObject|runScript|exitScript|beginSendPraat|endSendPraat|objectsAreIdentical",i="Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|BarkFilter|CCA|Categories|Cepstrum|Cepstrumc|ChebyshevSeries|ClassificationTable|Cochleagram|Collection|Configuration|Confusion|ContingencyTable|Corpus|Correlation|Covariance|CrossCorrelationTable|CrossCorrelationTables|DTW|Diagonalizer|Discriminant|Dissimilarity|Distance|Distributions|DurationTier|EEG|ERP|ERPTier|Eigen|Excitation|Excitations|ExperimentMFC|FFNet|FeatureWeights|Formant|FormantFilter|FormantGrid|FormantPoint|FormantTier|GaussianMixture|HMM|HMM_Observation|HMM_ObservationSequence|HMM_State|HMM_StateSequence|Harmonicity|ISpline|Index|Intensity|IntensityTier|IntervalTier|KNN|KlattGrid|KlattTable|LFCC|LPC|Label|LegendreSeries|LinearRegression|LogisticRegression|LongSound|Ltas|MFCC|MSpline|ManPages|Manipulation|Matrix|MelFilter|MixingMatrix|Movie|Network|OTGrammar|OTHistory|OTMulti|PCA|PairDistribution|ParamCurve|Pattern|Permutation|Pitch|PitchTier|PointProcess|Polygon|Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|SPINET|SSCP|SVD|Salience|ScalarProduct|Similarity|SimpleString|SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|SpeechSynthesizer|SpellingChecker|Strings|StringsIndex|Table|TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|Transition|VocalTract|Weight|WordList";this.$rules={start:[{token:"string.interpolated",regex:/'((?:\.?[a-z][a-zA-Z0-9_.]*)(?:\$|#|:[0-9]+)?)'/},{token:["text","text","keyword.operator","text","keyword"],regex:/(^\s*)(?:(\.?[a-z][a-zA-Z0-9_.]*\$?\s+)(=)(\s+))?(stopwatch)/},{token:["text","keyword","text","string"],regex:/(^\s*)(print(?:line|tab)?|echo|exit|pause|send(?:praat|socket)|include|execute|system(?:_nocheck)?)(\s+)(.*)/},{token:["text","keyword"],regex:"(^\\s*)("+n+")$"},{token:["text","keyword.operator","text"],regex:/(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/},{token:["text","text","keyword.operator","text","keyword","text","keyword"],regex:/(^\s*)(?:(\.?[a-z][a-zA-Z0-9_.]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|(?:unix_)?nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/},{token:["text","keyword","text","keyword"],regex:/(^\s*)((?:no(?:warn|check))?)(\s*)(\b(?:editor(?::?)|endeditor)\b)/},{token:["text","keyword","text","keyword"],regex:/(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/},{token:["text","keyword","text","keyword"],regex:/^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/},{token:["text","support.function","text"],regex:/(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/},{token:"entity.name.type",regex:"("+i+")"},{token:"variable.language",regex:"("+t+")"},{token:["support.function","text"],regex:"((?:"+r+")\\$?)(\\s*(?::|\\())"},{token:"keyword",regex:/(\bfor\b)/,next:"for"},{token:"keyword",regex:"(\\b(?:"+e+")\\b)"},{token:"string",regex:/"[^"]*"/},{token:"string",regex:/"[^"]*$/,next:"brokenstring"},{token:["text","keyword","text","entity.name.section"],regex:/(^\s*)(\bform\b)(\s+)(.*)/,next:"form"},{token:"constant.numeric",regex:/\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["keyword","text","entity.name.function"],regex:/(procedure)(\s+)([^:\s]+)/},{token:["entity.name.function","text"],regex:/(@\S+)(:|\s*\()/},{token:["text","keyword","text","entity.name.function"],regex:/(^\s*)(call)(\s+)(\S+)/},{token:"comment",regex:/(^\s*#|;).*$/},{token:"text",regex:/\s+/}],form:[{token:["keyword","text","constant.numeric"],regex:/((?:optionmenu|choice)\s+)(\S+:\s+)([0-9]+)/},{token:["keyword","constant.numeric"],regex:/((?:option|button)\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/},{token:["keyword","string"],regex:/((?:option|button)\s+)(.*)/},{token:["keyword","text","string"],regex:/((?:sentence|text)\s+)(\S+\s*)(.*)/},{token:["keyword","text","string","invalid.illegal"],regex:/(word\s+)(\S+\s*)(\S+)?(\s.*)?/},{token:["keyword","text","constant.language"],regex:/(boolean\s+)(\S+\s*)(0|1|"?(?:yes|no)"?)/},{token:["keyword","text","constant.numeric"],regex:/((?:real|natural|positive|integer)\s+)(\S+\s*)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/},{token:["keyword","string"],regex:/(comment\s+)(.*)/},{token:"keyword",regex:"endform",next:"start"}],"for":[{token:["keyword","text","constant.numeric","text"],regex:/(from|to)(\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?)(\s*)/},{token:["keyword","text"],regex:/(from|to)(\s+\S+\s*)/},{token:"text",regex:/$/,next:"start"}],brokenstring:[{token:["text","string"],regex:/(\s*\.{3})([^"]*)/},{token:"string",regex:/"/,next:"start"}]}};r.inherits(s,i),t.PraatHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./praat_highlight_rules").PraatHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/praat"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/praat"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-prisma.js b/mixly/common/modules/web-modules/ace/mode-prisma.js new file mode 100644 index 00000000..ca86840c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-prisma.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/prisma_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#triple_comment"},{include:"#double_comment"},{include:"#model_block_definition"},{include:"#config_block_definition"},{include:"#enum_block_definition"},{include:"#type_definition"}],"#model_block_definition":[{token:["source.prisma.embedded.source","storage.type.model.prisma","source.prisma.embedded.source","entity.name.type.model.prisma","source.prisma.embedded.source","punctuation.definition.tag.prisma"],regex:/^(\s*)(model|type)(\s+)([A-Za-z][\w]*)(\s+)({)/,push:[{token:"punctuation.definition.tag.prisma",regex:/\s*\}/,next:"pop"},{include:"#triple_comment"},{include:"#double_comment"},{include:"#field_definition"},{defaultToken:"source.prisma.embedded.source"}]}],"#enum_block_definition":[{token:["source.prisma.embedded.source","storage.type.enum.prisma","source.prisma.embedded.source","entity.name.type.enum.prisma","source.prisma.embedded.source","punctuation.definition.tag.prisma"],regex:/^(\s*)(enum)(\s+)([A-Za-z][\w]*)(\s+)({)/,push:[{token:"punctuation.definition.tag.prisma",regex:/\s*\}/,next:"pop"},{include:"#triple_comment"},{include:"#double_comment"},{include:"#enum_value_definition"},{defaultToken:"source.prisma.embedded.source"}]}],"#config_block_definition":[{token:["source.prisma.embedded.source","storage.type.config.prisma","source.prisma.embedded.source","entity.name.type.config.prisma","source.prisma.embedded.source","punctuation.definition.tag.prisma"],regex:/^(\s*)(generator|datasource)(\s+)([A-Za-z][\w]*)(\s+)({)/,push:[{token:"source.prisma.embedded.source",regex:/\s*\}/,next:"pop"},{include:"#triple_comment"},{include:"#double_comment"},{include:"#assignment"},{defaultToken:"source.prisma.embedded.source"}]}],"#assignment":[{token:["text","variable.other.assignment.prisma","text","keyword.operator.terraform","text"],regex:/^(\s*)(\w+)(\s*)(=)(\s*)/,push:[{token:"text",regex:/$/,next:"pop"},{include:"#value"},{include:"#double_comment_inline"}]}],"#field_definition":[{token:["text","variable.other.assignment.prisma","invalid.illegal.colon.prisma","text","support.type.primitive.prisma","keyword.operator.list_type.prisma","keyword.operator.optional_type.prisma","invalid.illegal.required_type.prisma"],regex:/^(\s*)(\w+)((?:\s*:)?)(\s+)(\w+)((?:\[\])?)((?:\?)?)((?:\!)?)/},{include:"#attribute_with_arguments"},{include:"#attribute"}],"#type_definition":[{token:["text","storage.type.type.prisma","text","entity.name.type.type.prisma","text","support.type.primitive.prisma"],regex:/^(\s*)(type)(\s+)(\w+)(\s*=\s*)(\w+)/},{include:"#attribute_with_arguments"},{include:"#attribute"}],"#enum_value_definition":[{token:["text","variable.other.assignment.prisma","text"],regex:/^(\s*)(\w+)(\s*$)/},{include:"#attribute_with_arguments"},{include:"#attribute"}],"#attribute_with_arguments":[{token:["entity.name.function.attribute.prisma","punctuation.definition.tag.prisma"],regex:/(@@?[\w\.]+)(\()/,push:[{token:"punctuation.definition.tag.prisma",regex:/\)/,next:"pop"},{include:"#named_argument"},{include:"#value"},{defaultToken:"source.prisma.attribute.with_arguments"}]}],"#attribute":[{token:"entity.name.function.attribute.prisma",regex:/@@?[\w\.]+/}],"#array":[{token:"source.prisma.array",regex:/\[/,push:[{token:"source.prisma.array",regex:/\]/,next:"pop"},{include:"#value"},{defaultToken:"source.prisma.array"}]}],"#value":[{include:"#array"},{include:"#functional"},{include:"#literal"}],"#functional":[{token:["support.function.functional.prisma","punctuation.definition.tag.prisma"],regex:/(\w+)(\()/,push:[{token:"punctuation.definition.tag.prisma",regex:/\)/,next:"pop"},{include:"#value"},{defaultToken:"source.prisma.functional"}]}],"#literal":[{include:"#boolean"},{include:"#number"},{include:"#double_quoted_string"},{include:"#identifier"}],"#identifier":[{token:"support.constant.constant.prisma",regex:/\b(?:\w)+\b/}],"#map_key":[{token:["variable.parameter.key.prisma","text","punctuation.definition.separator.key-value.prisma","text"],regex:/(\w+)(\s*)(:)(\s*)/}],"#named_argument":[{include:"#map_key"},{include:"#value"}],"#triple_comment":[{token:"comment.prisma",regex:/\/\/\//,push:[{token:"comment.prisma",regex:/$/,next:"pop"},{defaultToken:"comment.prisma"}]}],"#double_comment":[{token:"comment.prisma",regex:/\/\//,push:[{token:"comment.prisma",regex:/$/,next:"pop"},{defaultToken:"comment.prisma"}]}],"#double_comment_inline":[{token:"comment.prisma",regex:/\/\/[^$]*/}],"#boolean":[{token:"constant.language.boolean.prisma",regex:/\b(?:true|false)\b/}],"#number":[{token:"constant.numeric.prisma",regex:/(?:0(?:x|X)[0-9a-fA-F]*|(?:\+|-)?\b(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDdg]|UL|ul)?\b/}],"#double_quoted_string":[{token:"string.quoted.double.start.prisma",regex:/"/,push:[{token:"string.quoted.double.end.prisma",regex:/"/,next:"pop"},{include:"#string_interpolation"},{token:"string.quoted.double.prisma",regex:/[\w\-\/\._\\%@:\?=]+/},{defaultToken:"unnamed"}]}],"#string_interpolation":[{token:"keyword.control.interpolation.start.prisma",regex:/\$\{/,push:[{token:"keyword.control.interpolation.end.prisma",regex:/\s*\}/,next:"pop"},{include:"#value"},{defaultToken:"source.tag.embedded.source.prisma"}]}]},this.normalizeRules()};s.metaData={name:"Prisma",scopeName:"source.prisma"},r.inherits(s,i),t.PrismaHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/prisma",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prisma_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./prisma_highlight_rules").PrismaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/prisma"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/prisma"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-prolog.js b/mixly/common/modules/web-modules/ace/mode-prolog.js new file mode 100644 index 00000000..d1286dd4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-prolog.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#comment"},{include:"#basic_fact"},{include:"#rule"},{include:"#directive"},{include:"#fact"}],"#atom":[{token:"constant.other.atom.prolog",regex:"\\b[a-z][a-zA-Z0-9_]*\\b"},{token:"constant.numeric.prolog",regex:"-?\\d+(?:\\.\\d+)?"},{include:"#string"}],"#basic_elem":[{include:"#comment"},{include:"#statement"},{include:"#constants"},{include:"#operators"},{include:"#builtins"},{include:"#list"},{include:"#atom"},{include:"#variable"}],"#basic_fact":[{token:["entity.name.function.fact.basic.prolog","punctuation.end.fact.basic.prolog"],regex:"([a-z]\\w*)(\\.)"}],"#builtins":[{token:"support.function.builtin.prolog",regex:"\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b"}],"#comment":[{token:["punctuation.definition.comment.prolog","comment.line.percentage.prolog"],regex:"(%)(.*$)"},{token:"punctuation.definition.comment.prolog",regex:"/\\*",push:[{token:"punctuation.definition.comment.prolog",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.prolog"}]}],"#constants":[{token:"constant.language.prolog",regex:"\\b(?:true|false|yes|no)\\b"}],"#directive":[{token:"keyword.operator.directive.prolog",regex:":-",push:[{token:"meta.directive.prolog",regex:"\\.",next:"pop"},{include:"#comment"},{include:"#statement"},{defaultToken:"meta.directive.prolog"}]}],"#expr":[{include:"#comments"},{token:"meta.expression.prolog",regex:"\\(",push:[{token:"meta.expression.prolog",regex:"\\)",next:"pop"},{include:"#expr"},{defaultToken:"meta.expression.prolog"}]},{token:"keyword.control.cutoff.prolog",regex:"!"},{token:"punctuation.control.and.prolog",regex:","},{token:"punctuation.control.or.prolog",regex:";"},{include:"#basic_elem"}],"#fact":[{token:["entity.name.function.fact.prolog","punctuation.begin.fact.parameters.prolog"],regex:"([a-z]\\w*)(\\()(?!.*:-)",push:[{token:["punctuation.end.fact.parameters.prolog","punctuation.end.fact.prolog"],regex:"(\\))(\\.?)",next:"pop"},{include:"#parameter"},{defaultToken:"meta.fact.prolog"}]}],"#list":[{token:"punctuation.begin.list.prolog",regex:"\\[(?=.*\\])",push:[{token:"punctuation.end.list.prolog",regex:"\\]",next:"pop"},{include:"#comment"},{token:"punctuation.separator.list.prolog",regex:","},{token:"punctuation.concat.list.prolog",regex:"\\|",push:[{token:"meta.list.concat.prolog",regex:"(?=\\s*\\])",next:"pop"},{include:"#basic_elem"},{defaultToken:"meta.list.concat.prolog"}]},{include:"#basic_elem"},{defaultToken:"meta.list.prolog"}]}],"#operators":[{token:"keyword.operator.prolog",regex:"\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)="}],"#parameter":[{token:"variable.language.anonymous.prolog",regex:"\\b_\\b"},{token:"variable.parameter.prolog",regex:"\\b[A-Z_]\\w*\\b"},{token:"punctuation.separator.parameters.prolog",regex:","},{include:"#basic_elem"},{token:"text",regex:"[^\\s]"}],"#rule":[{token:"meta.rule.prolog",regex:"(?=[a-z]\\w*.*:-)",push:[{token:"punctuation.rule.end.prolog",regex:"\\.",next:"pop"},{token:"meta.rule.signature.prolog",regex:"(?=[a-z]\\w*.*:-)",push:[{token:"meta.rule.signature.prolog",regex:"(?=:-)",next:"pop"},{token:"entity.name.function.rule.prolog",regex:"[a-z]\\w*(?=\\(|\\s*:-)"},{token:"punctuation.rule.parameters.begin.prolog",regex:"\\(",push:[{token:"punctuation.rule.parameters.end.prolog",regex:"\\)",next:"pop"},{include:"#parameter"},{defaultToken:"meta.rule.parameters.prolog"}]},{defaultToken:"meta.rule.signature.prolog"}]},{token:"keyword.operator.definition.prolog",regex:":-",push:[{token:"meta.rule.definition.prolog",regex:"(?=\\.)",next:"pop"},{include:"#comment"},{include:"#expr"},{defaultToken:"meta.rule.definition.prolog"}]},{defaultToken:"meta.rule.prolog"}]}],"#statement":[{token:"meta.statement.prolog",regex:"(?=[a-z]\\w*\\()",push:[{token:"punctuation.end.statement.parameters.prolog",regex:"\\)",next:"pop"},{include:"#builtins"},{include:"#atom"},{token:"punctuation.begin.statement.parameters.prolog",regex:"\\(",push:[{token:"meta.statement.parameters.prolog",regex:"(?=\\))",next:"pop"},{token:"punctuation.separator.statement.prolog",regex:","},{include:"#basic_elem"},{defaultToken:"meta.statement.parameters.prolog"}]},{defaultToken:"meta.statement.prolog"}]}],"#string":[{token:"punctuation.definition.string.begin.prolog",regex:"'",push:[{token:"punctuation.definition.string.end.prolog",regex:"'",next:"pop"},{token:"constant.character.escape.prolog",regex:"\\\\."},{token:"constant.character.escape.quote.prolog",regex:"''"},{defaultToken:"string.quoted.single.prolog"}]}],"#variable":[{token:"variable.language.anonymous.prolog",regex:"\\b_\\b"},{token:"variable.other.prolog",regex:"\\b[A-Z_][a-zA-Z0-9_]*\\b"}]},this.normalizeRules()};s.metaData={fileTypes:["plg","prolog"],foldingStartMarker:"(%\\s*region \\w*)|([a-z]\\w*.*:- ?)",foldingStopMarker:"(%\\s*end(\\s*region)?)|(?=\\.)",keyEquivalent:"^~P",name:"Prolog",scopeName:"source.prolog"},r.inherits(s,i),t.PrologHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./prolog_highlight_rules").PrologHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/prolog"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/prolog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-properties.js b/mixly/common/modules/web-modules/ace/mode-properties.js new file mode 100644 index 00000000..b2ca8d75 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-properties.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/properties"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-protobuf.js b/mixly/common/modules/web-modules/ace/mode-protobuf.js new file mode 100644 index 00000000..ed3a7919 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-protobuf.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|class|wchar_t|template|char16_t|char32_t",r="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local",s="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes",t="message|required|optional|repeated|package|import|option|enum",n=this.createKeywordMapper({"keyword.declaration.protobuf":t,"support.type":e},"identifier");this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant",regex:"<[^>]+>"},{regex:"=",token:"keyword.operator.assignment.protobuf"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.ProtobufHighlightRules=s}),ace.define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./protobuf_highlight_rules").ProtobufHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.foldingRules=new o,this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/protobuf"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/protobuf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-prql.js b/mixly/common/modules/web-modules/ace/mode-prql.js new file mode 100644 index 00000000..2afbb7de --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-prql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/prql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="min|max|sum|average|stddev|every|any|concat_array|count|lag|lead|first|last|rank|rank_dense|row_number|round|as|in|tuple_every|tuple_map|tuple_zip|_eq|_is_null|from_text|lower|upper|read_parquet|read_csv",t=["bool","int","int8","int16","int32","int64","int128","float","text","timestamp","set"].join("|"),n=this.createKeywordMapper({"constant.language":"null","constant.language.boolean":"true|false",keyword:"let|into|case|prql|type|module|internal","storage.type":"let|func","support.function":e,"support.type":t,"variable.language":"date|math"},"identifier"),r=/\\(\d+|['"\\&bfnrt]|u\{[0-9a-fA-F]{1,6}\}|x[0-9a-fA-F]{2})/,i=/[A-Za-z_][a-z_A-Z0-9]/.source,s=/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/.source,o="[\\u202A\\u202B\\u202D\\u202E\\u2066\\u2067\\u2068\\u202C\\u2069]";this.$rules={start:[{token:"string.start",regex:'s?"',next:"string"},{token:"string.start",regex:'f"',next:"fstring"},{token:"string.start",regex:'r"',next:"rstring"},{token:"string.single",start:"'",end:"'"},{token:"string.character",regex:"'(?:"+r.source+"|.)'?"},{token:"constant.language",regex:"^"+i+"*"},{token:["constant.numeric","keyword"],regex:"("+s+")(years|months|weeks|days|hours|minutes|seconds|milliseconds|microseconds)"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:s},{token:"comment.block.documentation",regex:"#!.*"},{token:"comment.line.number-sign",regex:"#.*"},{token:"keyword.operator",regex:/\|\s*/,next:"pipe"},{token:"keyword.operator",regex:/->|=>|==|!=|>=|<=|~=|&&|\|\||\?\?|\/\/|@/},{token:"invalid.illegal",regex:o},{token:"punctuation.operator",regex:/[,`]/},{token:n,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],pipe:[{token:"constant.language",regex:i+"*",next:"pop"},{token:"error",regex:"",next:"pop"}],string:[{token:"constant.character.escape",regex:r},{token:"text",regex:/\\(\s|$)/,next:"stringGap"},{token:"string.end",regex:'"',next:"start"},{token:"invalid.illegal",regex:o},{defaultToken:"string.double"}],stringGap:[{token:"text",regex:/\\/,next:"string"},{token:"error",regex:"",next:"start"}],fstring:[{token:"constant.character.escape",regex:r},{token:"string.end",regex:'"',next:"start"},{token:"invalid.illegal",regex:o},{token:"paren.lparen",regex:"{",push:"fstringParenRules"},{token:"invalid.illegal",regex:o},{defaultToken:"string"}],fstringParenRules:[{token:"constant.language",regex:"^"+i+"*"},{token:"paren.rparen",regex:"}",next:"pop"}],rstring:[{token:"string.end",regex:'"',next:"start"},{token:"invalid.illegal",regex:o},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(s,i),t.PrqlHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/prql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prql_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./prql_highlight_rules").PrqlHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/prql"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/prql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-puppet.js b/mixly/common/modules/web-modules/ace/mode-puppet.js new file mode 100644 index 00000000..abbdba4a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-puppet.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/puppet_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["keyword.type.puppet","constant.class.puppet","keyword.inherits.puppet","constant.class.puppet"],regex:'^\\s*(class)(\\s+(?:[-_A-Za-z0-9".]+::)*[-_A-Za-z0-9".]+\\s*)(?:(inherits\\s*)(\\s+(?:[-_A-Za-z0-9".]+::)*[-_A-Za-z0-9".]+\\s*))?'},{token:["storage.function.puppet","name.function.puppet","punctuation.lpar"],regex:"(^\\s*define)(\\s+[a-zA-Z0-9_:]+\\s*)(\\()",push:[{token:"punctuation.rpar.puppet",regex:"\\)",next:"pop"},{include:"constants"},{include:"variable"},{include:"strings"},{include:"operators"},{defaultToken:"string"}]},{token:["language.support.class","keyword.operator"],regex:"\\b([a-zA-Z_]+)(\\s+=>)"},{token:["exported.resource.puppet","keyword.name.resource.puppet","paren.lparen"],regex:"(\\@\\@)?(\\s*[a-zA-Z_]*)(\\s*\\{)"},{token:"qualified.variable.puppet",regex:"(\\$([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)*::[a-z0-9_][a-zA-Z0-9_]*)"},{token:"singleline.comment.puppet",regex:"#(.)*$"},{token:"multiline.comment.begin.puppet",regex:"^\\s*\\/\\*",push:"blockComment"},{token:"keyword.control.puppet",regex:"\\b(case|if|unless|else|elsif|in|default:|and|or)\\s+(?!::)"},{token:"keyword.control.puppet",regex:"\\b(import|default|inherits|include|require|contain|node|application|consumes|environment|site|function|produces)\\b"},{token:"support.function.puppet",regex:"\\b(lest|str2bool|escape|gsub|Timestamp|Timespan|with|alert|crit|debug|notice|sprintf|split|step|strftime|slice|shellquote|type|sha1|defined|scanf|reverse_each|regsubst|return|emerg|reduce|err|failed|fail|versioncmp|file|generate|then|info|realize|search|tag|tagged|template|epp|warning|hiera_include|each|assert_type|binary_file|create_resources|dig|digest|filter|lookup|find_file|fqdn_rand|hiera_array|hiera_hash|inline_epp|inline_template|map|match|md5|new|next)\\b"},{token:"constant.types.puppet",regex:"\\b(String|File|Package|Service|Class|Integer|Array|Catalogentry|Variant|Boolean|Undef|Number|Hash|Float|Numeric|NotUndef|Callable|Optional|Any|Regexp|Sensitive|Sensitive.new|Type|Resource|Default|Enum|Scalar|Collection|Data|Pattern|Tuple|Struct)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{include:"variable"},{include:"constants"},{include:"strings"},{include:"operators"},{token:"regexp.begin.string.puppet",regex:"\\s*(\\/(\\S)+)\\/"}],blockComment:[{regex:"\\*\\/",token:"multiline.comment.end.puppet",next:"pop"},{defaultToken:"comment"}],constants:[{token:"constant.language.puppet",regex:"\\b(false|true|running|stopped|installed|purged|latest|file|directory|held|undef|present|absent|link|mounted|unmounted)\\b"}],variable:[{token:"variable.puppet",regex:"(\\$[a-z0-9_{][a-zA-Z0-9_]*)"}],strings:[{token:"punctuation.quote.puppet",regex:"'",push:[{token:"punctuation.quote.puppet",regex:"'",next:"pop"},{include:"escaped_chars"},{defaultToken:"string"}]},{token:"punctuation.quote.puppet",regex:'"',push:[{token:"punctuation.quote.puppet",regex:'"',next:"pop"},{include:"escaped_chars"},{include:"variable"},{defaultToken:"string"}]}],escaped_chars:[{token:"constant.escaped_char.puppet",regex:"\\\\."}],operators:[{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|::|,"}]},this.normalizeRules()};r.inherits(s,i),t.PuppetHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/puppet",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/puppet_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./puppet_highlight_rules").PuppetHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){i.call(this),this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/puppet"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/puppet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-python.js b/mixly/common/modules/web-modules/ace/mode-python.js new file mode 100644 index 00000000..ef9811b7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-python.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/python"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-qml.js b/mixly/common/modules/web-modules/ace/mode-qml.js new file mode 100644 index 00000000..322b01fc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-qml.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/qml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|readonly|string|int|bool|date|color|url|real|double|var|variant|height|width|anchors|parent|Abstract3DSeries|AbstractActionInput|AbstractAnimation|AbstractAxis|AbstractAxis3D|AbstractAxisInput|AbstractBarSeries|AbstractButton|AbstractClipAnimator|AbstractClipBlendNode|AbstractDataProxy|AbstractGraph3D|AbstractInputHandler3D|AbstractPhysicalDevice|AbstractRayCaster|AbstractSeries|AbstractSkeleton|AbstractTextureImage|Accelerometer|AccelerometerReading|Accessible|Action|ActionGroup|ActionInput|AdditiveClipBlend|Address|Affector|Age|AlphaCoverage|AlphaTest|Altimeter|AltimeterReading|AmbientLightReading|AmbientLightSensor|AmbientTemperatureReading|AmbientTemperatureSensor|AnalogAxisInput|AnchorAnimation|AnchorChanges|AngleDirection|AnimatedImage|AnimatedSprite|Animation|AnimationController|AnimationGroup|Animator|ApplicationWindow|ApplicationWindowStyle|AreaSeries|Armature|AttenuationModelInverse|AttenuationModelLinear|Attractor|Attribute|Audio|AudioCategory|AudioEngine|AudioListener|AudioSample|AuthenticationDialogRequest|Axis|AxisAccumulator|AxisSetting|BackspaceKey|Bar3DSeries|BarCategoryAxis|BarDataProxy|BarSeries|BarSet|Bars3D|BaseKey|Behavior|Binding|Blend|BlendEquation|BlendEquationArguments|BlendedClipAnimator|BlitFramebuffer|BluetoothDiscoveryModel|BluetoothService|BluetoothSocket|BorderImage|BorderImageMesh|BoxPlotSeries|BoxSet|BrightnessContrast|Buffer|BusyIndicator|BusyIndicatorStyle|Button|ButtonAxisInput|ButtonGroup|ButtonStyle|Calendar|CalendarStyle|Camera|Camera3D|CameraCapabilities|CameraCapture|CameraExposure|CameraFlash|CameraFocus|CameraImageProcessing|CameraLens|CameraRecorder|CameraSelector|CandlestickSeries|CandlestickSet|Canvas|Canvas3D|Canvas3DAbstractObject|Canvas3DActiveInfo|Canvas3DBuffer|Canvas3DContextAttributes|Canvas3DFrameBuffer|Canvas3DProgram|Canvas3DRenderBuffer|Canvas3DShader|Canvas3DShaderPrecisionFormat|Canvas3DTexture|Canvas3DTextureProvider|Canvas3DUniformLocation|CanvasGradient|CanvasImageData|CanvasPixelArray|Category|CategoryAxis|CategoryAxis3D|CategoryModel|CategoryRange|ChangeLanguageKey|ChartView|CheckBox|CheckBoxStyle|CheckDelegate|CircularGauge|CircularGaugeStyle|ClearBuffers|ClipAnimator|ClipPlane|CloseEvent|ColorAnimation|ColorDialog|ColorDialogRequest|ColorGradient|ColorGradientStop|ColorMask|ColorOverlay|Colorize|Column|ColumnLayout|ComboBox|ComboBoxStyle|Compass|CompassReading|Component|Component3D|ComputeCommand|ConeGeometry|ConeMesh|ConicalGradient|Connections|ContactDetail|ContactDetails|Container|Context2D|Context3D|ContextMenuRequest|Control|CoordinateAnimation|CuboidGeometry|CuboidMesh|CullFace|CumulativeDirection|Custom3DItem|Custom3DLabel|Custom3DVolume|CustomParticle|CylinderGeometry|CylinderMesh|Date|DateTimeAxis|DelayButton|DelayButtonStyle|DelegateChoice|DelegateChooser|DelegateModel|DelegateModelGroup|DepthTest|Desaturate|Dial|DialStyle|Dialog|DialogButtonBox|DiffuseMapMaterial|DiffuseSpecularMapMaterial|DiffuseSpecularMaterial|Direction|DirectionalBlur|DirectionalLight|DispatchCompute|Displace|DistanceReading|DistanceSensor|Dithering|DoubleValidator|Drag|DragEvent|DragHandler|Drawer|DropArea|DropShadow|DwmFeatures|DynamicParameter|EditorialModel|Effect|EllipseShape|Emitter|EnterKey|EnterKeyAction|Entity|EntityLoader|EnvironmentLight|EventConnection|EventPoint|EventTouchPoint|ExclusiveGroup|ExtendedAttributes|ExtrudedTextGeometry|ExtrudedTextMesh|FastBlur|FileDialog|FileDialogRequest|FillerKey|FilterKey|FinalState|FirstPersonCameraController|Flickable|Flipable|Flow|FocusScope|FolderListModel|FontDialog|FontLoader|FontMetrics|FormValidationMessageRequest|ForwardRenderer|Frame|FrameAction|FrameGraphNode|Friction|FrontFace|FrustumCulling|FullScreenRequest|GLStateDumpExt|GammaAdjust|Gauge|GaugeStyle|GaussianBlur|GeocodeModel|Geometry|GeometryRenderer|GestureEvent|Glow|GoochMaterial|Gradient|GradientStop|GraphicsApiFilter|GraphicsInfo|Gravity|Grid|GridLayout|GridMesh|GridView|GroupBox|GroupGoal|Gyroscope|GyroscopeReading|HBarModelMapper|HBoxPlotModelMapper|HCandlestickModelMapper|HPieModelMapper|HXYModelMapper|HandlerPoint|HandwritingInputPanel|HandwritingModeKey|HeightMapSurfaceDataProxy|HideKeyboardKey|HistoryState|HolsterReading|HolsterSensor|HorizontalBarSeries||HorizontalPercentBarSeries|HorizontalStackedBarSeries|HoverHandler|HueSaturation|HumidityReading|HumiditySensor|IRProximityReading|IRProximitySensor|Icon|Image|ImageModel|ImageParticle|InnerShadow|InputChord|InputContext|InputEngine|InputHandler3D|InputMethod|InputModeKey|InputPanel|InputSequence|InputSettings|Instantiator|IntValidator|InvokedServices|Item|ItemDelegate|ItemGrabResult|ItemModelBarDataProxy|ItemModelScatterDataProxy|ItemModelSurfaceDataProxy|ItemParticle|ItemSelectionModel|IviApplication|IviSurface|JavaScriptDialogRequest|Joint|JumpList|JumpListCategory|JumpListDestination|JumpListLink|JumpListSeparator|Key|KeyEvent|KeyIcon|KeyNavigation|KeyPanel|KeyboardColumn|KeyboardDevice|KeyboardHandler|KeyboardLayout|KeyboardLayoutLoader|KeyboardRow|KeyboardStyle|KeyframeAnimation|Keys|Label|Layer|LayerFilter|Layout|LayoutMirroring|Legend|LerpBlend|LevelAdjust|LevelOfDetail|LevelOfDetailBoundingSphere|LevelOfDetailLoader|LevelOfDetailSwitch|LidReading|LidSensor|Light|Light3D|LightReading|LightSensor|LineSeries|LineShape|LineWidth|LinearGradient|ListElement|ListModel|ListView|Loader|Locale|Location|LogValueAxis|LogValueAxis3DFormatter|LoggingCategory|LogicalDevice|Magnetometer|MagnetometerReading|Map|MapCircle|MapCircleObject|MapCopyrightNotice|MapGestureArea|MapIconObject|MapItemGroup|MapItemView|MapObjectView|MapParameter|MapPinchEvent|MapPolygon|MapPolygonObject|MapPolyline|MapPolylineObject|MapQuickItem|MapRectangle|MapRoute|MapRouteObject|MapType|Margins|MaskShape|MaskedBlur|Material|Matrix4x4|MediaPlayer|MemoryBarrier|Menu|MenuBar|MenuBarItem|MenuBarStyle|MenuItem|MenuSeparator|MenuStyle|Mesh|MessageDialog|ModeKey|MorphTarget|MorphingAnimation|MouseArea|MouseDevice|MouseEvent|MouseHandler|MultiPointHandler|MultiPointTouchArea|MultiSampleAntiAliasing|Navigator|NdefFilter|NdefMimeRecord|NdefRecord|NdefTextRecord|NdefUriRecord|NearField|NoDepthMask|NoDraw|Node|NodeInstantiator|NormalDiffuseMapAlphaMaterial|NormalDiffuseMapMaterial|NormalDiffuseSpecularMapMaterial|Number|NumberAnimation|NumberKey|Object3D|ObjectModel|ObjectPicker|OpacityAnimator|OpacityMask|OpenGLInfo|OrbitCameraController|OrientationReading|OrientationSensor|Overlay|Package|Page|PageIndicator|Pane|ParallelAnimation|Parameter|ParentAnimation|ParentChange|Particle|ParticleGroup|ParticlePainter|ParticleSystem|Path|PathAngleArc|PathAnimation|PathArc|PathAttribute|PathCubic|PathCurve|PathElement|PathInterpolator|PathLine|PathMove|PathPercent|PathQuad|PathSvg|PathView|PauseAnimation|PerVertexColorMaterial|PercentBarSeries|PhongAlphaMaterial|PhongMaterial|PickEvent|PickLineEvent|PickPointEvent|PickTriangleEvent|PickingSettings|Picture|PieMenu|PieMenuStyle|PieSeries|PieSlice|PinchArea|PinchEvent|PinchHandler|Place|PlaceAttribute|PlaceSearchModel|PlaceSearchSuggestionModel|PlaneGeometry|PlaneMesh|PlayVariation|Playlist|PlaylistItem|Plugin|PluginParameter|PointDirection|PointHandler|PointLight|PointSize|PointerDevice|PointerDeviceHandler|PointerEvent|PointerHandler|PolarChartView|PolygonOffset|Popup|Position|PositionSource|Positioner|PressureReading|PressureSensor|Product|ProgressBar|ProgressBarStyle|PropertyAction|PropertyAnimation|PropertyChanges|ProximityFilter|ProximityReading|ProximitySensor|QAbstractState|QAbstractTransition|QSignalTransition|QVirtualKeyboardSelectionListModel|Qt|QtMultimedia|QtObject|QtPositioning|QuaternionAnimation|QuotaRequest|RadialBlur|RadialGradient|Radio|RadioButton|RadioButtonStyle|RadioData|RadioDelegate|RangeSlider|Ratings|RayCaster|Rectangle|RectangleShape|RectangularGlow|RecursiveBlur|RegExpValidator|RegisterProtocolHandlerRequest|RenderCapture|RenderCaptureReply|RenderPass|RenderPassFilter|RenderSettings|RenderState|RenderStateSet|RenderSurfaceSelector|RenderTarget|RenderTargetOutput|RenderTargetSelector|Repeater|ReviewModel|Rotation|RotationAnimation|RotationAnimator|RotationReading|RotationSensor|RoundButton|Route|RouteLeg|RouteManeuver|RouteModel|RouteQuery|RouteSegment|Row|RowLayout|Scale|ScaleAnimator|Scatter3D|Scatter3DSeries|ScatterDataProxy|ScatterSeries|Scene2D|Scene3D|SceneLoader|ScissorTest|Screen|ScreenRayCaster|ScriptAction|ScrollBar|ScrollIndicator|ScrollView|ScrollViewStyle|ScxmlStateMachine|SeamlessCubemap|SelectionListItem|Sensor|SensorGesture|SensorGlobal|SensorReading|SequentialAnimation|Settings|SettingsStore|ShaderEffect|ShaderEffectSource|ShaderProgram|ShaderProgramBuilder|Shape|ShellSurface|ShellSurfaceItem|ShiftHandler|ShiftKey|Shortcut|SignalSpy|SignalTransition|SinglePointHandler|Skeleton|SkeletonLoader|Slider|SliderStyle|SmoothedAnimation|SortPolicy|Sound|SoundEffect|SoundInstance|SpaceKey|SphereGeometry|SphereMesh|SpinBox|SpinBoxStyle|SplineSeries|SplitView|SpotLight|SpringAnimation|Sprite|SpriteGoal|SpriteSequence|Stack|StackLayout|StackView|StackViewDelegate|StackedBarSeries|State|StateChangeScript|StateGroup|StateMachine|StateMachineLoader|StatusBar|StatusBarStyle|StatusIndicator|StatusIndicatorStyle|StencilMask|StencilOperation|StencilOperationArguments|StencilTest|StencilTestArguments|Store|String|Supplier|Surface3D|Surface3DSeries|SurfaceDataProxy|SwipeDelegate|SwipeView|Switch|SwitchDelegate|SwitchStyle|SymbolModeKey|SystemPalette|Tab|TabBar|TabButton|TabView|TabViewStyle|TableView|TableViewColumn|TableViewStyle|TapHandler|TapReading|TapSensor|TargetDirection|TaskbarButton|Technique|TechniqueFilter|TestCase|Text|TextArea|TextAreaStyle|TextEdit|TextField|TextFieldStyle|TextInput|TextMetrics|TextureImage|TextureImageFactory|Theme3D|ThemeColor|ThresholdMask|ThumbnailToolBar|ThumbnailToolButton|TiltReading|TiltSensor|TimeoutTransition|Timer|ToggleButton|ToggleButtonStyle|ToolBar|ToolBarStyle|ToolButton|ToolSeparator|ToolTip|Torch|TorusGeometry|TorusMesh|TouchEventSequence|TouchInputHandler3D|TouchPoint|Trace|TraceCanvas|TraceInputArea|TraceInputKey|TraceInputKeyPanel|TrailEmitter|Transaction|Transform|Transition|Translate|TreeView|TreeViewStyle|Tumbler|TumblerColumn|TumblerStyle|Turbulence|UniformAnimator|User|VBarModelMapper|VBoxPlotModelMapper|VCandlestickModelMapper|VPieModelMapper|VXYModelMapper|ValueAxis|ValueAxis3D|ValueAxis3DFormatter|Vector3dAnimation|VertexBlendAnimation|Video|VideoOutput|ViewTransition|Viewport|VirtualKeyboardSettings|Wander|WavefrontMesh|WaylandClient|WaylandCompositor|WaylandHardwareLayer|WaylandOutput|WaylandQuickItem|WaylandSeat|WaylandSurface|WaylandView|Waypoint|WebChannel|WebEngine|WebEngineAction|WebEngineCertificateError|WebEngineDownloadItem|WebEngineHistory|WebEngineHistoryListModel|WebEngineLoadRequest|WebEngineNavigationRequest|WebEngineNewViewRequest|WebEngineProfile|WebEngineScript|WebEngineSettings|WebEngineView|WebSocket|WebSocketServer|WebView|WebViewLoadRequest|WheelEvent|Window|WlShell|WlShellSurface|WorkerScript|XAnimator|XYPoint|XYSeries|XdgDecorationManagerV1|XdgPopup|XdgPopupV5|XdgPopupV6|XdgShell|XdgShellV5|XdgShellV6|XdgSurface|XdgSurfaceV5|XdgSurfaceV6|XdgToplevel|XdgToplevelV6|XmlListModel|XmlRole|YAnimator|ZoomBlur","storage.type":"const|let|var|function|property|","constant.language":"null|Infinity|NaN|undefined","support.function":"print|console\\.log","constant.language.boolean":"true|false"},"identifier");this.$rules={start:[{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{token:e,regex:"\\b\\w+\\b"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.QmlHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/qml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/qml_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./qml_highlight_rules").QmlHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'"},this.$id="ace/mode/qml"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/qml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-r.js b/mixly/common/modules/web-modules/ace/mode-r.js new file mode 100644 index 00000000..2802f4f9 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-r.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=function(){var e=i.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")),t=i.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));this.$rules={start:[{token:"comment.sectionhead",regex:"#+(?!').*(?:----|====|####)\\s*$"},{token:"comment",regex:"#+'",next:"rd-start"},{token:"comment",regex:"#.*$"},{token:"string",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(n){return e[n]?"keyword":t[n]?"constant.language":n=="..."||n.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",regex:"%.*?%"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]};var n=(new o("comment")).getRules();for(var r=0;r|\\+|\\*|-|/|~|%|\\?|!|\\^|\\.|\\:|\\,|\u00bb|\u00ab|\\||\\&|\u269b|\u2218"},v={token:"constant.language",regex:"\ud835\udc52|\u03c0|\u03c4|\u221e"},m={token:"string.quoted.single",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},g={token:"string.quoted.single",regex:"[<](?:[a-zA-Z0-9 ])*[>]"},y={token:"string.regexp",regex:"[m|rx]?[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"};this.$rules={start:[{token:"comment.block",regex:"#[`|=]\\(.*\\)"},{token:"comment.block",regex:"#[`|=]\\[.*\\]"},{token:"comment.doc",regex:"^=(?:begin)\\b",next:"block_comment"},{token:"string.unquoted",regex:"q[x|w]?\\:to/END/;",next:"qheredoc"},{token:"string.unquoted",regex:"qq[x|w]?\\:to/END/;",next:"qqheredoc"},y,m,{token:"string.quoted.double",regex:'"',next:"qqstring"},g,{token:["keyword","text","variable.module"],regex:"(use)(\\s+)((?:"+o+"\\.?)*)"},u,a,f,l,c,h,p,d,v,{token:"comment",regex:"#.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"constant.language.escape",regex:'\\\\(?:[nrtef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},h,p,{token:"lparen",regex:"{",next:"qqinterpolation"},{token:"string.quoted.double",regex:'"',next:"start"},{defaultToken:"string.quoted.double"}],qqinterpolation:[u,a,f,l,c,h,p,d,v,m,y,{token:"rparen",regex:"}",next:"qqstring"}],block_comment:[{token:"comment.doc",regex:"^=end +[a-zA-Z_0-9]*",next:"start"},{defaultToken:"comment.doc"}],qheredoc:[{token:"string.unquoted",regex:"END$",next:"start"},{defaultToken:"string.unquoted"}],qqheredoc:[h,p,{token:"lparen",regex:"{",next:"qqheredocinterpolation"},{token:"string.unquoted",regex:"END$",next:"start"},{defaultToken:"string.unquoted"}],qqheredocinterpolation:[u,a,f,l,c,h,p,d,v,m,y,{token:"rparen",regex:"}",next:"qqheredoc"}]}};r.inherits(s,i),t.RakuHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/raku",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/raku_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./raku_highlight_rules").RakuHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u({start:"^=(begin)\\b",end:"^=(end)\\b"}),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment=[{start:"=begin",end:"=end",lineStartOnly:!0},{start:"=item",end:"=end",lineStartOnly:!0}],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/raku"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/raku"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-razor.js b/mixly/common/modules/web-modules/ace/mode-razor.js new file mode 100644 index 00000000..9e0d615f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-razor.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"abstract|async|await|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|partial|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic","constant.language":"null|true|false"},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:/'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))?'/},{token:"string",start:'"',end:'"|$',next:[{token:"constant.language.escape",regex:/\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},{token:"invalid",regex:/\\./}]},{token:"string",start:'@"',end:'"',next:[{token:"constant.language.escape",regex:'""'}]},{token:"string",start:/\$"/,end:'"|$',next:[{token:"constant.language.escape",regex:/\\(:?$)|{{/},{token:"constant.language.escape",regex:/\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},{token:"invalid",regex:/\\./}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"keyword",regex:"^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.CSharpHighlightRules=o}),ace.define("ace/mode/razor_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/html_highlight_rules","ace/mode/csharp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=e("./csharp_highlight_rules").CSharpHighlightRules,a="razor-block-",f=function(){u.call(this);var e=function(e,t){return typeof t=="function"?t(e):t},t="in-braces";this.$rules.start.unshift({regex:"[\\[({]",onMatch:function(e,n,r){var i=/razor-[^\-]+-/.exec(n)[0];return r.unshift(e),r.unshift(i+t),this.next=i+t,"paren.lparen"}},{start:"@\\*",end:"\\*@",token:"comment"});var n={"{":"}","[":"]","(":")"};this.$rules[t]=i.deepCopy(this.$rules.start),this.$rules[t].unshift({regex:"[\\])}]",onMatch:function(t,r,i){var s=i[1];return n[s]!==t?"invalid.illegal":(i.shift(),i.shift(),this.next=e(t,i[0])||"start","paren.rparen")}})};r.inherits(f,u);var l=function(){o.call(this);var e={regex:"@[({]|@functions{",onMatch:function(e,t,n){return n.unshift(e),n.unshift("razor-block-start"),this.next="razor-block-start","punctuation.block.razor"}},t={"@{":"}","@(":")","@functions{":"}"},n={regex:"[})]",onMatch:function(e,n,r){var i=r[1];return t[i]!==e?"invalid.illegal":(r.shift(),r.shift(),this.next=r.shift()||"start","punctuation.block.razor")}},r={regex:"@(?![{(])",onMatch:function(e,t,n){return n.unshift("razor-short-start"),this.next="razor-short-start","punctuation.short.razor"}},i={token:"",regex:"(?=[^A-Za-z_\\.()\\[\\]])",next:"pop"},s={regex:"@(?=if)",onMatch:function(e,t,n){return n.unshift(function(e){return e!=="}"?"start":n.shift()||"start"}),this.next="razor-block-start","punctuation.control.razor"}},u=[{start:"@\\*",end:"\\*@",token:"comment"},{token:["meta.directive.razor","text","identifier"],regex:"^(\\s*@model)(\\s+)(.+)$"},e,r];for(var a in this.$rules)this.$rules[a].unshift.apply(this.$rules[a],u);this.embedRules(f,"razor-block-",[n],["start"]),this.embedRules(f,"razor-short-",[i],["start"]),this.normalizeRules()};r.inherits(l,o),t.RazorHighlightRules=l,t.RazorLangHighlightRules=f}),ace.define("ace/mode/razor_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=["abstract","as","base","bool","break","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","else","enum","event","explicit","extern","false","finally","fixed","float","for","foreach","goto","if","implicit","in","int","interface","internal","is","lock","long","namespace","new","null","object","operator","out","override","params","private","protected","public","readonly","ref","return","sbyte","sealed","short","sizeof","stackalloc","static","string","struct","switch","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","void","volatile","while"],s=["Html","Model","Url","Layout"],o=function(){};(function(){this.getCompletions=function(e,t,n,r){if(e.lastIndexOf("razor-short-start")==-1&&e.lastIndexOf("razor-block-start")==-1)return[];var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(e.lastIndexOf("razor-short-start")!=-1)return this.getShortStartCompletions(e,t,n,r);if(e.lastIndexOf("razor-block-start")!=-1)return this.getKeywordCompletions(e,t,n,r)},this.getShortStartCompletions=function(e,t,n,r){return s.map(function(e){return{value:e,meta:"keyword",score:1e6}})},this.getKeywordCompletions=function(e,t,n,r){return s.concat(i).map(function(e){return{value:e,meta:"keyword",score:1e6}})}}).call(o.prototype),t.RazorCompletions=o}),ace.define("ace/mode/razor",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/razor_highlight_rules","ace/mode/razor_completions","ace/mode/html_completions"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./razor_highlight_rules").RazorHighlightRules,o=e("./razor_completions").RazorCompletions,u=e("./html_completions").HtmlCompletions,a=function(){i.call(this),this.$highlightRules=new s,this.$completer=new o,this.$htmlCompleter=new u};r.inherits(a,i),function(){this.getCompletions=function(e,t,n,r){var i=this.$completer.getCompletions(e,t,n,r),s=this.$htmlCompleter.getCompletions(e,t,n,r);return i.concat(s)},this.createWorker=function(e){return null},this.$id="ace/mode/razor",this.snippetFileId="ace/snippets/razor"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/razor"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-rdoc.js b/mixly/common/modules/web-modules/ace/mode-rdoc.js new file mode 100644 index 00000000..ba4852eb --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-rdoc.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(verbatim)(})",next:"verbatim"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(lstlisting)(})",next:"lstlisting"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)([\\w*]*)(})"},{token:"storage.type",regex:/\\verb\b\*?/,next:[{token:["keyword.operator","string","keyword.operator"],regex:"(.)(.*?)(\\1|$)|",next:"start"}]},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}],verbatim:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(verbatim)(})",next:"start"},{defaultToken:"text"}],lstlisting:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(lstlisting)(})",next:"start"},{defaultToken:"text"}]},this.normalizeRules()};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./latex_highlight_rules"),u=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:"text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell.text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell.text",regex:"\\s+"},{token:"nospell.text",regex:"\\w+"}]}};r.inherits(u,s),t.RDocHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rdoc_highlight_rules").RDocHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(e){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/rdoc"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/rdoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-red.js b/mixly/common/modules/web-modules/ace/mode-red.js new file mode 100644 index 00000000..7a98434e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-red.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/red_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="";this.$rules={start:[{token:"keyword.operator",regex:/\s([\-+%/=<>*]|(?:\*\*\|\/\/|==|>>>?|<>|<<|=>|<=|=\?))(\s|(?=:))/},{token:"string.email",regex:/\w[-\w._]*\@\w[-\w._]*/},{token:"value.time",regex:/\b\d+:\d+(:\d+)?/},{token:"string.url",regex:/\w[-\w_]*\:(\/\/)?\w[-\w._]*(:\d+)?/},{token:"value.date",regex:/(\b\d{1,4}[-/]\d{1,2}[-/]\d{1,2}|\d{1,2}[-/]\d{1,2}[-/]\d{1,4})\b/},{token:"value.tuple",regex:/\b\d{1,3}\.\d{1,3}\.\d{1,3}(\.\d{1,3}){0,9}/},{token:"value.pair",regex:/[+-]?\d+x[-+]?\d+/},{token:"value.binary",regex:/\b2#{([01]{8})+}/},{token:"value.binary",regex:/\b64#{([\w/=+])+}/},{token:"value.binary",regex:/(16)?#{([\dabcdefABCDEF][\dabcdefABCDEF])*}/},{token:"value.issue",regex:/#\w[-\w'*.]*/},{token:"value.numeric",regex:/[+-]?\d['\d]*(?:\.\d+)?e[-+]?\d{1,3}\%?(?!\w)/},{token:"invalid.illegal",regex:/[+-]?\d['\d]*(?:\.\d+)?\%?[a-zA-Z]/},{token:"value.numeric",regex:/[+-]?\d['\d]*(?:\.\d+)?\%?(?![a-zA-Z])/},{token:"value.character",regex:/#"(\^[-@/_~^"HKLM\[]|.)"/},{token:"string.file",regex:/%[-\w\.\/]+/},{token:"string.tag",regex://,next:"start"},{defaultToken:"string.tag"}],comment:[{token:"comment",regex:/}/,next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.RedHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/red",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/red_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./red_highlight_rules").RedHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=function(){this.HighlightRules=s,this.foldingRules=new o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){this.lineCommentStart=";",this.blockComment={start:"comment {",end:"}"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\[\(]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/red"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/red"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-redshift.js b/mixly/common/modules/web-modules/ace/mode-redshift.js new file mode 100644 index 00000000..16cfb47c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-redshift.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),ace.define("ace/mode/redshift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/json_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./json_highlight_rules").JsonHighlightRules,a=function(){var e="aes128|aes256|all|allowoverwrite|analyse|analyze|and|any|array|as|asc|authorization|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|leading|left|like|limit|localtime|localtimestamp|lun|luns|lzo|lzop|minus|mostly13|mostly32|mostly8|natural|new|not|notnull|null|nulls|off|offline|offset|old|on|only|open|or|order|outer|overlaps|parallel|partition|percent|permissions|placing|primary|raw|readratio|recover|references|rejectlog|resort|restore|right|select|session_user|similar|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",t="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|octet_length|set_bit|set_byte|to_ascii|avg|count|listagg|max|min|stddev_samp|stddev_pop|sum|var_samp|var_pop|bit_and|bit_or|bool_and|bool_or|avg|count|cume_dist|dense_rank|first_value|last_value|lag|lead|listagg|max|median|min|nth_value|ntile|percent_rank|percentile_cont|percentile_disc|rank|ratio_to_report|row_number|case|coalesce|decode|greatest|least|nvl|nvl2|nullif|add_months|age|convert_timezone|current_date|timeofday|current_time|current_timestamp|date_cmp|date_cmp_timestamp|date_part_year|dateadd|datediff|date_part|date_trunc|extract|getdate|interval_cmp|isfinite|last_day|localtime|localtimestamp|months_between|next_day|now|sysdate|timestamp_cmp|timestamp_cmp_date|trunc|abs|acos|asin|atan|atan2|cbrt|ceiling|ceil|checksum|cos|cot|degrees|dexp|dlog1|dlog10|exp|floor|ln|log|mod|pi|power|radians|random|round|sin|sign|sqrt|tan|trunc|ascii|bpcharcmp|btrim|bttext_pattern_cmp|char_length|character_length|charindex|chr|concat|crc32|func_sha1|get_bit|get_byte|initcap|left|right|len|length|lower|lpad|rpad|ltrim|md5|octet_length|position|quote_ident|quote_literal|regexp_count|regexp_instr|regexp_replace|regexp_substr|repeat|replace|replicate|reverse|rtrim|set_bit|set_byte|split_part|strpos|strtol|substring|textlen|to_ascii|to_hex|translate|trim|upper|json_array_length|json_extract_array_element_text|json_extract_path_text|cast|convert|to_char|to_date|to_number|current_database|current_schema|current_schemas|current_user|current_user_id|has_database_privilege|has_schema_privilege|has_table_privilege|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",n=this.createKeywordMapper({"support.function":t,keyword:e},"identifier",!0),r=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}];this.$rules={start:[{token:"comment",regex:"--.*$"},s.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"^[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$json\\$",next:"json-start"},{token:"string",regex:"\\$[\\w_0-9]*\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(r),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentDollarSql"},{token:"string",regex:"^\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(r),comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],commentStatement:[{token:"comment",regex:".*?\\*\\/",next:"statement"},{token:"comment",regex:".+"}],commentDollarSql:[{token:"comment",regex:".*?\\*\\/",next:"dollarSql"},{token:"comment",regex:".+"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",regex:".+"}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.embedRules(u,"json-",[{token:"string",regex:"\\$json\\$",next:"statement"}])};r.inherits(a,o),t.RedshiftHighlightRules=a}),ace.define("ace/mode/redshift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/redshift_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./redshift_highlight_rules").RedshiftHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){return e=="start"||e=="keyword.statementEnd"?"":this.$getIndent(t)},this.$id="ace/mode/redshift"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/redshift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-rhtml.js b/mixly/common/modules/web-modules/ace/mode-rhtml.js new file mode 100644 index 00000000..d96df41e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-rhtml.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=function(){var e=i.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")),t=i.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));this.$rules={start:[{token:"comment.sectionhead",regex:"#+(?!').*(?:----|====|####)\\s*$"},{token:"comment",regex:"#+'",next:"rd-start"},{token:"comment",regex:"#.*$"},{token:"string",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(n){return e[n]?"keyword":t[n]?"constant.language":n=="..."||n.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",regex:"%.*?%"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]};var n=(new o("comment")).getRules();for(var r=0;r",next:"start"}],["start"]),this.normalizeRules()};r.inherits(u,o),t.RHtmlHighlightRules=u}),ace.define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./rhtml_highlight_rules").RHtmlHighlightRules,o=function(e,t){i.call(this),this.$session=t,this.HighlightRules=s};r.inherits(o,i),function(){this.insertChunkInfo={value:"\n",position:{row:0,column:15}},this.getLanguageMode=function(e){return this.$session.getState(e.row).match(/^r-/)?"R":"HTML"},this.$id="ace/mode/rhtml"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/rhtml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-robot.js b/mixly/common/modules/web-modules/ace/mode-robot.js new file mode 100644 index 00000000..a02b361f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-robot.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/robot_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=new RegExp(/\$\{CURDIR\}|\$\{TEMPDIR\}|\$\{EXECDIR\}|\$\{\/\}|\$\{\:\}|\$\{\\n\}|\$\{true\}|\$\{false\}|\$\{none\}|\$\{null\}|\$\{space(?:\s*\*\s+[0-9]+)?\}|\$\{empty\}|&\{empty\}|@\{empty\}|\$\{TEST NAME\}|@\{TEST[\s_]TAGS\}|\$\{TEST[\s_]DOCUMENTATION\}|\$\{TEST[\s_]STATUS\}|\$\{TEST[\s_]MESSAGE\}|\$\{PREV[\s_]TEST[\s_]NAME\}|\$\{PREV[\s_]TEST[\s_]STATUS\}|\$\{PREV[\s_]TEST[\s_]MESSAGE\}|\$\{SUITE[\s_]NAME\}|\$\{SUITE[\s_]SOURCE\}|\$\{SUITE[\s_]DOCUMENTATION\}|&\{SUITE[\s_]METADATA\}|\$\{SUITE[\s_]STATUS\}|\$\{SUITE[\s_]MESSAGE\}|\$\{KEYWORD[\s_]STATUS\}|\$\{KEYWORD[\s_]MESSAGE\}|\$\{LOG[\s_]LEVEL\}|\$\{OUTPUT[\s_]FILE\}|\$\{LOG[\s_]FILE\}|\$\{REPORT[\s_]FILE\}|\$\{DEBUG[\s_]FILE\}|\$\{OUTPUT[\s_]DIR\}/);this.$rules={start:[{token:"string.robot.header",regex:/^\*{3}\s+(?:settings?|metadata|(?:user )?keywords?|test ?cases?|tasks?|variables?)/,caseInsensitive:!0,push:[{token:"string.robot.header",regex:/$/,next:"pop"},{defaultToken:"string.robot.header"}],comment:"start of a table"},{token:"comment.robot",regex:/(?:^|\s{2,}|\t|\|\s{1,})(?=[^\\])#/,push:[{token:"comment.robot",regex:/$/,next:"pop"},{defaultToken:"comment.robot"}]},{token:"comment",regex:/^\s*\[?Documentation\]?/,caseInsensitive:!0,push:[{token:"comment",regex:/^(?!\s*\.\.\.)/,next:"pop"},{defaultToken:"comment"}]},{token:"storage.type.method.robot",regex:/\[(?:Arguments|Setup|Teardown|Precondition|Postcondition|Template|Return|Timeout)\]/,caseInsensitive:!0,comment:"testcase settings"},{token:"storage.type.method.robot",regex:/\[Tags\]/,caseInsensitive:!0,push:[{token:"storage.type.method.robot",regex:/^(?!\s*\.\.\.)/,next:"pop"},{token:"comment",regex:/^\s*\.\.\./},{defaultToken:"storage.type.method.robot"}],comment:"test tags"},{token:"constant.language",regex:e,caseInsensitive:!0},{token:"entity.name.variable.wrapper",regex:/[$@&%]\{\{?/,push:[{token:"entity.name.variable.wrapper",regex:/\}\}?(\s?=)?/,next:"pop"},{include:"$self"},{token:"entity.name.variable",regex:/./},{defaultToken:"entity.name.variable"}]},{token:"keyword.control.robot",regex:/^[^\s\t*$|]+|(?=^\|)\s+[^\s\t*$|]+/,push:[{token:"keyword.control.robot",regex:/(?=\s{2})|\t|$|\s+(?=\|)/,next:"pop"},{defaultToken:"keyword.control.robot"}]},{token:"constant.numeric.robot",regex:/\b[0-9]+(?:\.[0-9]+)?\b/},{token:"keyword",regex:/\s{2,}(for|in range|in|end|else if|if|else|with name)(\s{2,}|$)/,caseInsensitive:!0},{token:"storage.type.function",regex:/^(?:\s{2,}\s+)[^ \t*$@&%[.|]+/,push:[{token:"storage.type.function",regex:/(?=\s{2})|\t|$|\s+(?=\|)/,next:"pop"},{defaultToken:"storage.type.function"}]}]},this.normalizeRules()};s.metadata={fileTypes:["robot"],name:"Robot",scopeName:"source.robot"},r.inherits(s,i),t.RobotHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/robot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/robot_highlight_rules","ace/mode/folding/pythonic"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./robot_highlight_rules").RobotHighlightRules,o=e("./folding/pythonic").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/robot",this.snippetFileId="ace/snippets/robot"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/robot"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-rst.js b/mixly/common/modules/web-modules/ace/mode-rst.js new file mode 100644 index 00000000..4fff69b4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-rst.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/rst_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e={title:"markup.heading",list:"markup.heading",table:"constant",directive:"keyword.operator",entity:"string",link:"markup.underline.list",bold:"markup.bold",italic:"markup.italic",literal:"support.function",comment:"comment"},t="(^|\\s|[\"'(<\\[{\\-/:])",n="(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))";this.$rules={start:[{token:e.title,regex:"(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"},{token:["text",e.directive,e.literal],regex:"(^\\s*\\.\\. )([^: ]+::)(.*$)",next:"codeblock"},{token:e.directive,regex:"::$",next:"codeblock"},{token:[e.entity,e.link],regex:"(^\\.\\. _[^:]+:)(.*$)"},{token:[e.entity,e.link],regex:"(^__ )(https?://.*$)"},{token:e.entity,regex:"^\\.\\. \\[[^\\]]+\\] "},{token:e.comment,regex:"^\\.\\. .*$",next:"comment"},{token:e.list,regex:"^\\s*[\\*\\+-] "},{token:e.list,regex:"^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "},{token:e.list,regex:"^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "},{token:e.table,regex:"^={2,}(?: +={2,})+$"},{token:e.table,regex:"^\\+-{2,}(?:\\+-{2,})+\\+$"},{token:e.table,regex:"^\\+={2,}(?:\\+={2,})+\\+$"},{token:["text",e.literal],regex:t+"(``)(?=\\S)",next:"code"},{token:["text",e.bold],regex:t+"(\\*\\*)(?=\\S)",next:"bold"},{token:["text",e.italic],regex:t+"(\\*)(?=\\S)",next:"italic"},{token:e.entity,regex:"\\|[\\w\\-]+?\\|"},{token:e.entity,regex:":[\\w-:]+:`\\S",next:"entity"},{token:["text",e.entity],regex:t+"(_`)(?=\\S)",next:"entity"},{token:e.entity,regex:"_[A-Za-z0-9\\-]+?"},{token:["text",e.link],regex:t+"(`)(?=\\S)",next:"link"},{token:e.link,regex:"[A-Za-z0-9\\-]+?__?"},{token:e.link,regex:"\\[[^\\]]+?\\]_"},{token:e.link,regex:"https?://\\S+"},{token:e.table,regex:"\\|"}],codeblock:[{token:e.literal,regex:"^ +.+$",next:"codeblock"},{token:e.literal,regex:"^$",next:"codeblock"},{token:"empty",regex:"",next:"start"}],code:[{token:e.literal,regex:"\\S``"+n,next:"start"},{defaultToken:e.literal}],bold:[{token:e.bold,regex:"\\S\\*\\*"+n,next:"start"},{defaultToken:e.bold}],italic:[{token:e.italic,regex:"\\S\\*"+n,next:"start"},{defaultToken:e.italic}],entity:[{token:e.entity,regex:"\\S`"+n,next:"start"},{defaultToken:e.entity}],link:[{token:e.link,regex:"\\S`__?"+n,next:"start"},{defaultToken:e.link}],comment:[{token:e.comment,regex:"^ +.+$",next:"comment"},{token:e.comment,regex:"^$",next:"comment"},{token:"empty",regex:"",next:"start"}]}};r.inherits(o,s),t.RSTHighlightRules=o}),ace.define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rst_highlight_rules").RSTHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.type="text",this.$id="ace/mode/rst",this.snippetFileId="ace/snippets/rst"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/rst"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-ruby.js b/mixly/common/modules/web-modules/ace/mode-ruby.js new file mode 100644 index 00000000..225d9837 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-ruby.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};r.inherits(d,i),t.RubyHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={"class":1,def:1,module:1,"do":1,unless:1,"if":1,"while":1,"for":1,until:1,begin:1,"else":0,elsif:0,rescue:0,ensure:0,when:0,end:-1,"case":1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/ruby"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-rust.js b/mixly/common/modules/web-modules/ace/mode-rust.js new file mode 100644 index 00000000..3fd84df6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-rust.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/rust_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=/\\(?:[nrt0'"\\]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source,u=/[a-zA-Z_\xa1-\uffff][a-zA-Z0-9_\xa1-\uffff]*/.source,a=function(){var e=this.createKeywordMapper({"keyword.source.rust":"abstract|alignof|as|async|await|become|box|break|catch|continue|const|crate|default|do|dyn|else|enum|extern|for|final|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield|try","storage.type.source.rust":"Self|isize|usize|char|bool|u8|u16|u32|u64|u128|f16|f32|f64|i8|i16|i32|i64|i128|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","constant.language.source.rust":"true|false|Some|None|Ok|Err|FALSE|TRUE","support.constant.source.rust":"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","constant.language":"macro_rules|mac_variant"},"identifier");this.$rules={start:[{token:"variable.other.source.rust",regex:"'"+u+"(?![\\'])"},{token:"string.quoted.single.source.rust",regex:"'(?:[^'\\\\]|"+o+")'"},{token:"identifier",regex:"r#"+u+"\\b"},{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-1,t),"string.quoted.raw.source.rust"},regex:/r#*"/,next:[{onMatch:function(e,t,n){var r="string.quoted.raw.source.rust";return e.length>=n[1]?(e.length>n[1]&&(r="invalid"),n.shift(),n.shift(),this.next=n.shift()):this.next="",r},regex:/"#*/,next:"start"},{defaultToken:"string.quoted.raw.source.rust"}]},{token:"string.quoted.double.source.rust",regex:'"',push:[{token:"string.quoted.double.source.rust",regex:'"',next:"pop"},{token:"constant.character.escape.source.rust",regex:o},{defaultToken:"string.quoted.double.source.rust"}]},{token:["keyword.source.rust","text","entity.name.function.source.rust","punctuation"],regex:"\\b(fn)(\\s+)((?:r#)?"+u+")(<)(?!<)",push:"generics"},{token:["keyword.source.rust","text","entity.name.function.source.rust"],regex:"\\b(fn)(\\s+)((?:r#)?"+u+")"},{token:["support.constant","punctuation"],regex:"("+u+"::)(<)(?!<)",push:"generics"},{token:"support.constant",regex:u+"::"},{token:"variable.language.source.rust",regex:"\\bself\\b"},s.getStartRule("doc-start"),{token:"comment.line.doc.source.rust",regex:"///.*$"},{token:"comment.line.doc.source.rust",regex:"//!.*$"},{token:"comment.line.double-dash.source.rust",regex:"//.*$"},{token:"comment.start.block.source.rust",regex:"/\\*",stateName:"comment",push:[{token:"comment.start.block.source.rust",regex:"/\\*",push:"comment"},{token:"comment.end.block.source.rust",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.source.rust"}]},{token:["keyword.source.rust","identifier","punctuaction"],regex:"(?:(impl)|("+u+"))(<)(?!<)",stateName:"generics",push:[{token:"keyword.operator",regex:/<<|=/},{token:"punctuaction",regex:"<(?!<)",push:"generics"},{token:"variable.other.source.rust",regex:"'"+u+"(?![\\'])"},{token:"storage.type.source.rust",regex:"\\b(u8|u16|u32|u64|u128|usize|i8|i16|i32|i64|i128|isize|char|bool)\\b"},{token:"keyword",regex:"\\b(?:const|dyn)\\b"},{token:"punctuation",regex:">",next:"pop"},{include:"punctuation"},{include:"operators"},{include:"constants"},{token:"identifier",regex:"\\b"+u+"\\b"}]},{token:e,regex:u},{token:"meta.preprocessor.source.rust",regex:"\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b"},{include:"punctuation"},{include:"operators"},{include:"constants"}],punctuation:[{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/},{token:"punctuation.operator",regex:/[?:,;.]/}],operators:[{token:"keyword.operator",regex:/\$|[-=]>|[-+%^=!&|<>]=?|[*/](?![*/])=?/}],constants:[{token:"constant.numeric.source.rust",regex:/\b(?:0x[a-fA-F0-9_]+|0o[0-7_]+|0b[01_]+|[0-9][0-9_]*(?!\.))(?:[iu](?:size|8|16|32|64|128))?\b/},{token:"constant.numeric.source.rust",regex:/\b(?:[0-9][0-9_]*)(?:\.[0-9][0-9_]*)?(?:[Ee][+-][0-9][0-9_]*)?(?:f32|f64)?\b/}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};a.metaData={fileTypes:["rs","rc"],foldingStartMarker:"^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$",foldingStopMarker:"^\\s*\\}",name:"Rust",scopeName:"source.rust"},r.inherits(a,i),t.RustHighlightRules=a}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rust_highlight_rules").RustHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/",nestable:!0},this.$quotes={'"':'"'},this.$id="ace/mode/rust"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/rust"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-sac.js b/mixly/common/modules/web-modules/ace/mode-sac.js new file mode 100644 index 00000000..74b7eef0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-sac.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/sac_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="break|continue|do|else|for|if|return|with|while|use|class|all|void",t="bool|char|complex|double|float|byte|int|short|long|longlong|ubyte|uint|ushort|ulong|ulonglong|struct|typedef",n="inline|external|specialize",r="step|width",s="true|false",o=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"constant.language":s},"identifier"),u="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",a=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,f="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+a+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:a},{token:"constant.language.escape",regex:f},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:"support.function",regex:"fold|foldfix|genarray|modarray|propagate"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.sacHighlightRules=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/sac",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sac_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sac_highlight_rules").sacHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sac"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/sac"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-sass.js b/mixly/common/modules/web-modules/ace/mode-sass.js new file mode 100644 index 00000000..13af9a1f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-sass.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unquote".split("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),u=i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|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|legend|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|tt|u|ul|var|video|wbr|xmp".split("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./scss_highlight_rules").ScssHighlightRules,o=function(){s.call(this);var e=this.$rules.start;e[1].token=="comment"&&(e.splice(1,1,{onMatch:function(e,t,n){return n.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,n){return n[1]===-1&&(n[1]=Math.max(n[2],e.length-1)),e.length<=n[1]?(n.shift(),n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};r.inherits(o,s),t.SassHighlightRules=o}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u"},{token:"keyword",regex:"(?:use|include)"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]},this.embedRules(s,"doc-",[s.getEndRule("start")])};r.inherits(u,o),t.scadHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scad_highlight_rules").scadHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/scad"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/scad"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-scala.js b/mixly/common/modules/web-modules/ace/mode-scala.js new file mode 100644 index 00000000..dd426237 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-scala.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="case|default|do|else|for|if|match|while|throw|return|try|trye|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|null|override|package|private|protected|sealed|super|this|trait|type|val|var|with|assert|assume|require|print|println|printf|readLine|readBoolean|readByte|readShort|readChar|readInt|readLong|readFloat|readDouble",t="true|false",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Int|Long|Nothing|App|Application|BufferedIterator|BigDecimal|BigInt|Console|Either|Enumeration|Equiv|Fractional|Function|IndexedSeq|Integral|Iterator|Map|Numeric|Nil|NotNull|Ordered|Ordering|PartialFunction|PartialOrdering|Product|Proxy|Range|Responder|Seq|Serializable|Set|Specializable|Stream|StringContext|Symbol|Traversable|TraversableOnce|Tuple|Vector|Pair|Triple",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"tstring"},{token:"string",regex:'"(?=.)',next:"string"},{token:"symbol.constant",regex:"'[\\w\\d_]+"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],string:[{token:"escape",regex:'\\\\"'},{token:"string",regex:'"',next:"start"},{token:"string.invalid",regex:'[^"\\\\]*$',next:"start"},{token:"string",regex:'[^"\\\\]+'}],tstring:[{token:"string",regex:'"{3,5}',next:"start"},{defaultToken:"string"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.ScalaHighlightRules=o}),ace.define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./scala_highlight_rules").ScalaHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/scala"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/scala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-scheme.js b/mixly/common/modules/web-modules/ace/mode-scheme.js new file mode 100644 index 00000000..4619e0dc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-scheme.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq?|eqv?|equal?|and|or|not|null?",n="#t|#f",r="cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.scheme","text","entity.name.function.scheme"],regex:"(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:"punctuation.definition.constant.character.scheme",regex:"#:\\S+"},{token:["punctuation.definition.variable.scheme","variable.other.global.scheme","punctuation.definition.variable.scheme"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"#[xXoObB][0-9a-fA-F]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"},{token:i,regex:"[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.scheme",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}]}};r.inherits(s,i),t.SchemeHighlightRules=s}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i}),ace.define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scheme_highlight_rules").SchemeHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.minorIndentFunctions=["define","lambda","define-macro","define-syntax","syntax-rules","define-record-type","define-structure"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){var n=this.$getIndent(e),r=0,i,s;for(var o=e.length-1;o>=0;o--){s=e[o],s==="("?(r--,i=!0):s==="("||s==="["||s==="{"?(r--,i=!1):(s===")"||s==="]"||s==="}")&&r++;if(r<0)break}if(!(r<0&&i))return r<0&&!i?this.$toIndent(e.substring(0,o+1)):r>0?(n=n.substring(0,n.length-t.length),n):n;o+=1;var u=o,a="";for(;;){s=e[o];if(s===" "||s===" ")return this.minorIndentFunctions.indexOf(a)!==-1?this.$toIndent(e.substring(0,u-1)+t):this.$toIndent(e.substring(0,o+1));if(s===undefined)return this.$toIndent(e.substring(0,u-1)+t);a+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/scheme"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/scheme"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-scrypt.js b/mixly/common/modules/web-modules/ace/mode-scrypt.js new file mode 100644 index 00000000..8222f27f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-scrypt.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/scrypt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="contract|library|loop|new|private|public|if|else|struct|type|require|static|const|import|exit|return|asm",t="true|false",n="function|auto|constructor|bytes|int|bool|SigHashPreimage|PrivKey|PubKey|Sig|Ripemd160|Sha1|Sha256|SigHashType|SigHashPreimage|OpCodeType",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:["support.function.math.scrypt","text","text"],regex:/\b(abs|min|max|within|ripemd160|sha1|sha256|hash160|hash256|checkSig|checkMultiSig|num2bin|pack|unpack|len|reverseBytes|repeat)(\s*)(\()/},{token:["entity.name.type.scrypt","text","text","text","variable.object.property.scrypt"],regex:/\b(SigHash)(\s*)(\.)(\s*)(ANYONECANPAY|ALL|FORKID|NONE|SINGLE)\b/},{token:["entity.name.type.scrypt","text","text","text","variable.object.property.scrypt"],regex:/\b(OpCode)(\s*)(\.)(\s*)(OP_PUSHDATA1|OP_PUSHDATA2|OP_PUSHDATA4|OP_0|OP_FALSE|OP_1NEGATE|OP_1|OP_TRUE|OP_2|OP_3|OP_4|OP_5|OP_6|OP_7|OP_8|OP_9|OP_10|OP_11|OP_12|OP_13|OP_14|OP_15|OP_16|OP_1ADD|OP_1SUB|OP_NEGATE|OP_ABS|OP_NOT|OP_0NOTEQUAL|OP_ADD|OP_SUB|OP_MUL|OP_DIV|OP_MOD|OP_LSHIFT|OP_RSHIFT|OP_BOOLAND|OP_BOOLOR|OP_NUMEQUAL|OP_NUMEQUALVERIFY|OP_NUMNOTEQUAL|OP_LESSTHAN|OP_GREATERTHAN|OP_LESSTHANOREQUAL|OP_GREATERTHANOREQUAL|OP_MIN|OP_MAX|OP_WITHIN|OP_CAT|OP_SPLIT|OP_BIN2NUM|OP_NUM2BIN|OP_SIZE|OP_NOP|OP_IF|OP_NOTIF|OP_ELSE|OP_ENDIF|OP_VERIFY|OP_RETURN|OP_TOALTSTACK|OP_FROMALTSTACK|OP_IFDUP|OP_DEPTH|OP_DROP|OP_DUP|OP_NIP|OP_OVER|OP_PICK|OP_ROLL|OP_ROT|OP_SWAP|OP_TUCK|OP_2DROP|OP_2DUP|OP_3DUP|OP_2OVER|OP_2ROT|OP_2SWAP|OP_RIPEMD160|OP_SHA1|OP_SHA256|OP_HASH160|OP_HASH256|OP_CODESEPARATOR|OP_CHECKSIG|OP_CHECKSIGVERIFY|OP_CHECKMULTISIG|OP_CHECKMULTISIGVERIFY|OP_INVERT|OP_AND|OP_OR|OP_XOR|OP_EQUAL|OP_EQUALVERIFY)\b/},{token:"entity.name.type.scrypt",regex:/\b(?:P2PKH|P2PK|Tx|HashPuzzleRipemd160|HashPuzzleSha1|HashPuzzleSha256|HashPuzzleHash160|OpCode|SigHash)\b/},{token:["punctuation.separator.period.scrypt","text","entity.name.function.scrypt","text","punctuation.definition.parameters.begin.bracket.round.scrypt"],regex:/(\.)([^\S$\r]*)([\w][\w\d]*)(\s*)(\()/,push:[{token:"punctuation.definition.parameters.end.bracket.round.scrypt",regex:/\)/,next:"pop"},{defaultToken:"start"}]},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.scryptHighlightRules=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/scrypt",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scrypt_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scrypt_highlight_rules").scryptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'"},this.createWorker=function(e){return null},this.$id="ace/mode/scrypt"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/scrypt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-scss.js b/mixly/common/modules/web-modules/ace/mode-scss.js new file mode 100644 index 00000000..09b62343 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-scss.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unquote".split("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),u=i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|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|legend|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|tt|u|ul|var|video|wbr|xmp".split("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scss_highlight_rules").ScssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,f=e("./css_completions").CssCompletions,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new f,this.foldingRules=new a};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/scss"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/scss"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-sh.js b/mixly/common/modules/web-modules/ace/mode-sh.js new file mode 100644 index 00000000..dafd11b6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-sh.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};r.inherits(u,i),t.ShHighlightRules=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/sh"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-sjs.js b/mixly/common/modules/web-modules/ace/mode-sjs.js new file mode 100644 index 00000000..1cbe4d81 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-sjs.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=new i({noES6:!0}),t="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",n=function(e){return e.isContextAware=!0,e},r=function(e){return{token:e.token,regex:e.regex,next:n(function(t,n){return n.length===0&&n.unshift(t),n.unshift(e.next),e.next})}},s=function(e){return{token:e.token,regex:e.regex,next:n(function(e,t){return t.shift(),t[0]||"start"})}};this.$rules=e.$rules,this.$rules.no_regex=[{token:"keyword",regex:"(waitfor|or|and|collapse|spawn|retract)\\b"},{token:"keyword.operator",regex:"(->|=>|\\.\\.)"},{token:"variable.language",regex:"(hold|default)\\b"},r({token:"string",regex:"`",next:"bstring"}),r({token:"string",regex:'"',next:"qqstring"}),r({token:"string",regex:'"',next:"qqstring"}),{token:["paren.lparen","text","paren.rparen"],regex:"(\\{)(\\s*)(\\|)",next:"block_arguments"}].concat(this.$rules.no_regex),this.$rules.block_arguments=[{token:"paren.rparen",regex:"\\|",next:"no_regex"}].concat(this.$rules.function_arguments),this.$rules.bstring=[{token:"constant.language.escape",regex:t},{token:"string",regex:"\\\\$",next:"bstring"},r({token:"paren.lparen",regex:"\\$\\{",next:"string_interp"}),r({token:"paren.lparen",regex:"\\$",next:"bstring_interp_single"}),s({token:"string",regex:"`"}),{defaultToken:"string"}],this.$rules.qqstring=[{token:"constant.language.escape",regex:t},{token:"string",regex:"\\\\$",next:"qqstring"},r({token:"paren.lparen",regex:"#\\{",next:"string_interp"}),s({token:"string",regex:'"'}),{defaultToken:"string"}];var o=[];for(var u=0;u=e.length?(n.splice(0,3),this.next=n.shift(),this.token):(this.next="",[{type:"text",value:i}])},next:""},{token:"string",regex:/.+/,onMatch:function(e,t,n,i){var s=n[2][0],o=n[2][1],u=n[1];if(r[o]){var a=r[o].getTokenizer().getLineTokens(i.slice(s.length),u.slice(0));return n[1]=a.state,a.tokens}return this.token}}]},{token:"constant.begin.javascript.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(ruby):$"},{token:"constant.begin.coffeescript.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(markdown):$"},{token:"constant.begin.css.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin.scss.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(sass):$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(less):$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(erb):$"},{token:"keyword.html.tags.slim",regex:"^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|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|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b"},{token:"keyword.slim",regex:"^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)"},{token:"string",regex:/^(\s*)('|\||\/|(\/!))\s*/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,this.token},next:"mlString"},{token:"keyword.control.slim",regex:"^(\\s*)(\\-|==|=)",push:[{token:"control.end.slim",regex:"$",next:"pop"},{include:"rubyline"},{include:"misc"}]},{token:"paren",regex:"\\(",push:[{token:"paren",regex:"\\)",next:"pop"},{include:"misc"}]},{token:"paren",regex:"\\[",push:[{token:"paren",regex:"\\]",next:"pop"},{include:"misc"}]},{include:"misc"}],mlString:[{token:"indent",regex:/^\s*/,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"start"},{defaultToken:"string"}],rubyline:[{token:"keyword.operator.ruby.embedded.slim",regex:"(==|=)(<>|><|<'|'<|<|>)?|-"},{token:"list.ruby.operators.slim",regex:"(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b"},{token:"string",regex:"['](.)*?[']"},{token:"string",regex:'["](.)*?["]'}],misc:[{token:"class.variable.slim",regex:"\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:"list.meta.slim",regex:"(\\b)(true|false|nil)(\\b)"},{token:"keyword.operator.equals.slim",regex:"="},{token:"string",regex:"['](.)*?[']"},{token:"string",regex:'["](.)*?["]'}]},this.normalizeRules()};i.inherits(o,s),t.SlimHighlightRules=o}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="`"?e.bgTokenizer.getState(n)=="start"?"end":"start":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type.lastIndexOf(c,0)===0}function h(){var e=f.value[0];return e=="="?6:e=="-"?5:7-f.value.search(/[^#]|$/)}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;if(r[0]=="`"){if(e.bgTokenizer.getState(n)!=="start"){while(++n0){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(n,r.length,u,0)}var f,c="markup.heading";if(l(n)){var p=h();while(++n=p)break}a=n-(!f||["=","-"].indexOf(f.value[0])==-1?1:2);if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var v=e.getLine(a).length;return new s(u,i,a,v)}}}}.call(o.prototype)}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};r.inherits(u,i),t.ShHighlightRules=u}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(l,s),function(){this.voidElements=i.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./behaviour/cstyle").CstyleBehaviour,s=e("./text").Mode,o=e("./markdown_highlight_rules").MarkdownHighlightRules,u=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new u,this.$behaviour=new i({braces:!0})};r.inherits(a,s),function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!r)return"";var i=r[2];return i||(i=parseInt(r[3],10)+1+"."),r[1]+i+r[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes|yield|export|import|default",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift()||"";if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;this.lineCommentStart="#",this.blockComment={start:"###",end:"###"},this.getNextLineIndent=function(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/coffee",this.snippetFileId="ace/snippets/coffee"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unquote".split("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),u=i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|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|legend|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|tt|u|ul|var|video|wbr|xmp".split("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scss_highlight_rules").ScssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,f=e("./css_completions").CssCompletions,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new f,this.foldingRules=new a};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/scss"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./scss_highlight_rules").ScssHighlightRules,o=function(){s.call(this);var e=this.$rules.start;e[1].token=="comment"&&(e.splice(1,1,{onMatch:function(e,t,n){return n.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,n){return n[1]===-1&&(n[1]=Math.max(n[2],e.length-1)),e.length<=n[1]?(n.shift(),n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};r.inherits(o,s),t.SassHighlightRules=o}),ace.define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sass_highlight_rules").SassHighlightRules,o=e("./folding/coffee").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/sass"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z_][a-z0-9-_]*"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|=|!=|-|%|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./less_highlight_rules").LessHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./css_completions").CssCompletions,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions("ruleset",t,n,r)},this.$id="ace/mode/less"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};r.inherits(d,i),t.RubyHighlightRules=d}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={"class":1,def:1,module:1,"do":1,unless:1,"if":1,"while":1,"for":1,until:1,begin:1,"else":0,elsif:0,rescue:0,ensure:0,when:0,end:-1,"case":1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/slim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/slim_highlight_rules","ace/mode/javascript","ace/mode/markdown","ace/mode/coffee","ace/mode/scss","ace/mode/sass","ace/mode/less","ace/mode/ruby","ace/mode/css"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./slim_highlight_rules").SlimHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.createModeDelegates({javascript:e("./javascript").Mode,markdown:e("./markdown").Mode,coffee:e("./coffee").Mode,scss:e("./scss").Mode,sass:e("./sass").Mode,less:e("./less").Mode,ruby:e("./ruby").Mode,css:e("./css").Mode})};r.inherits(o,i),function(){this.$id="ace/mode/slim"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/slim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-smarty.js b/mixly/common/modules/web-modules/ace/mode-smarty.js new file mode 100644 index 00000000..362b286e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-smarty.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=function(){i.call(this);var e={start:[{include:"#comments"},{include:"#blocks"}],"#blocks":[{token:"punctuation.section.embedded.begin.smarty",regex:"\\{%?",push:[{token:"punctuation.section.embedded.end.smarty",regex:"%?\\}",next:"pop"},{include:"#strings"},{include:"#variables"},{include:"#lang"},{defaultToken:"source.smarty"}]}],"#comments":[{token:["punctuation.definition.comment.smarty","comment.block.smarty"],regex:"(\\{%?)(\\*)",push:[{token:"comment.block.smarty",regex:"\\*%?\\}",next:"pop"},{defaultToken:"comment.block.smarty"}]}],"#lang":[{token:"keyword.operator.smarty",regex:"(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b"},{token:"constant.language.smarty",regex:"\\b(?:TRUE|FALSE|true|false)\\b"},{token:"keyword.control.smarty",regex:"\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b"},{token:"variable.parameter.smarty",regex:"\\b[a-zA-Z]+="},{token:"support.function.built-in.smarty",regex:"\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b"},{token:"support.function.variable-modifier.smarty",regex:"\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)"}],"#strings":[{token:"punctuation.definition.string.begin.smarty",regex:"'",push:[{token:"punctuation.definition.string.end.smarty",regex:"'",next:"pop"},{token:"constant.character.escape.smarty",regex:"\\\\."},{defaultToken:"string.quoted.single.smarty"}]},{token:"punctuation.definition.string.begin.smarty",regex:'"',push:[{token:"punctuation.definition.string.end.smarty",regex:'"',next:"pop"},{token:"constant.character.escape.smarty",regex:"\\\\."},{defaultToken:"string.quoted.double.smarty"}]}],"#variables":[{token:["punctuation.definition.variable.smarty","variable.other.global.smarty"],regex:"\\b(\\$)(Smarty\\.)"},{token:["punctuation.definition.variable.smarty","variable.other.smarty"],regex:"(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:["keyword.operator.smarty","variable.other.property.smarty"],regex:"(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:["keyword.operator.smarty","meta.function-call.object.smarty","punctuation.definition.variable.smarty","variable.other.smarty","punctuation.definition.variable.smarty"],regex:"(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))"}]},t=e.start;for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],t);Object.keys(e).forEach(function(t){this.$rules[t]||(this.$rules[t]=e[t])},this),this.normalizeRules()};s.metaData={fileTypes:["tpl"],foldingStartMarker:"\\{%?",foldingStopMarker:"%?\\}",name:"Smarty",scopeName:"text.html.smarty"},r.inherits(s,i),t.SmartyHighlightRules=s}),ace.define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./smarty_highlight_rules").SmartyHighlightRules,o=function(){i.call(this),this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/smarty"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/smarty"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-smithy.js b/mixly/common/modules/web-modules/ace/mode-smithy.js new file mode 100644 index 00000000..ee5755ef --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-smithy.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/smithy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#comment"},{token:["meta.keyword.statement.smithy","variable.other.smithy","text","keyword.operator.smithy"],regex:/^(\$)(\s+.+)(\s*)(=)/},{token:["keyword.statement.smithy","text","entity.name.type.namespace.smithy"],regex:/^(namespace)(\s+)([A-Z-a-z0-9_\.#$-]+)/},{token:["keyword.statement.smithy","text","keyword.statement.smithy","text","entity.name.type.smithy"],regex:/^(use)(\s+)(shape|trait)(\s+)([A-Z-a-z0-9_\.#$-]+)\b/},{token:["keyword.statement.smithy","variable.other.smithy","text","keyword.operator.smithy"],regex:/^(metadata)(\s+.+)(\s*)(=)/},{token:["keyword.statement.smithy","text","entity.name.type.smithy"],regex:/^(apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|service|resource|trait|list|map|set|structure|union|document)(\s+)([A-Z-a-z0-9_\.#$-]+)\b/},{token:["keyword.operator.smithy","text","entity.name.type.smithy","text","text","support.function.smithy","text","text","support.function.smithy"],regex:/^(operation)(\s+)([A-Z-a-z0-9_\.#$-]+)(\(.*\))(?:(\s*)(->)(\s*[A-Z-a-z0-9_\.#$-]+))?(?:(\s+)(errors))?/},{include:"#trait"},{token:["support.type.property-name.smithy","punctuation.separator.dictionary.pair.smithy"],regex:/([A-Z-a-z0-9_\.#$-]+)(:)/},{include:"#value"},{token:"keyword.other.smithy",regex:/\->/}],"#comment":[{include:"#doc_comment"},{include:"#line_comment"}],"#doc_comment":[{token:"comment.block.documentation.smithy",regex:/\/\/\/.*/}],"#line_comment":[{token:"comment.line.double-slash.smithy",regex:/\/\/.*/}],"#trait":[{token:["punctuation.definition.annotation.smithy","storage.type.annotation.smithy"],regex:/(@)([0-9a-zA-Z\.#-]+)/},{token:["punctuation.definition.annotation.smithy","punctuation.definition.object.end.smithy","meta.structure.smithy"],regex:/(@)([0-9a-zA-Z\.#-]+)(\()/,push:[{token:"punctuation.definition.object.end.smithy",regex:/\)/,next:"pop"},{include:"#value"},{include:"#object_inner"},{defaultToken:"meta.structure.smithy"}]}],"#value":[{include:"#constant"},{include:"#number"},{include:"#string"},{include:"#array"},{include:"#object"}],"#array":[{token:"punctuation.definition.array.begin.smithy",regex:/\[/,push:[{token:"punctuation.definition.array.end.smithy",regex:/\]/,next:"pop"},{include:"#comment"},{include:"#value"},{token:"punctuation.separator.array.smithy",regex:/,/},{token:"invalid.illegal.expected-array-separator.smithy",regex:/[^\s\]]/},{defaultToken:"meta.structure.array.smithy"}]}],"#constant":[{token:"constant.language.smithy",regex:/\b(?:true|false|null)\b/}],"#number":[{token:"constant.numeric.smithy",regex:/-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/}],"#object":[{token:"punctuation.definition.dictionary.begin.smithy",regex:/\{/,push:[{token:"punctuation.definition.dictionary.end.smithy",regex:/\}/,next:"pop"},{include:"#trait"},{include:"#object_inner"},{defaultToken:"meta.structure.dictionary.smithy"}]}],"#object_inner":[{include:"#comment"},{include:"#string_key"},{token:"punctuation.separator.dictionary.key-value.smithy",regex:/:/,push:[{token:"punctuation.separator.dictionary.pair.smithy",regex:/,|(?=\})/,next:"pop"},{include:"#value"},{token:"invalid.illegal.expected-dictionary-separator.smithy",regex:/[^\s,]/},{defaultToken:"meta.structure.dictionary.value.smithy"}]},{token:"invalid.illegal.expected-dictionary-separator.smithy",regex:/[^\s\}]/}],"#string_key":[{include:"#identifier_key"},{include:"#dquote_key"},{include:"#squote_key"}],"#identifier_key":[{token:"support.type.property-name.smithy",regex:/[A-Z-a-z0-9_\.#$-]+/}],"#dquote_key":[{include:"#dquote"}],"#squote_key":[{include:"#squote"}],"#string":[{include:"#textblock"},{include:"#dquote"},{include:"#squote"},{include:"#identifier"}],"#textblock":[{token:"punctuation.definition.string.begin.smithy",regex:/"""/,push:[{token:"punctuation.definition.string.end.smithy",regex:/"""/,next:"pop"},{token:"constant.character.escape.smithy",regex:/\\./},{defaultToken:"string.quoted.double.smithy"}]}],"#dquote":[{token:"punctuation.definition.string.begin.smithy",regex:/"/,push:[{token:"punctuation.definition.string.end.smithy",regex:/"/,next:"pop"},{token:"constant.character.escape.smithy",regex:/\\./},{defaultToken:"string.quoted.double.smithy"}]}],"#squote":[{token:"punctuation.definition.string.begin.smithy",regex:/'/,push:[{token:"punctuation.definition.string.end.smithy",regex:/'/,next:"pop"},{token:"constant.character.escape.smithy",regex:/\\./},{defaultToken:"string.quoted.single.smithy"}]}],"#identifier":[{token:"storage.type.smithy",regex:/[A-Z-a-z_][A-Z-a-z0-9_\.#$-]*/}]},this.normalizeRules()};s.metaData={name:"Smithy",fileTypes:["smithy"],scopeName:"source.smithy",foldingStartMarker:"(\\{|\\[)\\s*",foldingStopMarker:"\\s*(\\}|\\])"},r.inherits(s,i),t.SmithyHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/smithy",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/smithy_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./smithy_highlight_rules").SmithyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.$quotes={'"':'"'},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/smithy"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/smithy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-snippets.js b/mixly/common/modules/web-modules/ace/mode-snippets.js new file mode 100644 index 00000000..2c9a13ea --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-snippets.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=function(){i.call(this);var e={start:[{include:"#template"},{include:"#if"},{include:"#comment-line"},{include:"#comment-block"},{include:"#comment-doc"},{include:"#call"},{include:"#css"},{include:"#param"},{include:"#print"},{include:"#msg"},{include:"#for"},{include:"#foreach"},{include:"#switch"},{include:"#tag"},{include:"text.html.basic"}],"#call":[{token:["punctuation.definition.tag.begin.soy","meta.tag.call.soy"],regex:"(\\{/?)(\\s*)(?=call|delcall)",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{token:["entity.name.tag.soy","variable.parameter.soy"],regex:"(call|delcall)(\\s+[\\.\\w]+)"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy"],regex:"\\b(data)(\\s*)(=)"},{defaultToken:"meta.tag.call.soy"}]}],"#comment-line":[{token:["comment.line.double-slash.soy","comment.line.double-slash.soy"],regex:"(//)(.*$)"}],"#comment-block":[{token:"punctuation.definition.comment.begin.soy",regex:"/\\*(?!\\*)",push:[{token:"punctuation.definition.comment.end.soy",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.soy"}]}],"#comment-doc":[{token:"punctuation.definition.comment.begin.soy",regex:"/\\*\\*(?!/)",push:[{token:"punctuation.definition.comment.end.soy",regex:"\\*/",next:"pop"},{token:["support.type.soy","text","variable.parameter.soy"],regex:"(@param|@param\\?)(\\s+)(\\w+)"},{defaultToken:"comment.block.documentation.soy"}]}],"#css":[{token:["punctuation.definition.tag.begin.soy","meta.tag.css.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(css)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:"support.constant.soy",regex:"\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b"},{defaultToken:"meta.tag.css.soy"}]}],"#for":[{token:["punctuation.definition.tag.begin.soy","meta.tag.for.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(for)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:"keyword.operator.soy",regex:"\\bin\\b"},{token:"support.function.soy",regex:"\\brange\\b"},{include:"#variable"},{include:"#number"},{include:"#primitive"},{defaultToken:"meta.tag.for.soy"}]}],"#foreach":[{token:["punctuation.definition.tag.begin.soy","meta.tag.foreach.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(foreach)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:"keyword.operator.soy",regex:"\\bin\\b"},{include:"#variable"},{defaultToken:"meta.tag.foreach.soy"}]}],"#function":[{token:"support.function.soy",regex:"\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b"}],"#if":[{token:["punctuation.definition.tag.begin.soy","meta.tag.if.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(if|elseif)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{include:"#operator"},{include:"#function"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{defaultToken:"meta.tag.if.soy"}]}],"#namespace":[{token:["entity.name.tag.soy","text","variable.parameter.soy"],regex:"(namespace|delpackage)(\\s+)([\\w\\.]+)"}],"#number":[{token:"constant.numeric",regex:"[\\d]+"}],"#operator":[{token:"keyword.operator.soy",regex:"==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:"}],"#param":[{token:["punctuation.definition.tag.begin.soy","meta.tag.param.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(param)",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy"],regex:"\\b([\\w]+)(\\s*)((?::)?)"},{defaultToken:"meta.tag.param.soy"}]}],"#primitive":[{token:"constant.language.soy",regex:"\\b(?:null|false|true)\\b"}],"#msg":[{token:["punctuation.definition.tag.begin.soy","meta.tag.msg.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(msg)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy"],regex:"\\b(meaning|desc)(\\s*)(=)"},{defaultToken:"meta.tag.msg.soy"}]}],"#print":[{token:["punctuation.definition.tag.begin.soy","meta.tag.print.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(print)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{include:"#print-parameter"},{include:"#number"},{include:"#primitive"},{include:"#attribute-lookup"},{defaultToken:"meta.tag.print.soy"}]}],"#print-parameter":[{token:"keyword.operator.soy",regex:"\\|"},{token:"variable.parameter.soy",regex:"noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate"}],"#special-character":[{token:"support.constant.soy",regex:"\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b"}],"#string-quoted-double":[{token:"string.quoted.double",regex:'"[^"]*"'}],"#string-quoted-single":[{token:"string.quoted.single",regex:"'[^']*'"}],"#switch":[{token:["punctuation.definition.tag.begin.soy","meta.tag.switch.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(switch|case)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{include:"#function"},{include:"#number"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{defaultToken:"meta.tag.switch.soy"}]}],"#attribute-lookup":[{token:"punctuation.definition.attribute-lookup.begin.soy",regex:"\\[",push:[{token:"punctuation.definition.attribute-lookup.end.soy",regex:"\\]",next:"pop"},{include:"#variable"},{include:"#function"},{include:"#operator"},{include:"#number"},{include:"#primitive"},{include:"#string-quoted-single"},{include:"#string-quoted-double"}]}],"#tag":[{token:"punctuation.definition.tag.begin.soy",regex:"\\{",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#namespace"},{include:"#variable"},{include:"#special-character"},{include:"#tag-simple"},{include:"#function"},{include:"#operator"},{include:"#attribute-lookup"},{include:"#number"},{include:"#primitive"},{include:"#print-parameter"}]}],"#tag-simple":[{token:"entity.name.tag.soy",regex:"{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})"}],"#template":[{token:["punctuation.definition.tag.begin.soy","meta.tag.template.soy"],regex:"(\\{/?)(\\s*)(?=template|deltemplate)",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:["entity.name.tag.soy","text","entity.name.function.soy"],regex:"(template|deltemplate)(\\s+)([\\.\\w]+)",originalRegex:"(?<=template|deltemplate)\\s+([\\.\\w]+)"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.double.soy"],regex:'\\b(private)(\\s*)(=)(\\s*)("true"|"false")'},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.single.soy"],regex:"\\b(private)(\\s*)(=)(\\s*)('true'|'false')"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.double.soy"],regex:'\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")'},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.single.soy"],regex:"\\b(autoescape)(\\s*)(=)(\\s*)('true'|'false'|'contextual')"},{defaultToken:"meta.tag.template.soy"}]}],"#variable":[{token:"variable.other.soy",regex:"\\$[\\w\\.]+"}]};for(var t in e)this.$rules[t]?this.$rules[t].unshift.apply(this.$rules[t],e[t]):this.$rules[t]=e[t];this.normalizeRules()};s.metaData={comment:"SoyTemplate",fileTypes:["soy"],firstLineMatch:"\\{\\s*namespace\\b",foldingStartMarker:"\\{\\s*template\\s+[^\\}]*\\}",foldingStopMarker:"\\{\\s*/\\s*template\\s*\\}",name:"SoyTemplate",scopeName:"source.soy"},r.inherits(s,i),t.SoyTemplateHighlightRules=s}),ace.define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./soy_template_highlight_rules").SoyTemplateHighlightRules,o=function(){i.call(this),this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/soy_template"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/soy_template"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-space.js b/mixly/common/modules/web-modules/ace/mode-space.js new file mode 100644 index 00000000..176b60fa --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-space.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|<=|>=|(?:^|!?\s)IN(?:!?\s|$)|(?:^|!?\s)NOT(?:!?\s|$)|-|\+|\*|\/|\!/}],"#owl-types":[{token:"support.type.datatype.owl.sparql",regex:/owl:[a-zA-Z]+/}],"#punctuation-operators":[{token:"keyword.operator.punctuation.sparql",regex:/;|,|\.|\(|\)|\{|\}|\|/}],"#qnames":[{token:"entity.name.other.qname.sparql",regex:/(?:[a-zA-Z][-_a-zA-Z0-9]*)?:(?:[_a-zA-Z][-_a-zA-Z0-9]*)?/}],"#rdf-schema-types":[{token:"support.type.datatype.rdf.schema.sparql",regex:/rdfs?:[a-zA-Z]+|(?:^|\s)a(?:\s|$)/}],"#relative-urls":[{token:"string.quoted.other.relative.url.sparql",regex://,next:"pop"},{defaultToken:"string.quoted.other.relative.url.sparql"}]}],"#string-datatype-suffixes":[{token:"keyword.operator.datatype.suffix.sparql",regex:/\^\^/}],"#string-language-suffixes":[{token:["keyword.operator.language.suffix.sparql","constant.language.suffix.sparql"],regex:/(?!")(@)([a-z]+(?:\-[a-z0-9]+)*)/}],"#strings":[{token:"string.quoted.triple.sparql",regex:/"""/,push:[{token:"string.quoted.triple.sparql",regex:/"""/,next:"pop"},{defaultToken:"string.quoted.triple.sparql"}]},{token:"string.quoted.double.sparql",regex:/"/,push:[{token:"string.quoted.double.sparql",regex:/"/,next:"pop"},{token:"invalid.string.newline",regex:/$/},{token:"constant.character.escape.sparql",regex:/\\./},{defaultToken:"string.quoted.double.sparql"}]}],"#variables":[{token:"variable.other.sparql",regex:/(?:\?|\$)[-_a-zA-Z0-9]+/}],"#xml-schema-types":[{token:"support.type.datatype.schema.sparql",regex:/xsd?:[a-z][a-zA-Z]+/}]},this.normalizeRules()};s.metaData={fileTypes:["rq","sparql"],name:"SPARQL",scopeName:"source.sparql"},r.inherits(s,i),t.SPARQLHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/sparql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sparql_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sparql_highlight_rules").SPARQLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/sparql"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/sparql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-sql.js b/mixly/common/modules/web-modules/ace/mode-sql.js new file mode 100644 index 00000000..e7cd742b --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-sql.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct|is|in|all|alter|any|array|at|authorization|between|both|cast|check|collate|column|commit|constraint|cube|current|current_date|current_time|current_timestamp|current_user|describe|escape|except|exists|external|extract|fetch|filter|for|full|function|global|grouping|intersect|interval|into|leading|like|local|no|of|only|out|overlaps|partition|position|range|revoke|rollback|rollup|row|rows|session_user|set|some|start|tablesample|time|to|trailing|truncate|unique|unknown|user|using|values|window|with",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer|string",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=t.FoldMode=function(){};r.inherits(s,i),function(){}.call(s.prototype)}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=e("./folding/sql").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/sql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-sqlserver.js b/mixly/common/modules/web-modules/ace/mode-sqlserver.js new file mode 100644 index 00000000..b8bd30a4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-sqlserver.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/sqlserver_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME";e+="|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS";var t="OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|DENSE_RANK|NTILE|RANK|ROW_NUMBER@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|DATETRUNC|CHOOSE|IIF|ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|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|@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|PATINDEX|TEXTPTR|TEXTVALID|GREATEST|LEAST|GENERATE_SERIES|DATE_BUCKET|JSON_ARRAY|JSON_OBJECT|JSON_PATH_EXISTS|ISJSON|FIRST_VALUE|LAST_VALUE|COALESCE|NULLIF",n="BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML",r="sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool",s="ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|STRING_SPLIT|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE";s+="|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT",s+="|LOOP|HASH|MERGE|REMOTE",s+="|TRY|CATCH|THROW",s+="|TYPE",s=s.split("|"),s=s.filter(function(r,i,s){return e.split("|").indexOf(r)===-1&&t.split("|").indexOf(r)===-1&&n.split("|").indexOf(r)===-1}),s=s.sort().join("|");var o=this.createKeywordMapper({"constant.language":e,"storage.type":n,"support.function":t,"support.storedprocedure":r,keyword:s},"identifier",!0),u="SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split("|"),a="READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split("|");for(var f=0;f|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"punctuation",regex:",|;"},{token:"text",regex:"\\s+"}],comment:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]};for(var f=0;ff)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/sqlserver",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./cstyle").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i,this.startRegionRe=/^\s*(\/\*|--)#?region\b/,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.getBeginEndBlock(e,n,o,s[1]);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;return},this.getBeginEndBlock=function(e,t,n,r){var s={row:t,column:n+r.length},o=e.getLength(),u,a=1,f=/(\bCASE\b|\bBEGIN\b)|(\bEND\b)/i;while(++ts.row)return new i(s.row,s.column,c,u.length)}}.call(o.prototype)}),ace.define("ace/mode/sqlserver",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sqlserver_highlight_rules","ace/mode/folding/sqlserver"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sqlserver_highlight_rules").SqlHighlightRules,o=e("./folding/sqlserver").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getCompletions=function(e,t,n,r){return t.$mode.$highlightRules.completions},this.$id="ace/mode/sqlserver",this.snippetFileId="ace/snippets/sqlserver"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/sqlserver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-stylus.js b/mixly/common/modules/web-modules/ace/mode-stylus.js new file mode 100644 index 00000000..781d6f34 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-stylus.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e=this.createKeywordMapper({"support.type":s.supportType,"support.function":s.supportFunction,"support.constant":s.supportConstant,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"text",!0);this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:["entity.name.function.stylus","text"],regex:"^([-a-zA-Z_][-\\w]*)?(\\()"},{token:["entity.other.attribute-name.class.stylus"],regex:"\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"},{token:["entity.language.stylus"],regex:"^ *&"},{token:["variable.language.stylus"],regex:"(arguments)"},{token:["keyword.stylus"],regex:"@[-\\w]+"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:s.pseudoElements},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s.pseudoClasses},{token:["entity.name.tag.stylus"],regex:"(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"},{token:"constant.numeric",regex:"#[a-fA-F0-9]{6}"},{token:"constant.numeric",regex:"#[a-fA-F0-9]{3}"},{token:["punctuation.definition.entity.stylus","entity.other.attribute-name.id.stylus"],regex:"(#)([a-zA-Z][a-zA-Z0-9_-]*)"},{token:"meta.vendor-prefix.stylus",regex:"-webkit-|-moz\\-|-ms-|-o-"},{token:"keyword.control.stylus",regex:"(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"},{token:"keyword.operator.stylus",regex:"!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="},{token:"keyword.operator.stylus",regex:"(?:in|is(?:nt)?|not)\\b"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:s.numRe},{token:"keyword",regex:"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}],qstring:[{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"}]}};r.inherits(o,i),t.StylusHighlightRules=o}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value==="-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o"},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,s=e("../behaviour/cstyle").CstyleBehaviour,o=e("../behaviour/xml").XmlBehaviour,u=function(){var e=(new o({closeCurlyBraces:!0})).getBehaviours();this.addBehaviours(e),this.inherit(s),this.add("autoclosing-fragment","insertion",function(e,t,n,r,s){if(s==">"){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,o=function(){s.call(this),this.embedTagRules(i,"js-","script"),this.normalizeRules()};r.inherits(o,s),t.SvgHighlightRules=o}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./xml").Mode,s=e("./javascript").Mode,o=e("./svg_highlight_rules").SvgHighlightRules,u=e("./folding/mixed").FoldMode,a=e("./folding/xml").FoldMode,f=e("./folding/cstyle").FoldMode,l=function(){i.call(this),this.HighlightRules=o,this.createModeDelegates({"js-":s}),this.foldingRules=new u(new a,{"js-":new f})};r.inherits(l,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/svg"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/svg"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-swift.js b/mixly/common/modules/web-modules/ace/mode-swift.js new file mode 100644 index 00000000..78dbc915 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-swift.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/swift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){function t(e,t){var n=t.nestable||t.interpolation,r=t.interpolation&&t.interpolation.nextState||"start",s={regex:e+(t.multiline?"":"(?=.)"),token:"string.start"},o=[t.escape&&{regex:t.escape,token:"character.escape"},t.interpolation&&{token:"paren.quasi.start",regex:i.escapeRegExp(t.interpolation.lead+t.interpolation.open),push:r},t.error&&{regex:t.error,token:"error.invalid"},{regex:e+(t.multiline?"":"|$"),token:"string.end",next:n?"pop":"start"},{defaultToken:"string"}].filter(Boolean);n?s.push=o:s.next=o;if(!t.interpolation)return s;var u=t.interpolation.open,a=t.interpolation.close,f={regex:"["+i.escapeRegExp(u+a)+"]",onMatch:function(e,t,n){this.next=e==u?this.nextState:"";if(e==u&&n.length)return n.unshift("start",t),"paren";if(e==a&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1)return"paren.quasi.end"}return e==u?"paren.lparen":"paren.rparen"},nextState:r};return[f,s]}function n(){return[{token:"comment",regex:/\/\//,next:[s.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]},s.getStartRule("doc-start"),{token:"comment.start",regex:/\/\*/,stateName:"nested_comment",push:[s.getTagRule(),{token:"comment.start",regex:/\/\*/,push:"nested_comment"},{token:"comment.end",regex:"\\*\\/",next:"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var e=this.createKeywordMapper({"variable.language":"",keyword:"__COLUMN__|__FILE__|__FUNCTION__|__LINE__|as|associativity|break|case|class|continue|default|deinit|didSet|do|dynamicType|else|enum|extension|fallthrough|for|func|get|if|import|in|infix|init|inout|is|left|let|let|mutating|new|none|nonmutating|operator|override|postfix|precedence|prefix|protocol|return|right|safe|Self|self|set|struct|subscript|switch|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|convenience|dynamic|final|infix|lazy|mutating|nonmutating|optional|override|postfix|prefix|required|static|guard|defer","storage.type":"bool|double|Double|extension|float|Float|int|Int|open|internal|fileprivate|private|public|string|String","constant.language":"false|Infinity|NaN|nil|no|null|null|off|on|super|this|true|undefined|yes","support.function":""},"identifier");this.$rules={start:[t('"""',{escape:/\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/,interpolation:{lead:"\\",open:"(",close:")"},error:/\\./,multiline:!0}),t('"',{escape:/\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/,interpolation:{lead:"\\",open:"(",close:")"},error:/\\./,multiline:!1}),n(),{regex:/@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:"variable.parameter"},{regex:/[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:e},{token:"constant.numeric",regex:/[+-]?(?:0(?:b[01]+|o[0-7]+|x[\da-fA-F])|\d+(?:(?:\.\d*)?(?:[PpEe][+-]?\d+)?)\b)/},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(u,o),t.HighlightRules=u,t.SwiftHighlightRules=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./swift_highlight_rules").HighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/",nestable:!0},this.$id="ace/mode/swift"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/swift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-tcl.js b/mixly/common/modules/web-modules/ace/mode-tcl.js new file mode 100644 index 00000000..cb772d72 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-tcl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*\\\\$",next:"commentfollow"},{token:"comment",regex:"#.*$"},{token:"support.function",regex:"[\\\\]$",next:"splitlineStart"},{token:"text",regex:/\\(?:["{}\[\]$\\])/},{token:"text",regex:"^|[^{][;][^}]|[/\r/]",next:"commandItem"},{token:"string",regex:'[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'[ ]*["]',next:"qqstring"},{token:"variable.instance",regex:"[$]",next:"variable"},{token:"support.function",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"},{token:"identifier",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"paren.lparen",regex:"[[{]",next:"commandItem"},{token:"paren.lparen",regex:"[(]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],commandItem:[{token:"comment",regex:"#.*\\\\$",next:"commentfollow"},{token:"comment",regex:"#.*$",next:"start"},{token:"string",regex:'[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"variable.instance",regex:"[$]",next:"variable"},{token:"support.function",regex:"(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])",next:"commandItem"},{token:"support.function",regex:"[a-zA-Z0-9_/]+(?:[:][:])",next:"commandItem"},{token:"support.function",regex:"(?:[:][:])",next:"commandItem"},{token:"paren.rparen",regex:"[\\])}]"},{token:"paren.lparen",regex:"[[({]"},{token:"support.function",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"},{token:"keyword",regex:"[a-zA-Z0-9_/]+",next:"start"}],commentfollow:[{token:"comment",regex:".*\\\\$",next:"commentfollow"},{token:"comment",regex:".+",next:"start"}],splitlineStart:[{token:"text",regex:"^.",next:"start"}],variable:[{token:"variable.instance",regex:"[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",next:"start"},{token:"variable.instance",regex:"{?[a-zA-Z_\\d]+}?",next:"start"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?["]',next:"start"},{token:"string",regex:".+"}]}};r.inherits(s,i),t.TclHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./folding/cstyle").FoldMode,o=e("./tcl_highlight_rules").TclHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=function(){this.HighlightRules=o,this.$outdent=new u,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/tcl",this.snippetFileId="ace/snippets/tcl"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/tcl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-terraform.js b/mixly/common/modules/web-modules/ace/mode-terraform.js new file mode 100644 index 00000000..b6ee38bc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-terraform.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/terraform_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["storage.function.terraform"],regex:"\\b(output|resource|data|variable|module|export)\\b"},{token:"variable.terraform",regex:"\\$\\s",push:[{token:"keyword.terraform",regex:"(-var-file|-var)"},{token:"variable.terraform",regex:"\\n|$",next:"pop"},{include:"strings"},{include:"variables"},{include:"operators"},{defaultToken:"text"}]},{token:"language.support.class",regex:"\\b(timeouts|provider|connection|provisioner|lifecycleprovider|atlas)\\b"},{token:"singleline.comment.terraform",regex:"#.*$"},{token:"singleline.comment.terraform",regex:"//.*$"},{token:"multiline.comment.begin.terraform",regex:/\/\*/,push:"blockComment"},{token:"storage.function.terraform",regex:"^\\s*(locals|terraform)\\s*{"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{include:"constants"},{include:"strings"},{include:"operators"},{include:"variables"}],blockComment:[{regex:/\*\//,token:"multiline.comment.end.terraform",next:"pop"},{defaultToken:"comment"}],constants:[{token:"constant.language.terraform",regex:"\\b(true|false|yes|no|on|off|EOF)\\b"},{token:"constant.numeric.terraform",regex:"(\\b([0-9]+)([kKmMgG]b?)?\\b)|(\\b(0x[0-9A-Fa-f]+)([kKmMgG]b?)?\\b)"}],variables:[{token:["variable.assignment.terraform","keyword.operator"],regex:"\\b([a-zA-Z_]+)(\\s*=)"}],interpolated_variables:[{token:"variable.terraform",regex:"\\b(var|self|count|path|local)\\b(?:\\.*[a-zA-Z_-]*)?"}],strings:[{token:"punctuation.quote.terraform",regex:"'",push:[{token:"punctuation.quote.terraform",regex:"'",next:"pop"},{include:"escaped_chars"},{defaultToken:"string"}]},{token:"punctuation.quote.terraform",regex:'"',push:[{token:"punctuation.quote.terraform",regex:'"',next:"pop"},{include:"interpolation"},{include:"escaped_chars"},{defaultToken:"string"}]}],escaped_chars:[{token:"constant.escaped_char.terraform",regex:"\\\\."}],operators:[{token:"keyword.operator",regex:"\\?|:|==|!=|>|<|>=|<=|&&|\\|\\||!|%|&|\\*|\\+|\\-|/|="}],interpolation:[{token:"punctuation.interpolated.begin.terraform",regex:"\\$?\\$\\{",push:[{token:"punctuation.interpolated.end.terraform",regex:"\\}",next:"pop"},{include:"interpolated_variables"},{include:"operators"},{include:"constants"},{include:"strings"},{include:"functions"},{include:"parenthesis"},{defaultToken:"punctuation"}]}],functions:[{token:"keyword.function.terraform",regex:"\\b(abs|basename|base64decode|base64encode|base64gzip|base64sha256|base64sha512|bcrypt|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|coalesce|coalescelist|compact|concat|contains|dirname|distinct|element|file|floor|flatten|format|formatlist|indent|index|join|jsonencode|keys|length|list|log|lookup|lower|map|matchkeys|max|merge|min|md5|pathexpand|pow|replace|rsadecrypt|sha1|sha256|sha512|signum|slice|sort|split|substr|timestamp|timeadd|title|transpose|trimspace|upper|urlencode|uuid|values|zipmap)\\b"}],parenthesis:[{token:"paren.lparen",regex:"\\["},{token:"paren.rparen",regex:"\\]"}]},this.normalizeRules()};r.inherits(s,i),t.TerraformHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/terraform",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/terraform_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./terraform_highlight_rules").TerraformHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){i.call(this),this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.lineCommentStart=["#","//"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/terraform"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/terraform"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-tex.js b/mixly/common/modules/web-modules/ace/mode-tex.js new file mode 100644 index 00000000..50f84df7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-tex.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(e){e?this.HighlightRules=s:this.HighlightRules=o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="%",this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.allowAutoInsert=function(){return!1},this.$id="ace/mode/tex",this.snippetFileId="ace/snippets/tex"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/tex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-text.js b/mixly/common/modules/web-modules/ace/mode-text.js new file mode 100644 index 00000000..ac9e09f8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-text.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/mode/text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-textile.js b/mixly/common/modules/web-modules/ace/mode-textile.js new file mode 100644 index 00000000..c863a626 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-textile.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:function(e){return e.charAt(0)=="h"?"markup.heading."+e.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};r.inherits(s,i),t.TextileHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./textile_highlight_rules").TextileHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return e=="intag"?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/textile",this.snippetFileId="ace/snippets/textile"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/textile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-toml.js b/mixly/common/modules/web-modules/ace/mode-toml.js new file mode 100644 index 00000000..5cd26f24 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-toml.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language.boolean":"true|false"},"identifier"),t="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";this.$rules={start:[{token:"comment.toml",regex:/#.*$/},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[\\[([^\\]]+)\\]\\])"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[([^\\]]+)\\])"},{token:e,regex:t},{token:"support.date.toml",regex:"\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)"},{token:"constant.numeric.toml",regex:"-?\\d+(\\.?\\d+)?"}],qqstring:[{token:"string",regex:"\\\\$",next:"qqstring"},{token:"constant.language.escape",regex:'\\\\[0tnr"\\\\]'},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.TomlHighlightRules=s}),ace.define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),ace.define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./toml_highlight_rules").TomlHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/toml"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/toml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-tsv.js b/mixly/common/modules/web-modules/ace/mode-tsv.js new file mode 100644 index 00000000..f50c4206 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-tsv.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/csv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){i.call(this)};r.inherits(s,i),t.CsvHighlightRules=s}),ace.define("ace/mode/csv",["require","exports","module","ace/lib/oop","ace/mode/text","ace/lib/lang","ace/mode/csv_highlight_rules"],function(e,t,n){"use strict";function f(e,t,n){var r=[],i=e.split(n.separatorRegex),s=n.spliter,o=n.quote||'"',u=(t||"start").split("-"),f=parseInt(u[1])||0,l=u[0]=="string",c=!l;for(var h=0;h-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\u00a1-\uffff]*)"},{token:"keyword",regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)"},{token:["keyword","storage.type.variable.ts"],regex:"(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)"},{token:"keyword",regex:"\\b(?:super|export|import|keyof|infer)\\b"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./typescript_highlight_rules").TypeScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/tsx",["require","exports","module","ace/lib/oop","ace/mode/behaviour/javascript","ace/mode/folding/javascript","ace/mode/typescript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./behaviour/javascript").JavaScriptBehaviour,s=e("./folding/javascript").FoldMode,o=e("./typescript").Mode,u=function(){o.call(this),this.$highlightRuleConfig={jsx:!0},this.foldingRules=new s,this.$behaviour=new i};r.inherits(u,o),function(){this.$id="ace/mode/tsx"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/tsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-turtle.js b/mixly/common/modules/web-modules/ace/mode-turtle.js new file mode 100644 index 00000000..a92c85ca --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-turtle.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/turtle_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#comments"},{include:"#strings"},{include:"#base-prefix-declarations"},{include:"#string-language-suffixes"},{include:"#string-datatype-suffixes"},{include:"#relative-urls"},{include:"#xml-schema-types"},{include:"#rdf-schema-types"},{include:"#owl-types"},{include:"#qnames"},{include:"#punctuation-operators"}],"#base-prefix-declarations":[{token:"keyword.other.prefix.turtle",regex:/@(?:base|prefix)/}],"#comments":[{token:["punctuation.definition.comment.turtle","comment.line.hash.turtle"],regex:/(#)(.*$)/}],"#owl-types":[{token:"support.type.datatype.owl.turtle",regex:/owl:[a-zA-Z]+/}],"#punctuation-operators":[{token:"keyword.operator.punctuation.turtle",regex:/;|,|\.|\(|\)|\[|\]/}],"#qnames":[{token:"entity.name.other.qname.turtle",regex:/(?:[a-zA-Z][-_a-zA-Z0-9]*)?:(?:[_a-zA-Z][-_a-zA-Z0-9]*)?/}],"#rdf-schema-types":[{token:"support.type.datatype.rdf.schema.turtle",regex:/rdfs?:[a-zA-Z]+|(?:^|\s)a(?:\s|$)/}],"#relative-urls":[{token:"string.quoted.other.relative.url.turtle",regex://,next:"pop"},{defaultToken:"string.quoted.other.relative.url.turtle"}]}],"#string-datatype-suffixes":[{token:"keyword.operator.datatype.suffix.turtle",regex:/\^\^/}],"#string-language-suffixes":[{token:["keyword.operator.language.suffix.turtle","constant.language.suffix.turtle"],regex:/(?!")(@)([a-z]+(?:\-[a-z0-9]+)*)/}],"#strings":[{token:"string.quoted.triple.turtle",regex:/"""/,push:[{token:"string.quoted.triple.turtle",regex:/"""/,next:"pop"},{defaultToken:"string.quoted.triple.turtle"}]},{token:"string.quoted.double.turtle",regex:/"/,push:[{token:"string.quoted.double.turtle",regex:/"/,next:"pop"},{token:"invalid.string.newline",regex:/$/},{token:"constant.character.escape.turtle",regex:/\\./},{defaultToken:"string.quoted.double.turtle"}]}],"#xml-schema-types":[{token:"support.type.datatype.xml.schema.turtle",regex:/xsd?:[a-z][a-zA-Z]+/}]},this.normalizeRules()};s.metaData={fileTypes:["ttl","nt"],name:"Turtle",scopeName:"source.turtle"},r.inherits(s,i),t.TurtleHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/turtle",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/turtle_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./turtle_highlight_rules").TurtleHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/turtle"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/turtle"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-twig.js b/mixly/common/modules/web-modules/ace/mode-twig.js new file mode 100644 index 00000000..ce051d06 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-twig.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/twig_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./html_highlight_rules").HtmlHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){s.call(this);var e="autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";e=e+"|end"+e.replace(/\|/g,"|end");var t="abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode",n="attribute|constant|cycle|date|dump|parent|random|range|template_from_string",r="constant|divisibleby|sameas|defined|empty|even|iterable|odd",i="null|none|true|false",o="b-and|b-xor|b-or|in|is|and|or|not",u=this.createKeywordMapper({"keyword.control.twig":e,"support.function.twig":[t,n,r].join("|"),"keyword.operator.twig":o,"constant.language.twig":i},"identifier");for(var a in this.$rules)this.$rules[a].unshift({token:"variable.other.readwrite.local.twig",regex:"\\{\\{-?",push:"twig-start"},{token:"meta.tag.twig",regex:"\\{%-?",push:"twig-start"},{token:"comment.block.twig",regex:"\\{#-?",push:"twig-comment"});this.$rules["twig-comment"]=[{token:"comment.block.twig",regex:".*-?#\\}",next:"pop"}],this.$rules["twig-start"]=[{token:"variable.other.readwrite.local.twig",regex:"-?\\}\\}",next:"pop"},{token:"meta.tag.twig",regex:"-?%\\}",next:"pop"},{token:"string",regex:"'",next:"twig-qstring"},{token:"string",regex:'"',next:"twig-qqstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:u,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator.assignment",regex:"=|~"},{token:"keyword.operator.comparison",regex:"==|!=|<|>|>=|<=|==="},{token:"keyword.operator.arithmetic",regex:"\\+|-|/|%|//|\\*|\\*\\*"},{token:"keyword.operator.other",regex:"\\.\\.|\\|"},{token:"punctuation.operator",regex:/\?|:|,|;|\./},{token:"paren.lparen",regex:/[\[\({]/},{token:"paren.rparen",regex:/[\])}]/},{token:"text",regex:"\\s+"}],this.$rules["twig-qqstring"]=[{token:"constant.language.escape",regex:/\\[\\"$#ntr]|#{[^"}]*}/},{token:"string",regex:'"',next:"twig-start"},{defaultToken:"string"}],this.$rules["twig-qstring"]=[{token:"constant.language.escape",regex:/\\[\\'ntr]}/},{token:"string",regex:"'",next:"twig-start"},{defaultToken:"string"}],this.normalizeRules()};r.inherits(u,o),t.TwigHighlightRules=u}),ace.define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./twig_highlight_rules").TwigHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){i.call(this),this.HighlightRules=s,this.$outdent=new o};r.inherits(u,i),function(){this.blockComment={start:"{#",end:"#}"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/twig"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/twig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-typescript.js b/mixly/common/modules/web-modules/ace/mode-typescript.js new file mode 100644 index 00000000..cf20314f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-typescript.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\u00a1-\uffff]*)"},{token:"keyword",regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)"},{token:["keyword","storage.type.variable.ts"],regex:"(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)"},{token:"keyword",regex:"\\b(?:super|export|import|keyof|infer)\\b"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./typescript_highlight_rules").TypeScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/typescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-vala.js b/mixly/common/modules/web-modules/ace/mode-vala.js new file mode 100644 index 00000000..fe31a54e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-vala.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["meta.using.vala","keyword.other.using.vala","meta.using.vala","storage.modifier.using.vala","meta.using.vala","punctuation.terminator.vala"],regex:"^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?"},{include:"#code"}],"#all-types":[{include:"#primitive-arrays"},{include:"#primitive-types"},{include:"#object-types"}],"#annotations":[{token:["storage.type.annotation.vala","punctuation.definition.annotation-arguments.begin.vala"],regex:"(@[^ (]+)(\\()",push:[{token:"punctuation.definition.annotation-arguments.end.vala",regex:"\\)",next:"pop"},{token:["constant.other.key.vala","text","keyword.operator.assignment.vala"],regex:"(\\w*)(\\s*)(=)"},{include:"#code"},{token:"punctuation.seperator.property.vala",regex:","},{defaultToken:"meta.declaration.annotation.vala"}]},{token:"storage.type.annotation.vala",regex:"@\\w*"}],"#anonymous-classes-and-new":[{token:"keyword.control.new.vala",regex:"\\bnew\\b",push_disabled:[{token:"text",regex:"(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)",next:"pop"},{token:["storage.type.vala","text"],regex:"(\\w+)(\\s*)(?=\\[)",push:[{token:"text",regex:"}|(?=;|\\))",next:"pop"},{token:"text",regex:"\\[",push:[{token:"text",regex:"\\]",next:"pop"},{include:"#code"}]},{token:"text",regex:"{",push:[{token:"text",regex:"(?=})",next:"pop"},{include:"#code"}]}]},{token:"text",regex:"(?=\\w.*\\()",push:[{token:"text",regex:"(?<=\\))",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?<=\\))",next:"pop"},{include:"#object-types"},{token:"text",regex:"\\(",push:[{token:"text",regex:"\\)",next:"pop"},{include:"#code"}]}]},{token:"meta.inner-class.vala",regex:"{",push:[{token:"meta.inner-class.vala",regex:"}",next:"pop"},{include:"#class-body"},{defaultToken:"meta.inner-class.vala"}]}]}],"#assertions":[{token:["keyword.control.assert.vala","meta.declaration.assertion.vala"],regex:"\\b(assert|requires|ensures)(\\s)",push:[{token:"meta.declaration.assertion.vala",regex:"$",next:"pop"},{token:"keyword.operator.assert.expression-seperator.vala",regex:":"},{include:"#code"},{defaultToken:"meta.declaration.assertion.vala"}]}],"#class":[{token:"meta.class.vala",regex:"(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)",push:[{token:"paren.vala",regex:"}",next:"pop"},{include:"#storage-modifiers"},{include:"#comments"},{token:["storage.modifier.vala","meta.class.identifier.vala","entity.name.type.class.vala"],regex:"(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)"},{token:"storage.modifier.extends.vala",regex:":",push:[{token:"meta.definition.class.inherited.classes.vala",regex:"(?={|,)",next:"pop"},{include:"#object-types-inherited"},{include:"#comments"},{defaultToken:"meta.definition.class.inherited.classes.vala"}]},{token:["storage.modifier.implements.vala","meta.definition.class.implemented.interfaces.vala"],regex:"(,)(\\s)",push:[{token:"meta.definition.class.implemented.interfaces.vala",regex:"(?=\\{)",next:"pop"},{include:"#object-types-inherited"},{include:"#comments"},{defaultToken:"meta.definition.class.implemented.interfaces.vala"}]},{token:"paren.vala",regex:"{",push:[{token:"paren.vala",regex:"(?=})",next:"pop"},{include:"#class-body"},{defaultToken:"meta.class.body.vala"}]},{defaultToken:"meta.class.vala"}],comment:"attempting to put namespace in here."}],"#class-body":[{include:"#comments"},{include:"#class"},{include:"#enums"},{include:"#methods"},{include:"#annotations"},{include:"#storage-modifiers"},{include:"#code"}],"#code":[{include:"#comments"},{include:"#class"},{token:"text",regex:"{",push:[{token:"text",regex:"}",next:"pop"},{include:"#code"}]},{include:"#assertions"},{include:"#parens"},{include:"#constants-and-special-vars"},{include:"#anonymous-classes-and-new"},{include:"#keywords"},{include:"#storage-modifiers"},{include:"#strings"},{include:"#all-types"}],"#comments":[{token:"punctuation.definition.comment.vala",regex:"/\\*\\*/"},{include:"text.html.javadoc"},{include:"#comments-inline"}],"#comments-inline":[{token:"punctuation.definition.comment.vala",regex:"/\\*",push:[{token:"punctuation.definition.comment.vala",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.vala"}]},{token:["text","punctuation.definition.comment.vala","comment.line.double-slash.vala"],regex:"(\\s*)(//)(.*$)"}],"#constants-and-special-vars":[{token:"constant.language.vala",regex:"\\b(?:true|false|null)\\b"},{token:"variable.language.vala",regex:"\\b(?:this|base)\\b"},{token:"constant.numeric.vala",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b"},{token:["keyword.operator.dereference.vala","constant.other.vala"],regex:"((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b"}],"#enums":[{token:"text",regex:"^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))",push:[{token:"text",regex:"(?=;|})",next:"pop"},{token:"constant.other.enum.vala",regex:"\\w+",push:[{token:"meta.enum.vala",regex:"(?=,|;|})",next:"pop"},{include:"#parens"},{token:"text",regex:"{",push:[{token:"text",regex:"}",next:"pop"},{include:"#class-body"}]},{defaultToken:"meta.enum.vala"}]}]}],"#keywords":[{token:"keyword.control.catch-exception.vala",regex:"\\b(?:try|catch|finally|throw)\\b"},{token:"keyword.control.vala",regex:"\\?|:|\\?\\?"},{token:"keyword.control.vala",regex:"\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b"},{token:"keyword.operator.vala",regex:"\\b(?:typeof|is|as)\\b"},{token:"keyword.operator.comparison.vala",regex:"==|!=|<=|>=|<>|<|>"},{token:"keyword.operator.assignment.vala",regex:"="},{token:"keyword.operator.increment-decrement.vala",regex:"\\-\\-|\\+\\+"},{token:"keyword.operator.arithmetic.vala",regex:"\\-|\\+|\\*|\\/|%"},{token:"keyword.operator.logical.vala",regex:"!|&&|\\|\\|"},{token:"keyword.operator.dereference.vala",regex:"\\.(?=\\S)",originalRegex:"(?<=\\S)\\.(?=\\S)"},{token:"punctuation.terminator.vala",regex:";"},{token:"keyword.operator.ownership",regex:"owned|unowned"}],"#methods":[{token:"meta.method.vala",regex:"(?!new)(?=\\w.*\\s+)(?=[^=]+\\()",push:[{token:"paren.vala",regex:"}|(?=;)",next:"pop"},{include:"#storage-modifiers"},{token:["entity.name.function.vala","meta.method.identifier.vala"],regex:"([\\~\\w\\.]+)(\\s*\\()",push:[{token:"meta.method.identifier.vala",regex:"\\)",next:"pop"},{include:"#parameters"},{defaultToken:"meta.method.identifier.vala"}]},{token:"meta.method.return-type.vala",regex:"(?=\\w.*\\s+\\w+\\s*\\()",push:[{token:"meta.method.return-type.vala",regex:"(?=\\w+\\s*\\()",next:"pop"},{include:"#all-types"},{defaultToken:"meta.method.return-type.vala"}]},{include:"#throws"},{token:"paren.vala",regex:"{",push:[{token:"paren.vala",regex:"(?=})",next:"pop"},{include:"#code"},{defaultToken:"meta.method.body.vala"}]},{defaultToken:"meta.method.vala"}]}],"#namespace":[{token:"text",regex:"^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))",push:[{token:"text",regex:"(?=;|})",next:"pop"},{token:"constant.other.namespace.vala",regex:"\\w+",push:[{token:"meta.namespace.vala",regex:"(?=,|;|})",next:"pop"},{include:"#parens"},{token:"text",regex:"{",push:[{token:"text",regex:"}",next:"pop"},{include:"#code"}]},{defaultToken:"meta.namespace.vala"}]}],comment:"This is not quite right. See the class grammar right now"}],"#object-types":[{token:"storage.type.generic.vala",regex:"\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<",push:[{token:"storage.type.generic.vala",regex:">|[^\\w\\s,\\?<\\[()\\]]",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:">|[^\\w\\s,\\?<\\[(?:[,]+)\\]]",next:"pop"},{include:"#object-types"},{token:"storage.type.generic.vala",regex:"<",push:[{token:"storage.type.generic.vala",regex:">|[^\\w\\s,\\[\\]<]",next:"pop"},{defaultToken:"storage.type.generic.vala"}],comment:"This is just to support <>'s with no actual type prefix"},{defaultToken:"storage.type.generic.vala"}]},{token:"storage.type.object.array.vala",regex:"\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)",push:[{token:"storage.type.object.array.vala",regex:"(?=[^\\]\\s])",next:"pop"},{token:"text",regex:"\\[",push:[{token:"text",regex:"\\]",next:"pop"},{include:"#code"}]},{defaultToken:"storage.type.object.array.vala"}]},{token:["storage.type.vala","keyword.operator.dereference.vala","storage.type.vala"],regex:"\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)"}],"#object-types-inherited":[{token:"entity.other.inherited-class.vala",regex:"\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<",push:[{token:"entity.other.inherited-class.vala",regex:">|[^\\w\\s,<]",next:"pop"},{include:"#object-types"},{token:"storage.type.generic.vala",regex:"<",push:[{token:"storage.type.generic.vala",regex:">|[^\\w\\s,<]",next:"pop"},{defaultToken:"storage.type.generic.vala"}],comment:"This is just to support <>'s with no actual type prefix"},{defaultToken:"entity.other.inherited-class.vala"}]},{token:["entity.other.inherited-class.vala","keyword.operator.dereference.vala","entity.other.inherited-class.vala"],regex:"\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)"}],"#parameters":[{token:"storage.modifier.vala",regex:"final"},{include:"#primitive-arrays"},{include:"#primitive-types"},{include:"#object-types"},{token:"variable.parameter.vala",regex:"\\w+"}],"#parens":[{token:"text",regex:"\\(",push:[{token:"text",regex:"\\)",next:"pop"},{include:"#code"}]}],"#primitive-arrays":[{token:"storage.type.primitive.array.vala",regex:"\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b"}],"#primitive-types":[{token:"storage.type.primitive.vala",regex:"\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b",comment:"var is not really a primitive, but acts like one in most cases"}],"#storage-modifiers":[{token:"storage.modifier.vala",regex:"\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b",comment:"Not sure about unsafe and readonly"}],"#strings":[{token:"punctuation.definition.string.begin.vala",regex:'@"',push:[{token:"punctuation.definition.string.end.vala",regex:'"',next:"pop"},{token:"constant.character.escape.vala",regex:"\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))"},{defaultToken:"string.quoted.interpolated.vala"}]},{token:"punctuation.definition.string.begin.vala",regex:'"',push:[{token:"punctuation.definition.string.end.vala",regex:'"',next:"pop"},{token:"constant.character.escape.vala",regex:"\\\\."},{token:"constant.character.escape.vala",regex:"%[\\w\\.\\-]+"},{defaultToken:"string.quoted.double.vala"}]},{token:"punctuation.definition.string.begin.vala",regex:"'",push:[{token:"punctuation.definition.string.end.vala",regex:"'",next:"pop"},{token:"constant.character.escape.vala",regex:"\\\\."},{defaultToken:"string.quoted.single.vala"}]},{token:"punctuation.definition.string.begin.vala",regex:'"""',push:[{token:"punctuation.definition.string.end.vala",regex:'"""',next:"pop"},{token:"constant.character.escape.vala",regex:"%[\\w\\.\\-]+"},{defaultToken:"string.quoted.triple.vala"}]}],"#throws":[{token:"storage.modifier.vala",regex:"throws",push:[{token:"meta.throwables.vala",regex:"(?={|;)",next:"pop"},{include:"#object-types"},{defaultToken:"meta.throwables.vala"}]}],"#values":[{include:"#strings"},{include:"#object-types"},{include:"#constants-and-special-vars"}]},this.normalizeRules()};s.metaData={comment:"Based heavily on the Java bundle's language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n",fileTypes:["vala"],foldingStartMarker:"(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)",foldingStopMarker:"^\\s*(\\}|// \\}\\}\\}$)",name:"Vala",scopeName:"source.vala"},r.inherits(s,i),t.ValaHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vala_highlight_rules").ValaHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/vala",this.snippetFileId="ace/snippets/vala"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/vala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-vbscript.js b/mixly/common/modules/web-modules/ace/mode-vbscript.js new file mode 100644 index 00000000..21a782bc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-vbscript.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"keyword.control.asp":"If|Then|Else|ElseIf|End|While|Wend|For|To|Each|Case|Select|Return|Continue|Do|Until|Loop|Next|With|Exit|Function|Property|Type|Enum|Sub|IIf|Class","storage.type.asp":"Dim|Call|Const|Redim|Set|Let|Get|New|Randomize|Option|Explicit|Preserve|Erase|Execute|ExecuteGlobal","storage.modifier.asp":"Private|Public|Default","keyword.operator.asp":"Mod|And|Not|Or|Xor|As|Eqv|Imp|Is","constant.language.asp":"Empty|False|Nothing|Null|True","variable.language.vb.asp":"Me","support.class.vb.asp":"RegExp","support.class.asp":"Application|ObjectContext|Request|Response|Server|Session","support.class.collection.asp":"Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables","support.constant.asp":"TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout","support.function.asp":"Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex","support.function.event.asp":"Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart","support.function.vb.asp":"Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|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|AscB|AscW|ChrB|ChrW|InStrB|LeftB|LenB|MidB|RightB|Abs|GetUILanguage","support.type.vb.asp":"vbTrue|vbFalse|vbCr|vbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbBinaryCompare|vbTextCompare|vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek|vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime|vbObjectError|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray|vbOKOnly|vbOKCancel|vbAbortRetryIgnore|vbYesNoCancel|vbYesNo|vbRetryCancel|vbCritical|vbQuestion|vbExclamation|vbInformation|vbDefaultButton1|vbDefaultButton2|vbDefaultButton3|vbDefaultButton4|vbApplicationModal|vbSystemModal|vbOK|vbCancel|vbAbort|vbRetry|vbIgnore|vbYes|vbNo|vbUseDefault"},"identifier",!0);this.$rules={start:[{token:["meta.ending-space"],regex:"$"},{token:[null],regex:"^(?=\\t)",next:"state_3"},{token:[null],regex:"^(?= )",next:"state_4"},{token:["text","storage.type.function.asp","text","entity.name.function.asp","text","punctuation.definition.parameters.asp","variable.parameter.function.asp","punctuation.definition.parameters.asp"],regex:"^(\\s*)(Function|Sub)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))"},{token:"punctuation.definition.comment.asp",regex:"'|REM(?=\\s|$)",next:"comment",caseInsensitive:!0},{token:"storage.type.asp",regex:"On\\s+Error\\s+(?:Resume\\s+Next|GoTo)\\b",caseInsensitive:!0},{token:"punctuation.definition.string.begin.asp",regex:'"',next:"string"},{token:["punctuation.definition.variable.asp"],regex:"(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"},{token:"constant.numeric.asp",regex:"-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{regex:"\\w+",token:e},{token:["entity.name.function.asp"],regex:"(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"},{token:["keyword.operator.asp"],regex:"\\-|\\+|\\*|\\/|\\>|\\<|\\=|\\&|\\\\|\\^"}],state_3:[{token:["meta.odd-tab.tabs","meta.even-tab.tabs"],regex:"(\\t)(\\t)?"},{token:"meta.leading-space",regex:"(?=[^\\t])",next:"start"},{token:"meta.leading-space",regex:".",next:"state_3"}],state_4:[{token:["meta.odd-tab.spaces","meta.even-tab.spaces"],regex:"( )( )?"},{token:"meta.leading-space",regex:"(?=[^ ])",next:"start"},{defaultToken:"meta.leading-space"}],comment:[{token:"comment.line.apostrophe.asp",regex:"$",next:"start"},{defaultToken:"comment.line.apostrophe.asp"}],string:[{token:"constant.character.escape.apostrophe.asp",regex:'""'},{token:"string.quoted.double.asp",regex:'"',next:"start"},{defaultToken:"string.quoted.double.asp"}]}};r.inherits(s,i),t.VBScriptHighlightRules=s}),ace.define("ace/mode/folding/vbscript",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={"class":1,"function":1,sub:1,"if":1,select:1,"do":1,"for":1,"while":1,"with":1,property:1,"else":1,elseif:1,end:-1,loop:-1,next:-1,wend:-1},this.foldingStartMarker=/(?:\s|^)(class|function|sub|if|select|do|for|while|with|property|else|elseif)\b/i,this.foldingStopMarker=/\b(end|loop|next|wend)\b/i,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i||s){var o=s?this.foldingStopMarker.exec(r):this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a==="keyword.control.asp"||a==="storage.type.function.asp")return this.vbsBlock(e,n,o.index+2)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword.control.asp"||a=="storage.type.function.asp")return u=="if"&&!/then\s*('|$)/i.test(r)?"":"start"}}return""},this.vbsBlock=function(e,t,n,r){var i=new o(e,t,n),u={"class":1,"function":1,sub:1,"if":1,select:1,"with":1,property:1,"else":1,elseif:1},a=i.getCurrentToken();if(!a||a.type!="keyword.control.asp"&&a.type!="storage.type.function.asp")return;var f=a.value.toLowerCase(),l=a.value.toLowerCase(),c=[l],h=this.indentKeywords[l];if(!h)return;var p=i.getCurrentTokenRange();switch(l){case"property":case"sub":case"function":case"if":case"select":case"do":case"for":case"class":case"while":case"with":var d=e.getLine(t),v=/^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(d);if(v)return;var m=new RegExp("(?:^|\\s)"+l,"i"),g=/^\s*End\s(If|Sub|Select|Function|Class|With|Property)\s*/i.test(d);if(!m.test(d)&&!g)return;if(g){var r=i.getCurrentTokenRange();i.step=i.stepBackward,i.step(),i.step(),a=i.getCurrentToken(),a&&(l=a.value.toLowerCase(),l=="end"&&(p=i.getCurrentTokenRange(),p=new s(p.start.row,p.start.column,r.start.row,r.end.column))),h=-1}break;case"end":var y=i.getCurrentTokenPosition();p=i.getCurrentTokenRange(),i.step=i.stepForward,i.step(),i.step(),a=i.getCurrentToken();if(a){l=a.value.toLowerCase();if(l in u){f=l;var b=i.getCurrentTokenPosition(),w=b.column+l.length;p=new s(y.row,y.column,b.row,w)}}i.step=i.stepBackward,i.step(),i.step()}var E=h===-1?e.getLine(t-1).length:e.getLine(t).length,S=t,x=[];x.push(p),i.step=h===-1?i.stepBackward:i.stepForward;while(a=i.step()){var T=null,N=!1;if(a.type!="keyword.control.asp"&&a.type!="storage.type.function.asp")continue;l=a.value.toLowerCase();var C=h*this.indentKeywords[l];switch(l){case"property":case"sub":case"function":case"if":case"select":case"do":case"for":case"class":case"while":case"with":var d=e.getLine(i.getCurrentTokenRow()),v=/^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(d);v&&(C=0,N=!0);var m=new RegExp("^\\s* end\\s+"+l,"i");m.test(d)&&(C=0,N=!0);break;case"elseif":case"else":C=0,f!="elseif"&&(N=!0)}if(C>0)c.unshift(l);else if(C<=0&&N===!1){c.shift();if(!c.length){switch(l){case"end":var y=i.getCurrentTokenPosition();T=i.getCurrentTokenRange(),i.step(),i.step(),a=i.getCurrentToken();if(a){l=a.value.toLowerCase();if(l in u){f=="else"||f=="elseif"?l!=="if"&&x.shift():l!=f&&x.shift();var b=i.getCurrentTokenPosition(),w=b.column+l.length;T=new s(y.row,y.column,b.row,w)}else x.shift()}else x.shift();i.step=i.stepBackward,i.step(),i.step(),a=i.getCurrentToken(),l=a.value.toLowerCase();break;case"select":case"sub":case"if":case"function":case"class":case"with":case"property":l!=f&&x.shift();break;case"do":f!="loop"&&x.shift();break;case"loop":f!="do"&&x.shift();break;case"for":f!="next"&&x.shift();break;case"next":f!="for"&&x.shift();break;case"while":f!="wend"&&x.shift();break;case"wend":f!="while"&&x.shift()}break}C===0&&c.unshift(l)}}if(!a)return null;if(r)return T?x.push(T):x.push(i.getCurrentTokenRange()),x;var t=i.getCurrentTokenRow();if(h===-1){var w=e.getLine(t).length;return new s(t,w,S-1,E)}return new s(S,E,t-1,e.getLine(t-1).length)}}.call(u.prototype)}),ace.define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules","ace/mode/folding/vbscript","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vbscript_highlight_rules").VBScriptHighlightRules,o=e("./folding/vbscript").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(a,i),function(){function t(e,t,n){var r=0;for(var i=0;i0?1:0}this.lineCommentStart=["'","REM"];var e=["else","elseif","end","loop","next","wend"];this.getNextLineIndent=function(e,n,r){var i=this.$getIndent(n),s=0,o=this.getTokenizer().getLineTokens(n,e),u=o.tokens;return e=="start"&&(s=t(u,n,this.indentKeywords)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,n,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(t,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i||!i.length)return!1;var s=i[0].value.toLowerCase();return(i[0].type=="keyword.control.asp"||i[0].type=="storage.type.function.asp")&&e.indexOf(s)!=-1},this.getMatching=function(e,t,n,r){if(t==undefined){var i=e.selection.lead;n=i.column,t=i.row}r==undefined&&(r=!0);var s=e.getTokenAt(t,n);if(s){var o=s.value.toLowerCase();if(o in this.indentKeywords)return this.foldingRules.vbsBlock(e,t,n,r)}},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^\s*/)[0].length;if(!i||!n)return;var s=this.getMatching(t,n,i+1,!1);if(!s||s.start.row==n)return;var o=this.$getIndent(t.getLine(s.start.row));o.length!=i&&(t.replace(new u(n,0,n,i),o),t.outdentRows(new u(n+1,0,n+1,0)))},this.$id="ace/mode/vbscript"}.call(a.prototype),t.Mode=a}); (function() { + ace.require(["ace/mode/vbscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-velocity.js b/mixly/common/modules/web-modules/ace/mode-velocity.js new file mode 100644 index 00000000..260d15c7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-velocity.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=function(){o.call(this);var e=i.arrayToMap("true|false|null".split("|")),t=i.arrayToMap("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool".split("|")),n=i.arrayToMap("$contentRoot|$foreach".split("|")),r=i.arrayToMap("#set|#macro|#include|#parse|#if|#elseif|#else|#foreach|#break|#end|#stop".split("|"));this.$rules.start.push({token:"comment",regex:"##.*$"},{token:"comment.block",regex:"#\\*",next:"vm_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(i){return r.hasOwnProperty(i)?"keyword":e.hasOwnProperty(i)?"constant.language":n.hasOwnProperty(i)?"variable.language":t.hasOwnProperty(i)||t.hasOwnProperty(i.substring(1))?"support.function":i=="debugger"?"invalid.deprecated":i.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)?"variable":"identifier"},regex:"[a-zA-Z$#][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}),this.$rules.vm_comment=[{token:"comment",regex:"\\*#|-->",next:"start"},{defaultToken:"comment"}],this.$rules.vm_start=[{token:"variable",regex:"}",next:"pop"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(i){return r.hasOwnProperty(i)?"keyword":e.hasOwnProperty(i)?"constant.language":n.hasOwnProperty(i)?"variable.language":t.hasOwnProperty(i)||t.hasOwnProperty(i.substring(1))?"support.function":i=="debugger"?"invalid.deprecated":i.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)?"variable":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}];for(var s in this.$rules)this.$rules[s].unshift({token:"variable",regex:"\\${",push:"vm_start"});this.normalizeRules()};r.inherits(u,s),t.VelocityHighlightRules=u}),ace.define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="##")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++nl){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.VerilogHighlightRules=s}),ace.define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./verilog_highlight_rules").VerilogHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"'},this.$id="ace/mode/verilog"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/verilog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-vhdl.js b/mixly/common/modules/web-modules/ace/mode-vhdl.js new file mode 100644 index 00000000..670bc00c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-vhdl.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="access|after|alias|all|architecture|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|context|disconnect|downto|else|elsif|end|entity|exit|file|for|force|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|of|on|or|open|others|out|package|parameter|port|postponed|procedure|process|protected|pure|range|record|register|reject|release|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|signed|std_logic|std_logic_vector|string||text|time|unsigned",n="array|constant",r="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",i="true|false|null",s=this.createKeywordMapper({"keyword.operator":r,keyword:e,"constant.language":i,"storage.modifier":n,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.VHDLHighlightRules=s}),ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vhdl_highlight_rules").VHDLHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/vhdl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-visualforce.js b/mixly/common/modules/web-modules/ace/mode-visualforce.js new file mode 100644 index 00000000..c4050054 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-visualforce.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/visualforce_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function s(e){return{token:e.token+".start",regex:e.start,push:[{token:"constant.language.escape",regex:e.escape},{token:e.token+".end",regex:e.start,next:"pop"},{defaultToken:e.token}]}}var r=e("../lib/oop"),i=e("../mode/html_highlight_rules").HtmlHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"$Action|$Api|$Component|$ComponentLabel|$CurrentPage|$FieldSet|$Label|$Label|$ObjectType|$Organization|$Page|$Permission|$Profile|$Resource|$SControl|$Setup|$Site|$System.OriginDateTime|$User|$UserRole|Site|UITheme|UIThemeDisplayed",keyword:"","storage.type":"","constant.language":"true|false|null|TRUE|FALSE|NULL","support.function":"DATE|DATEVALUE|DATETIMEVALUE|DAY|MONTH|NOW|TODAY|YEAR|BLANKVALUE|ISBLANK|NULLVALUE|PRIORVALUE|AND|CASE|IF|ISCHANGED|ISNEW|ISNUMBER|NOT|OR|ABS|CEILING|EXP|FLOOR|LN|LOG|MAX|MIN|MOD|ROUND|SQRT|BEGINS|BR|CASESAFEID|CONTAINS|FIND|GETSESSIONID|HTMLENCODE|ISPICKVAL|JSENCODE|JSINHTMLENCODE|LEFT|LEN|LOWER|LPAD|MID|RIGHT|RPAD|SUBSTITUTE|TEXT|TRIM|UPPER|URLENCODE|VALUE|GETRECORDIDS|INCLUDE|LINKTO|REGEX|REQUIRESCRIPT|URLFOR|VLOOKUP|HTMLENCODE|JSENCODE|JSINHTMLENCODE|URLENCODE"},"identifier");i.call(this);var t={token:"keyword.start",regex:"{!",push:"Visualforce"};for(var n in this.$rules)this.$rules[n].unshift(t);this.$rules.Visualforce=[s({start:'"',escape:/\\[btnfr"'\\]/,token:"string",multiline:!0}),s({start:"'",escape:/\\[btnfr"'\\]/,token:"string",multiline:!0}),{token:"comment.start",regex:"\\/\\*",push:[{token:"comment.end",regex:"\\*\\/|(?=})",next:"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"keyword.end",regex:"}",next:"pop"},{token:e,regex:/[a-zA-Z$_\u00a1-\uffff][a-zA-Z\d$_\u00a1-\uffff]*\b/},{token:"keyword.operator",regex:/==|<>|!=|<=|>=|&&|\|\||[+\-*/^()=<>&]/},{token:"punctuation.operator",regex:/[?:,;.]/},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],this.normalizeRules()};r.inherits(o,i),t.VisualforceHighlightRules=o}),ace.define("ace/mode/visualforce",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/visualforce_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"],function(e,t,n){"use strict";function a(){i.call(this),this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=new o}var r=e("../lib/oop"),i=e("./html").Mode,s=e("./visualforce_highlight_rules").VisualforceHighlightRules,o=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode;r.inherits(a,i),a.prototype.emmetConfig={profile:"xhtml"},t.Mode=a}); (function() { + ace.require(["ace/mode/visualforce"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-vue.js b/mixly/common/modules/web-modules/ace/mode-vue.js new file mode 100644 index 00000000..b02d3811 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-vue.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value==="-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,s=e("../behaviour/cstyle").CstyleBehaviour,o=e("../behaviour/xml").XmlBehaviour,u=function(){var e=(new o({closeCurlyBraces:!0})).getBehaviours();this.addBehaviours(e),this.inherit(s),this.add("autoclosing-fragment","insertion",function(e,t,n,r,s){if(s==">"){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",f=t.supportConstantColor="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|green|greenyellow|grey|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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\u00a1-\uffff]*)"},{token:"keyword",regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)"},{token:["keyword","storage.type.variable.ts"],regex:"(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)"},{token:"keyword",regex:"\\b(?:super|export|import|keyof|infer)\\b"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes|yield|export|import|default",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift()||"";if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e=this.createKeywordMapper({"support.type":s.supportType,"support.function":s.supportFunction,"support.constant":s.supportConstant,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"text",!0);this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:["entity.name.function.stylus","text"],regex:"^([-a-zA-Z_][-\\w]*)?(\\()"},{token:["entity.other.attribute-name.class.stylus"],regex:"\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"},{token:["entity.language.stylus"],regex:"^ *&"},{token:["variable.language.stylus"],regex:"(arguments)"},{token:["keyword.stylus"],regex:"@[-\\w]+"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:s.pseudoElements},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s.pseudoClasses},{token:["entity.name.tag.stylus"],regex:"(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"},{token:"constant.numeric",regex:"#[a-fA-F0-9]{6}"},{token:"constant.numeric",regex:"#[a-fA-F0-9]{3}"},{token:["punctuation.definition.entity.stylus","entity.other.attribute-name.id.stylus"],regex:"(#)([a-zA-Z][a-zA-Z0-9_-]*)"},{token:"meta.vendor-prefix.stylus",regex:"-webkit-|-moz\\-|-ms-|-o-"},{token:"keyword.control.stylus",regex:"(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"},{token:"keyword.operator.stylus",regex:"!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="},{token:"keyword.operator.stylus",regex:"(?:in|is(?:nt)?|not)\\b"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:s.numRe},{token:"keyword",regex:"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}],qstring:[{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"}]}};r.inherits(o,i),t.StylusHighlightRules=o}),ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unquote".split("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),u=i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|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|legend|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|tt|u|ul|var|video|wbr|xmp".split("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./scss_highlight_rules").ScssHighlightRules,o=function(){s.call(this);var e=this.$rules.start;e[1].token=="comment"&&(e.splice(1,1,{onMatch:function(e,t,n){return n.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,n){return n[1]===-1&&(n[1]=Math.max(n[2],e.length-1)),e.length<=n[1]?(n.shift(),n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};r.inherits(o,s),t.SassHighlightRules=o}),ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z_][a-z0-9-_]*"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|=|!=|-|%|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),ace.define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"keyword",regex:/^(\s*)(\w+):\s*/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0],s=e.match(/^(\s*)(\w+):/),o=s[2];return/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(o)||(o=""),n.unshift("language-embed",[],[i,o],t),this.token},stateName:"language-embed",next:[{token:"string",regex:/^(\s*)/,onMatch:function(e,t,n,r){var i=n[2][0];return i.length>=e.length?(n.splice(0,3),this.next=n.shift(),this.token):(this.next="",[{type:"text",value:i}])},next:""},{token:"string",regex:/.+/,onMatch:function(e,t,n,i){var s=n[2][0],o=n[2][1],u=n[1];if(r[o]){var a=r[o].getTokenizer().getLineTokens(i.slice(s.length),u.slice(0));return n[1]=a.state,a.tokens}return this.token}}]},{token:"constant.begin.javascript.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(ruby):$"},{token:"constant.begin.coffeescript.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(markdown):$"},{token:"constant.begin.css.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin.scss.filter.slim",regex:"^(\\s*)():$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(sass):$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(less):$"},{token:"constant.begin..filter.slim",regex:"^(\\s*)(erb):$"},{token:"keyword.html.tags.slim",regex:"^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|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|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b"},{token:"keyword.slim",regex:"^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)"},{token:"string",regex:/^(\s*)('|\||\/|(\/!))\s*/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,this.token},next:"mlString"},{token:"keyword.control.slim",regex:"^(\\s*)(\\-|==|=)",push:[{token:"control.end.slim",regex:"$",next:"pop"},{include:"rubyline"},{include:"misc"}]},{token:"paren",regex:"\\(",push:[{token:"paren",regex:"\\)",next:"pop"},{include:"misc"}]},{token:"paren",regex:"\\[",push:[{token:"paren",regex:"\\]",next:"pop"},{include:"misc"}]},{include:"misc"}],mlString:[{token:"indent",regex:/^\s*/,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"start"},{defaultToken:"string"}],rubyline:[{token:"keyword.operator.ruby.embedded.slim",regex:"(==|=)(<>|><|<'|'<|<|>)?|-"},{token:"list.ruby.operators.slim",regex:"(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b"},{token:"string",regex:"['](.)*?[']"},{token:"string",regex:'["](.)*?["]'}],misc:[{token:"class.variable.slim",regex:"\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:"list.meta.slim",regex:"(\\b)(true|false|nil)(\\b)"},{token:"keyword.operator.equals.slim",regex:"="},{token:"string",regex:"['](.)*?[']"},{token:"string",regex:'["](.)*?["]'}]},this.normalizeRules()};i.inherits(o,s),t.SlimHighlightRules=o}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),ace.define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";function l(e,t){return{token:"entity.name.function.jade",regex:"^\\s*\\:"+e,next:t+"start"}}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./markdown_highlight_rules").MarkdownHighlightRules,o=e("./scss_highlight_rules").ScssHighlightRules,u=e("./less_highlight_rules").LessHighlightRules,a=e("./coffee_highlight_rules").CoffeeHighlightRules,f=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"keyword.control.import.include.jade",regex:"\\s*\\binclude\\b"},{token:"keyword.other.doctype.jade",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},{onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/^\s*\/\//,next:"comment_block"},l("markdown","markdown-"),l("sass","sass-"),l("less","less-"),l("coffee","coffee-"),{token:["storage.type.function.jade","entity.name.function.jade","punctuation.definition.parameters.begin.jade","variable.parameter.function.jade","punctuation.definition.parameters.end.jade"],regex:"^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"},{token:["storage.type.function.jade","entity.name.function.jade"],regex:"^(\\s*mixin)( [\\w\\-]+)"},{token:"source.js.embedded.jade",regex:"^\\s*(?:-|=|!=)",next:"js-start"},{token:"string.interpolated.jade",regex:"[#!]\\{[^\\}]+\\}"},{token:"meta.tag.any.jade",regex:/^\s*(?!\w+:)(?:[\w-]+|(?=\.|#)])/,next:"tag_single"},{token:"suport.type.attribute.id.jade",regex:"#\\w+"},{token:"suport.type.attribute.class.jade",regex:"\\.\\w+"},{token:"punctuation",regex:"\\s*(?:\\()",next:"tag_attributes"}],comment_block:[{regex:/^\s*(?:\/\/)?/,onMatch:function(e,t,n){return e.length<=n[1]?e.slice(-1)=="/"?(n[1]=e.length-2,this.next="","comment"):(n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}],tag_single:[{token:"entity.other.attribute-name.class.jade",regex:"\\.[\\w-]+"},{token:"entity.other.attribute-name.id.jade",regex:"#[\\w-]+"},{token:["text","punctuation"],regex:"($)|((?!\\.|#|=|-))",next:"start"}],tag_attributes:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:["entity.other.attribute-name.jade","punctuation"],regex:"([a-zA-Z:\\.-]+)(=)?",next:"attribute_strings"},{token:"punctuation",regex:"\\)",next:"start"}],attribute_strings:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"string",regex:"(?=\\S)",next:"tag_attributes"}],qqstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"tag_attributes"}],qstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"tag_attributes"}]},this.embedRules(f,"js-",[{token:"text",regex:".$",next:"start"}])};r.inherits(c,i),t.JadeHighlightRules=c}),ace.define("ace/mode/vue_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/typescript_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/stylus_highlight_rules","ace/mode/sass_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/tokenizer","ace/mode/slim_highlight_rules","ace/mode/jade_highlight_rules","ace/mode/javascript"],function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{while((t===void 0||t-->0)&&!(i=r.next()).done)s.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(o)throw o.error}}return s},i=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r]*"+r+"\\s*=\\s*['\"]"+n+"['\"]))":"(?=\\s|>|$))";this.$rules.start.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+t+".tag-name.xml"],regex:"(<)("+t+i,next:[{token:"meta.tag.punctuation.tag-close."+t+".xml",regex:"/?>",next:n+"-start"},{include:"attributes"}]}),this.$rules[t+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,n+"-",[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+t+".tag-name.xml"],regex:"(|$))",next:t+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])};var t=[{include:"vue-interpolations"}],n=(new f).getRules();n.start=t.concat(n.start),n["vue-interpolations"]=[{token:"punctuation",regex:/\{\{\{?/,next:"js-interpolation-start"}];var s=this;n.tag_stuff.unshift({token:"string",regex:/(?:\b(v-)|(:|@))(\[?[a-zA-Z\-.]+\]?)(?:(\:\[?[a-zA-Z\-]+\]?))?((?:\.[a-zA-Z\-]+)*)(\s*)(=)(\s*)(["'])/,onMatch:function(e,t,n){var r=e[e.length-1];n.unshift(r,t);var i=(new RegExp(this.regex)).exec(e);if(!i)return"text";var s=[],o=["entity.other.attribute-name.xml","punctuation.separator.key-value.xml","entity.other.attribute-name.xml","entity.other.attribute-name.xml","entity.other.attribute-name.xml","text","punctuation.separator.key-value.xml","text","string"];for(var u=0,a=o.length;u1){n.shift();var l=n.shift(),c=(new v(s.$rules)).getLineTokens(a.slice(1).join(u),l);c.tokens.unshift({type:"string",value:u}),this.next=Array.isArray(c.state)?c.state[c.state.length-1]:c.state}var h=(new y).getTokenizer().getLineTokens(f,"start"),p=h.tokens;return c&&p.push.apply(p,i([],r(c.tokens),!1)),p}}]},{token:"string",regex:'"',next:[{token:"string",regex:'"|$',next:"tag_stuff"},{include:"vue-interpolations"},{defaultToken:"string"}]},{token:"string",regex:"'",next:[{token:"string",regex:"'|$",next:"tag_stuff"},{include:"vue-interpolations"},{defaultToken:"string"}]}),this.$rules=n,this.embedRules(l,"js-interpolation-",[{token:"punctuation",regex:/\}\}\}?/,next:"start"}]),this.embedLangRules(o,"style","css"),this.embedLangRules(c,"style","stylus","lang"),this.embedLangRules(h,"style","sass","lang"),this.embedLangRules(p,"style","scss","lang"),this.embedLangRules(d,"style","less","lang"),this.embedLangRules(u,"script","ts","lang"),this.embedLangRules(a,"script","coffee","lang"),this.embedLangRules(m,"template","slm","lang"),this.embedLangRules(g,"template","jade","lang"),this.embedLangRules(c,"template","stylus","lang"),this.normalizeRules()};s.inherits(b,f),t.VueHighlightRules=b}),ace.define("ace/mode/vue",["require","exports","module","ace/lib/oop","ace/mode/folding/html","ace/lib/lang","ace/mode/behaviour/xml","ace/mode/html_completions","ace/mode/html","ace/mode/vue_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./folding/html").FoldMode,s=e("../lib/lang"),o=e("./behaviour/xml").XmlBehaviour,u=e("./html_completions").HtmlCompletions,a=e("./html").Mode,f=e("./vue_highlight_rules").VueHighlightRules,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],c=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(){this.HighlightRules=f,this.foldingRules=new i(this.voidElements,s.arrayToMap(c)),this.$behaviour=new o,this.$completer=new u};r.inherits(h,a),function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(l),this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/vue"}.call(h.prototype),t.Mode=h}); (function() { + ace.require(["ace/mode/vue"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-wollok.js b/mixly/common/modules/web-modules/ace/mode-wollok.js new file mode 100644 index 00000000..a5b96480 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-wollok.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/wollok_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="test|describe|package|inherits|false|import|else|or|class|and|not|native|override|program|self|try|const|var|catch|object|super|throw|if|null|return|true|new|constructor|method|mixin",t="null|assert|console",n="Object|Pair|String|Boolean|Number|Integer|Double|Collection|Set|List|Exception|Range|StackTraceElement",r=this.createKeywordMapper({"variable.language":"self",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"===|&&|\\*=|\\.\\.|\\*\\*|#|!|%|\\*|\\?:|\\+|\\/|,|\\+=|\\-|\\.\\.<|!==|:|\\/=|\\?\\.|\\+\\+|>|=|<|>=|=>|==|\\]|\\[|\\-=|\\->|\\||\\-\\-|<>|!=|%=|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.WollokHighlightRules=o}),ace.define("ace/mode/wollok",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/wollok_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./wollok_highlight_rules").WollokHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/wollok",this.snippetFileId="ace/snippets/wollok"}.call(o.prototype),t.Mode=o}); (function() { + ace.require(["ace/mode/wollok"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-xml.js b/mixly/common/modules/web-modules/ace/mode-xml.js new file mode 100644 index 00000000..26d92b2e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-xml.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value==="-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o"},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}); (function() { + ace.require(["ace/mode/xml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-xquery.js b/mixly/common/modules/web-modules/ace/mode-xquery.js new file mode 100644 index 00000000..4d2b8f68 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-xquery.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/xquery/xquery_lexer",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function o(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[u]={exports:{}};t[u][0].call(c.exports,function(e){var n=t[u][1][e];return o(n?n:e)},c,c.exports,r,t,n,i)}return n[u].exports}var s=typeof e=="function"&&e;for(var u=0;ux?x:w),m=b,g=w,y=0):d(b,w,0,y,e)}function l(){g!=b&&(m=g,g=b,E.whitespace(m,g))}function c(e){var t;for(;;){t=C(e);if(t!=28)break}return t}function h(e){y==0&&(y=c(e),b=T,w=N)}function p(e){y==0&&(y=C(e),b=T,w=N)}function d(e,t,r,i,s){throw new n.ParseException(e,t,r,i,s)}function C(e){var t=!1;T=N;var n=N,r=i.INITIAL[e],s=0;for(var o=r&4095;o!=0;){var u,a=n>4;u=i.MAP1[(a&15)+i.MAP1[(f&31)+i.MAP1[f>>5]]]}else{if(a<56320){var f=n=56320&&f<57344&&(++n,a=((a&1023)<<10)+(f&1023)+65536,t=!0)}var l=0,c=5;for(var h=3;;h=c+l>>1){if(i.MAP2[h]>a)c=h-1;else{if(!(i.MAP2[6+h]c){u=0;break}}}s=o;var p=(u<<12)+o-1;o=i.TRANSITION[(p&15)+i.TRANSITION[p>>4]],o>4095&&(r=o,o&=4095,N=n)}r>>=12;if(r==0){N=n-1;var f=N=56320&&f<57344&&--N,d(T,N,s,-1,-1)}if(t)for(var v=r>>9;v>0;--v){--N;var f=N=56320&&f<57344&&--N}else N-=r>>9;return(r&511)-1}r(e,t);var n=this;this.ParseException=function(e,t,n,r,i){var s=e,o=t,u=n,a=r,f=i;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return u},this.getExpected=function(){return f},this.getOffending=function(){return a},this.getMessage=function(){return a<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return S},this.getOffendingToken=function(e){var t=e.getOffending();return t>=0?i.TOKEN[t]:null},this.getExpectedTokenSet=function(e){var t;return e.getExpected()<0?t=i.getTokenSet(-e.getState()):t=[i.TOKEN[e.getExpected()]],t},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),r=S.substring(0,e.getBegin()),i=r.split("\n"),s=i.length,o=i[s-1].length+1,u=e.getEnd()-e.getBegin();return e.getMessage()+(n==null?"":", found "+n)+"\nwhile expecting "+(t.length==1?t[0]:"["+t.join(", ")+"]")+"\n"+(u==0||n!=null?"":"after successfully scanning "+u+" characters beginning ")+"at line "+s+", column "+o+":\n..."+S.substring(e.getBegin(),Math.min(S.length,e.getBegin()+64))+"..."},this.parse_start=function(){E.startNonterminal("start",g),h(14);switch(y){case 55:f(55);break;case 54:f(54);break;case 56:f(56);break;case 40:f(40);break;case 42:f(42);break;case 41:f(41);break;case 35:f(35);break;case 38:f(38);break;case 274:f(274);break;case 271:f(271);break;case 39:f(39);break;case 43:f(43);break;case 49:f(49);break;case 62:f(62);break;case 63:f(63);break;case 46:f(46);break;case 48:f(48);break;case 53:f(53);break;case 51:f(51);break;case 34:f(34);break;case 273:f(273);break;case 2:f(2);break;case 1:f(1);break;case 3:f(3);break;case 12:f(12);break;case 13:f(13);break;case 15:f(15);break;case 16:f(16);break;case 17:f(17);break;case 5:f(5);break;case 6:f(6);break;case 4:f(4);break;case 33:f(33);break;default:o()}E.endNonterminal("start",g)},this.parse_StartTag=function(){E.startNonterminal("StartTag",g),h(8);switch(y){case 58:f(58);break;case 50:f(50);break;case 27:f(27);break;case 57:f(57);break;case 35:f(35);break;case 38:f(38);break;default:f(33)}E.endNonterminal("StartTag",g)},this.parse_TagContent=function(){E.startNonterminal("TagContent",g),p(11);switch(y){case 23:f(23);break;case 6:f(6);break;case 7:f(7);break;case 55:f(55);break;case 54:f(54);break;case 18:f(18);break;case 29:f(29);break;case 272:f(272);break;case 275:f(275);break;case 271:f(271);break;default:f(33)}E.endNonterminal("TagContent",g)},this.parse_AposAttr=function(){E.startNonterminal("AposAttr",g),p(10);switch(y){case 20:f(20);break;case 25:f(25);break;case 18:f(18);break;case 29:f(29);break;case 272:f(272);break;case 275:f(275);break;case 271:f(271);break;case 38:f(38);break;default:f(33)}E.endNonterminal("AposAttr",g)},this.parse_QuotAttr=function(){E.startNonterminal("QuotAttr",g),p(9);switch(y){case 19:f(19);break;case 24:f(24);break;case 18:f(18);break;case 29:f(29);break;case 272:f(272);break;case 275:f(275);break;case 271:f(271);break;case 35:f(35);break;default:f(33)}E.endNonterminal("QuotAttr",g)},this.parse_CData=function(){E.startNonterminal("CData",g),p(1);switch(y){case 11:f(11);break;case 64:f(64);break;default:f(33)}E.endNonterminal("CData",g)},this.parse_XMLComment=function(){E.startNonterminal("XMLComment",g),p(0);switch(y){case 9:f(9);break;case 47:f(47);break;default:f(33)}E.endNonterminal("XMLComment",g)},this.parse_PI=function(){E.startNonterminal("PI",g),p(3);switch(y){case 10:f(10);break;case 59:f(59);break;case 60:f(60);break;default:f(33)}E.endNonterminal("PI",g)},this.parse_Pragma=function(){E.startNonterminal("Pragma",g),p(2);switch(y){case 8:f(8);break;case 36:f(36);break;case 37:f(37);break;default:f(33)}E.endNonterminal("Pragma",g)},this.parse_Comment=function(){E.startNonterminal("Comment",g),p(4);switch(y){case 52:f(52);break;case 41:f(41);break;case 30:f(30);break;default:f(33)}E.endNonterminal("Comment",g)},this.parse_CommentDoc=function(){E.startNonterminal("CommentDoc",g),p(5);switch(y){case 31:f(31);break;case 32:f(32);break;case 52:f(52);break;case 41:f(41);break;default:f(33)}E.endNonterminal("CommentDoc",g)},this.parse_QuotString=function(){E.startNonterminal("QuotString",g),p(6);switch(y){case 18:f(18);break;case 29:f(29);break;case 19:f(19);break;case 21:f(21);break;case 35:f(35);break;default:f(33)}E.endNonterminal("QuotString",g)},this.parse_AposString=function(){E.startNonterminal("AposString",g),p(7);switch(y){case 18:f(18);break;case 29:f(29);break;case 20:f(20);break;case 22:f(22);break;case 38:f(38);break;default:f(33)}E.endNonterminal("AposString",g)},this.parse_Prefix=function(){E.startNonterminal("Prefix",g),h(13),l(),a(),E.endNonterminal("Prefix",g)},this.parse__EQName=function(){E.startNonterminal("_EQName",g),h(12),l(),o(),E.endNonterminal("_EQName",g)};var v,m,g,y,b,w,E,S,x,T,N};r.getTokenSet=function(e){var t=[],n=e<0?-e:INITIAL[e]&4095;for(var i=0;i<276;i+=32){var s=i,o=(i>>5)*2062+n-1,u=o>>2,a=u>>2,f=r.EXPECTED[(o&3)+r.EXPECTED[(u&3)+r.EXPECTED[(a&3)+r.EXPECTED[a>>2]]]];for(;f!=0;f>>>=1,++s)(f&1)!=0&&t.push(r.TOKEN[s])}return t},r.MAP0=[66,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,35,31,35,37,38,39,40,41,42,43,44,45,31,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,31,61,62,63,64,35],r.MAP1=[108,124,214,214,214,214,214,214,214,214,214,214,214,214,214,214,156,181,181,181,181,181,214,215,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,247,261,277,293,309,347,363,379,416,416,416,408,331,323,331,323,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,433,433,433,433,433,433,433,316,331,331,331,331,331,331,331,331,394,416,416,417,415,416,416,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,330,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,66,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,31,31,31,31,35,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,35,31,35,37,38,39,40,41,42,43,44,45,31,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,31,61,62,63,64,35,35,35,35,35,35,35,35,35,35,35,35,31,31,35,35,35,35,35,35,35,65,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65],r.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,35,31,35,31,31,35],r.INITIAL=[1,2,36867,45060,5,6,7,8,9,10,11,12,13,14,15],r.TRANSITION=[17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22908,18836,17152,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,17365,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,17470,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,18157,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,17848,17880,18731,17918,36551,17292,17934,17979,18727,18023,36545,18621,18039,18056,18072,18117,18143,18173,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17687,18805,18421,18437,18101,17393,18489,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,18579,21711,17152,19008,19233,20367,19008,28684,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,17365,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,17470,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,18157,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,17848,17880,18731,17918,36551,17292,17934,17979,18727,18023,36545,18621,18039,18056,18072,18117,18143,18173,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17687,18805,18421,18437,18101,17393,18489,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,20116,18836,18637,19008,19233,21267,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,18763,18778,18794,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,18821,22923,18906,19008,19233,17431,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18937,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,19054,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,18953,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21843,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21696,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22429,20131,18720,19008,19233,20367,19008,17173,23559,36437,17330,17349,18921,17189,17208,17281,20355,18087,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,21242,19111,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,19024,18836,18609,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,19081,22444,18987,19008,19233,20367,19008,19065,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21992,22007,18987,19008,19233,20367,19008,18690,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22414,18836,18987,19008,19233,30651,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,19138,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,19280,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,19172,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21783,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,19218,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21651,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,19249,19265,19307,18888,27857,30536,24401,31444,23357,18888,19351,18888,18890,27211,19370,27211,27211,19392,24401,31911,24401,24401,25467,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,19440,24401,24401,24401,24401,24036,17994,24060,18888,18888,18888,18890,19468,27211,27211,27211,27211,19484,35367,19520,24401,24401,24401,19628,18888,29855,18888,18888,23086,27211,19538,27211,27211,30756,24012,24401,19560,24401,24401,26750,18888,18888,19327,27855,27211,27211,19580,17590,24017,24401,24401,19600,25665,18888,18888,28518,27211,27212,24016,19620,19868,28435,25722,18889,19644,27211,32888,35852,19868,31018,19694,19376,19717,22215,19735,22098,19751,35203,19776,19797,19817,19840,25783,31738,24135,19701,19856,31015,23516,31008,28311,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21768,18836,19307,18888,27857,27904,24401,29183,28015,18888,18888,18888,18890,27211,27211,27211,27211,19888,24401,24401,24401,24401,22953,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,19440,24401,24401,24401,24401,24036,18881,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22399,18836,19918,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21666,18836,19307,18888,27857,27525,24401,29183,21467,18888,18888,18888,18890,27211,27211,27211,27211,19946,24401,24401,24401,24401,32382,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,19998,24401,24401,24401,24401,31500,18467,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,20021,24401,24401,24401,24401,24401,34271,18888,18888,18888,18888,23086,27211,27211,27211,27211,32926,29908,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,20050,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,20101,19039,20191,20412,20903,17569,20309,20872,25633,20623,20505,20218,20242,17189,17208,17281,20355,20265,20306,20328,20383,22490,20796,20619,21354,20654,20410,20956,21232,20765,17421,20535,17192,18127,22459,20312,25531,22470,20309,20428,18964,20466,20491,21342,21070,20521,20682,17714,18326,17543,17559,17585,22497,20559,19504,20279,20575,20290,20475,20604,20639,20226,20670,17661,21190,17703,21176,17730,19494,20698,20711,22480,21046,21116,18971,21130,20727,20755,17675,17753,17832,17590,25518,20394,20781,20831,20202,20847,21401,17292,17934,17979,18549,20863,20588,25542,20888,20919,18072,18117,20935,20972,21032,21062,21086,18239,21102,18563,21146,21162,21206,18351,20949,20902,18340,21222,21258,21283,18360,20249,17405,21295,21311,21327,20739,20343,21370,21386,21417,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21977,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,21452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,21504,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,36501,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,28674,21946,17617,36473,18223,17237,17477,19152,17860,17892,17675,17753,17832,21575,21534,17481,19156,17864,18731,17918,36551,17292,17934,21560,30628,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21798,18836,21612,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21636,18836,18987,19008,19233,17902,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21753,19096,21903,19008,19233,20367,19008,19291,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,17379,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,21931,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,18280,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21962,18594,18987,19008,19233,22043,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21681,21858,18987,19008,19233,20367,19008,21544,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,32319,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,22231,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,31678,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,33588,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,35019,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22248,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22324,18836,22059,18888,27857,30501,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,34365,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22354,18836,18987,19008,19233,20367,19008,17173,27086,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,19930,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21828,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22309,22513,18987,19008,19233,20367,19008,19122,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,22544,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22608,18836,22988,23004,27585,23020,23036,23067,22087,18888,18888,18888,23083,27211,27211,27211,23102,22121,24401,24401,24401,23122,31386,26154,19674,18888,28119,28232,19424,23705,27211,27211,23142,23173,23189,23212,24401,24401,23246,34427,31693,23262,18888,23290,23308,27783,27620,23327,35263,35107,33383,23346,18193,23393,32748,23968,24401,23414,35153,23463,18888,33913,23442,23482,27211,27211,23532,23552,21431,23575,24401,24401,23604,26095,23635,23657,18888,33482,23685,33251,27211,22187,18851,23721,35536,24401,18887,23750,32641,27211,23769,23787,20080,33012,24384,25659,18888,18889,27211,27211,19719,23889,23803,31018,18890,27211,31833,19406,19447,23086,23330,19828,28224,31826,23823,26917,34978,23850,26493,25782,23878,23914,23516,31008,22105,19419,27963,19659,29781,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22623,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,28909,25783,27211,27211,27211,34048,23933,22164,24401,24401,24401,28409,23949,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,26583,18888,18888,18888,35585,23984,27211,27211,27211,24005,22201,24033,24401,24401,24401,24052,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,26496,24076,24126,24151,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22638,18836,22059,19678,27857,24185,24401,24201,24217,26592,18888,18888,18890,24252,24268,27211,27211,22121,24287,24303,24401,24401,30613,19781,35432,36007,32649,18888,25783,24322,28966,23771,27211,35072,22164,24358,32106,26829,24400,31500,31693,18888,18888,18888,24801,18890,27211,27211,27211,27211,24418,19484,24401,24401,24401,24401,20167,31181,18888,18888,18888,27833,23086,27211,27211,33540,27211,30756,21431,24401,24401,22972,24401,26095,18888,36131,18888,27855,27211,24440,27211,22187,22968,24401,24459,24401,31699,28454,18888,34528,34570,35779,24478,24402,24494,25659,18888,36228,27211,27211,24515,30981,23734,31018,18890,27211,31833,19406,19447,23086,23330,24538,31017,27856,31741,30059,23377,24563,19837,25782,19760,31015,23516,25374,22105,19419,29793,24579,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22653,18836,22059,25756,19982,34097,23196,29183,24614,24110,23641,24673,26103,24697,24443,24713,28558,22121,24748,24462,24764,23398,30613,18888,18888,18888,18888,24798,25783,27211,27211,27211,34232,35072,22164,24401,24401,24401,33302,31500,22559,24106,24232,18888,18888,34970,24817,30411,27211,27211,32484,19484,29750,35127,24401,24401,19872,31181,24852,18888,18888,24871,29221,27211,27211,32072,27211,30756,34441,24401,24401,31571,24401,26095,33141,27802,27011,27855,25295,25607,24888,22187,22968,19195,34593,24906,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,33663,27211,27211,24924,24947,23588,31018,18890,27211,31833,22135,19447,23086,23330,19828,30904,31042,24972,19840,25e3,31738,30898,25782,19760,31015,23516,31008,22105,19419,25016,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22668,18836,25041,25057,31320,25073,25089,25105,22087,34796,24236,36138,34870,34125,25121,23106,35497,22248,36613,25137,30671,27365,30613,25153,26447,25199,25233,22574,23274,25249,25265,25281,25318,25344,25360,25400,25428,25452,26731,25504,31693,23669,25558,27407,25575,28599,25934,25599,27211,28180,27304,25623,25839,25649,24401,34820,25681,25698,22586,27775,30190,25745,25778,25799,25817,28995,33569,30756,21518,33443,25837,25855,25893,26095,31254,26677,30136,27855,25930,25950,27211,22187,22968,25966,25986,24401,23428,27763,36330,26959,26002,26029,26045,26085,26119,26170,26203,26222,26239,30527,26372,26274,28404,31018,33757,27211,34262,26316,36729,26345,26366,35337,31017,26388,26407,30954,26350,33861,26434,26463,26479,26512,23516,33189,26531,26547,27963,31293,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22683,18836,26568,26181,26608,34097,26643,29183,22087,26669,18888,18888,18890,26693,27211,27211,27211,22121,26720,24401,24401,24401,30613,18888,18888,18888,18888,26774,25783,27211,27211,27211,26619,35072,22164,24401,24401,24401,21596,31500,31693,18888,18888,33978,18888,18890,27211,27211,25801,27211,27211,19484,24401,24401,24401,26792,24401,31181,18888,18888,18888,35464,23086,27211,27211,27211,26809,30756,21431,24401,24401,24401,26828,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,31948,18889,35707,27211,19719,26845,19868,31018,18890,27211,31833,19406,19447,23086,23330,26905,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,24984,31088,19419,26945,27651,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22698,18836,26999,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,23051,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,27033,24401,24401,24401,24401,24036,31693,18888,18888,27056,18888,18890,27211,27211,30320,27211,27211,27075,24401,24401,29032,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,33986,27855,27211,27211,27102,17590,24017,24401,24401,27123,27144,36254,27162,27210,27228,28500,18187,34842,33426,27244,35980,27277,27302,27320,36048,34013,20999,31882,21478,27895,27356,30287,27381,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,26329,30087,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,27406,27423,27445,35294,27461,22087,18888,18888,30140,18890,27211,27211,27989,27211,22121,24401,24401,25682,24401,18866,18888,18888,18888,18888,18888,34042,27211,27211,27211,27211,29700,22164,24401,24401,24401,24401,27128,31693,27477,18888,18888,18888,18890,27194,27211,27211,27211,27211,19484,35299,24401,24401,24401,24401,19628,18888,18888,18888,27059,23086,27211,27211,27211,33366,30756,24012,24401,24401,24401,35044,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,20815,27211,30818,19960,33969,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22713,18836,22059,27496,27516,27541,35231,27557,22087,29662,26292,23292,27573,24836,27601,27211,27636,22121,35544,27686,24401,27721,18866,18888,27799,18888,27818,22071,27853,32260,27211,26013,27873,27920,22164,29419,24401,29946,33413,26742,27751,26881,18888,18888,27261,36776,27936,27211,27211,27211,27988,28005,28031,28052,24401,24401,28069,28088,28135,25488,28152,26069,28167,27211,28340,24657,28196,30756,31523,24401,28212,34176,36174,24956,28248,28266,28290,21488,33077,28327,28356,17590,20986,23126,28391,28425,28102,28451,28470,28490,28516,28534,20034,33728,25868,25659,18888,18889,27211,27211,19719,23889,19868,30241,28274,28553,28574,19406,28590,23086,23330,19828,19452,28615,28660,26147,25783,31738,19837,25782,19760,29613,35958,29276,22105,19419,27963,23157,28700,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,22528,18888,18888,18888,18888,18890,27333,27211,27211,27211,27211,19484,30853,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22728,18836,28747,28782,28817,28841,28857,28880,28896,24161,28943,32011,36261,27340,28961,29492,28982,29011,24522,29027,25436,29048,23051,27500,29090,29110,30713,18888,23512,29130,25183,27211,29155,28927,27033,29173,23230,24401,29199,35373,31693,18888,18888,25583,32629,29218,27211,27211,31461,30692,29237,27075,24401,24401,24401,29262,29302,19628,18888,34329,18888,18888,23086,27211,29329,27211,27211,30756,24012,35933,24401,24401,24401,27705,31612,18888,18888,29346,29374,27211,35650,17590,21436,29393,24401,25970,18887,33895,18888,27211,32528,27212,24016,32769,19868,25659,18888,26889,27211,27211,29412,23889,24371,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31768,19840,25783,31738,19837,29435,29508,31102,29550,29606,22105,30300,29462,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22743,18836,22059,29629,29473,34097,33285,29183,29651,27254,18888,29678,33329,32535,27211,29694,29716,22121,19202,24401,32742,29741,18866,26776,33921,28474,18888,18888,25783,29766,27211,29809,27211,35072,22164,35825,24401,29828,24401,24036,36769,25217,18888,18888,29848,18890,27211,29871,27211,26258,27211,29894,24401,29929,24401,36587,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,29725,29962,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18473,18888,18888,19584,27211,27212,24016,29982,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19902,19447,32052,19544,19828,29998,30097,30031,19840,25783,30047,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,30075,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22758,18836,30121,30156,30206,30257,30273,30336,22087,35624,32837,25762,18890,29878,34934,26812,27211,22121,24931,23223,29202,24401,18866,34373,30352,18888,18888,18888,23447,24828,27211,27211,27211,35072,30370,35052,24401,24401,24401,24036,29523,18888,18888,27146,18888,31308,30386,27211,27211,30405,30558,19484,30427,24401,24401,29938,35686,19628,28766,30447,34506,35614,23086,28731,30482,30517,30552,30756,24012,20156,30574,30598,30667,26283,33464,28945,27670,30687,32915,33504,25328,17590,23963,20450,33837,21016,32397,26300,30708,30729,27885,30748,21588,36373,30779,26653,24628,33220,32514,30806,31835,25412,25906,26515,18890,28825,31833,26133,19447,28304,31730,23834,26057,30869,30885,32181,30920,30942,32797,25782,30970,31015,23516,31008,30997,31034,27963,19659,29450,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22773,18836,31058,31074,32463,31125,31141,31197,22087,18888,29534,35471,36738,27211,24342,31213,24424,22121,24401,20175,31229,31917,27736,31245,34334,27175,18888,29094,27286,27211,31278,31336,27211,31355,31371,24401,31402,31418,24401,31437,31693,18888,31619,32841,18888,18890,27211,27211,31460,31477,27211,19484,24401,24401,31497,36581,24401,33020,18888,18888,18888,18888,30007,27211,27211,27211,27211,31516,32310,24401,24401,24401,24401,31539,18888,28762,18888,24651,35740,27211,27211,28644,31565,35796,24401,24401,19318,32188,18888,24334,28366,27212,29966,29832,19868,25659,18888,18889,27211,27211,19719,31587,19868,31635,32435,33693,30105,31663,20005,31715,31757,31784,31812,30015,31851,31878,25783,31898,19837,25782,19760,31015,23516,31008,22105,19419,27963,31933,30221,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22788,18836,22059,25729,30466,31968,24306,31984,32e3,32807,35160,27017,29590,34941,19801,29377,33700,22121,27040,30431,29396,28864,29565,18888,18888,18888,32027,18888,25783,27211,27211,23698,27211,35072,22164,24401,24401,30845,24401,24036,32045,18888,26929,18888,18888,18890,27211,31481,32068,27211,27211,32088,24401,33058,32122,24401,24401,33736,18888,18888,33162,18888,23086,27211,27211,29484,27211,28375,32144,24401,24401,33831,24401,26750,18888,18888,18888,27855,27211,27211,27211,36704,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,33107,22171,33224,24271,32169,31017,27856,31741,19840,25783,31738,30234,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,32204,32232,32252,32677,33295,29074,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,23619,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,32276,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,32299,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,33886,18889,36065,27211,19719,35326,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22803,18836,32335,31647,34666,32351,32367,32417,22087,18888,32433,19335,32451,27211,32479,27107,32500,22121,24401,32551,20085,32572,18866,22287,23753,18888,18888,32602,32665,27211,32693,27211,26972,32713,32729,24401,32764,24401,25877,32785,34768,18888,27390,32823,24594,24855,32857,24890,32878,32904,27211,32942,32977,24401,33e3,29313,24401,30790,26206,27666,33904,18888,23086,36353,27211,33036,27211,30756,24012,32153,24401,33056,24401,35861,18888,18888,30354,27972,27211,27211,33800,17590,20145,24401,24401,34638,20811,18888,18888,33074,27211,27212,36167,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,34616,24169,33093,33123,33157,27856,31741,23862,26552,34302,19837,25782,19760,31015,23516,31008,33178,19973,27963,23497,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22818,18836,33205,28113,33240,34097,33275,29183,22087,33318,35438,18888,18890,33345,26391,33382,27211,22121,33399,28072,33442,24401,18866,22232,18888,33459,18888,18888,33480,33498,25175,27211,27211,26704,22164,24775,35239,24401,24401,25914,29580,18888,18888,31109,25211,33520,33539,27211,27211,33556,36284,19484,33585,24401,24401,33604,32556,19628,18888,18888,31262,33658,23086,27211,27211,33679,27211,30756,24012,24401,24401,33716,24401,26854,27480,18888,33752,27855,33259,34701,27211,17590,32102,24782,23807,24401,18887,18888,18888,27211,27211,27212,33773,36105,19868,25659,18888,23368,27211,29157,19719,23889,34454,29286,18890,33794,25302,33816,19447,34079,33853,31862,31017,27856,31741,33877,28920,33937,19837,30461,34002,22276,36041,34029,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22833,18836,34064,32616,34113,34141,34157,34192,34208,32216,36013,31549,31952,34224,34248,34287,29330,34350,34389,34413,34481,26793,18866,26187,29635,22293,18888,36654,25783,34522,34544,34566,25821,35072,22164,34586,34609,34632,19604,24036,36644,36674,24681,18888,32401,34654,31339,34682,34698,27211,34717,34753,28053,34812,34836,24401,33619,19628,34858,32236,34906,24598,33523,27612,34890,34922,24732,29246,36717,33634,34465,32984,34168,26750,34957,18888,18888,34994,35010,27211,33040,17590,29913,35035,24401,36304,25482,30171,35883,35068,35088,26627,20441,31173,35123,35143,35176,24640,30492,29358,19719,35192,35219,25384,28801,35255,35279,32586,34496,23086,23330,29061,31017,27856,31741,19840,25783,31738,24547,25164,35315,31796,35353,34316,22105,19419,27963,24091,28630,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22848,18836,22059,34782,34088,35389,21008,35405,35421,35454,18888,18888,23466,35487,27211,27211,27211,35513,31154,24401,24401,24401,35560,18888,26863,36664,35601,24872,25783,30389,23536,26250,35647,35666,22164,19522,19564,30582,35682,27697,35575,29114,18888,18888,18888,18890,27211,35702,27211,27211,27211,35723,24401,35527,24401,24401,24401,19628,30184,18888,18888,18888,23086,35739,27211,27211,27211,29139,22938,24401,24401,24401,24401,23898,35756,18888,18888,25025,35778,27211,27211,17590,20064,35795,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,23917,18890,34550,31833,22262,19447,23086,23330,26418,31017,27856,31741,19840,25783,35812,19837,27187,35841,33135,23516,31008,22105,22148,28712,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22863,18836,22059,35877,28723,34097,31164,29183,22087,26758,18888,22592,18890,23989,27211,29812,27211,22121,33778,24401,31421,24401,18866,18888,18888,26872,18888,18888,25783,27211,30732,27211,27211,35072,22164,24401,24908,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22878,18836,22059,27837,27857,35899,24401,35915,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31602,18888,18888,18888,18888,26223,27211,27211,27211,27211,27211,19484,35931,24401,24401,24401,24401,19628,18888,28136,18888,18888,35949,27211,32862,27211,32697,30756,24012,24401,32283,24401,32128,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22893,18836,22059,35974,34882,34097,33960,29183,35996,18888,23311,18888,36029,27211,27211,36064,36081,22121,24401,24401,36104,33950,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,36121,18888,25559,18888,18888,18890,27211,27211,30313,27211,27211,36154,24401,24401,34397,24401,24401,19628,28250,18888,18888,18888,23086,30926,27211,27211,27211,26983,24012,33642,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,19354,27857,36190,24401,36206,22087,18888,18888,18888,18007,27211,27211,27211,24724,22121,24401,24401,24401,30827,18866,18888,36222,18888,28795,18888,25783,35100,27211,27429,27211,35072,22164,30836,24401,24499,24401,24036,31693,18888,36244,18888,18888,18890,27211,36088,27211,27211,27211,19484,24401,28036,24401,24401,24401,19628,18888,18888,35631,18888,35762,27211,27211,36277,27211,34730,24012,24401,24401,36300,24401,36320,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,25712,18888,18888,36346,27211,27212,19184,24402,19868,25659,32029,18889,27211,33359,19719,23889,36369,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22384,18836,36389,19008,19233,20367,36434,17173,17595,36437,17330,17349,18921,17189,17208,17281,20355,36453,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,20362,21726,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22369,18836,18987,19008,19233,20367,19008,21737,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21813,18836,36489,19008,19233,20367,19008,17173,17737,36437,17330,17349,18921,17189,17208,17281,20355,17768,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,20543,22022,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21828,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,36517,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21828,18836,19307,18888,27857,30756,24401,29183,28015,18888,18888,18888,18890,27211,27211,27211,27211,36567,24401,24401,24401,24401,22953,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,36603,24401,24401,24401,24401,24036,18881,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,36629,36690,18720,19008,19233,20367,19008,17454,17595,36437,17330,17349,18921,17189,17208,17281,20355,17223,17308,17327,17346,18918,36754,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,20362,21726,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,0,94242,0,118820,0,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2482176,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,24,27,27,27,2207744,2404352,2412544,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3104768,2605056,2207744,2207744,2207744,2207744,2207744,2207744,2678784,2207744,2695168,2207744,2703360,2207744,2711552,2752512,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,0,2158592,2158592,3170304,3174400,2158592,0,139,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,2748416,2756608,2777088,2801664,2158592,2158592,2158592,2863104,2891776,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3104768,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2785280,2207744,2809856,2207744,2207744,2842624,2207744,2207744,2207744,2899968,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2473984,2207744,2207744,2494464,2207744,2207744,2207744,2523136,2158592,2404352,2412544,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2564096,2158592,2158592,2605056,2158592,2158592,2158592,2158592,2158592,2158592,2678784,2158592,2695168,2158592,2703360,2158592,2711552,2752512,2158592,2158592,2785280,2158592,2158592,2785280,2158592,2809856,2158592,2158592,2842624,2158592,2158592,2158592,2899968,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,18,0,0,0,0,0,0,0,2211840,0,0,641,0,2158592,0,0,0,0,0,0,0,0,2211840,0,0,32768,0,2158592,0,2158592,2158592,2158592,2383872,2158592,2158592,2158592,2158592,3006464,2383872,2207744,2207744,2207744,2207744,2158877,2158877,2158877,2158877,0,0,0,2158877,2572573,2158877,2158877,0,2207744,2207744,2596864,2207744,2207744,2207744,2207744,2207744,2207744,2641920,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,167936,0,0,2162688,0,0,3104768,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,0,0,0,2146304,2146304,2224128,2224128,2232320,2232320,2232320,641,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2531328,2158592,2158592,2158592,2158592,2158592,2617344,2158592,2158592,2158592,2158592,2441216,2445312,2158592,2158592,2158592,2158592,2158592,2158592,2502656,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2580480,2158592,2158592,2158592,2158592,2621440,2158592,2580480,2158592,2158592,2158592,2158592,2621440,2158592,2158592,2158592,2158592,2158592,2158592,2699264,2158592,2158592,2158592,2158592,2158592,2748416,2756608,2777088,2801664,2207744,2863104,2891776,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3018752,2207744,3043328,2207744,2207744,2207744,2207744,3080192,2207744,2207744,3112960,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,172310,279,0,2162688,0,0,2207744,2207744,2207744,3186688,2207744,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2158592,2158592,2158592,2404352,2412544,2158592,2510848,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2584576,2158592,2609152,2158592,2158592,2629632,2158592,2158592,2158592,2686976,2158592,2715648,2158592,2158592,3121152,2158592,2158592,2158592,3149824,2158592,2158592,3170304,3174400,2158592,2367488,2207744,2207744,2207744,2207744,2158592,2158592,2158592,2158592,0,0,0,2158592,2572288,2158592,2158592,0,2207744,2207744,2207744,2433024,2207744,2453504,2461696,2207744,2207744,2207744,2207744,2207744,2207744,2510848,2207744,2207744,2207744,2207744,2207744,2531328,2207744,2207744,2207744,2207744,2207744,2617344,2207744,2207744,2207744,2207744,2158592,2158592,2158592,2158592,0,0,0,2158592,2572288,2158592,2158592,1508,2715648,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2867200,2207744,2904064,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2580480,2207744,2207744,2207744,2207744,2621440,2207744,2207744,2207744,3149824,2207744,2207744,3170304,3174400,2207744,0,0,0,0,0,0,0,0,0,0,138,2158592,2158592,2158592,2404352,2412544,2707456,2732032,2207744,2207744,2207744,2822144,2826240,2207744,2895872,2207744,2207744,2924544,2207744,2207744,2973696,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,285,2158592,2158592,3112960,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3186688,2158592,2207744,2207744,2158592,2158592,2158592,2158592,2158592,0,0,0,2158592,2158592,2158592,2158592,0,0,2535424,2543616,2158592,2158592,2158592,0,0,0,2158592,2158592,2158592,2990080,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2572288,2981888,2207744,2207744,3002368,2207744,3047424,3063808,3076096,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3203072,2708960,2732032,2158592,2158592,2158592,2822144,2827748,2158592,2895872,2158592,2158592,2924544,2158592,2158592,2973696,2158592,2981888,2158592,2158592,3002368,2158592,3047424,3063808,3076096,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3203072,2981888,2158592,2158592,3003876,2158592,3047424,3063808,3076096,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3203072,2207744,2207744,2207744,2207744,2207744,2424832,2207744,2207744,2207744,2207744,2207744,2207744,2207744,20480,0,0,0,0,0,2162688,20480,0,2523136,2527232,2158592,2158592,2576384,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2908160,2527232,2207744,2207744,2576384,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2908160,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,286,2158592,2158592,0,0,2158592,2158592,2158592,2158592,2633728,2658304,0,0,2740224,2744320,0,2834432,2207744,2207744,2977792,2207744,2207744,2207744,2207744,3039232,2207744,2207744,2207744,2207744,2207744,2207744,3158016,0,0,29315,0,0,0,0,45,45,45,45,45,933,45,45,45,45,442,45,45,45,45,45,45,45,45,45,67,67,2494464,2158592,2158592,2158592,2524757,2527232,2158592,2158592,2576384,2158592,2158592,2158592,2158592,2158592,2158592,1504,2158592,2498560,2158592,2158592,2158592,2158592,2568192,2158592,2592768,2625536,2158592,2158592,2674688,2736128,2158592,2158592,0,2158592,2912256,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3108864,2158592,2158592,3133440,3145728,3153920,2375680,2379776,2207744,2207744,2420736,2207744,2449408,2207744,2207744,2207744,2498560,2207744,2207744,2207744,2207744,2568192,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,551,2158592,2158592,2158592,2158592,2207744,2506752,2207744,2207744,2207744,2207744,2207744,2158592,2506752,0,2020,2158592,2592768,2625536,2207744,2207744,2674688,2736128,2207744,2207744,2207744,2912256,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,542,0,544,2207744,3108864,2207744,2207744,3133440,3145728,3153920,2375680,2379776,2158592,2158592,2420736,2158592,2449408,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,641,0,0,0,0,0,0,2367488,2158592,2498560,2158592,2158592,1621,2158592,2158592,2568192,2158592,2592768,2625536,2158592,2158592,2674688,0,0,0,0,0,1608,97,97,97,97,97,97,97,97,97,97,1107,97,97,1110,97,97,3133440,3145728,3153920,2158592,2408448,2416640,2158592,2465792,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3014656,2158592,2158592,3051520,2158592,2158592,3100672,2158592,2158592,3121152,2158592,2158592,2158592,3149824,2416640,2207744,2465792,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2633728,2658304,2740224,2744320,2834432,2949120,2158592,2985984,2158592,2998272,2158592,2158592,2158592,3129344,2207744,2408448,2949120,2207744,2985984,2207744,2998272,2207744,2207744,2207744,3129344,2158592,2408448,2416640,2158592,2465792,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,32768,0,0,0,0,0,0,2367488,2949120,2158592,2985984,2158592,2998272,2158592,2158592,2158592,3129344,2158592,2158592,2478080,2158592,2158592,2158592,2535424,2543616,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3117056,2207744,2207744,2478080,2207744,2207744,2207744,2207744,2699264,2207744,2207744,2207744,2207744,2207744,2748416,2756608,2777088,2801664,2207744,2207744,2158877,2158877,2158877,2158877,2158877,0,0,0,2158877,2158877,2158877,2158877,0,0,2535709,2543901,2158877,2158877,2158877,0,0,0,2158877,2158877,2158877,2990365,2158877,2158877,2158730,2158730,2158730,2158730,2158730,2572426,2207744,2535424,2543616,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3117056,2158592,2158592,2478080,2207744,2207744,2990080,2207744,2207744,2158592,2158592,2482176,2158592,2158592,0,0,0,2158592,2158592,2158592,0,2158592,2908160,2158592,2158592,2158592,2977792,2158592,2158592,2158592,2158592,3039232,2158592,2158592,3010560,2207744,2428928,2207744,2514944,2207744,2588672,2207744,2838528,2207744,2207744,2207744,3010560,2158592,2428928,2158592,2514944,0,0,2158592,2588672,2158592,0,2838528,2158592,2158592,2158592,3010560,2158592,2506752,2158592,18,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,0,0,29315,922,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,1539,45,3006464,2383872,0,2020,2158592,2158592,2158592,2158592,3006464,2158592,2637824,2953216,2158592,2207744,2637824,2953216,2207744,0,0,2158592,2637824,2953216,2158592,2539520,2158592,2539520,2207744,0,0,2539520,2158592,2158592,2158592,2158592,2207744,2506752,2207744,2207744,2207744,2207744,2207744,2158592,2506752,0,0,2158592,2207744,0,2158592,2158592,2207744,0,2158592,2158592,2207744,0,2158592,2965504,2965504,2965504,0,0,0,0,0,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2474269,2158877,2158877,0,0,2158877,2158877,2158877,2158877,2634013,2658589,0,0,2740509,2744605,0,2834717,40976,18,36884,45078,24,28,90143,94242,118820,102439,106538,98347,118820,118820,118820,40976,18,18,36884,0,0,0,24,24,24,27,27,27,27,90143,0,0,86016,0,0,2211840,102439,0,0,0,98347,0,2158592,2158592,2158592,2158592,2158592,3158016,0,2375680,2379776,2158592,2158592,2420736,2158592,2449408,2158592,2158592,0,94242,0,0,0,2211840,102439,0,0,106538,98347,135,2158592,2158592,2158592,2158592,2158592,2158592,2564096,2158592,2158592,2158592,2158592,2158592,2596864,2158592,2158592,2158592,2158592,2158592,2158592,2641920,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2781184,2793472,2494464,2158592,2158592,2158592,2523136,2527232,2158592,2158592,2576384,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,0,27,27,0,2158592,2498560,2158592,2158592,0,2158592,2158592,2568192,2158592,2592768,2625536,2158592,2158592,2674688,0,0,0,0,0,2211840,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2473984,2158592,2158592,2494464,2158592,2158592,2158592,3006464,2383872,0,0,2158592,2158592,2158592,2158592,3006464,2158592,2637824,2953216,2158592,2207744,2637824,2953216,40976,18,36884,45078,24,27,147488,94242,147456,147488,106538,98347,0,0,147456,40976,18,18,36884,0,45078,0,24,24,24,27,27,27,27,0,81920,0,94242,0,0,0,2211840,0,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2158592,2428928,2158592,2514944,2158592,2588672,2158592,2838528,2158592,2158592,40976,18,151573,45078,24,27,90143,94242,0,102439,106538,98347,0,0,0,40976,18,18,36884,0,45078,0,24,24,24,27,27,27,27,90143,0,0,1315,0,97,97,97,97,97,97,97,97,97,97,1487,97,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,0,0,29315,0,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,130,94242,0,0,0,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2158592,3096576,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2207744,2158592,18,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,644,2207744,2207744,2207744,3186688,2207744,0,1080,0,1084,0,1088,0,0,0,0,0,0,0,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2531466,2158730,2158730,2158730,2158730,2158730,2617482,0,94242,0,0,0,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2781184,2793472,2158592,2818048,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,40976,18,36884,45078,24,27,90143,159779,159744,102439,159779,98347,0,0,159744,40976,18,18,36884,0,45078,0,2224253,172032,2224253,2232448,2232448,172032,2232448,90143,0,0,2170880,0,0,550,829,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,124,124,127,127,127,40976,18,36884,45078,25,29,90143,94242,0,102439,106538,98347,0,0,163931,40976,18,18,36884,0,45078,249856,24,24,24,27,27,27,27,90143,0,0,2170880,0,0,827,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,4243810,4243810,24,24,27,27,27,2207744,0,0,0,0,0,0,2166784,0,0,0,0,57344,286,2158592,2158592,2158592,2158592,2707456,2732032,2158592,2158592,2158592,2822144,2826240,2158592,2895872,2158592,2158592,2924544,2158592,2158592,2973696,2158592,2207744,2207744,2207744,3186688,2207744,0,0,0,0,0,0,53248,0,0,0,0,0,97,97,97,97,97,1613,97,97,97,97,97,97,1495,97,97,97,97,97,97,97,97,97,566,97,97,97,97,97,97,2207744,0,0,0,0,0,0,2166784,546,0,0,0,0,286,2158592,2158592,2158592,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,17,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,20480,120,121,18,18,36884,0,45078,0,24,24,24,27,27,27,27,90143,0,0,2170880,0,53248,550,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,196608,18,266240,24,24,27,27,27,0,94242,0,0,0,38,102439,0,0,106538,98347,0,45,45,45,45,45,45,45,1535,45,45,45,45,45,45,45,1416,45,45,45,45,45,45,45,45,424,45,45,45,45,45,45,45,45,45,405,45,45,45,45,45,45,45,45,45,45,45,45,45,199,45,45,67,67,67,67,67,491,67,67,67,67,67,67,67,67,67,67,67,1766,67,67,67,1767,67,24850,24850,12564,12564,0,0,2166784,546,0,53531,53531,0,286,97,97,0,0,97,97,97,97,97,97,0,0,97,97,0,97,97,97,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,743,57889,0,2170880,0,0,550,0,97,97,97,97,97,97,97,97,97,45,45,45,45,45,45,45,45,1856,45,1858,1859,67,67,67,1009,67,67,67,67,67,67,67,67,67,67,67,1021,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,0,0,0,0,0,2367773,2158877,2158877,2158877,2158877,2158877,2158877,2699549,2158877,2158877,2158877,2158877,2158877,2748701,2756893,2777373,2801949,97,1115,97,97,97,97,97,97,97,97,97,97,97,97,97,97,857,97,67,67,67,67,67,1258,67,67,67,67,67,67,67,67,67,67,67,1826,67,97,97,97,97,97,97,1338,97,97,97,97,97,97,97,97,97,97,97,97,97,870,97,97,67,67,67,1463,67,67,67,67,67,67,67,67,67,67,67,67,67,1579,67,67,97,97,97,1518,97,97,97,97,97,97,97,97,97,97,97,97,97,904,905,97,97,97,97,1620,97,97,97,97,97,97,97,97,97,97,97,0,921,0,0,0,0,0,0,45,1679,67,67,67,1682,67,67,67,67,67,67,67,67,67,1690,67,0,0,97,97,97,97,45,45,67,67,0,0,97,97,45,45,45,669,45,45,45,45,45,45,45,45,45,45,45,45,189,45,45,45,1748,45,45,45,1749,1750,45,45,45,45,45,45,45,45,67,67,67,67,1959,67,67,67,67,1768,67,67,67,67,67,67,67,67,97,97,97,97,97,97,97,97,97,1791,97,97,97,97,97,97,97,97,45,45,45,45,45,45,1802,67,1817,67,67,67,67,67,67,1823,67,67,67,67,97,97,97,97,0,0,0,97,97,97,97,0,97,97,97,97,1848,45,45,45,45,45,45,45,45,45,45,45,659,45,45,45,45,45,45,45,1863,67,67,67,67,67,67,67,67,67,67,67,67,495,67,67,67,67,67,1878,97,97,97,97,0,0,0,97,97,97,97,0,0,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,45,45,45,45,45,67,67,67,67,97,97,97,97,0,0,0,1973,97,97,97,0,97,97,97,97,97,97,97,97,97,97,97,97,97,1165,97,1167,67,24850,24850,12564,12564,0,0,2166784,0,0,53531,53531,0,286,97,97,0,0,97,97,97,97,97,97,0,0,97,97,1789,97,0,94242,0,0,0,2211840,102439,0,0,106538,98347,136,2158592,2158592,2158592,2158592,2158592,3158016,229376,2375680,2379776,2158592,2158592,2420736,2158592,2449408,2158592,2158592,67,24850,24850,12564,12564,0,0,280,547,0,53531,53531,0,286,97,97,0,0,97,97,97,97,97,97,0,1788,97,97,0,97,2024,97,45,45,45,45,45,45,67,67,67,67,67,67,67,67,235,67,67,67,67,67,57889,547,547,0,0,550,0,97,97,97,97,97,97,97,97,97,45,45,45,1799,45,45,45,67,67,67,67,67,25398,0,13112,0,54074,0,0,1092,0,0,0,0,0,97,97,97,97,1612,97,97,97,97,1616,97,1297,1472,0,0,0,0,1303,1474,0,0,0,0,1309,1476,0,0,0,0,97,97,97,1481,97,97,97,97,97,97,1488,97,0,1474,0,1476,0,97,97,97,97,97,97,97,97,97,97,97,607,97,97,97,97,40976,18,36884,45078,26,30,90143,94242,0,102439,106538,98347,0,0,213080,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,143448,40976,18,18,36884,0,45078,0,24,24,24,27,27,27,27,0,0,0,0,97,97,97,97,1482,97,1483,97,97,97,97,97,97,1326,97,97,1329,1330,97,97,97,97,97,97,1159,1160,97,97,97,97,97,97,97,97,590,97,97,97,97,97,97,97,0,94242,0,0,0,2211974,102439,0,0,106538,98347,0,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2474122,2158730,2158730,2494602,2158730,2158730,2158730,2809994,2158730,2158730,2842762,2158730,2158730,2158730,2900106,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3014794,2158730,2158730,3051658,2158730,2158730,3100810,2158730,2158730,2158730,2158730,3096714,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2207744,2207744,2207744,2207744,2207744,2572288,2207744,2207744,2207744,2207744,541,541,543,543,0,0,2166784,0,548,549,549,0,286,2158877,2158877,2158877,2863389,2892061,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3186973,2158877,0,0,0,0,0,0,0,0,2367626,2158877,2404637,2412829,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2564381,2158877,2158877,2605341,2158877,2158877,2158877,2158877,2158877,2158877,2679069,2158877,2695453,2158877,2703645,2158877,2711837,2752797,2158877,0,2158877,2158877,2158877,2384010,2158730,2158730,2158730,2158730,3006602,2383872,2207744,2207744,2207744,2207744,2207744,2207744,3096576,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,0,0,2158877,2785565,2158877,2810141,2158877,2158877,2842909,2158877,2158877,2158877,2900253,2158877,2158877,2158877,2158877,2158877,2531613,2158877,2158877,2158877,2158877,2158877,2617629,2158877,2158877,2158877,2158877,2158730,2818186,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3105053,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,0,0,0,0,0,97,97,97,1611,97,97,97,97,97,97,97,1496,97,97,1499,97,97,97,97,97,2441354,2445450,2158730,2158730,2158730,2158730,2158730,2158730,2502794,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2433162,2158730,2453642,2461834,2158730,2158730,2158730,2158730,2158730,2158730,2580618,2158730,2158730,2158730,2158730,2621578,2158730,2158730,2158730,2158730,2158730,2158730,2699402,2158730,2158730,2158730,2158730,2678922,2158730,2695306,2158730,2703498,2158730,2711690,2752650,2158730,2158730,2785418,2158730,2158730,2158730,3113098,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3186826,2158730,2207744,2207744,2207744,2207744,2781184,2793472,2207744,2818048,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,541,0,543,2158877,2502941,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2580765,2158877,2158877,2158877,2158877,2621725,2158877,3019037,2158877,3043613,2158877,2158877,2158877,2158877,3080477,2158877,2158877,3113245,2158877,2158877,2158877,2158877,0,2158877,2908445,2158877,2158877,2158877,2978077,2158877,2158877,2158877,2158877,3039517,2158877,2158730,2510986,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2584714,2158730,2609290,2158730,2158730,2629770,2158730,2158730,2158730,2388106,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2605194,2158730,2158730,2158730,2158730,2687114,2158730,2715786,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2867338,2158730,2904202,2158730,2158730,2158730,2642058,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2781322,2793610,2158730,3121290,2158730,2158730,2158730,3149962,2158730,2158730,3170442,3174538,2158730,2367488,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2441216,2445312,2207744,2207744,2207744,2207744,2207744,2207744,2502656,2158877,2433309,2158877,2453789,2461981,2158877,2158877,2158877,2158877,2158877,2158877,2511133,2158877,2158877,2158877,2158877,2584861,2158877,2609437,2158877,2158877,2629917,2158877,2158877,2158877,2687261,2158877,2715933,2158877,2158730,2158730,2973834,2158730,2982026,2158730,2158730,3002506,2158730,3047562,3063946,3076234,2158730,2158730,2158730,2158730,2207744,2506752,2207744,2207744,2207744,2207744,2207744,2158877,2507037,0,0,2158877,2158730,2158730,2158730,3203210,2207744,2207744,2207744,2207744,2207744,2424832,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2564096,2207744,2207744,2207744,2707741,2732317,2158877,2158877,2158877,2822429,2826525,2158877,2896157,2158877,2158877,2924829,2158877,2158877,2973981,2158877,18,0,0,0,0,0,0,0,2211840,0,0,642,0,2158592,0,45,1529,45,45,45,45,45,45,45,45,45,45,45,45,45,1755,45,67,67,2982173,2158877,2158877,3002653,2158877,3047709,3064093,3076381,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3203357,2523274,2527370,2158730,2158730,2576522,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2908298,2494749,2158877,2158877,2158877,2523421,2527517,2158877,2158877,2576669,2158877,2158877,2158877,2158877,2158877,2158877,0,40976,0,18,18,4321280,2224253,2232448,4329472,2232448,2158730,2498698,2158730,2158730,2158730,2158730,2568330,2158730,2592906,2625674,2158730,2158730,2674826,2736266,2158730,2158730,2158730,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2158730,2912394,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3109002,2158730,2158730,3133578,3145866,3154058,2375680,2207744,3108864,2207744,2207744,3133440,3145728,3153920,2375965,2380061,2158877,2158877,2421021,2158877,2449693,2158877,2158877,2158877,3117341,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3104906,2158730,2158730,2158730,2158730,2158730,2158730,2158877,2498845,2158877,2158877,0,2158877,2158877,2568477,2158877,2593053,2625821,2158877,2158877,2674973,0,0,0,0,97,97,1480,97,97,97,97,97,1485,97,97,97,0,97,97,1729,97,1731,97,97,97,97,97,97,97,311,97,97,97,97,97,97,97,97,1520,97,97,1523,97,97,1526,97,2736413,2158877,2158877,0,2158877,2912541,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3109149,2158877,2158877,3014941,2158877,2158877,3051805,2158877,2158877,3100957,2158877,2158877,3121437,2158877,2158877,2158877,3150109,3133725,3146013,3154205,2158730,2408586,2416778,2158730,2465930,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3018890,2158730,3043466,2158730,2158730,2158730,2158730,3080330,2633866,2658442,2740362,2744458,2834570,2949258,2158730,2986122,2158730,2998410,2158730,2158730,2158730,3129482,2207744,2408448,2949120,2207744,2985984,2207744,2998272,2207744,2207744,2207744,3129344,2158877,2408733,2416925,2158877,2466077,2158877,2158877,3170589,3174685,2158877,0,0,0,2158730,2158730,2158730,2158730,2158730,2424970,2158730,2158730,2158730,2158730,2707594,2732170,2158730,2158730,2158730,2822282,2826378,2158730,2896010,2158730,2158730,2924682,2949405,2158877,2986269,2158877,2998557,2158877,2158877,2158877,3129629,2158730,2158730,2478218,2158730,2158730,2158730,2535562,2543754,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3117194,2207744,2207744,2478080,2207744,2207744,2207744,2207744,3014656,2207744,2207744,3051520,2207744,2207744,3100672,2207744,2207744,3121152,2207744,2207744,2207744,2207744,2207744,2584576,2207744,2609152,2207744,2207744,2629632,2207744,2207744,2207744,2686976,2207744,2207744,2535424,2543616,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3117056,2158877,2158877,2478365,0,2158877,2158877,2158877,2158877,2158877,2158877,2158730,2158730,2482314,2158730,2158730,2158730,2158730,2158730,2158730,2207744,2207744,2207744,2387968,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,823,0,825,2158730,2158730,2158730,2990218,2158730,2158730,2207744,2207744,2482176,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,135,0,2207744,2207744,2990080,2207744,2207744,2158877,2158877,2482461,2158877,2158877,0,0,0,2158877,2158877,2158877,2158877,2158877,2158730,2429066,2158730,2515082,2158730,2588810,2158730,2838666,2158730,2158730,2158730,3010698,2207744,2428928,2207744,2514944,2207744,2588672,2207744,2838528,2207744,2207744,2207744,3010560,2158877,2429213,2158877,2515229,0,0,2158877,2588957,2158877,0,2838813,2158877,2158877,2158877,3010845,2158730,2506890,2158730,2158730,2158730,2748554,2756746,2777226,2801802,2158730,2158730,2158730,2863242,2891914,2158730,2158730,2158730,2158730,2158730,2158730,2564234,2158730,2158730,2158730,2158730,2158730,2597002,2158730,2158730,2158730,3006464,2384157,0,0,2158877,2158877,2158877,2158877,3006749,2158730,2637962,2953354,2158730,2207744,2637824,2953216,2207744,0,0,2158877,2638109,2953501,2158877,2539658,2158730,2539520,2207744,0,0,2539805,2158877,2158730,2158730,2158730,2977930,2158730,2158730,2158730,2158730,3039370,2158730,2158730,2158730,2158730,2158730,2158730,3158154,2207744,0,2158877,2158730,2207744,0,2158877,2158730,2207744,0,2158877,2965642,2965504,2965789,0,0,0,0,1315,0,0,0,0,97,97,97,97,97,97,97,1484,97,97,97,97,2158592,18,0,122880,0,0,0,77824,0,2211840,0,0,0,0,2158592,0,356,0,0,0,0,0,0,28809,0,139,45,45,45,45,45,45,1751,45,45,45,45,45,45,45,67,67,1427,67,67,67,67,67,1432,67,67,67,3104768,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,122880,0,0,0,0,1315,0,0,0,0,97,97,97,97,97,97,1322,550,0,286,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,24,4329472,27,27,2207744,2207744,2977792,2207744,2207744,2207744,2207744,3039232,2207744,2207744,2207744,2207744,2207744,2207744,3158016,542,0,0,0,542,0,544,0,0,0,544,0,550,0,0,0,0,0,97,97,1610,97,97,97,97,97,97,97,97,898,97,97,97,97,97,97,97,0,94242,0,0,0,2211840,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,2158592,2158592,2158592,40976,18,36884,45078,24,27,90143,94242,237568,102439,106538,98347,0,0,20480,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,192512,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,94,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,96,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,12378,40976,18,18,36884,0,45078,0,24,24,24,126,126,126,126,90143,0,0,2170880,0,0,0,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,20480,40976,0,18,18,24,24,27,27,27,40976,18,36884,45078,24,27,90143,94242,241664,102439,106538,98347,0,0,20568,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,200797,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,20480,40976,18,36884,45078,24,27,90143,94242,0,0,0,44,0,0,20575,40976,18,36884,45078,24,27,90143,94242,0,41,41,41,0,0,1126400,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,0,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,89,40976,18,18,36884,0,45078,0,24,24,24,27,131201,27,27,90143,0,0,2170880,0,0,550,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2441216,2445312,2158592,2158592,2158592,2158592,2158592,0,94242,0,0,208896,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,0,0,0,0,0,0,0,2367488,32768,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2433024,2158592,2453504,2461696,2158592,2158592,2158592,2158592,2158592,2158592,2510848,2158592,2158592,2158592,2158592,40976,18,36884,245783,24,27,90143,94242,0,102439,106538,98347,0,0,20480,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,221184,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,180224,40976,18,18,36884,155648,45078,0,24,24,217088,27,27,27,217088,90143,0,0,2170880,0,0,828,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2207744,2207744,2387968,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,233472,0,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,45,45,718,45,45,45,45,45,45,45,45,45,727,131427,0,0,0,0,362,0,365,28809,367,139,45,45,45,45,45,45,1808,45,45,45,45,67,67,67,67,67,67,67,97,97,0,0,97,67,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,97,97,0,0,97,97,97,97,97,97,1787,0,97,97,0,97,97,97,45,45,45,45,2029,45,67,67,67,67,2033,57889,0,0,54074,54074,550,0,97,97,97,97,97,97,97,97,97,45,1798,45,45,1800,45,45,0,1472,0,0,0,0,0,1474,0,0,0,0,0,1476,0,0,0,0,1315,0,0,0,0,97,97,97,97,1320,97,97,0,0,97,97,97,97,1786,97,0,0,97,97,0,1790,1527,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,663,67,24850,24850,12564,12564,0,57889,281,0,0,53531,53531,367,286,97,97,0,0,97,97,97,1785,97,97,0,0,97,97,0,97,97,1979,97,97,45,45,1983,45,1984,45,45,45,45,45,652,45,45,45,45,45,45,45,45,45,45,690,45,45,694,45,45,40976,19,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,262144,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,46,67,98,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,45,67,97,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,258048,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,1122423,40976,18,36884,45078,24,27,90143,94242,0,1114152,1114152,1114152,0,0,1114112,40976,18,36884,45078,24,27,90143,94242,37,102439,106538,98347,0,0,204800,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,57436,40976,18,36884,45078,24,27,33,33,0,33,33,33,0,0,0,40976,18,18,36884,0,45078,0,124,124,124,127,127,127,127,90143,0,0,2170880,0,0,550,0,2158877,2158877,2158877,2388253,2158877,2158877,2158877,2158877,2158877,2781469,2793757,2158877,2818333,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2867485,2158877,2904349,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3096861,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2441501,2445597,2158877,2158877,2158877,2158877,2158877,40976,122,123,36884,0,45078,0,24,24,24,27,27,27,27,90143,0,921,29315,0,0,0,0,45,45,45,45,45,45,45,45,936,2158592,4243810,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,0,921,29315,0,0,0,0,45,45,45,45,45,45,45,935,45,45,45,715,45,45,45,45,45,45,45,723,45,45,45,45,45,1182,45,45,45,45,45,45,45,45,45,45,430,45,45,45,45,45,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,47,68,99,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,48,69,100,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,49,70,101,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,50,71,102,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,51,72,103,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,52,73,104,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,53,74,105,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,54,75,106,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,55,76,107,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,56,77,108,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,57,78,109,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,58,79,110,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,59,80,111,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,60,81,112,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,61,82,113,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,62,83,114,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,63,84,115,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,64,85,116,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,65,86,117,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,66,87,118,40976,18,36884,45078,24,27,90143,94242,118820,102439,106538,98347,118820,118820,118820,40976,18,18,0,0,45078,0,24,24,24,27,27,27,27,90143,0,0,1314,0,0,0,0,0,0,97,97,97,97,97,1321,97,18,131427,0,0,0,0,0,0,362,0,0,365,0,367,0,0,1315,0,97,97,97,97,97,97,97,97,97,97,97,97,97,1360,97,97,131,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,145,149,45,45,45,45,45,174,45,179,45,185,45,188,45,45,202,67,255,67,67,269,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,292,296,97,97,97,97,97,321,97,326,97,332,97,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,646,335,97,97,349,97,97,0,40976,0,18,18,24,24,27,27,27,437,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,523,67,67,67,67,67,67,67,67,67,67,67,67,511,67,67,67,97,97,97,620,97,97,97,97,97,97,97,97,97,97,97,97,97,1501,1502,97,793,67,67,796,67,67,67,67,67,67,67,67,67,67,808,67,0,0,97,97,97,97,45,45,67,67,0,0,97,97,2052,67,67,67,67,813,67,67,67,67,67,67,67,25398,542,13112,544,57889,0,0,54074,54074,550,830,97,97,97,97,97,97,97,97,97,315,97,97,97,97,97,97,841,97,97,97,97,97,97,97,97,97,854,97,97,97,97,97,97,589,97,97,97,97,97,97,97,97,97,867,97,97,97,97,97,97,97,891,97,97,894,97,97,97,97,97,97,97,97,97,97,906,45,937,45,45,940,45,45,45,45,45,45,948,45,45,45,45,45,734,735,67,737,67,738,67,740,67,67,67,45,967,45,45,45,45,45,45,45,45,45,45,45,45,45,45,435,45,45,45,980,45,45,45,45,45,45,45,45,45,45,45,45,45,415,45,45,67,67,1024,67,67,67,67,67,67,67,67,67,67,67,67,67,97,97,97,67,67,67,67,67,25398,1081,13112,1085,54074,1089,0,0,0,0,0,0,363,0,28809,0,139,45,45,45,45,45,45,1674,45,45,45,45,45,45,45,45,67,1913,67,1914,67,67,67,1918,67,67,97,97,97,97,1118,97,97,97,97,97,97,97,97,97,97,97,630,97,97,97,97,97,1169,97,97,97,97,97,0,921,0,1175,0,0,0,0,45,45,45,45,45,45,1534,45,45,45,45,45,1538,45,45,45,45,1233,45,45,45,45,45,45,67,67,67,67,67,67,67,67,742,67,45,45,1191,45,45,45,45,45,45,45,45,45,45,45,45,45,454,67,67,67,67,1243,67,67,67,67,67,67,67,67,67,67,67,1251,67,0,0,97,97,97,97,45,45,67,67,2050,0,97,97,45,45,45,732,45,45,67,67,67,67,67,67,67,67,67,67,67,67,97,97,67,67,67,1284,67,67,67,67,67,67,67,67,67,67,67,67,772,67,67,67,1293,67,67,67,67,67,67,0,0,0,0,0,0,0,0,0,0,368,2158592,2158592,2158592,2404352,2412544,1323,97,97,97,97,97,97,97,97,97,97,97,1331,97,97,97,0,97,97,97,97,97,97,97,97,97,97,97,1737,97,1364,97,97,97,97,97,97,97,97,97,97,97,97,1373,97,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,647,45,45,1387,45,45,1391,45,45,45,45,45,45,45,45,45,45,410,45,45,45,45,45,1400,45,45,45,45,45,45,45,45,45,45,1407,45,45,45,45,45,941,45,943,45,45,45,45,45,45,951,45,67,1438,67,67,67,67,67,67,67,67,67,67,1447,67,67,67,67,67,67,782,67,67,67,67,67,67,67,67,67,756,67,67,67,67,67,67,97,1491,97,97,97,97,97,97,97,97,97,97,1500,97,97,97,0,97,97,97,97,97,97,97,97,97,97,1736,97,45,45,1541,45,45,45,45,45,45,45,45,45,45,45,45,45,677,45,45,67,1581,67,67,67,67,67,67,67,67,67,67,67,67,67,67,791,792,67,67,67,67,1598,67,1600,67,67,67,67,67,67,67,67,1472,97,97,97,1727,97,97,97,97,97,97,97,97,97,97,97,97,97,1513,97,97,67,67,97,1879,97,1881,97,0,1884,0,97,97,97,97,0,0,97,97,97,97,97,0,0,0,1842,97,97,67,67,67,67,67,97,97,97,97,1928,0,0,0,97,97,97,97,97,97,45,45,45,45,45,1903,45,45,45,67,67,67,67,97,97,97,97,1971,0,0,97,97,97,97,0,97,97,97,97,97,97,97,97,97,0,0,0,45,45,45,1381,45,45,45,45,1976,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,45,45,1747,809,67,67,67,67,67,67,67,67,67,67,67,25398,542,13112,544,97,907,97,97,97,97,97,97,97,97,97,97,97,638,0,0,0,0,1478,97,97,97,97,97,97,97,97,97,97,97,1150,97,97,97,97,67,67,67,67,1244,67,67,67,67,67,67,67,67,67,67,67,477,67,67,67,67,67,67,1294,67,67,67,67,0,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1324,97,97,97,97,97,97,97,97,97,97,97,97,97,0,0,0,1374,97,97,97,97,0,1175,0,45,45,45,45,45,45,45,45,945,45,45,45,45,45,45,45,45,1908,45,45,1910,45,67,67,67,67,67,67,67,67,1919,67,0,0,97,97,97,97,45,2048,67,2049,0,0,97,2051,45,45,45,939,45,45,45,45,45,45,45,45,45,45,45,45,397,45,45,45,1921,67,67,1923,67,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,1947,45,1935,0,0,0,97,1939,97,97,1941,97,45,45,45,45,45,45,382,389,45,45,45,45,45,45,45,45,1810,45,45,1812,67,67,67,67,67,256,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,336,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,0,0,362,0,365,28809,367,139,45,45,371,373,45,45,45,955,45,45,45,45,45,45,45,45,45,45,45,45,413,45,45,45,457,459,67,67,67,67,67,67,67,67,473,67,478,67,67,482,67,67,485,67,67,67,67,67,67,67,67,67,67,67,67,67,97,1828,97,554,556,97,97,97,97,97,97,97,97,570,97,575,97,97,579,97,97,582,97,97,97,97,97,97,97,97,97,97,97,97,97,330,97,97,67,746,67,67,67,67,67,67,67,67,67,758,67,67,67,67,67,67,67,1575,67,67,67,67,67,67,67,67,493,67,67,67,67,67,67,67,97,97,844,97,97,97,97,97,97,97,97,97,856,97,97,97,0,97,97,97,97,97,97,97,97,1735,97,97,97,0,97,97,97,97,97,97,97,1642,97,1644,97,97,890,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,0,67,67,67,67,1065,1066,67,67,67,67,67,67,67,67,67,67,532,67,67,67,67,67,67,67,1451,67,67,67,67,67,67,67,67,67,67,67,67,67,496,67,67,97,97,1505,97,97,97,97,97,97,97,97,97,97,97,97,97,593,97,97,0,1474,0,1476,0,97,97,97,97,97,97,97,97,97,97,1617,97,97,1635,0,1637,97,97,97,97,97,97,97,97,97,97,97,885,97,97,97,97,67,67,1704,67,67,67,67,97,97,97,97,97,97,97,97,97,565,572,97,97,97,97,97,97,97,97,1832,0,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,1946,45,45,67,67,67,67,67,97,1926,97,1927,97,0,0,0,97,97,1934,2043,0,0,97,97,97,2047,45,45,67,67,0,1832,97,97,45,45,45,981,45,45,45,45,45,45,45,45,45,45,45,45,1227,45,45,45,131427,0,0,0,0,362,0,365,28809,367,139,45,45,372,45,45,45,45,1661,1662,45,45,45,45,45,1666,45,45,45,45,45,1673,45,1675,45,45,45,45,45,45,45,67,1426,67,67,67,67,67,67,67,67,67,67,1275,67,67,67,67,67,45,418,45,45,420,45,45,423,45,45,45,45,45,45,45,45,959,45,45,962,45,45,45,45,458,67,67,67,67,67,67,67,67,67,67,67,67,67,67,483,67,67,67,67,504,67,67,506,67,67,509,67,67,67,67,67,67,67,528,67,67,67,67,67,67,67,67,1287,67,67,67,67,67,67,67,555,97,97,97,97,97,97,97,97,97,97,97,97,97,97,580,97,97,97,97,601,97,97,603,97,97,606,97,97,97,97,97,97,848,97,97,97,97,97,97,97,97,97,1498,97,97,97,97,97,97,45,45,714,45,45,45,45,45,45,45,45,45,45,45,45,45,989,990,45,67,67,67,67,67,1011,67,67,67,67,1015,67,67,67,67,67,67,67,753,67,67,67,67,67,67,67,67,467,67,67,67,67,67,67,67,45,45,1179,45,45,45,45,45,45,45,45,45,45,45,45,45,1003,1004,67,1217,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,728,67,1461,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1034,67,97,1516,97,97,97,97,97,97,97,97,97,97,97,97,97,97,871,97,67,67,67,1705,67,67,67,97,97,97,97,97,97,97,97,97,567,97,97,97,97,97,97,97,97,97,97,1715,97,97,97,97,97,97,97,97,97,0,0,0,45,45,1380,45,45,45,45,45,67,67,97,97,97,97,97,0,0,0,97,1887,97,97,0,0,97,97,97,0,97,97,97,97,97,2006,45,45,1907,45,45,45,45,45,67,67,67,67,67,67,67,67,67,1920,67,97,0,2035,97,97,97,97,97,45,45,45,45,67,67,67,1428,67,67,67,67,67,67,1435,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,146,45,152,45,45,165,45,175,45,180,45,45,187,190,195,45,203,254,257,262,67,270,67,67,0,24850,12564,0,0,0,281,28809,53531,97,97,97,293,97,299,97,97,312,97,322,97,327,97,97,334,337,342,97,350,97,97,0,40976,0,18,18,24,24,27,27,27,67,484,67,67,67,67,67,67,67,67,67,67,67,67,67,499,97,581,97,97,97,97,97,97,97,97,97,97,97,97,97,596,648,45,650,45,651,45,653,45,45,45,657,45,45,45,45,45,45,1954,67,67,67,1958,67,67,67,67,67,67,67,768,67,67,67,67,67,67,67,67,769,67,67,67,67,67,67,67,680,45,45,45,45,45,45,45,45,688,689,691,45,45,45,45,45,983,45,45,45,45,45,45,45,45,45,45,947,45,45,45,45,952,45,45,698,699,45,45,702,703,45,45,45,45,45,45,45,711,744,67,67,67,67,67,67,67,67,67,757,67,67,67,67,761,67,67,67,67,765,67,767,67,67,67,67,67,67,67,67,775,776,778,67,67,67,67,67,67,785,786,67,67,789,790,67,67,67,67,67,67,1442,67,67,67,67,67,67,67,67,67,97,97,97,1775,97,97,97,67,67,67,67,67,798,67,67,67,802,67,67,67,67,67,67,67,67,1465,67,67,1468,67,67,1471,67,67,810,67,67,67,67,67,67,67,67,67,821,25398,542,13112,544,57889,0,0,54074,54074,550,0,833,97,835,97,836,97,838,97,97,0,0,97,97,97,2002,97,97,97,97,97,45,45,45,45,45,1740,45,45,45,1744,45,45,45,97,842,97,97,97,97,97,97,97,97,97,855,97,97,97,97,0,1717,1718,97,97,97,97,97,1722,97,0,0,859,97,97,97,97,863,97,865,97,97,97,97,97,97,97,97,604,97,97,97,97,97,97,97,873,874,876,97,97,97,97,97,97,883,884,97,97,887,888,97,18,131427,0,0,0,0,0,0,362,225280,0,365,0,367,0,45,45,45,1531,45,45,45,45,45,45,45,45,45,45,45,1199,45,45,45,45,45,97,97,908,97,97,97,97,97,97,97,97,97,919,638,0,0,0,0,2158877,2158877,2158877,2158877,2158877,2425117,2158877,2158877,2158877,2158877,2158877,2158877,2597149,2158877,2158877,2158877,2158877,2158877,2158877,2642205,2158877,2158877,2158877,2158877,2158877,3158301,0,2375818,2379914,2158730,2158730,2420874,2158730,2449546,2158730,2158730,953,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,965,978,45,45,45,45,45,45,985,45,45,45,45,45,45,45,45,971,45,45,45,45,45,45,45,67,67,67,67,67,1027,67,1029,67,67,67,67,67,67,67,67,67,1455,67,67,67,67,67,67,67,1077,1078,67,67,25398,0,13112,0,54074,0,0,0,0,0,0,0,0,366,0,139,2158730,2158730,2158730,2404490,2412682,1113,97,97,97,97,97,97,1121,97,1123,97,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1540,1155,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,615,1168,97,97,1171,1172,97,97,0,921,0,1175,0,0,0,0,45,45,45,45,45,1533,45,45,45,45,45,45,45,45,45,1663,45,45,45,45,45,45,45,45,45,183,45,45,45,45,201,45,45,45,1219,45,45,45,45,45,45,45,1226,45,45,45,45,45,168,45,45,45,45,45,45,45,45,45,45,427,45,45,45,45,45,45,45,1231,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,1242,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1046,67,67,1254,67,1256,67,67,67,67,67,67,67,67,67,67,67,67,806,807,67,67,97,1336,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1111,97,97,97,97,97,1351,97,97,97,1354,97,97,97,1359,97,97,97,0,97,97,97,97,1640,97,97,97,97,97,97,97,897,97,97,97,902,97,97,97,97,97,97,97,97,1366,97,97,97,97,97,97,97,1371,97,97,97,0,97,97,97,1730,97,97,97,97,97,97,97,97,915,97,97,97,97,0,360,0,67,67,67,1440,67,67,67,67,67,67,67,67,67,67,67,67,1017,67,1019,67,67,67,67,67,1453,67,67,67,67,67,67,67,67,67,67,1459,97,97,97,1493,97,97,97,97,97,97,97,97,97,97,97,97,97,1525,97,97,97,97,97,97,1507,97,97,97,97,97,97,97,97,97,97,1514,67,67,67,67,1584,67,67,67,67,67,1590,67,67,67,67,67,67,67,783,67,67,67,788,67,67,67,67,67,67,67,67,67,1599,1601,67,67,67,1604,67,1606,1607,67,1472,0,1474,0,1476,0,97,97,97,97,97,97,1614,97,97,97,97,45,45,1850,45,45,45,45,1855,45,45,45,45,45,1222,45,45,45,45,45,45,45,45,45,1229,97,1618,97,97,97,97,97,97,97,1625,97,97,97,97,97,0,1175,0,45,45,45,45,45,45,45,45,447,45,45,45,45,45,67,67,1633,97,97,0,97,97,97,97,97,97,97,97,1643,1645,97,97,0,0,97,97,1784,97,97,97,0,0,97,97,0,97,1894,1895,97,1897,97,45,45,45,45,45,45,45,45,45,656,45,45,45,45,45,45,97,1648,97,1650,1651,97,0,45,45,45,1654,45,45,45,45,45,169,45,45,45,45,45,45,45,45,45,45,658,45,45,45,45,664,45,45,1659,45,45,45,45,45,45,45,45,45,45,45,45,45,1187,45,45,1669,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,1005,67,67,1681,67,67,67,67,67,67,67,1686,67,67,67,67,67,67,67,784,67,67,67,67,67,67,67,67,1055,67,67,67,67,1060,67,67,97,97,1713,97,0,97,97,97,97,97,97,97,97,97,0,0,0,1378,45,45,45,45,45,45,45,408,45,45,45,45,45,45,45,45,1547,45,1549,45,45,45,45,45,97,97,1780,0,97,97,97,97,97,97,0,0,97,97,0,97,97,97,45,45,2027,2028,45,45,67,67,2031,2032,67,45,45,1804,45,45,45,45,45,45,45,45,67,67,67,67,67,67,1917,67,67,67,67,67,67,67,1819,67,67,67,67,67,67,67,67,97,97,97,1708,97,97,97,97,97,45,45,1862,67,67,67,67,67,67,67,67,67,67,67,67,67,497,67,67,67,1877,97,97,97,97,97,0,0,0,97,97,97,97,0,0,97,97,97,97,97,1839,0,0,97,97,97,97,1936,0,0,97,97,97,97,97,97,1943,1944,1945,45,45,45,45,670,45,45,45,45,674,45,45,45,45,678,45,1948,45,1950,45,45,45,45,1955,1956,1957,67,67,67,1960,67,1962,67,67,67,67,1967,1968,1969,97,0,0,0,97,97,1974,97,0,1936,0,97,97,97,97,97,97,45,45,45,45,45,45,45,45,1906,0,1977,97,97,97,97,45,45,45,45,45,45,45,45,45,45,45,1746,45,45,45,45,2011,67,67,2013,67,67,67,2017,97,97,0,0,2021,97,8192,97,97,2025,45,45,45,45,45,45,67,67,67,67,67,1916,67,67,67,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,140,45,45,45,1180,45,45,45,45,1184,45,45,45,45,45,45,45,387,45,392,45,45,396,45,45,399,45,45,67,207,67,67,67,67,67,67,236,67,67,67,67,67,67,67,800,67,67,67,67,67,67,67,67,67,1603,67,67,67,67,67,0,97,97,287,97,97,97,97,97,97,316,97,97,97,97,97,97,0,45,45,45,45,45,45,45,1656,1657,45,376,45,45,45,45,45,388,45,45,45,45,45,45,45,45,1406,45,45,45,45,45,45,45,67,67,67,67,462,67,67,67,67,67,474,67,67,67,67,67,67,67,817,67,67,67,67,25398,542,13112,544,97,97,97,97,559,97,97,97,97,97,571,97,97,97,97,97,97,896,97,97,97,900,97,97,97,97,97,97,912,914,97,97,97,97,97,0,0,0,45,45,45,45,45,45,45,45,391,45,45,45,45,45,45,45,45,713,45,45,45,45,45,45,45,45,45,45,45,45,45,45,662,45,1140,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,636,67,67,1283,67,67,67,67,67,67,67,67,67,67,67,67,67,513,67,67,1363,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,889,97,97,97,1714,0,97,97,97,97,97,97,97,97,97,0,0,926,45,45,45,45,45,45,45,45,672,45,45,45,45,45,45,45,45,686,45,45,45,45,45,45,45,45,944,45,45,45,45,45,45,45,45,1676,45,45,45,45,45,45,67,97,97,97,1833,0,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,1902,45,45,45,45,45,957,45,45,45,45,961,45,963,45,45,45,67,97,2034,0,97,97,97,97,97,2040,45,45,45,2042,67,67,67,67,67,67,1574,67,67,67,67,67,1578,67,67,67,67,67,67,799,67,67,67,804,67,67,67,67,67,67,67,1298,0,0,0,1304,0,0,0,1310,132,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,45,45,1414,45,45,45,45,45,45,45,45,45,45,428,45,45,45,45,45,57889,0,0,54074,54074,550,831,97,97,97,97,97,97,97,97,97,568,97,97,97,97,578,97,45,45,968,45,45,45,45,45,45,45,45,45,45,45,45,45,1228,45,45,67,67,67,67,67,25398,1082,13112,1086,54074,1090,0,0,0,0,0,0,364,0,0,0,139,2158592,2158592,2158592,2404352,2412544,67,67,67,67,1464,67,67,67,67,67,67,67,67,67,67,67,510,67,67,67,67,97,97,97,97,1519,97,97,97,97,97,97,97,97,97,97,97,918,97,0,0,0,0,1528,45,45,45,45,45,45,45,45,45,45,45,45,45,45,976,45,1554,45,45,45,45,45,45,45,45,1562,45,45,1565,45,45,45,45,683,45,45,45,687,45,45,692,45,45,45,45,45,1953,45,67,67,67,67,67,67,67,67,67,1014,67,67,67,67,67,67,1568,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,0,67,67,67,67,67,1585,67,67,67,67,67,67,67,67,67,1594,97,97,1649,97,97,97,0,45,45,1653,45,45,45,45,45,45,383,45,45,45,45,45,45,45,45,45,986,45,45,45,45,45,45,45,45,1670,45,1672,45,45,45,45,45,45,45,45,45,45,67,736,67,67,67,67,67,741,67,67,67,1680,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1074,67,67,67,1692,67,67,67,67,67,67,67,1697,67,1699,67,67,67,67,67,67,1012,67,67,67,67,67,67,67,67,67,468,475,67,67,67,67,67,67,1769,67,67,67,67,67,67,67,97,97,97,97,97,97,97,624,97,97,97,97,97,97,634,97,97,1792,97,97,97,97,97,97,97,45,45,45,45,45,45,45,958,45,45,45,45,45,45,964,45,150,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,977,204,45,67,67,67,217,67,67,67,67,67,67,67,67,67,67,787,67,67,67,67,67,67,67,67,67,67,271,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,97,351,97,0,40976,0,18,18,24,24,27,27,27,45,45,938,45,45,45,45,45,45,45,45,45,45,45,45,45,1398,45,45,45,153,45,161,45,45,45,45,45,45,45,45,45,45,45,45,660,661,45,45,205,45,67,67,67,67,220,67,228,67,67,67,67,67,67,67,0,0,0,0,0,280,94,0,0,67,67,67,67,67,272,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,97,352,97,0,40976,0,18,18,24,24,27,27,27,45,439,45,45,45,45,45,445,45,45,45,452,45,45,67,67,212,216,67,67,67,67,67,241,67,246,67,252,67,67,486,67,67,67,67,67,67,67,494,67,67,67,67,67,67,67,1245,67,67,67,67,67,67,67,67,1013,67,67,1016,67,67,67,67,67,521,67,67,525,67,67,67,67,67,531,67,67,67,538,67,0,0,2046,97,97,97,45,45,67,67,0,0,97,97,45,45,45,1192,45,45,45,45,45,45,45,45,45,45,45,45,1418,45,45,1421,97,97,583,97,97,97,97,97,97,97,591,97,97,97,97,97,97,913,97,97,97,97,97,97,0,0,0,45,45,45,45,45,45,45,1384,97,618,97,97,622,97,97,97,97,97,628,97,97,97,635,97,18,131427,0,0,0,639,0,132,362,0,0,365,29315,367,0,921,29315,0,0,0,0,45,45,45,45,932,45,45,45,45,45,1544,45,45,45,45,45,1550,45,45,45,45,45,1194,45,1196,45,45,45,45,45,45,45,45,999,45,45,45,45,45,67,67,45,45,667,45,45,45,45,45,45,45,45,45,45,45,45,45,1408,45,45,45,696,45,45,45,701,45,45,45,45,45,45,45,45,710,45,45,45,1220,45,45,45,45,45,45,45,45,45,45,45,45,194,45,45,45,729,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,797,67,67,67,67,67,67,805,67,67,67,67,67,67,67,1587,67,1589,67,67,67,67,67,67,67,67,1763,67,67,67,67,67,67,67,0,0,0,0,0,0,2162968,0,0,67,67,67,67,67,814,816,67,67,67,67,67,25398,542,13112,544,67,67,1008,67,67,67,67,67,67,67,67,67,67,67,1020,67,0,97,45,67,0,97,45,67,0,97,45,67,97,0,0,97,97,97,97,97,45,45,45,45,67,67,67,67,1429,67,1430,67,67,67,67,67,1062,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,518,1076,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,0,0,0,0,28809,0,139,45,45,45,45,45,97,97,97,97,1102,97,97,97,97,97,97,97,97,97,97,97,1124,97,1126,97,97,1114,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1112,97,97,1156,97,97,97,97,97,97,97,97,97,97,97,97,97,594,97,97,97,97,1170,97,97,97,97,0,921,0,0,0,0,0,0,45,45,45,45,1532,45,45,45,45,1536,45,45,45,45,45,172,45,45,45,45,45,45,45,45,45,45,706,45,45,709,45,45,1177,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1202,45,1204,45,45,45,45,45,45,45,45,45,45,45,45,1215,45,45,45,1232,45,45,45,45,45,45,45,67,1237,67,67,67,67,67,67,1053,1054,67,67,67,67,67,67,1061,67,67,1282,67,67,67,67,67,67,67,67,67,1289,67,67,67,1292,97,97,97,97,1339,97,97,97,97,97,97,1344,97,97,97,97,45,1849,45,1851,45,45,45,45,45,45,45,45,721,45,45,45,45,45,726,45,1385,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1188,45,45,1401,1402,45,45,45,45,1405,45,45,45,45,45,45,45,45,1752,45,45,45,45,45,67,67,1410,45,45,45,1413,45,1415,45,45,45,45,45,45,1419,45,45,45,45,1806,45,45,45,45,45,45,67,67,67,67,67,67,67,97,97,2019,0,97,67,67,67,1452,67,67,67,67,67,67,67,67,1457,67,67,67,67,67,67,1259,67,67,67,67,67,67,1264,67,67,1460,67,1462,67,67,67,67,67,67,1466,67,67,67,67,67,67,67,67,1588,67,67,67,67,67,67,67,0,1300,0,0,0,1306,0,0,0,97,97,97,1506,97,97,97,97,97,97,97,97,1512,97,97,97,0,1728,97,97,97,97,97,97,97,97,97,97,97,901,97,97,97,97,1515,97,1517,97,97,97,97,97,97,1521,97,97,97,97,97,97,0,45,1652,45,45,45,1655,45,45,45,45,45,1542,45,45,45,45,45,45,45,45,45,45,45,45,45,1552,1553,45,45,45,1556,45,45,45,45,45,45,45,45,45,45,45,45,45,693,45,45,45,67,67,67,67,1572,67,67,67,67,1576,67,67,67,67,67,67,67,67,1602,67,67,1605,67,67,67,0,67,1582,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1580,67,67,1596,67,67,67,67,67,67,67,67,67,67,67,67,67,0,542,0,544,67,67,67,67,1759,67,67,67,67,67,67,67,67,67,67,67,533,67,67,67,67,67,67,67,1770,67,67,67,67,67,97,97,97,97,97,97,1777,97,97,97,1793,97,97,97,97,97,45,45,45,45,45,45,45,998,45,45,1001,1002,45,45,67,67,45,1861,45,67,67,67,67,67,67,67,67,1871,67,1873,1874,67,0,97,45,67,0,97,45,67,16384,97,45,67,97,0,0,0,1473,0,1082,0,0,0,1475,0,1086,0,0,0,1477,1876,67,97,97,97,97,97,1883,0,1885,97,97,97,1889,0,0,0,286,0,0,0,286,0,2367488,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,24,126,126,126,2053,0,2055,45,67,0,97,45,67,0,97,45,67,97,0,0,97,97,97,2039,97,45,45,45,45,67,67,67,67,67,226,67,67,67,67,67,67,67,67,1246,67,67,1249,1250,67,67,67,132,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,141,45,45,45,1403,45,45,45,45,45,45,45,45,45,45,45,45,1186,45,45,1189,45,45,155,45,45,45,45,45,45,45,45,45,191,45,45,45,45,700,45,45,45,45,45,45,45,45,45,45,45,1753,45,45,45,67,67,45,45,67,208,67,67,67,222,67,67,67,67,67,67,67,67,67,1764,67,67,67,67,67,67,67,258,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,288,97,97,97,302,97,97,97,97,97,97,97,97,97,627,97,97,97,97,97,97,338,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,0,0,362,0,365,28809,367,139,45,370,45,45,45,45,716,45,45,45,45,45,722,45,45,45,45,45,45,1912,67,67,67,67,67,67,67,67,67,819,67,67,25398,542,13112,544,45,403,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1409,45,67,67,67,67,489,67,67,67,67,67,67,67,67,67,67,67,771,67,67,67,67,520,67,67,67,67,67,67,67,67,67,67,67,534,67,67,67,67,67,67,1271,67,67,67,1274,67,67,67,1279,67,67,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,97,553,97,97,97,97,586,97,97,97,97,97,97,97,97,97,97,97,1138,97,97,97,97,617,97,97,97,97,97,97,97,97,97,97,97,631,97,97,97,0,1834,97,97,97,97,97,0,0,0,97,97,97,97,97,353,0,40976,0,18,18,24,24,27,27,27,45,45,668,45,45,45,45,45,45,45,45,45,45,45,45,45,724,45,45,45,45,45,682,45,45,45,45,45,45,45,45,45,45,45,45,45,949,45,45,45,67,67,747,748,67,67,67,67,755,67,67,67,67,67,67,67,0,0,0,1302,0,0,0,1308,0,67,794,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1701,67,97,97,97,845,846,97,97,97,97,853,97,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,97,97,892,97,97,97,97,97,97,97,97,97,97,97,97,97,610,97,97,45,992,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,1239,67,67,67,1063,67,67,67,67,67,1068,67,67,67,67,67,67,67,0,0,1301,0,0,0,1307,0,0,97,1141,97,97,97,97,97,97,97,97,97,97,97,1152,97,97,0,0,97,97,2001,0,97,2003,97,97,97,45,45,45,1739,45,45,45,1742,45,45,45,45,45,97,97,97,97,1157,97,97,97,97,97,1162,97,97,97,97,97,97,1145,97,97,97,97,97,1151,97,97,97,1253,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,539,45,1423,45,45,67,67,67,67,67,67,67,1431,67,67,67,67,67,67,67,1695,67,67,67,67,67,1700,67,1702,67,67,1439,67,67,67,67,67,67,67,67,67,67,67,67,67,514,67,67,97,97,1492,97,97,97,97,97,97,97,97,97,97,97,97,97,611,97,97,1703,67,67,67,67,67,67,97,97,97,97,97,97,97,97,97,852,97,97,97,97,97,97,45,1949,45,1951,45,45,45,67,67,67,67,67,67,67,1961,67,0,97,45,67,0,97,2060,2061,0,2062,45,67,97,0,0,2036,97,97,97,97,45,45,45,45,67,67,67,67,67,223,67,67,237,67,67,67,67,67,67,67,1272,67,67,67,67,67,67,67,67,507,67,67,67,67,67,67,67,1963,67,67,67,97,97,97,97,0,1972,0,97,97,97,1975,0,921,29315,0,0,0,0,45,45,45,931,45,45,45,45,45,407,45,45,45,45,45,45,45,45,45,417,45,45,1989,67,67,67,67,67,67,67,67,67,67,67,1996,97,18,131427,0,0,360,0,0,0,362,0,0,365,29315,367,0,921,29315,0,0,0,0,45,45,930,45,45,45,45,45,45,444,45,45,45,45,45,45,45,67,67,97,97,1998,0,97,97,97,0,97,97,97,97,97,45,45,45,45,45,45,1985,45,1986,45,45,45,156,45,45,170,45,45,45,45,45,45,45,45,45,45,675,45,45,45,45,679,131427,0,358,0,0,362,0,365,28809,367,139,45,45,45,45,45,381,45,45,45,45,45,45,45,45,45,400,45,45,419,45,45,45,45,45,45,45,45,45,45,45,45,436,67,67,67,67,67,505,67,67,67,67,67,67,67,67,67,67,820,67,25398,542,13112,544,67,67,522,67,67,67,67,67,529,67,67,67,67,67,67,67,0,1299,0,0,0,1305,0,0,0,97,97,619,97,97,97,97,97,626,97,97,97,97,97,97,97,1105,97,97,97,97,1109,97,97,97,67,67,67,67,749,67,67,67,67,67,67,67,67,67,760,67,0,97,45,67,2058,97,45,67,0,97,45,67,97,0,0,97,97,97,97,97,45,45,45,2041,67,67,67,67,67,780,67,67,67,67,67,67,67,67,67,67,67,67,67,516,67,67,97,97,97,878,97,97,97,97,97,97,97,97,97,97,97,97,97,1629,97,0,45,979,45,45,45,45,984,45,45,45,45,45,45,45,45,45,1198,45,45,45,45,45,45,67,1023,67,67,67,67,1028,67,67,67,67,67,67,67,67,67,470,67,67,67,67,67,67,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,1094,0,0,0,1092,1315,0,0,0,0,97,97,97,97,97,97,97,97,97,1486,97,1489,97,97,97,1117,97,97,97,97,1122,97,97,97,97,97,97,97,1146,97,97,97,97,97,97,97,97,881,97,97,97,886,97,97,97,1311,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,1615,97,97,97,97,97,1619,97,97,97,97,97,97,97,97,97,97,97,97,1631,97,97,1847,97,45,45,45,45,1852,45,45,45,45,45,45,45,1235,45,45,45,67,67,67,67,67,1868,67,67,67,1872,67,67,67,67,67,97,97,97,97,1882,0,0,0,97,97,97,97,0,1891,67,67,67,67,67,97,97,97,97,97,1929,0,0,97,97,97,97,97,97,45,1900,45,1901,45,45,45,1905,45,67,2054,97,45,67,0,97,45,67,0,97,45,67,97,0,0,97,2037,2038,97,97,45,45,45,45,67,67,67,67,1867,67,67,67,67,67,67,67,67,67,1774,97,97,97,97,97,97,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,142,45,45,45,1412,45,45,45,45,45,45,45,45,45,45,45,45,432,45,45,45,45,45,157,45,45,171,45,45,45,182,45,45,45,45,200,45,45,45,1543,45,45,45,45,45,45,45,45,1551,45,45,45,45,1181,45,45,45,45,45,45,45,45,45,45,45,1211,45,45,45,1214,45,45,45,67,209,67,67,67,224,67,67,238,67,67,67,249,67,0,97,2056,2057,0,2059,45,67,0,97,45,67,97,0,0,1937,97,97,97,97,97,97,45,45,45,45,45,45,1741,45,45,45,45,45,45,67,67,67,267,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,289,97,97,97,304,97,97,318,97,97,97,329,97,97,0,0,97,1783,97,97,97,97,0,0,97,97,0,97,97,97,45,2026,45,45,45,45,67,2030,67,67,67,67,67,67,1041,67,67,67,67,67,67,67,67,67,1044,67,67,67,67,67,67,97,97,347,97,97,97,0,40976,0,18,18,24,24,27,27,27,45,666,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1420,45,57889,0,0,54074,54074,550,0,97,97,97,97,97,97,97,97,840,67,1007,67,67,67,67,67,67,67,67,67,67,67,67,67,67,759,67,67,67,67,67,67,67,1052,67,67,67,67,67,67,67,67,67,67,1031,67,67,67,67,67,97,97,97,1101,97,97,97,97,97,97,97,97,97,97,97,97,592,97,97,97,1190,45,45,45,45,45,1195,45,1197,45,45,45,45,1201,45,45,45,45,1952,45,45,67,67,67,67,67,67,67,67,67,67,67,67,250,67,67,67,1255,67,1257,67,67,67,67,1261,67,67,67,67,67,67,67,67,1685,67,67,67,67,67,67,67,0,24851,12565,0,0,0,0,28809,53532,67,67,1267,67,67,67,67,67,67,1273,67,67,67,67,67,67,67,67,1696,67,67,67,67,67,67,67,0,0,0,0,0,0,2162688,0,0,1281,67,67,67,67,1285,67,67,67,67,67,67,67,67,67,67,1070,67,67,67,67,67,1335,97,1337,97,97,97,97,1341,97,97,97,97,97,97,97,97,882,97,97,97,97,97,97,97,1347,97,97,97,97,97,97,1353,97,97,97,97,97,97,1361,97,18,131427,0,638,0,0,0,0,362,0,0,365,29315,367,0,544,0,550,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2473984,2158592,2158592,2158592,2990080,2158592,2158592,2207744,2207744,2482176,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,0,53530,97,97,97,1365,97,97,97,97,97,97,97,97,97,97,97,97,608,97,97,97,45,45,1424,45,1425,67,67,67,67,67,67,67,67,67,67,67,1058,67,67,67,67,45,1555,45,45,1557,45,45,45,45,45,45,45,45,45,45,45,707,45,45,45,45,67,67,1570,67,67,67,67,67,67,67,67,67,67,67,67,67,773,67,67,1595,67,67,1597,67,67,67,67,67,67,67,67,67,67,67,0,0,0,0,0,0,0,0,0,0,139,2158592,2158592,2158592,2404352,2412544,97,97,97,1636,97,97,97,1639,97,97,1641,97,97,97,97,97,97,1173,0,921,0,0,0,0,0,0,45,67,67,67,1693,67,67,67,67,67,67,67,1698,67,67,67,67,67,67,67,1773,67,97,97,97,97,97,97,97,625,97,97,97,97,97,97,97,97,850,97,97,97,97,97,97,97,97,880,97,97,97,97,97,97,97,97,1106,97,97,97,97,97,97,97,1860,45,45,67,67,1865,67,67,67,67,1870,67,67,67,67,1875,67,67,97,97,1880,97,97,0,0,0,97,97,1888,97,0,0,0,1938,97,97,97,97,97,45,45,45,45,45,45,1854,45,45,45,45,45,45,45,1909,45,45,1911,67,67,67,67,67,67,67,67,67,67,1248,67,67,67,67,67,67,1922,67,67,1924,97,97,97,97,97,0,0,0,97,97,97,97,97,1898,45,45,45,45,45,45,1904,45,45,67,67,67,67,97,97,97,97,0,0,16384,97,97,97,97,0,97,97,97,97,97,97,97,97,97,0,1724,2008,2009,45,45,67,67,67,2014,2015,67,67,97,97,0,0,97,97,97,0,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,45,45,45,2022,0,2023,97,97,45,45,45,45,45,45,67,67,67,67,67,67,1869,67,67,67,67,67,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,147,151,154,45,162,45,45,176,178,181,45,45,45,192,196,45,45,45,45,2012,67,67,67,67,67,67,2018,97,0,0,97,1978,97,97,97,1982,45,45,45,45,45,45,45,45,45,972,973,45,45,45,45,45,67,259,263,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,294,298,301,97,309,97,97,323,325,328,97,97,97,97,97,560,97,97,97,569,97,97,97,97,97,97,306,97,97,97,97,97,97,97,97,97,1624,97,97,97,97,97,97,97,0,921,0,1175,0,0,0,0,45,339,343,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,67,67,503,67,67,67,67,67,67,67,67,67,512,67,67,519,97,97,600,97,97,97,97,97,97,97,97,97,609,97,97,616,45,649,45,45,45,45,45,654,45,45,45,45,45,45,45,45,1393,45,45,45,45,45,45,45,45,1209,45,45,45,45,45,45,45,67,763,67,67,67,67,67,67,67,67,770,67,67,67,774,67,0,2045,97,97,97,97,45,45,67,67,0,0,97,97,45,45,45,994,45,45,45,45,45,45,45,45,45,45,67,67,213,67,219,67,67,232,67,242,67,247,67,67,67,779,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1018,67,67,67,67,811,67,67,67,67,67,67,67,67,67,25398,542,13112,544,57889,0,0,54074,54074,550,0,97,834,97,97,97,97,97,839,97,18,131427,0,638,0,0,0,0,362,0,0,365,29315,367,645,97,97,861,97,97,97,97,97,97,97,97,868,97,97,97,872,97,97,877,97,97,97,97,97,97,97,97,97,97,97,97,97,613,97,97,97,97,97,909,97,97,97,97,97,97,97,97,97,0,0,0,18,18,24,24,27,27,27,1036,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1047,67,67,67,1050,67,67,67,67,67,67,67,67,67,67,67,67,1033,67,67,67,97,97,1130,97,97,97,97,97,97,97,97,97,97,97,97,97,638,0,0,67,67,67,1295,67,67,67,0,0,0,0,0,0,0,0,0,97,1317,97,97,97,97,97,97,1375,97,97,97,0,0,0,45,1379,45,45,45,45,45,45,422,45,45,45,429,431,45,45,45,45,0,1090,0,0,97,1479,97,97,97,97,97,97,97,97,97,97,1357,97,97,97,97,97,97,97,97,97,1716,97,97,97,97,97,97,97,97,97,1723,0,921,29315,0,0,0,0,45,929,45,45,45,45,45,45,45,1392,45,45,45,45,45,45,45,45,45,960,45,45,45,45,45,45,97,97,97,1738,45,45,45,45,45,45,45,1743,45,45,45,45,166,45,45,45,45,184,186,45,45,197,45,45,97,1779,0,0,97,97,97,97,97,97,0,0,97,97,0,97,18,131427,0,638,0,0,0,0,362,0,640,365,29315,367,0,921,29315,0,0,0,0,45,45,45,45,45,45,45,45,45,45,1537,45,45,45,45,45,1803,45,45,45,45,45,1809,45,45,45,67,67,67,1814,67,67,67,67,67,67,1821,67,67,67,67,67,67,97,97,97,97,97,0,0,0,97,97,97,97,0,0,67,67,67,1818,67,67,67,67,67,1824,67,67,67,97,97,97,97,97,0,0,0,97,97,97,97,1890,0,1829,97,97,0,0,97,97,1836,97,97,0,0,0,97,97,97,97,1981,45,45,45,45,45,45,45,45,45,1987,1845,97,97,97,45,45,45,45,45,1853,45,45,45,1857,45,45,45,67,1864,67,1866,67,67,67,67,67,67,67,67,67,97,97,97,97,97,97,97,1710,1711,67,67,97,97,97,97,97,0,0,0,1886,97,97,97,0,0,97,97,97,97,1838,0,0,0,97,1843,97,0,1893,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,1745,45,45,67,67,67,67,67,97,97,97,97,97,0,0,1931,97,97,97,97,97,588,97,97,97,97,97,97,97,97,97,97,629,97,97,97,97,97,67,2044,0,97,97,97,97,45,45,67,67,0,0,97,97,45,45,45,1660,45,45,45,45,45,45,45,45,45,45,45,45,453,45,455,67,67,67,67,268,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,348,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,359,0,0,362,0,365,28809,367,139,45,45,45,45,45,421,45,45,45,45,45,45,45,434,45,45,695,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1667,45,0,921,29315,0,925,0,0,45,45,45,45,45,45,45,45,45,1811,45,67,67,67,67,67,67,1037,67,1039,67,67,67,67,67,67,67,67,67,67,67,67,1277,67,67,67,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,1095,0,0,0,1096,97,97,97,97,97,97,97,97,97,97,97,97,869,97,97,97,97,97,97,1131,97,1133,97,97,97,97,97,97,97,97,97,97,1370,97,97,97,97,97,1312,0,0,0,0,1096,0,0,0,97,97,97,97,97,97,97,1327,97,97,97,97,97,1332,97,97,97,1830,97,0,0,97,97,97,97,97,0,0,0,97,97,97,1896,97,97,45,45,45,45,45,45,45,45,45,1548,45,45,45,45,45,45,133,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,45,380,45,45,45,45,45,45,45,45,45,45,401,45,45,158,45,45,45,45,45,45,45,45,45,45,45,45,45,1200,45,45,45,45,206,67,67,67,67,67,225,67,67,67,67,67,67,67,67,754,67,67,67,67,67,67,67,57889,0,0,54074,54074,550,832,97,97,97,97,97,97,97,97,97,1342,97,97,97,97,97,97,67,67,67,67,67,25398,1083,13112,1087,54074,1091,0,0,0,0,0,0,1316,0,831,97,97,97,97,97,97,97,1174,921,0,1175,0,0,0,0,45,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,148,67,67,264,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,295,97,97,97,97,313,97,97,97,97,331,333,97,18,131427,356,638,0,0,0,0,362,0,0,365,0,367,0,45,45,1530,45,45,45,45,45,45,45,45,45,45,45,45,988,45,45,45,97,344,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,402,404,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1756,67,438,45,45,45,45,45,45,45,45,449,450,45,45,45,67,67,214,218,221,67,229,67,67,243,245,248,67,67,67,67,67,488,490,67,67,67,67,67,67,67,67,67,67,67,1071,67,1073,67,67,67,67,67,524,67,67,67,67,67,67,67,67,535,536,67,67,67,67,67,67,1683,1684,67,67,67,67,1688,1689,67,67,67,67,67,67,1586,67,67,67,67,67,67,67,67,67,469,67,67,67,67,67,67,97,97,97,585,587,97,97,97,97,97,97,97,97,97,97,97,1163,97,97,97,97,97,97,97,621,97,97,97,97,97,97,97,97,632,633,97,97,0,0,1782,97,97,97,97,97,0,0,97,97,0,97,712,45,45,45,717,45,45,45,45,45,45,45,45,725,45,45,45,163,167,173,177,45,45,45,45,45,193,45,45,45,45,982,45,45,45,45,45,45,987,45,45,45,45,45,1558,45,1560,45,45,45,45,45,45,45,45,704,705,45,45,45,45,45,45,45,45,731,45,45,45,67,67,67,67,67,739,67,67,67,67,67,67,273,0,24850,12564,0,0,0,0,28809,53531,67,67,67,764,67,67,67,67,67,67,67,67,67,67,67,67,1290,67,67,67,67,67,67,812,67,67,67,67,818,67,67,67,25398,542,13112,544,57889,0,0,54074,54074,550,0,97,97,97,97,97,837,97,97,97,97,97,602,97,97,97,97,97,97,97,97,97,97,1137,97,97,97,97,97,97,97,97,97,862,97,97,97,97,97,97,97,97,97,97,97,1627,97,97,97,0,97,97,97,97,910,97,97,97,97,916,97,97,97,0,0,0,97,97,1940,97,97,1942,45,45,45,45,45,45,385,45,45,45,45,395,45,45,45,45,966,45,969,45,45,45,45,45,45,45,45,45,45,975,45,45,45,406,45,45,45,45,45,45,45,45,45,45,45,45,974,45,45,45,67,67,67,67,1010,67,67,67,67,67,67,67,67,67,67,67,1262,67,67,67,67,67,67,67,67,67,1040,67,1042,67,1045,67,67,67,67,67,67,67,97,1706,97,97,97,1709,97,97,97,67,67,67,67,1051,67,67,67,67,67,1057,67,67,67,67,67,67,67,1443,67,67,1446,67,67,67,67,67,67,67,1297,0,0,0,1303,0,0,0,1309,67,67,67,67,1079,25398,0,13112,0,54074,0,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2207744,2207744,2207744,2207744,2572288,2207744,2207744,2207744,1098,97,97,97,97,97,1104,97,97,97,97,97,97,97,97,97,1356,97,97,97,97,97,97,1128,97,97,97,97,97,97,1134,97,1136,97,1139,97,97,97,97,97,97,1622,97,97,97,97,97,97,97,97,0,921,0,0,0,1176,0,646,45,67,67,67,1268,67,67,67,67,67,67,67,67,67,67,67,67,1469,67,67,67,97,1348,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1127,97,67,1569,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1448,1449,67,1816,67,67,67,67,67,67,67,67,67,1825,67,67,1827,97,97,0,1781,97,97,97,97,97,97,0,0,97,97,0,97,97,97,1831,0,0,97,97,97,97,97,0,0,0,97,97,97,1980,97,45,45,45,45,45,45,45,45,45,45,1395,45,45,45,45,45,97,1846,97,97,45,45,45,45,45,45,45,45,45,45,45,45,1212,45,45,45,45,45,45,2010,45,67,67,67,67,67,2016,67,97,97,0,0,97,97,97,0,97,97,97,97,97,45,45,2007,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,143,45,45,45,1671,45,45,45,45,45,45,45,45,45,45,45,67,1813,67,67,1815,45,45,67,210,67,67,67,67,67,67,239,67,67,67,67,67,67,67,1454,67,67,67,67,67,67,67,67,67,1445,67,67,67,67,67,67,97,97,290,97,97,97,97,97,97,319,97,97,97,97,97,97,303,97,97,317,97,97,97,97,97,97,305,97,97,97,97,97,97,97,97,97,899,97,97,97,97,97,97,375,45,45,45,379,45,45,390,45,45,394,45,45,45,45,45,443,45,45,45,45,45,45,45,45,67,67,67,67,67,461,67,67,67,465,67,67,476,67,67,480,67,67,67,67,67,67,1694,67,67,67,67,67,67,67,67,67,1288,67,67,67,67,67,67,500,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1075,97,97,97,558,97,97,97,562,97,97,573,97,97,577,97,97,97,97,97,895,97,97,97,97,97,97,903,97,97,97,0,97,97,1638,97,97,97,97,97,97,97,97,1646,597,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1334,45,681,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1396,45,45,1399,45,45,730,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1434,67,67,67,67,67,67,750,67,67,67,67,67,67,67,67,67,67,1456,67,67,67,67,67,45,45,993,45,45,45,45,45,45,45,45,45,45,45,67,67,1238,67,67,1006,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1280,1048,1049,67,67,67,67,67,67,67,67,67,67,1059,67,67,67,67,67,67,1286,67,67,67,67,67,67,67,1291,67,97,97,1100,97,97,97,97,97,97,97,97,97,97,97,97,97,638,0,920,97,97,1142,1143,97,97,97,97,97,97,97,97,97,97,1153,97,97,97,97,97,1158,97,97,97,1161,97,97,97,97,1166,97,97,97,97,97,1325,97,97,97,97,97,97,97,97,97,97,1328,97,97,97,97,97,97,97,45,1218,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1678,45,45,45,67,67,67,67,67,1269,67,67,67,67,67,67,67,67,1278,67,67,67,67,67,67,1761,67,67,67,67,67,67,67,67,67,530,67,67,67,67,67,67,97,97,1349,97,97,97,97,97,97,97,97,1358,97,97,97,97,97,97,1623,97,97,97,97,97,97,97,97,0,921,0,0,926,0,0,0,45,45,1411,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1754,45,45,67,67,1301,0,1307,0,1313,97,97,97,97,97,97,97,97,97,97,97,21054,97,97,97,97,67,1757,67,67,67,1760,67,67,67,67,67,67,67,67,67,67,1467,67,67,67,67,67,1778,97,0,0,97,97,97,97,97,97,0,0,97,97,0,97,97,97,97,97,1352,97,97,97,97,97,97,97,97,97,97,1511,97,97,97,97,97,67,67,67,67,67,1820,67,1822,67,67,67,67,67,97,97,97,97,97,0,0,0,97,1933,97,1892,97,97,97,97,97,97,1899,45,45,45,45,45,45,45,45,1664,45,45,45,45,45,45,45,45,1546,45,45,45,45,45,45,45,45,1208,45,45,45,45,45,45,45,45,1224,45,45,45,45,45,45,45,45,673,45,45,45,45,45,45,45,67,67,67,67,67,1925,97,97,97,97,0,0,0,97,97,97,97,97,623,97,97,97,97,97,97,97,97,97,97,307,97,97,97,97,97,97,97,97,97,1796,97,45,45,45,45,45,45,45,970,45,45,45,45,45,45,45,45,1417,45,45,45,45,45,45,45,67,1964,67,67,97,97,97,97,0,0,0,97,97,97,97,0,97,97,97,97,97,97,1721,97,97,0,0,1997,97,0,0,2e3,97,97,0,97,97,97,97,97,45,45,45,45,733,45,67,67,67,67,67,67,67,67,67,67,803,67,67,67,67,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,144,45,45,45,1805,45,1807,45,45,45,45,45,67,67,67,67,67,67,231,67,67,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,45,45,67,211,67,67,67,67,230,234,240,244,67,67,67,67,67,67,464,67,67,67,67,67,67,479,67,67,67,260,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,291,97,97,97,97,310,314,320,324,97,97,97,97,97,97,1367,97,97,97,97,97,97,97,97,97,1355,97,97,97,97,97,97,1362,340,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,360,0,362,0,365,28809,367,139,369,45,45,45,374,67,67,460,67,67,67,67,466,67,67,67,67,67,67,67,67,801,67,67,67,67,67,67,67,67,67,487,67,67,67,67,67,67,67,67,67,67,498,67,67,67,67,67,67,1772,67,67,97,97,97,97,97,97,97,0,921,922,1175,0,0,0,0,45,67,502,67,67,67,67,67,67,67,508,67,67,67,515,517,67,67,67,67,67,97,97,97,97,97,0,0,0,1932,97,97,0,1999,97,97,97,0,97,97,2004,2005,97,45,45,45,45,1193,45,45,45,45,45,45,45,45,45,45,45,676,45,45,45,45,67,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,552,97,97,97,97,97,1377,0,0,45,45,45,45,45,45,45,45,655,45,45,45,45,45,45,45,97,97,557,97,97,97,97,563,97,97,97,97,97,97,97,97,1135,97,97,97,97,97,97,97,97,97,584,97,97,97,97,97,97,97,97,97,97,595,97,97,97,97,97,911,97,97,97,97,97,97,97,638,0,0,0,0,1315,0,0,0,0,97,97,97,1319,97,97,97,0,97,97,97,97,97,97,1733,97,97,97,97,97,97,1340,97,97,97,1343,97,97,1345,97,1346,97,599,97,97,97,97,97,97,97,605,97,97,97,612,614,97,97,97,97,97,1794,97,97,97,45,45,45,45,45,45,45,1207,45,45,45,45,45,45,1213,45,45,745,67,67,67,67,751,67,67,67,67,67,67,67,67,67,67,1577,67,67,67,67,67,762,67,67,67,67,766,67,67,67,67,67,67,67,67,67,67,1765,67,67,67,67,67,777,67,67,781,67,67,67,67,67,67,67,67,67,67,67,67,1592,1593,67,67,97,843,97,97,97,97,849,97,97,97,97,97,97,97,97,97,1510,97,97,97,97,97,97,97,860,97,97,97,97,864,97,97,97,97,97,97,97,97,97,1797,45,45,45,45,1801,45,97,875,97,97,879,97,97,97,97,97,97,97,97,97,97,97,1522,97,97,97,97,97,991,45,45,45,45,996,45,45,45,45,45,45,45,45,67,67,215,67,67,67,67,233,67,67,67,67,251,253,1022,67,67,67,1026,67,67,67,67,67,67,67,67,67,67,1035,67,67,1038,67,67,67,67,67,67,67,67,67,67,67,67,67,1458,67,67,67,67,67,1064,67,67,67,1067,67,67,67,67,1072,67,67,67,67,67,67,1296,0,0,0,0,0,0,0,0,0,2367488,2158592,2158592,2158592,2158592,2158592,2158592,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,1096,0,921,29315,0,0,0,0,928,45,45,45,45,45,934,45,45,45,164,45,45,45,45,45,45,45,45,45,198,45,45,45,378,45,45,45,45,45,45,393,45,45,45,398,45,97,97,1116,97,97,97,1120,97,97,97,97,97,97,97,97,97,1147,1148,97,97,97,97,97,97,97,1129,97,97,1132,97,97,97,97,97,97,97,97,97,97,97,1626,97,97,97,97,0,45,1178,45,45,45,45,45,45,45,45,45,1185,45,45,45,45,441,45,45,45,45,45,45,451,45,45,67,67,67,67,67,227,67,67,67,67,67,67,67,67,1260,67,67,67,1263,67,67,1265,1203,45,45,1205,45,1206,45,45,45,45,45,45,45,45,45,1216,67,1266,67,67,67,67,67,67,67,67,67,1276,67,67,67,67,67,67,492,67,67,67,67,67,67,67,67,67,471,67,67,67,67,481,67,45,1386,45,1389,45,45,45,45,1394,45,45,45,1397,45,45,45,45,995,45,997,45,45,45,45,45,45,45,67,67,67,67,1915,67,67,67,67,67,1422,45,45,45,67,67,67,67,67,67,67,67,67,1433,67,1436,67,67,67,67,1441,67,67,67,1444,67,67,67,67,67,67,67,0,24850,12564,0,0,0,281,28809,53531,97,97,97,97,1494,97,97,97,1497,97,97,97,97,97,97,97,1368,97,97,97,97,97,97,97,97,851,97,97,97,97,97,97,97,67,67,67,1571,67,67,67,67,67,67,67,67,67,67,67,67,25398,542,13112,544,67,67,1583,67,67,67,67,67,67,67,67,1591,67,67,67,67,67,67,752,67,67,67,67,67,67,67,67,67,1056,67,67,67,67,67,67,97,1634,97,0,97,97,97,97,97,97,97,97,97,97,97,97,1125,97,97,97,1647,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,1183,45,45,45,45,45,45,45,45,45,409,45,45,45,45,45,45,1658,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1668,1712,97,97,97,0,97,97,97,97,97,97,97,97,97,0,0,1835,97,97,97,97,0,0,0,97,97,1844,97,97,1726,0,97,97,97,97,97,1732,97,1734,97,97,97,97,97,300,97,308,97,97,97,97,97,97,97,97,866,97,97,97,97,97,97,97,67,67,67,1758,67,67,67,1762,67,67,67,67,67,67,67,67,1043,67,67,67,67,67,67,67,67,67,67,67,67,1771,67,67,67,97,97,97,97,97,1776,97,97,97,97,297,97,97,97,97,97,97,97,97,97,97,97,1108,97,97,97,97,67,67,67,1966,97,97,97,1970,0,0,0,97,97,97,97,0,97,97,97,1720,97,97,97,97,97,0,0,97,97,97,1837,97,0,1840,1841,97,97,97,1988,45,67,67,67,67,67,67,67,67,67,1994,1995,67,97,97,97,97,97,1103,97,97,97,97,97,97,97,97,97,97,917,97,97,0,0,0,67,67,265,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,345,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,0,361,362,0,365,28809,367,139,45,45,45,45,45,671,45,45,45,45,45,45,45,45,45,45,411,45,45,414,45,45,45,45,377,45,45,45,386,45,45,45,45,45,45,45,45,45,1223,45,45,45,45,45,45,45,45,45,426,45,45,433,45,45,45,67,67,67,67,67,463,67,67,67,472,67,67,67,67,67,67,67,527,67,67,67,67,67,67,537,67,540,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,97,97,97,97,97,1119,97,97,97,97,97,97,97,97,97,97,1509,97,97,97,97,97,97,97,97,564,97,97,97,97,97,97,97,637,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,0,921,29315,0,0,0,927,45,45,45,45,45,45,45,45,45,1234,45,45,45,45,67,67,67,67,1240,45,697,45,45,45,45,45,45,45,45,45,45,708,45,45,45,45,1221,45,45,45,45,1225,45,45,45,45,45,45,384,45,45,45,45,45,45,45,45,45,1210,45,45,45,45,45,45,67,67,795,67,67,67,67,67,67,67,67,67,67,67,67,67,1470,67,67,67,67,67,67,67,815,67,67,67,67,67,67,25398,542,13112,544,97,97,97,893,97,97,97,97,97,97,97,97,97,97,97,97,1164,97,97,97,67,67,67,1025,67,67,67,67,67,67,67,67,67,67,67,67,1687,67,67,67,67,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,0,1097,1241,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1450,45,45,1388,45,1390,45,45,45,45,45,45,45,45,45,45,45,1236,67,67,67,67,67,1437,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1472,1490,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1503,67,67,67,67,67,97,97,97,97,97,0,1930,0,97,97,97,97,97,847,97,97,97,97,97,97,97,97,97,858,67,67,1965,67,97,97,97,97,0,0,0,97,97,97,97,0,97,97,1719,97,97,97,97,97,97,0,0,0,45,45,45,45,1382,45,1383,45,45,45,159,45,45,45,45,45,45,45,45,45,45,45,45,45,1563,45,45,45,45,45,67,261,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,341,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,97,1099,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1333,97,1230,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,1992,67,1993,67,67,67,97,97,45,45,160,45,45,45,45,45,45,45,45,45,45,45,45,45,1665,45,45,45,45,45,131427,357,0,0,0,362,0,365,28809,367,139,45,45,45,45,45,684,45,45,45,45,45,45,45,45,45,45,412,45,45,45,416,45,45,45,440,45,45,45,45,45,45,45,45,45,45,45,67,67,1990,67,1991,67,67,67,67,67,67,67,97,97,1707,97,97,97,97,97,97,501,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1691,67,67,67,67,67,526,67,67,67,67,67,67,67,67,67,67,1030,67,1032,67,67,67,67,598,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1632,0,921,29315,923,0,0,0,45,45,45,45,45,45,45,45,45,1404,45,45,45,45,45,45,45,45,45,425,45,45,45,45,45,45,67,67,67,67,67,25398,0,13112,0,54074,0,0,1093,0,0,0,0,0,97,1609,97,97,97,97,97,97,97,97,97,1369,97,97,97,1372,97,97,67,67,266,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,346,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,665,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1677,45,45,45,45,67,45,45,954,45,956,45,45,45,45,45,45,45,45,45,45,45,1545,45,45,45,45,45,45,45,45,45,448,45,45,45,45,67,456,67,67,67,67,67,1270,67,67,67,67,67,67,67,67,67,67,1069,67,67,67,67,67,67,97,97,97,1350,97,97,97,97,97,97,97,97,97,97,97,97,1524,97,97,97,97,97,97,97,1376,0,0,0,45,45,45,45,45,45,45,45,1559,1561,45,45,45,1564,45,1566,1567,45,67,67,67,67,67,1573,67,67,67,67,67,67,67,67,67,67,1247,67,67,67,67,67,1252,97,1725,97,0,97,97,97,97,97,97,97,97,97,97,97,97,1628,97,1630,0,0,94242,0,0,0,2211840,0,1118208,0,0,0,0,2158592,2158731,2158592,2158592,2158592,3117056,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3018752,2158592,3043328,2158592,2158592,2158592,2158592,3080192,2158592,2158592,3112960,2158592,2158592,2158592,2158592,2158592,2158878,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2605056,2158592,2158592,2207744,0,542,0,544,0,0,2166784,0,0,0,550,0,0,2158592,2158592,2686976,2158592,2715648,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2867200,2158592,2904064,2158592,2158592,2158592,2158592,2158592,2158592,2158592,0,94242,0,0,0,2211840,0,0,1130496,0,0,0,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,0,139,0,0,0,139,0,2367488,2207744,0,0,0,0,176128,0,2166784,0,0,0,0,0,286,2158592,2158592,3170304,3174400,2158592,0,0,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,1508,2158592,2908160,2158592,2158592,2158592,2977792,2158592,2158592,2158592,2158592,3039232,2158592,2158592,2158592,2158592,2158592,2158592,3158016,67,24850,24850,12564,12564,0,0,0,0,0,53531,53531,0,286,97,97,97,97,97,1144,97,97,97,97,97,97,97,97,97,97,1149,97,97,97,97,1154,57889,0,0,0,0,550,0,97,97,97,97,97,97,97,97,97,561,97,97,97,97,97,97,576,97,97,139264,139264,139264,139264,139264,139264,139264,139264,139264,139264,139264,139264,0,0,139264,0,921,29315,0,0,926,0,45,45,45,45,45,45,45,45,45,719,720,45,45,45,45,45,45,45,45,685,45,45,45,45,45,45,45,45,45,942,45,45,946,45,45,45,950,45,45,0,2146304,2146304,0,0,0,0,2224128,2224128,2224128,2232320,2232320,2232320,2232320,0,0,1301,0,0,0,0,0,1307,0,0,0,0,0,1313,0,0,0,0,0,0,0,97,97,1318,97,97,97,97,97,97,1795,97,97,45,45,45,45,45,45,45,446,45,45,45,45,45,45,67,67,2158592,2146304,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,0,921,29315,0,924,0,0,45,45,45,45,45,45,45,45,45,1e3,45,45,45,45,67,67],r.EXPECTED=[290,300,304,353,296,309,305,319,315,324,328,352,354,334,338,330,320,345,349,293,358,362,341,366,312,370,374,378,382,386,390,394,398,737,402,634,439,604,634,634,634,634,408,634,634,634,404,634,634,634,457,634,634,963,634,634,413,634,634,634,634,634,634,634,663,418,422,903,902,426,431,548,634,437,521,919,443,615,409,449,455,624,731,751,634,461,465,672,470,469,474,481,485,477,489,493,629,542,497,505,603,602,991,648,510,804,634,515,958,526,525,530,768,634,546,552,711,710,593,558,562,618,566,570,574,578,582,586,590,608,612,660,822,821,634,622,596,444,628,533,724,633,640,653,647,652,536,1008,451,450,445,657,670,676,685,689,693,697,701,704,707,715,719,798,815,634,723,762,996,634,728,969,730,735,908,634,741,679,889,511,747,634,750,755,499,666,499,501,759,772,776,780,634,787,784,797,802,809,808,427,814,1006,517,634,519,853,634,813,850,793,634,819,826,833,832,837,843,847,857,861,863,867,871,875,879,883,643,887,539,980,979,634,893,944,634,900,896,634,907,933,506,912,917,828,433,636,635,554,961,923,930,927,937,941,634,634,634,974,948,952,985,913,968,967,743,634,973,839,634,978,599,634,984,989,765,444,995,1e3,634,1003,790,955,1012,681,634,634,634,634,634,414,1016,1020,1024,1085,1027,1090,1090,1046,1080,1137,1108,1215,1049,1032,1039,1085,1085,1085,1085,1058,1062,1068,1085,1086,1090,1090,1091,1072,1064,1107,1090,1090,1090,1118,1123,1138,1078,1074,1084,1085,1085,1085,1087,1090,1062,1052,1060,1114,1062,1104,1085,1085,1090,1090,1028,1122,1063,1128,1139,1127,1158,1085,1085,1151,1090,1090,1090,1095,1090,1132,1073,1136,1143,1061,1150,1085,1155,1098,1101,1146,1162,1169,1101,1185,1151,1090,1110,1173,1054,1087,1109,1177,1165,1089,1204,1184,1107,1189,1193,1088,1197,1180,1201,1208,1042,1212,1219,1223,1227,1231,1235,1245,1777,1527,1686,1686,1238,1686,1254,1686,1686,1686,1294,1669,1686,1686,1686,1322,1625,1534,1268,1624,1275,1281,1443,1292,1300,1686,1686,1686,1350,1826,1306,1686,1686,1240,2032,1317,1321,1686,1686,1253,1686,1326,1686,1686,1686,1418,1709,1446,1686,1686,1686,1492,1686,1295,1447,1686,1686,1258,1686,1736,1686,1686,1520,1355,1686,1288,1348,1361,1686,1359,1686,1364,1498,1368,1302,1362,1381,1389,1395,1486,1686,1371,1377,1370,1686,1375,1382,1384,1402,1408,1385,1383,1619,1413,1423,1428,1433,1686,1686,1270,1686,1338,1686,1440,1686,1686,1686,1499,1465,1686,1686,1686,1639,1473,1884,1686,1686,1293,1864,1686,1686,1296,1321,1483,1686,1686,1686,1646,1686,1748,1496,1686,1418,1675,1686,1418,1702,1686,1418,1981,1686,1429,1409,1427,1504,1692,1686,1686,1313,1448,1651,1508,1686,1686,1340,1686,1903,1686,1686,1435,1513,1686,1283,1287,1519,1686,1524,1363,1568,1938,1539,1566,1579,1479,1533,1538,1553,1544,1552,1557,1563,1574,1557,1583,1589,1590,1759,1594,1603,1607,1611,1686,1436,1514,1686,1434,1656,1686,1434,1680,1686,1453,1686,1686,1686,1559,1617,1686,1770,1418,1623,1769,1629,1686,1515,1335,1686,1285,1686,1671,1921,1650,1686,1686,1344,1308,1666,1686,1686,1686,1659,1685,1686,1686,1686,1686,1241,1686,1686,1844,1691,1686,1630,1977,1970,1362,1686,1686,1686,1693,1698,1686,1686,1686,1697,1686,1764,1715,1686,1634,1638,1686,1599,1585,1686,1271,1686,1269,1686,1721,1686,1686,1354,1686,1801,1686,1799,1686,1640,1686,1686,1461,1686,1686,1732,1686,1944,1686,1740,1686,1746,1415,1396,1686,1598,1547,1417,1597,1416,1577,1546,1397,1577,1547,1548,1570,1398,1753,1686,1652,1509,1686,1686,1686,1757,1686,1419,1686,1763,1418,1768,1781,1686,1686,1686,1705,1686,2048,1792,1686,1686,1686,1735,1686,1797,1686,1686,1404,1686,1639,1815,1686,1686,1418,2017,1820,1686,1686,1803,1686,1686,1686,1736,1489,1686,1686,1825,1338,1260,1263,1686,1686,1785,1686,1686,1728,1686,1686,1749,1497,1830,1830,1262,1248,1261,1329,1260,1264,1329,1248,1249,1259,1540,1849,1842,1686,1686,1835,1686,1686,1816,1686,1686,1831,1882,1848,1686,1686,1686,1774,2071,1854,1686,1686,1469,1884,1686,1821,1859,1686,1686,1350,1883,1686,1686,1686,1781,1391,1875,1686,1686,1613,1644,1686,1686,1889,1686,1686,1662,1884,1686,1885,1890,1686,1686,1686,1894,1686,1686,1678,1686,1907,1686,1686,1529,1914,1686,1838,1686,1686,1881,1686,1686,1872,1876,1836,1919,1686,1837,1692,1910,1686,1925,1928,1742,1686,1811,1811,1930,1810,1929,1935,1928,1900,1942,1867,1868,1931,1035,1788,1948,1952,1956,1960,1964,1686,1976,1686,1686,1686,2065,1686,1992,2037,1686,1686,1998,2009,1972,2002,1686,1686,1686,2077,1300,2023,1686,1686,1686,1807,2031,1686,1686,1686,1860,1500,2032,1686,1686,1686,2083,1686,2036,1686,1277,1276,2042,1877,1686,1686,2041,1686,1686,2027,2037,2012,1686,2012,1855,1850,1686,2046,1686,1686,2054,1996,1686,1897,1309,2059,2052,1686,2058,1686,1686,2081,1686,1717,1477,1686,1331,1686,1686,1687,1686,1860,1681,1686,1686,1686,1966,1724,1686,1686,1686,1984,2015,1686,1686,1686,1988,1686,2063,1686,1686,1686,2005,1686,1727,1686,1686,1711,1457,2069,1686,1686,1686,2019,2075,1686,1686,1915,1686,1686,1793,1874,1686,1686,1491,1362,1449,1686,1686,1460,2098,2087,2091,2095,2184,2102,2113,2780,2117,2134,2142,2281,2146,2146,2146,2304,2296,2181,2639,2591,2872,2592,2873,2313,2195,2200,2281,2146,2273,2226,2204,2152,2219,2276,2167,2177,2276,2235,2276,2276,2230,2281,2276,2296,2276,2293,2276,2276,2276,2276,2234,2276,2311,2314,2210,2199,2217,2222,2276,2276,2276,2240,2276,2294,2276,2276,2173,2276,2198,2281,2281,2281,2281,2282,2146,2146,2146,2146,2205,2146,2204,2248,2276,2235,2276,2297,2276,2276,2276,2277,2256,2281,2283,2146,2146,2146,2275,2276,2295,2276,2276,2293,2146,2304,2264,2269,2221,2276,2276,2276,2293,2295,2276,2276,2276,2295,2263,2205,2268,2220,2172,2276,2276,2276,2296,2276,2276,2296,2294,2276,2276,2278,2281,2281,2280,2281,2281,2281,2283,2206,2223,2276,2276,2279,2281,2281,2146,2273,2276,2276,2281,2281,2281,2276,2292,2276,2298,2225,2276,2298,2169,2224,2292,2298,2171,2229,2281,2281,2171,2236,2281,2281,2281,2146,2275,2225,2292,2299,2276,2229,2281,2146,2276,2290,2297,2283,2146,2146,2274,2224,2227,2298,2225,2297,2276,2230,2170,2230,2282,2146,2147,2151,2156,2288,2276,2230,2303,2308,2236,2284,2228,2318,2318,2318,2326,2335,2339,2343,2349,2416,2693,2357,2592,2109,2592,2592,2162,2943,2823,2646,2592,2361,2592,2122,2592,2592,2122,2470,2592,2592,2592,2109,2107,2592,2592,2592,2123,2592,2592,2592,2125,2592,2413,2592,2592,2592,2127,2592,2592,2414,2592,2592,2592,2130,2952,2592,2594,2592,2592,2212,2609,2252,2592,2592,2592,2446,2434,2592,2592,2592,2212,2446,2450,2456,2431,2435,2592,2592,2243,2478,2448,2439,2946,2592,2592,2592,2368,2809,2813,2450,2441,2212,2812,2449,2440,2947,2592,2592,2592,2345,2451,2457,2948,2592,2124,2592,2592,2650,2823,2449,2455,2946,2592,2128,2592,2592,2649,2952,2592,2810,2448,2461,2991,2467,2592,2592,2329,2817,2474,2990,2466,2592,2592,2373,2447,2992,2469,2592,2592,2592,2373,2447,2477,2468,2592,2592,2353,2469,2592,2495,2592,2592,2415,2483,2592,2415,2496,2592,2592,2352,2592,2592,2352,2352,2469,2592,2592,2363,2331,2494,2592,2592,2592,2375,2592,2375,2415,2504,2592,2592,2367,2372,2503,2592,2592,2592,2389,2418,2415,2592,2592,2373,2592,2592,2592,2593,2732,2417,2415,2592,2417,2520,2592,2592,2592,2390,2521,2521,2592,2592,2592,2401,2599,2585,2526,2531,2120,2592,2212,2426,2450,2463,2948,2592,2592,2592,2213,2389,2527,2532,2121,2542,2551,2105,2592,2213,2592,2592,2592,2558,2538,2544,2553,2557,2537,2543,2552,2421,2572,2576,2546,2543,2547,2592,2592,2373,2615,2575,2545,2105,2592,2244,2479,2592,2129,2592,2592,2628,2690,2469,2562,2566,2592,2592,2592,2415,2928,2934,2401,2570,2574,2564,2572,2585,2590,2592,2592,2585,2965,2592,2592,2592,2445,2251,2592,2592,2592,2474,2592,2609,2892,2592,2362,2592,2592,2138,2851,2159,2592,2592,2592,2509,2888,2892,2592,2592,2592,2490,2418,2891,2592,2592,2376,2592,2592,2374,2592,2889,2388,2592,2373,2373,2890,2592,2592,2387,2592,2887,2505,2892,2592,2373,2610,2388,2592,2592,2376,2373,2592,2887,2891,2592,2374,2592,2592,2608,2159,2614,2620,2592,2592,2394,2594,2887,2399,2592,2887,2397,2508,2374,2507,2592,2375,2592,2592,2592,2595,2508,2506,2592,2506,2505,2505,2592,2507,2637,2505,2592,2592,2401,2661,2592,2643,2592,2592,2417,2592,2655,2592,2592,2592,2510,2414,2656,2592,2592,2592,2516,2592,2593,2660,2665,2880,2592,2592,2592,2522,2767,2666,2881,2592,2592,2420,2571,2696,2592,2592,2592,2580,2572,2686,2632,2698,2592,2383,2514,2592,2163,2932,2465,2685,2631,2697,2592,2388,2592,2592,2212,2604,2671,2632,2678,2592,2401,2405,2409,2592,2592,2592,2679,2592,2592,2592,2592,2108,2677,2591,2592,2592,2592,2419,2592,2683,2187,2191,2469,2671,2189,2467,2592,2401,2629,2633,2702,2468,2592,2592,2421,2536,2703,2469,2592,2592,2422,2573,2593,2672,2467,2592,2402,2406,2592,2402,2979,2592,2592,2626,2673,2467,2592,2446,2259,2947,2592,2377,2709,2592,2592,2522,2862,2713,2468,2592,2592,2581,2572,2562,2374,2374,2592,2376,2721,2724,2592,2592,2624,2373,2731,2592,2592,2592,2626,2732,2592,2592,2592,2755,2656,2726,2736,2741,2592,2486,2593,2381,2592,2727,2737,2742,2715,2747,2753,2592,2498,2469,2873,2743,2592,2592,2592,2791,2759,2763,2592,2592,2627,2704,2592,2592,2522,2789,2593,2761,2753,2592,2498,2863,2592,2592,2767,2592,2592,2592,2792,2789,2592,2592,2592,2803,2126,2592,2592,2592,2811,2122,2592,2592,2592,2834,2777,2592,2592,2592,2848,2936,2591,2489,2797,2592,2592,2670,2631,2490,2798,2592,2592,2592,2963,2807,2592,2592,2592,2965,2838,2592,2592,2592,2975,2330,2818,2829,2592,2498,2939,2592,2498,2592,2791,2331,2819,2830,2592,2592,2592,2982,2834,2817,2828,2106,2592,2592,2592,2405,2405,2817,2828,2592,2592,2415,2849,2842,2592,2522,2773,2592,2522,2868,2592,2580,2600,2586,2137,2850,2843,2592,2592,2855,2937,2844,2592,2592,2592,2987,2936,2591,2592,2592,2684,2630,2592,2856,2938,2592,2592,2860,2939,2592,2592,2872,2592,2861,2591,2592,2592,2887,2616,2592,2867,2592,2592,2708,2592,2498,2469,2498,2497,2785,2773,2499,2783,2770,2877,2877,2877,2772,2592,2592,2345,2885,2592,2592,2592,2715,2762,2515,2896,2592,2592,2715,2917,2516,2897,2592,2592,2592,2901,2906,2911,2592,2592,2956,2960,2715,2902,2907,2912,2593,2916,2920,2820,2922,2822,2592,2592,2715,2927,2921,2821,2106,2592,2592,2974,2408,2321,2821,2106,2592,2592,2983,2592,2593,2404,2408,2592,2592,2717,2749,2716,2928,2322,2822,2593,2926,2919,2820,2934,2823,2592,2592,2592,2651,2824,2592,2592,2592,2130,2952,2592,2592,2592,2592,2964,2592,2592,2716,2748,2592,2969,2592,2592,2716,2918,2368,2970,2592,2592,2592,2403,2407,2592,2592,2787,2211,2404,2409,2592,2592,2802,2837,2987,2592,2592,2592,2809,2427,2592,2793,2592,2592,2809,2447,1073741824,2147483648,539754496,542375936,402653184,554434560,571736064,545521856,268451840,335544320,268693630,512,2048,256,1024,0,1024,0,1073741824,2147483648,0,0,0,8388608,0,0,1073741824,1073741824,0,2147483648,537133056,4194304,1048576,268435456,-1073741824,0,0,0,1048576,0,0,0,1572864,0,0,0,4194304,0,134217728,16777216,0,0,32,64,98304,0,33554432,8388608,192,67108864,67108864,67108864,67108864,16,32,4,0,8192,196608,196608,229376,80,4096,524288,8388608,0,0,32,128,256,24576,24600,24576,24576,2,24576,24576,24576,24584,24592,24576,24578,24576,24578,24576,24576,16,512,2048,2048,256,4096,32768,1048576,4194304,67108864,134217728,268435456,262144,134217728,0,128,128,64,16384,16384,16384,67108864,32,32,4,4,4096,262144,134217728,0,0,0,2,0,8192,131072,131072,4096,4096,4096,4096,24576,24576,24576,8,8,24576,24576,16384,16384,16384,24576,24584,24576,24576,24576,16384,24576,536870912,262144,0,0,32,2048,8192,4,4096,4096,4096,786432,8388608,16777216,0,128,16384,16384,16384,32768,65536,2097152,32,32,32,32,4,4,4,4,4,4096,67108864,67108864,67108864,24576,24576,24576,24576,0,16384,16384,16384,16384,67108864,67108864,8,67108864,24576,8,8,8,24576,24576,24576,24578,24576,24576,24576,2,2,2,16384,67108864,67108864,67108864,32,67108864,8,8,24576,2048,2147483648,536870912,262144,262144,262144,67108864,8,24576,16384,32768,1048576,4194304,25165824,67108864,24576,32770,2,4,112,512,98304,524288,50,402653186,1049090,1049091,10,66,100925514,10,66,12582914,0,0,-1678194207,-1678194207,-1041543218,0,32768,0,0,32,65536,268435456,1,1,513,1048577,0,12582912,0,0,0,4,1792,0,0,0,7,29360128,0,0,0,8,0,0,0,12,1,1,0,0,-604102721,-604102721,4194304,8388608,0,0,0,31,925600,997981306,997981306,997981306,0,0,2048,8388608,0,0,1,2,4,32,64,512,8192,0,0,0,245760,997720064,0,0,0,32,0,0,0,3,12,16,32,8,112,3072,12288,16384,32768,65536,131072,7864320,16777216,973078528,0,0,65536,131072,3670016,4194304,16777216,33554432,2,8,48,2048,8192,16384,32768,65536,131072,524288,131072,524288,3145728,4194304,16777216,33554432,65536,131072,2097152,4194304,16777216,33554432,134217728,268435456,536870912,0,0,0,1024,0,8,48,2048,8192,65536,33554432,268435456,536870912,65536,268435456,536870912,0,0,32768,0,0,126,623104,65011712,0,32,65536,536870912,0,0,65536,524288,0,32,65536,0,0,0,2048,0,0,0,15482,245760,-604102721,0,0,0,18913,33062912,925600,-605028352,0,0,0,65536,31,8096,131072,786432,3145728,3145728,12582912,50331648,134217728,268435456,160,256,512,7168,131072,786432,131072,786432,1048576,2097152,12582912,16777216,268435456,1073741824,2147483648,12582912,16777216,33554432,268435456,1073741824,2147483648,3,12,16,160,256,7168,786432,1048576,12582912,16777216,268435456,1073741824,0,8,16,32,128,256,512,7168,786432,1048576,2097152,0,1,2,8,16,7168,786432,1048576,8388608,16777216,16777216,1073741824,0,0,0,0,1,0,0,8,32,128,256,7168,8,32,0,3072,0,8,32,3072,4096,524288,8,32,0,0,3072,4096,0,2048,524288,8388608,8,2048,0,0,1,12,256,4096,32768,262144,1048576,4194304,67108864,0,2048,0,2048,2048,1073741824,-58805985,-58805985,-58805985,0,0,262144,0,0,32,4194304,16777216,134217728,4382,172032,-58982400,0,0,2,28,256,4096,8192,8192,32768,131072,262144,524288,1,2,12,256,4096,0,0,4194304,67108864,134217728,805306368,1073741824,0,0,1,2,12,16,256,4096,1048576,67108864,134217728,268435456,0,512,1048576,4194304,201326592,1879048192,0,0,12,256,4096,134217728,268435456,536870912,12,256,268435456,536870912,0,12,256,0,0,1,32,64,512,0,0,205236961,205236961,0,0,0,1,96,640,1,10976,229376,204996608,0,640,2048,8192,229376,1572864,1572864,2097152,201326592,0,0,0,64,512,2048,229376,1572864,201326592,1572864,201326592,0,0,1,4382,0,1,32,2048,65536,131072,1572864,201326592,131072,1572864,134217728,0,0,524288,524288,0,0,0,-68582786,-68582786,-68582786,0,0,2097152,524288,0,524288,0,0,65536,131072,1572864,0,0,2,4,0,0,65011712,-134217728,0,0,0,0,2,4,120,512,-268435456,0,0,0,2,8,48,64,2048,8192,98304,524288,2097152,4194304,25165824,33554432,134217728,268435456,2147483648,0,0,25165824,33554432,134217728,1879048192,2147483648,0,0,4,112,512,622592,65011712,134217728,-268435456,16777216,33554432,134217728,1610612736,0,0,0,64,98304,524288,4194304,16777216,33554432,0,98304,524288,16777216,33554432,0,65536,524288,33554432,536870912,1073741824,0,65536,524288,536870912,1073741824,0,0,65536,524288,536870912,0,524288,0,524288,524288,1048576,2086666240,2147483648,0,-1678194207,0,0,0,8,32,2048,524288,8388608,0,0,33062912,436207616,2147483648,0,0,32,64,2432,16384,32768,32768,524288,3145728,4194304,25165824,25165824,167772160,268435456,2147483648,0,32,64,384,2048,16384,32768,1048576,2097152,4194304,25165824,32,64,128,256,2048,16384,2048,16384,1048576,4194304,16777216,33554432,134217728,536870912,1073741824,0,0,2048,16384,4194304,16777216,33554432,134217728,805306368,0,0,16777216,134217728,268435456,2147483648,0,622592,622592,622592,8807,8807,434791,0,0,16777216,0,0,0,7,608,8192,0,0,0,3,4,96,512,32,64,8192,0,0,16777216,134217728,0,0,2,4,8192,16384,65536,2097152,33554432,268435456],r.TOKEN=["(0)","ModuleDecl","Annotation","OptionDecl","Operator","Variable","Tag","EndTag","PragmaContents","DirCommentContents","DirPIContents","CDataSectionContents","AttrTest","Wildcard","EQName","IntegerLiteral","DecimalLiteral","DoubleLiteral","PredefinedEntityRef","'\"\"'","EscapeApos","QuotChar","AposChar","ElementContentChar","QuotAttrContentChar","AposAttrContentChar","NCName","QName","S","CharRef","CommentContents","DocTag","DocCommentContents","EOF","'!'","'\"'","'#'","'#)'","''''","'('","'(#'","'(:'","'(:~'","')'","'*'","'*'","','","'-->'","'.'","'/'","'/>'","':'","':)'","';'","'"),token:l,next:function(e){e.pop()}}],CData:[{name:"CDataSectionContents",token:a},{name:p("]]>"),token:a,next:function(e){e.pop()}}],PI:[{name:"DirPIContents",token:c},{name:p("?"),token:c},{name:p("?>"),token:c,next:function(e){e.pop()}}],AposString:[{name:p("''"),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeApos",token:"constant.language.escape"},{name:"AposChar",token:"string"}],QuotString:[{name:p('"'),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeQuot",token:"constant.language.escape"},{name:"QuotChar",token:"string"}]};n.XQueryLexer=function(){return new i(r,d)}},{"./XQueryTokenizer":"/node_modules/xqlint/lib/lexers/XQueryTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}]},{},["/node_modules/xqlint/lib/lexers/xquery_lexer.js"])}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var s=n.getCursorPosition(),o=new u(r,s.row,s.column),f=o.getCurrentToken(),l=!1,e=JSON.parse(e).pop();if(f&&f.value===">"||e!=="StartTag")return;if(!f||!a(f,"meta.tag")&&(!a(f,"text")||!f.value.match("/"))){do f=o.stepBackward();while(f&&(a(f,"string")||a(f,"keyword.operator")||a(f,"entity.attribute-name")||a(f,"text")))}else l=!0;var c=o.stepBackward();if(!f||!a(f,"meta.tag")||c!==null&&c.value.match("/"))return;var h=f.value.substring(1);if(l)var h=h.substring(0,s.column-f.start);return{text:">",selection:[1,1]}}})};r.inherits(f,i),t.XQueryBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"],function(e,t,n){"use strict";var r=e("../worker/worker_client").WorkerClient,i=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,u=e("./xquery/xquery_lexer").XQueryLexer,a=e("../range").Range,f=e("./behaviour/xquery").XQueryBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../anchor").Anchor,h=function(){this.$tokenizer=new u,this.$behaviour=new f,this.foldingRules=new l,this.$highlightRules=new o};i.inherits(h,s),function(){this.completer={getCompletions:function(e,t,n,r,i){if(!t.$worker)return i();t.$worker.emit("complete",{data:{pos:n,prefix:r}}),t.$worker.on("complete",function(e){i(null,e.data)})}},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return/^\s+$/.test(t)?/^\s*[\}\)]/.test(n):!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^(\s*[\}\)])/);if(!i)return 0;var s=i[1].length,o=t.findMatchingBracket({row:n,column:s});if(!o||o.row==n)return 0;var u=this.$getIndent(t.getLine(o.row));t.replace(new a(n,0,n,s-1),u)},this.toggleCommentLines=function(e,t,n,r){var i,s,o=!0,u=/^\s*\(:(.*):\)/;for(i=n;i<=r;i++)if(!u.test(t.getLine(i))){o=!1;break}var f=new a(0,0,0,0);for(i=n;i<=r;i++)s=t.getLine(i),f.start.row=i,f.end.row=i,f.end.column=s.length,t.replace(f,o?s.match(u)[1]:"(:"+s+":)")},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/xquery_worker","XQueryWorker"),n=this;return t.attachToDocument(e.getDocument()),t.on("ok",function(t){e.clearAnnotations()}),t.on("markers",function(t){e.clearAnnotations(),n.addMarkers(t.data,e)}),t.on("highlight",function(t){n.$tokenizer.tokens=t.data.tokens,n.$tokenizer.lines=e.getDocument().getAllLines();var r=Object.keys(n.$tokenizer.tokens);for(var i=0;i][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,"");var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,"").length,s=parseInt(/\d+[\s+-]*$/.exec(r));return s?(i+=s-1,this.next="mlString"):this.next="mlStringPre",n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};r.inherits(s,i),t.YamlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&uc){var m=e.getLine(h).length;return new s(c,f,h,m)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/),f=r[i]==="-";if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u=|>/},{token:"keyword.operator",regex:/(&&)|(\|\|)|(!)/},{token:"keyword.operator",regex:/=|\+=|-=/},{token:"keyword.operator",regex:/\+\+|\+|--|-|\*|\/|%/},{token:"keyword.operator",regex:/&|\||\^|~/},{token:"keyword.operator",regex:/\b(?:in|as|is)\b/},{token:"punctuation.terminator",regex:/;/},{token:"punctuation.accessor",regex:/\??\$/},{token:"punctuation.accessor",regex:/::/},{token:"keyword.operator",regex:/\?/},{token:"punctuation.separator",regex:/:/},{token:"punctuation.separator",regex:/,/},{token:["keyword.other","meta.namespace","entity.name.namespace"],regex:/(module)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)/},{token:"keyword.other",regex:/\bexport\b/},{token:"keyword.control.conditional",regex:/\b(?:if|else)\b/},{token:"keyword.control",regex:/\b(?:for|while)\b/},{token:"keyword.control",regex:/\b(?:return|break|next|continue|fallthrough)\b/},{token:"keyword.control",regex:/\b(?:switch|default|case)\b/},{token:"keyword.other",regex:/\b(?:add|delete)\b/},{token:"keyword.other",regex:/\bprint\b/},{token:"keyword.control",regex:/\b(?:when|timeout|schedule)\b/},{token:["keyword.other","meta.struct.record","entity.name.struct.record","meta.struct.record","punctuation.separator","meta.struct.record","storage.type.struct.record"],regex:/\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(record)\b/},{token:["keyword.other","meta.enum","entity.name.enum","meta.enum","punctuation.separator","meta.enum","storage.type.enum"],regex:/\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(enum)\b/},{token:["keyword.other","meta.type","entity.name.type","meta.type","punctuation.separator"],regex:/\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)/},{token:["keyword.other","meta.struct.record","storage.type.struct.record","meta.struct.record","entity.name.struct.record"],regex:/\b(redef)(\s+)(record)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/},{token:["keyword.other","meta.enum","storage.type.enum","meta.enum","entity.name.enum"],regex:/\b(redef)(\s+)(enum)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/},{token:["storage.type","text","entity.name.function.event"],regex:/\b(event)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/},{token:["storage.type","text","entity.name.function.hook"],regex:/\b(hook)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/},{token:["storage.type","text","entity.name.function"],regex:/\b(function)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/},{token:"keyword.other",regex:/\bredef\b/},{token:"storage.type",regex:/\bany\b/},{token:"storage.type",regex:/\b(?:enum|record|set|table|vector)\b/},{token:["storage.type","text","keyword.operator","text","storage.type"],regex:/\b(opaque)(\s+)(of)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/},{token:"keyword.operator",regex:/\bof\b/},{token:"storage.type",regex:/\b(?:addr|bool|count|double|file|int|interval|pattern|port|string|subnet|time)\b/},{token:"storage.type",regex:/\b(?:function|hook|event)\b/},{token:"storage.modifier",regex:/\b(?:global|local|const|option)\b/},{token:"entity.name.function.call",regex:/\b[A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*(?=s*\()/},{token:"punctuation.section.block.begin",regex:/\{/},{token:"punctuation.section.block.end",regex:/\}/},{token:"punctuation.section.brackets.begin",regex:/\[/},{token:"punctuation.section.brackets.end",regex:/\]/},{token:"punctuation.section.parens.begin",regex:/\(/},{token:"punctuation.section.parens.end",regex:/\)/}],"string-state":[{token:"constant.character.escape",regex:/\\./},{token:"string.double",regex:/"/,next:"start"},{token:"constant.other.placeholder",regex:/%-?[0-9]*(\.[0-9]+)?[DTdxsefg]/},{token:"string.double",regex:"."}],"pattern-state":[{token:"constant.character.escape",regex:/\\./},{token:"string.regexp",regex:"/",next:"start"},{token:"string.regexp",regex:"."}]},this.normalizeRules()};s.metaData={fileTypes:["bro","zeek"],name:"Zeek",scopeName:"source.zeek"},r.inherits(s,i),t.ZeekHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/zeek",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zeek_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./zeek_highlight_rules").ZeekHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/zeek"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/zeek"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/mode-zig.js b/mixly/common/modules/web-modules/ace/mode-zig.js new file mode 100644 index 00000000..6ff9d88f --- /dev/null +++ b/mixly/common/modules/web-modules/ace/mode-zig.js @@ -0,0 +1,8 @@ +ace.define("ace/mode/zig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#dummy_main"}],"#block":[{token:["storage.type.zig","text","punctuation.section.braces.begin.zig"],regex:/((?:[a-zA-Z_][\w.]*|@\".+\")?)(\s*)(\{)/,push:[{token:"punctuation.section.braces.end.zig",regex:/\}/,next:"pop"},{include:"#dummy_main"}]}],"#character_escapes":[{token:"constant.character.escape.newline.zig",regex:/\\n/},{token:"constant.character.escape.carrigereturn.zig",regex:/\\r/},{token:"constant.character.escape.tabulator.zig",regex:/\\t/},{token:"constant.character.escape.backslash.zig",regex:/\\\\/},{token:"constant.character.escape.single-quote.zig",regex:/\\'/},{token:"constant.character.escape.double-quote.zig",regex:/\\\"/},{token:"constant.character.escape.hexidecimal.zig",regex:/\\x[a-fA-F\d]{2}/},{token:"constant.character.escape.hexidecimal.zig",regex:/\\u\{[a-fA-F\d]{1,6}\}/}],"#comments":[{token:"comment.line.documentation.zig",regex:/\/\/[!\/](?=[^\/])/,push:[{token:"comment.line.documentation.zig",regex:/$/,next:"pop"},{include:"#commentContents"},{defaultToken:"comment.line.documentation.zig"}]},{token:"comment.line.double-slash.zig",regex:/\/\//,push:[{token:"comment.line.double-slash.zig",regex:/$/,next:"pop"},{include:"#commentContents"},{defaultToken:"comment.line.double-slash.zig"}]}],"#commentContents":[{token:"keyword.todo.zig",regex:/\b(?:TODO|FIXME|XXX|NOTE)\b:?/}],"#constants":[{token:"constant.language.zig",regex:/\b(?:null|undefined|true|false)\b/},{token:"constant.numeric.integer.zig",regex:/\b(?!\.)-?[\d_]+(?!\.)\b/},{token:"constant.numeric.integer.hexadecimal.zig",regex:/\b(?!\.)0x[a-fA-F\d_]+(?!\.)\b/},{token:"constant.numeric.integer.octal.zig",regex:/\b(?!\.)0o[0-7_]+(?!\.)\b/},{token:"constant.numeric.integer.binary.zig",regex:/\b(?!\.)0b[01_]+(?!\.)\b/},{token:"constant.numeric.float.zig",regex:/(?!\.)-?\b[\d_]+(?:\.[\d_]+)?(?:[eE][+-]?[\d_]+)?(?!\.)\b/},{token:"constant.numeric.float.hexadecimal.zig",regex:/(?!\.)-?\b0x[a-fA-F\d_]+(?:\.[a-fA-F\d_]+)?[pP]?(?:[+-]?[\d_]+)?(?!\.)\b/}],"#container_decl":[{token:"entity.name.union.zig",regex:/\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*union\s*[(\{])/},{token:"entity.name.struct.zig",regex:/\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*struct\s*[(\{])/},{token:"entity.name.enum.zig",regex:/\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*enum\s*[(\{])/},{token:"entity.name.error.zig",regex:/\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*error\s*[(\{])/},{token:["storage.type.error.zig","punctuation.accessor.zig","entity.name.error.zig"],regex:/\b(error)(\.)([a-zA-Z_]\w*|@\".+\")/}],"#dummy_main":[{include:"#label"},{include:"#function_type"},{include:"#function_def"},{include:"#punctuation"},{include:"#storage_modifier"},{include:"#container_decl"},{include:"#constants"},{include:"#comments"},{include:"#strings"},{include:"#storage"},{include:"#keywords"},{include:"#operators"},{include:"#support"},{include:"#field_decl"},{include:"#block"},{include:"#function_call"},{include:"#enum_literal"},{include:"#variables"}],"#enum_literal":[{token:"constant.language.enum",regex:/(?!\w|\)|\?|\}|\]|\*|\.)\.(?:[a-zA-Z_]\w*\b|@\"[^\"]*\")(?!\(|\s*=[^=>])/}],"#field_decl":[{token:["variable.other.member.zig","text","punctuation.separator.zig","text"],regex:/([a-zA-Z_]\w*|@\".+\")(\s*)(:)(\s*)/,push:[{token:["storage.type.zig","text","punctuation.separator.zig","keyword.operator.assignment.zig"],regex:/((?:[a-zA-Z_][\w.]*|@\".+\")?)(\s*)(?:(,)|(=)|$)/,next:"pop"},{include:"#dummy_main"}]}],"#function_call":[{token:"variable.function.zig",regex:/\b(?!fn)(?:[a-zA-Z_]\w*|@\".+\")(?=\s*\()/}],"#keywords":[{token:"keyword.control.zig",regex:/\b(?:while|for|break|return|continue|asm|defer|errdefer|unreachable)\b/},{token:"keyword.control.async.zig",regex:/\b(?:async|await|suspend|nosuspend|resume)\b/},{token:"keyword.control.conditional.zig",regex:/\b(?:if|else|switch|try|catch|orelse)\b/},{token:"keyword.control.import.zig",regex:/\b(?!\w)(?:@import|@cImport|@cInclude)\b/},{token:"keyword.other.usingnamespace.zig",regex:/\busingnamespace\b/}],"#label":[{token:["keyword.control.zig","text","entity.name.label.zig","entity.name.label.zig"],regex:/\b(break|continue)(\s*:\s*)([a-zA-Z_]\w*|@\".+\")\b|\b(?!\d)([a-zA-Z_]\w*|@\".+\")\b(?=\s*:\s*(?:\{|while\b))/}],"#operators":[{token:"keyword.operator.zig",regex:/\b!\b/},{token:"keyword.operator.logical.zig",regex:/==|(?:!|>|<)=?/},{token:"keyword.operator.word.zig",regex:/\b(?:and|or)\b/},{token:"keyword.operator.assignment.zig",regex:/(?:(?:\+|-|\*)\%?|\/|%|<<|>>|&|\|(?=[^\|])|\^)?=/},{token:"keyword.operator.arithmetic.zig",regex:/(?:\+|-|\*)\%?|\/(?!\/)|%/},{token:"keyword.operator.bitwise.zig",regex:/<<|>>|&(?=[a-zA-Z_]|@\")|\|(?=[^\|])|\^|~/},{token:"keyword.operator.other.zig",regex:/\+\+|\*\*|->|\.\?|\.\*|&(?=[a-zA-Z_]|@\")|\?|\|\||\.{2,3}/}],"#param_list":[{token:["variable.parameter.zig","text","punctuation.separator.zig","text"],regex:/([a-zA-Z_]\w*|@\".+\")(\s*)(:)(\s*)/,push:[{token:["storage.type.zig","text","punctuation.separator.zig","punctuation.section.parens.end.zig"],regex:/((?:[a-zA-Z_][\w.]*|@\".+\")?)(\s*)(?:(,)|(\)))/,next:"pop"},{include:"#dummy_main"},{token:"storage.type.zig",regex:/[a-zA-Z_][\w.]*|@\".+\"/}]}],"#punctuation":[{token:"punctuation.separator.zig",regex:/,/},{token:"punctuation.terminator.zig",regex:/;/},{token:"punctuation.section.parens.begin.zig",regex:/\(/},{token:"punctuation.section.parens.end.zig",regex:/\)/}],"#storage":[{token:"storage.type.zig",regex:/\b(?:bool|void|noreturn|type|anyerror|anytype)\b/},{token:"storage.type.integer.zig",regex:/\b(?!\.)(?:[iu]\d+|[iu]size|comptime_int)\b/},{token:"storage.type.float.zig",regex:/\b(?:f16|f32|f64|f128|comptime_float)\b/},{token:"storage.type.c_compat.zig",regex:/\b(?:c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\b/},{token:["storage.type.zig","text","keyword.operator.zig","text","storage.type.zig"],regex:/\b(anyframe)\b(\s*)((?:->)?)(\s*)(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())?/},{token:"storage.type.function.zig",regex:/\bfn\b/},{token:"storage.type.test.zig",regex:/\btest\b/},{token:"storage.type.struct.zig",regex:/\bstruct\b/},{token:"storage.type.enum.zig",regex:/\benum\b/},{token:"storage.type.union.zig",regex:/\bunion\b/},{token:"storage.type.error.zig",regex:/\berror\b/}],"#storage_modifier":[{token:"storage.modifier.zig",regex:/\b(?:const|var|extern|packed|export|pub|noalias|inline|noinline|comptime|volatile|align|linksection|threadlocal|allowzero)\b/}],"#strings":[{token:"string.quoted.single.zig",regex:/\'/,push:[{token:"string.quoted.single.zig",regex:/\'/,next:"pop"},{include:"#character_escapes"},{token:"invalid.illegal.character.zig",regex:/\\[^\'][^\']*?/},{defaultToken:"string.quoted.single.zig"}]},{token:"string.quoted.double.zig",regex:/c?\"/,push:[{token:"string.quoted.double.zig",regex:/\"/,next:"pop"},{include:"#character_escapes"},{token:"invalid.illegal.character.zig",regex:/\\[^\'][^\']*?/},{defaultToken:"string.quoted.double.zig"}]},{token:"string.quoted.other.zig",regex:/c?\\\\/,push:[{token:"string.quoted.other.zig",regex:/$/,next:"pop"},{defaultToken:"string.quoted.other.zig"}]}],"#function_type":[{token:["storage.type.function.zig","text","punctuation.section.parens.begin.zig"],regex:/\b(fn)(\s*)(\()/,push:[{token:["text","storage.type.zig","text","keyword.operator.zig","text","storage.type.zig"],regex:/(\s*)(?:([a-zA-Z_]\w*|@\".+\"))?(\s*)((?:!)?)(\s*)([a-zA-Z_]\w*|@\".+\")/,next:"pop"},{include:"#label"},{include:"#param_list"},{token:"storage.type.zig",regex:/[a-zA-Z_]\w*|@\".+\"/},{include:"#dummy_main"},{defaultToken:"meta.function.parameters.zig"}]}],"#function_def":[{token:["text","entity.name.function","punctuation.section.parens.begin.zig"],regex:/(?=fn\s+)(\s+)([a-zA-Z_]\w*|@\".+\")(\()/,push:[{token:["text","storage.type.zig","keyword.operator.zig","text","storage.type.zig"],regex:/(\s*)((?:[a-zA-Z_][\w.]*|@\".+\")?)((?:!)?)(\s*)(?:([a-zA-Z_][\w.]*|@\".+\")?)/,next:"pop"},{include:"#label"},{include:"#param_list"},{token:"storage.type.zig",regex:/[a-zA-Z_][\w.]*|@\".+\"/},{include:"#dummy_main"}]}],"#support":[{token:"support.function.zig",regex:/\b@(?!\w|\"|[0-9])[a-zA-Z_]\w*\b/}],"#variables":[{token:"variable.constant.zig",regex:/\b[_A-Z][_A-Z0-9]+\b/},{token:"entity.name.type.zig",regex:/\b[_a-zA-Z][_a-zA-Z0-9]*_t\b/},{token:"entity.name.type.zig",regex:/\b[A-Z][a-zA-Z0-9]*\b/},{token:"variable.zig",regex:/\b[_a-zA-Z][_a-zA-Z0-9]*\b/}]},this.normalizeRules()};s.metaData={fileTypes:["zig"],keyEquivalent:"^~Z",name:"Zig",scopeName:"source.zig"},r.inherits(s,i),t.ZigHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/zig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zig_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./zig_highlight_rules").ZigHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/zig"}.call(u.prototype),t.Mode=u}); (function() { + ace.require(["ace/mode/zig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/abap.js b/mixly/common/modules/web-modules/ace/snippets/abap.js new file mode 100644 index 00000000..7fb38084 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/abap.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/abap"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/abc.js b/mixly/common/modules/web-modules/ace/snippets/abc.js new file mode 100644 index 00000000..63630b77 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/abc.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/abc.snippets",["require","exports","module"],function(e,t,n){n.exports='\nsnippet zupfnoter.print\n %%%%hn.print {"startpos": ${1:pos_y}, "t":"${2:title}", "v":[${3:voices}], "s":[[${4:syncvoices}1,2]], "f":[${5:flowlines}], "sf":[${6:subflowlines}], "j":[${7:jumplines}]}\n\nsnippet zupfnoter.note\n %%%%hn.note {"pos": [${1:pos_x},${2:pos_y}], "text": "${3:text}", "style": "${4:style}"}\n\nsnippet zupfnoter.annotation\n %%%%hn.annotation {"id": "${1:id}", "pos": [${2:pos}], "text": "${3:text}"}\n\nsnippet zupfnoter.lyrics\n %%%%hn.lyrics {"pos": [${1:x_pos},${2:y_pos}]}\n\nsnippet zupfnoter.legend\n %%%%hn.legend {"pos": [${1:x_pos},${2:y_pos}]}\n\n\n\nsnippet zupfnoter.target\n "^:${1:target}"\n\nsnippet zupfnoter.goto\n "^@${1:target}@${2:distance}"\n\nsnippet zupfnoter.annotationref\n "^#${1:target}"\n\nsnippet zupfnoter.annotation\n "^!${1:text}@${2:x_offset},${3:y_offset}"\n\n\n'}),ace.define("ace/snippets/abc",["require","exports","module","ace/snippets/abc.snippets"],function(e,t,n){"use strict";t.snippetText=e("./abc.snippets"),t.scope="abc"}); (function() { + ace.require(["ace/snippets/abc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/actionscript.js b/mixly/common/modules/web-modules/ace/snippets/actionscript.js new file mode 100644 index 00000000..1a95ebc0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/actionscript.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/actionscript.snippets",["require","exports","module"],function(e,t,n){n.exports='snippet main\n package {\n import flash.display.*;\n import flash.Events.*;\n \n public class Main extends Sprite {\n public function Main ( ) {\n trace("start");\n stage.scaleMode = StageScaleMode.NO_SCALE;\n stage.addEventListener(Event.RESIZE, resizeListener);\n }\n \n private function resizeListener (e:Event):void {\n trace("The application window changed size!");\n trace("New width: " + stage.stageWidth);\n trace("New height: " + stage.stageHeight);\n }\n \n }\n \n }\nsnippet class\n ${1:public|internal} class ${2:name} ${3:extends } {\n public function $2 ( ) {\n ("start");\n }\n }\nsnippet all\n package name {\n\n ${1:public|internal|final} class ${2:name} ${3:extends } {\n private|public| static const FOO = "abc";\n private|public| static var BAR = "abc";\n\n // class initializer - no JIT !! one time setup\n if Cababilities.os == "Linux|MacOS" {\n FOO = "other";\n }\n\n // constructor:\n public function $2 ( ){\n super2();\n trace("start");\n }\n public function name (a, b...){\n super.name(..);\n lable:break\n }\n }\n }\n\n function A(){\n // A can only be accessed within this file\n }\nsnippet switch\n switch(${1}){\n case ${2}:\n ${3}\n break;\n default:\n }\nsnippet case\n case ${1}:\n ${2}\n break;\nsnippet package\n package ${1:package}{\n ${2}\n }\nsnippet wh\n while ${1:cond}{\n ${2}\n }\nsnippet do\n do {\n ${2}\n } while (${1:cond})\nsnippet while\n while ${1:cond}{\n ${2}\n }\nsnippet for enumerate names\n for (${1:var} in ${2:object}){\n ${3}\n }\nsnippet for enumerate values\n for each (${1:var} in ${2:object}){\n ${3}\n }\nsnippet get_set\n function get ${1:name} {\n return ${2}\n }\n function set $1 (newValue) {\n ${3}\n }\nsnippet interface\n interface name {\n function method(${1}):${2:returntype};\n }\nsnippet try\n try {\n ${1}\n } catch (error:ErrorType) {\n ${2}\n } finally {\n ${3}\n }\n# For Loop (same as c.snippet)\nsnippet for for (..) {..}\n for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }\n# Custom For Loop\nsnippet forr\n for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {\n ${5:/* code */}\n }\n# If Condition\nsnippet if\n if (${1:/* condition */}) {\n ${2:/* code */}\n }\nsnippet el\n else {\n ${1}\n }\n# Ternary conditional\nsnippet t\n ${1:/* condition */} ? ${2:a} : ${3:b}\nsnippet fun\n function ${1:function_name}(${2})${3}\n {\n ${4:/* code */}\n }\n# FlxSprite (usefull when using the flixel library)\nsnippet FlxSprite\n package\n {\n import org.flixel.*\n\n public class ${1:ClassName} extends ${2:FlxSprite}\n {\n public function $1(${3: X:Number, Y:Number}):void\n {\n super(X,Y);\n ${4: //code...}\n }\n\n override public function update():void\n {\n super.update();\n ${5: //code...}\n }\n }\n }\n\n'}),ace.define("ace/snippets/actionscript",["require","exports","module","ace/snippets/actionscript.snippets"],function(e,t,n){"use strict";t.snippetText=e("./actionscript.snippets"),t.scope="actionscript"}); (function() { + ace.require(["ace/snippets/actionscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/ada.js b/mixly/common/modules/web-modules/ace/snippets/ada.js new file mode 100644 index 00000000..77db475e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/ada.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/ada"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/alda.js b/mixly/common/modules/web-modules/ace/snippets/alda.js new file mode 100644 index 00000000..c0cda384 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/alda.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/alda"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/apache_conf.js b/mixly/common/modules/web-modules/ace/snippets/apache_conf.js new file mode 100644 index 00000000..ff62c7fc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/apache_conf.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/apache_conf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/apex.js b/mixly/common/modules/web-modules/ace/snippets/apex.js new file mode 100644 index 00000000..6fc20815 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/apex.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/apex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/applescript.js b/mixly/common/modules/web-modules/ace/snippets/applescript.js new file mode 100644 index 00000000..2db2ef43 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/applescript.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/applescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/aql.js b/mixly/common/modules/web-modules/ace/snippets/aql.js new file mode 100644 index 00000000..9924bed7 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/aql.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/aql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/asciidoc.js b/mixly/common/modules/web-modules/ace/snippets/asciidoc.js new file mode 100644 index 00000000..930a3f57 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/asciidoc.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/asciidoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/asl.js b/mixly/common/modules/web-modules/ace/snippets/asl.js new file mode 100644 index 00000000..41eeddfe --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/asl.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/asl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/assembly_arm32.js b/mixly/common/modules/web-modules/ace/snippets/assembly_arm32.js new file mode 100644 index 00000000..d807c6e6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/assembly_arm32.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/assembly_arm32"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/assembly_x86.js b/mixly/common/modules/web-modules/ace/snippets/assembly_x86.js new file mode 100644 index 00000000..fdf36532 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/assembly_x86.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/assembly_x86"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/astro.js b/mixly/common/modules/web-modules/ace/snippets/astro.js new file mode 100644 index 00000000..95b61737 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/astro.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/astro"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/autohotkey.js b/mixly/common/modules/web-modules/ace/snippets/autohotkey.js new file mode 100644 index 00000000..73488ea1 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/autohotkey.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/autohotkey"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/basic.js b/mixly/common/modules/web-modules/ace/snippets/basic.js new file mode 100644 index 00000000..9a6665c8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/basic.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/basic"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/batchfile.js b/mixly/common/modules/web-modules/ace/snippets/batchfile.js new file mode 100644 index 00000000..2a5bf777 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/batchfile.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/batchfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/bibtex.js b/mixly/common/modules/web-modules/ace/snippets/bibtex.js new file mode 100644 index 00000000..38a24988 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/bibtex.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/bibtex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/c9search.js b/mixly/common/modules/web-modules/ace/snippets/c9search.js new file mode 100644 index 00000000..15f1baa4 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/c9search.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/c9search"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/c_cpp.js b/mixly/common/modules/web-modules/ace/snippets/c_cpp.js new file mode 100644 index 00000000..17601636 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/c_cpp.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/c_cpp.snippets",["require","exports","module"],function(e,t,n){n.exports="## STL Collections\n# std::array\nsnippet array\n std::array<${1:T}, ${2:N}> ${3};${4}\n# std::vector\nsnippet vector\n std::vector<${1:T}> ${2};${3}\n# std::deque\nsnippet deque\n std::deque<${1:T}> ${2};${3}\n# std::forward_list\nsnippet flist\n std::forward_list<${1:T}> ${2};${3}\n# std::list\nsnippet list\n std::list<${1:T}> ${2};${3}\n# std::set\nsnippet set\n std::set<${1:T}> ${2};${3}\n# std::map\nsnippet map\n std::map<${1:Key}, ${2:T}> ${3};${4}\n# std::multiset\nsnippet mset\n std::multiset<${1:T}> ${2};${3}\n# std::multimap\nsnippet mmap\n std::multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_set\nsnippet uset\n std::unordered_set<${1:T}> ${2};${3}\n# std::unordered_map\nsnippet umap\n std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_multiset\nsnippet umset\n std::unordered_multiset<${1:T}> ${2};${3}\n# std::unordered_multimap\nsnippet ummap\n std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::stack\nsnippet stack\n std::stack<${1:T}> ${2};${3}\n# std::queue\nsnippet queue\n std::queue<${1:T}> ${2};${3}\n# std::priority_queue\nsnippet pqueue\n std::priority_queue<${1:T}> ${2};${3}\n##\n## Access Modifiers\n# private\nsnippet pri\n private\n# protected\nsnippet pro\n protected\n# public\nsnippet pub\n public\n# friend\nsnippet fr\n friend\n# mutable\nsnippet mu\n mutable\n## \n## Class\n# class\nsnippet cl\n class ${1:`Filename('$1', 'name')`} \n {\n public:\n $1(${2});\n ~$1();\n\n private:\n ${3:/* data */}\n };\n# member function implementation\nsnippet mfun\n ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n ${5:/* code */}\n }\n# namespace\nsnippet ns\n namespace ${1:`Filename('', 'my')`} {\n ${2}\n } /* namespace $1 */\n##\n## Input/Output\n# std::cout\nsnippet cout\n std::cout << ${1} << std::endl;${2}\n# std::cin\nsnippet cin\n std::cin >> ${1};${2}\n##\n## Iteration\n# for i \nsnippet fori\n for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }${5}\n\n# foreach\nsnippet fore\n for (${1:auto} ${2:i} : ${3:container}) {\n ${4:/* code */}\n }${5}\n# iterator\nsnippet iter\n for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n ${6}\n }${7}\n\n# auto iterator\nsnippet itera\n for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n ${2:std::cout << *$1 << std::endl;}\n }${3}\n##\n## Lambdas\n# lamda (one line)\nsnippet ld\n [${1}](${2}){${3:/* code */}}${4}\n# lambda (multi-line)\nsnippet lld\n [${1}](${2}){\n ${3:/* code */}\n }${4}\n"}),ace.define("ace/snippets/c_cpp",["require","exports","module","ace/snippets/c_cpp.snippets"],function(e,t,n){"use strict";t.snippetText=e("./c_cpp.snippets"),t.scope="c_cpp"}); (function() { + ace.require(["ace/snippets/c_cpp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/cirru.js b/mixly/common/modules/web-modules/ace/snippets/cirru.js new file mode 100644 index 00000000..bea20abc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/cirru.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/cirru"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/clojure.js b/mixly/common/modules/web-modules/ace/snippets/clojure.js new file mode 100644 index 00000000..94c598de --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/clojure.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/clojure.snippets",["require","exports","module"],function(e,t,n){n.exports='snippet comm\n (comment\n ${1}\n )\nsnippet condp\n (condp ${1:pred} ${2:expr}\n ${3})\nsnippet def\n (def ${1})\nsnippet defm\n (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]\n ${5})\nsnippet defmm\n (defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defma\n (defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defn\n (defn ${1:name} "${2:doc-string}" [${3:arg-list}]\n ${4})\nsnippet defp\n (defprotocol ${1:name}\n ${2})\nsnippet defr\n (defrecord ${1:name} [${2:fields}]\n ${3:protocol}\n ${4})\nsnippet deft\n (deftest ${1:name}\n (is (= ${2:assertion})))\n ${3})\nsnippet is\n (is (= ${1} ${2}))\nsnippet defty\n (deftype ${1:Name} [${2:fields}]\n ${3:Protocol}\n ${4})\nsnippet doseq\n (doseq [${1:elem} ${2:coll}]\n ${3})\nsnippet fn\n (fn [${1:arg-list}] ${2})\nsnippet if\n (if ${1:test-expr}\n ${2:then-expr}\n ${3:else-expr})\nsnippet if-let \n (if-let [${1:result} ${2:test-expr}]\n (${3:then-expr} $1)\n (${4:else-expr}))\nsnippet imp\n (:import [${1:package}])\n & {:keys [${1:keys}] :or {${2:defaults}}}\nsnippet let\n (let [${1:name} ${2:expr}]\n ${3})\nsnippet letfn\n (letfn [(${1:name) [${2:args}]\n ${3})])\nsnippet map\n (map ${1:func} ${2:coll})\nsnippet mapl\n (map #(${1:lambda}) ${2:coll})\nsnippet met\n (${1:name} [${2:this} ${3:args}]\n ${4})\nsnippet ns\n (ns ${1:name}\n ${2})\nsnippet dotimes\n (dotimes [_ 10]\n (time\n (dotimes [_ ${1:times}]\n ${2})))\nsnippet pmethod\n (${1:name} [${2:this} ${3:args}])\nsnippet refer\n (:refer-clojure :exclude [${1}])\nsnippet require\n (:require [${1:namespace} :as [${2}]])\nsnippet use\n (:use [${1:namespace} :only [${2}]])\nsnippet print\n (println ${1})\nsnippet reduce\n (reduce ${1:(fn [p n] ${3})} ${2})\nsnippet when\n (when ${1:test} ${2:body})\nsnippet when-let\n (when-let [${1:result} ${2:test}]\n ${3:body})\n'}),ace.define("ace/snippets/clojure",["require","exports","module","ace/snippets/clojure.snippets"],function(e,t,n){"use strict";t.snippetText=e("./clojure.snippets"),t.scope="clojure"}); (function() { + ace.require(["ace/snippets/clojure"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/cobol.js b/mixly/common/modules/web-modules/ace/snippets/cobol.js new file mode 100644 index 00000000..f1c24de3 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/cobol.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/cobol"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/coffee.js b/mixly/common/modules/web-modules/ace/snippets/coffee.js new file mode 100644 index 00000000..c0d722f1 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/coffee.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/coffee.snippets",["require","exports","module"],function(e,t,n){n.exports="# Closure loop\nsnippet forindo\n for ${1:name} in ${2:array}\n do ($1) ->\n ${3:// body}\n# Array comprehension\nsnippet fora\n for ${1:name} in ${2:array}\n ${3:// body...}\n# Object comprehension\nsnippet foro\n for ${1:key}, ${2:value} of ${3:object}\n ${4:// body...}\n# Range comprehension (inclusive)\nsnippet forr\n for ${1:name} in [${2:start}..${3:finish}]\n ${4:// body...}\nsnippet forrb\n for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n ${5:// body...}\n# Range comprehension (exclusive)\nsnippet forrex\n for ${1:name} in [${2:start}...${3:finish}]\n ${4:// body...}\nsnippet forrexb\n for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n ${5:// body...}\n# Function\nsnippet fun\n (${1:args}) ->\n ${2:// body...}\n# Function (bound)\nsnippet bfun\n (${1:args}) =>\n ${2:// body...}\n# Class\nsnippet cla class ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n ${2}\nsnippet cla class .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n constructor: (${2:args}) ->\n ${3}\n\n ${4}\nsnippet cla class .. extends ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n ${3}\nsnippet cla class .. extends .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n constructor: (${3:args}) ->\n ${4}\n\n ${5}\n# If\nsnippet if\n if ${1:condition}\n ${2:// body...}\n# If __ Else\nsnippet ife\n if ${1:condition}\n ${2:// body...}\n else\n ${3:// body...}\n# Else if\nsnippet elif\n else if ${1:condition}\n ${2:// body...}\n# Ternary If\nsnippet ifte\n if ${1:condition} then ${2:value} else ${3:other}\n# Unless\nsnippet unl\n ${1:action} unless ${2:condition}\n# Switch\nsnippet swi\n switch ${1:object}\n when ${2:value}\n ${3:// body...}\n\n# Log\nsnippet log\n console.log ${1}\n# Try __ Catch\nsnippet try\n try\n ${1}\n catch ${2:error}\n ${3}\n# Require\nsnippet req\n ${2:$1} = require '${1:sys}'${3}\n# Export\nsnippet exp\n ${1:root} = exports ? this\n"}),ace.define("ace/snippets/coffee",["require","exports","module","ace/snippets/coffee.snippets"],function(e,t,n){"use strict";t.snippetText=e("./coffee.snippets"),t.scope="coffee"}); (function() { + ace.require(["ace/snippets/coffee"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/coldfusion.js b/mixly/common/modules/web-modules/ace/snippets/coldfusion.js new file mode 100644 index 00000000..bd5f6917 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/coldfusion.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/coldfusion"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/crystal.js b/mixly/common/modules/web-modules/ace/snippets/crystal.js new file mode 100644 index 00000000..e4294165 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/crystal.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/crystal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/csharp.js b/mixly/common/modules/web-modules/ace/snippets/csharp.js new file mode 100644 index 00000000..291e4f3c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/csharp.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/csharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/csound_document.js b/mixly/common/modules/web-modules/ace/snippets/csound_document.js new file mode 100644 index 00000000..9d7578a3 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/csound_document.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/csound_document.snippets",["require","exports","module"],function(e,t,n){n.exports="# \nsnippet synth\n \n \n ${1}\n \n \n e\n \n \n"}),ace.define("ace/snippets/csound_document",["require","exports","module","ace/snippets/csound_document.snippets"],function(e,t,n){"use strict";t.snippetText=e("./csound_document.snippets"),t.scope="csound_document"}); (function() { + ace.require(["ace/snippets/csound_document"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/csound_orchestra.js b/mixly/common/modules/web-modules/ace/snippets/csound_orchestra.js new file mode 100644 index 00000000..d7423945 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/csound_orchestra.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/csound_orchestra.snippets",["require","exports","module"],function(e,t,n){n.exports="# else\nsnippet else\n else\n ${1:/* statements */}\n# elseif\nsnippet elseif\n elseif ${1:/* condition */} then\n ${2:/* statements */}\n# if\nsnippet if\n if ${1:/* condition */} then\n ${2:/* statements */}\n endif\n# instrument block\nsnippet instr\n instr ${1:name}\n ${2:/* statements */}\n endin\n# i-time while loop\nsnippet iwhile\n i${1:Index} = ${2:0}\n while i${1:Index} < ${3:/* count */} do\n ${4:/* statements */}\n i${1:Index} += 1\n od\n# k-rate while loop\nsnippet kwhile\n k${1:Index} = ${2:0}\n while k${1:Index} < ${3:/* count */} do\n ${4:/* statements */}\n k${1:Index} += 1\n od\n# opcode\nsnippet opcode\n opcode ${1:name}, ${2:/* output types */ 0}, ${3:/* input types */ 0}\n ${4:/* statements */}\n endop\n# until loop\nsnippet until\n until ${1:/* condition */} do\n ${2:/* statements */}\n od\n# while loop\nsnippet while\n while ${1:/* condition */} do\n ${2:/* statements */}\n od\n"}),ace.define("ace/snippets/csound_orchestra",["require","exports","module","ace/snippets/csound_orchestra.snippets"],function(e,t,n){"use strict";t.snippetText=e("./csound_orchestra.snippets"),t.scope="csound_orchestra"}); (function() { + ace.require(["ace/snippets/csound_orchestra"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/csound_score.js b/mixly/common/modules/web-modules/ace/snippets/csound_score.js new file mode 100644 index 00000000..25a7589e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/csound_score.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/csound_score"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/csp.js b/mixly/common/modules/web-modules/ace/snippets/csp.js new file mode 100644 index 00000000..1e79152a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/csp.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/csp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/css.js b/mixly/common/modules/web-modules/ace/snippets/css.js new file mode 100644 index 00000000..66a42fd0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/css.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/css.snippets",["require","exports","module"],function(e,t,n){n.exports="snippet .\n ${1} {\n ${2}\n }\nsnippet !\n !important\nsnippet bdi:m+\n -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:m\n -moz-border-image: ${1};\nsnippet bdrz:m\n -moz-border-radius: ${1};\nsnippet bxsh:m+\n -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:m\n -moz-box-shadow: ${1};\nsnippet bdi:w+\n -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:w\n -webkit-border-image: ${1};\nsnippet bdrz:w\n -webkit-border-radius: ${1};\nsnippet bxsh:w+\n -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:w\n -webkit-box-shadow: ${1};\nsnippet @f\n @font-face {\n font-family: ${1};\n src: url(${2});\n }\nsnippet @i\n @import url(${1});\nsnippet @m\n @media ${1:print} {\n ${2}\n }\nsnippet bg+\n background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\nsnippet bga\n background-attachment: ${1};\nsnippet bga:f\n background-attachment: fixed;\nsnippet bga:s\n background-attachment: scroll;\nsnippet bgbk\n background-break: ${1};\nsnippet bgbk:bb\n background-break: bounding-box;\nsnippet bgbk:c\n background-break: continuous;\nsnippet bgbk:eb\n background-break: each-box;\nsnippet bgcp\n background-clip: ${1};\nsnippet bgcp:bb\n background-clip: border-box;\nsnippet bgcp:cb\n background-clip: content-box;\nsnippet bgcp:nc\n background-clip: no-clip;\nsnippet bgcp:pb\n background-clip: padding-box;\nsnippet bgc\n background-color: #${1:FFF};\nsnippet bgc:t\n background-color: transparent;\nsnippet bgi\n background-image: url(${1});\nsnippet bgi:n\n background-image: none;\nsnippet bgo\n background-origin: ${1};\nsnippet bgo:bb\n background-origin: border-box;\nsnippet bgo:cb\n background-origin: content-box;\nsnippet bgo:pb\n background-origin: padding-box;\nsnippet bgpx\n background-position-x: ${1};\nsnippet bgpy\n background-position-y: ${1};\nsnippet bgp\n background-position: ${1:0} ${2:0};\nsnippet bgr\n background-repeat: ${1};\nsnippet bgr:n\n background-repeat: no-repeat;\nsnippet bgr:x\n background-repeat: repeat-x;\nsnippet bgr:y\n background-repeat: repeat-y;\nsnippet bgr:r\n background-repeat: repeat;\nsnippet bgz\n background-size: ${1};\nsnippet bgz:a\n background-size: auto;\nsnippet bgz:ct\n background-size: contain;\nsnippet bgz:cv\n background-size: cover;\nsnippet bg\n background: ${1};\nsnippet bg:ie\n filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\nsnippet bg:n\n background: none;\nsnippet bd+\n border: ${1:1px} ${2:solid} #${3:000};\nsnippet bdb+\n border-bottom: ${1:1px} ${2:solid} #${3:000};\nsnippet bdbc\n border-bottom-color: #${1:000};\nsnippet bdbi\n border-bottom-image: url(${1});\nsnippet bdbi:n\n border-bottom-image: none;\nsnippet bdbli\n border-bottom-left-image: url(${1});\nsnippet bdbli:c\n border-bottom-left-image: continue;\nsnippet bdbli:n\n border-bottom-left-image: none;\nsnippet bdblrz\n border-bottom-left-radius: ${1};\nsnippet bdbri\n border-bottom-right-image: url(${1});\nsnippet bdbri:c\n border-bottom-right-image: continue;\nsnippet bdbri:n\n border-bottom-right-image: none;\nsnippet bdbrrz\n border-bottom-right-radius: ${1};\nsnippet bdbs\n border-bottom-style: ${1};\nsnippet bdbs:n\n border-bottom-style: none;\nsnippet bdbw\n border-bottom-width: ${1};\nsnippet bdb\n border-bottom: ${1};\nsnippet bdb:n\n border-bottom: none;\nsnippet bdbk\n border-break: ${1};\nsnippet bdbk:c\n border-break: close;\nsnippet bdcl\n border-collapse: ${1};\nsnippet bdcl:c\n border-collapse: collapse;\nsnippet bdcl:s\n border-collapse: separate;\nsnippet bdc\n border-color: #${1:000};\nsnippet bdci\n border-corner-image: url(${1});\nsnippet bdci:c\n border-corner-image: continue;\nsnippet bdci:n\n border-corner-image: none;\nsnippet bdf\n border-fit: ${1};\nsnippet bdf:c\n border-fit: clip;\nsnippet bdf:of\n border-fit: overwrite;\nsnippet bdf:ow\n border-fit: overwrite;\nsnippet bdf:r\n border-fit: repeat;\nsnippet bdf:sc\n border-fit: scale;\nsnippet bdf:sp\n border-fit: space;\nsnippet bdf:st\n border-fit: stretch;\nsnippet bdi\n border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:n\n border-image: none;\nsnippet bdl+\n border-left: ${1:1px} ${2:solid} #${3:000};\nsnippet bdlc\n border-left-color: #${1:000};\nsnippet bdli\n border-left-image: url(${1});\nsnippet bdli:n\n border-left-image: none;\nsnippet bdls\n border-left-style: ${1};\nsnippet bdls:n\n border-left-style: none;\nsnippet bdlw\n border-left-width: ${1};\nsnippet bdl\n border-left: ${1};\nsnippet bdl:n\n border-left: none;\nsnippet bdlt\n border-length: ${1};\nsnippet bdlt:a\n border-length: auto;\nsnippet bdrz\n border-radius: ${1};\nsnippet bdr+\n border-right: ${1:1px} ${2:solid} #${3:000};\nsnippet bdrc\n border-right-color: #${1:000};\nsnippet bdri\n border-right-image: url(${1});\nsnippet bdri:n\n border-right-image: none;\nsnippet bdrs\n border-right-style: ${1};\nsnippet bdrs:n\n border-right-style: none;\nsnippet bdrw\n border-right-width: ${1};\nsnippet bdr\n border-right: ${1};\nsnippet bdr:n\n border-right: none;\nsnippet bdsp\n border-spacing: ${1};\nsnippet bds\n border-style: ${1};\nsnippet bds:ds\n border-style: dashed;\nsnippet bds:dtds\n border-style: dot-dash;\nsnippet bds:dtdtds\n border-style: dot-dot-dash;\nsnippet bds:dt\n border-style: dotted;\nsnippet bds:db\n border-style: double;\nsnippet bds:g\n border-style: groove;\nsnippet bds:h\n border-style: hidden;\nsnippet bds:i\n border-style: inset;\nsnippet bds:n\n border-style: none;\nsnippet bds:o\n border-style: outset;\nsnippet bds:r\n border-style: ridge;\nsnippet bds:s\n border-style: solid;\nsnippet bds:w\n border-style: wave;\nsnippet bdt+\n border-top: ${1:1px} ${2:solid} #${3:000};\nsnippet bdtc\n border-top-color: #${1:000};\nsnippet bdti\n border-top-image: url(${1});\nsnippet bdti:n\n border-top-image: none;\nsnippet bdtli\n border-top-left-image: url(${1});\nsnippet bdtli:c\n border-corner-image: continue;\nsnippet bdtli:n\n border-corner-image: none;\nsnippet bdtlrz\n border-top-left-radius: ${1};\nsnippet bdtri\n border-top-right-image: url(${1});\nsnippet bdtri:c\n border-top-right-image: continue;\nsnippet bdtri:n\n border-top-right-image: none;\nsnippet bdtrrz\n border-top-right-radius: ${1};\nsnippet bdts\n border-top-style: ${1};\nsnippet bdts:n\n border-top-style: none;\nsnippet bdtw\n border-top-width: ${1};\nsnippet bdt\n border-top: ${1};\nsnippet bdt:n\n border-top: none;\nsnippet bdw\n border-width: ${1};\nsnippet bd\n border: ${1};\nsnippet bd:n\n border: none;\nsnippet b\n bottom: ${1};\nsnippet b:a\n bottom: auto;\nsnippet bxsh+\n box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh\n box-shadow: ${1};\nsnippet bxsh:n\n box-shadow: none;\nsnippet bxz\n box-sizing: ${1};\nsnippet bxz:bb\n box-sizing: border-box;\nsnippet bxz:cb\n box-sizing: content-box;\nsnippet cps\n caption-side: ${1};\nsnippet cps:b\n caption-side: bottom;\nsnippet cps:t\n caption-side: top;\nsnippet cl\n clear: ${1};\nsnippet cl:b\n clear: both;\nsnippet cl:l\n clear: left;\nsnippet cl:n\n clear: none;\nsnippet cl:r\n clear: right;\nsnippet cp\n clip: ${1};\nsnippet cp:a\n clip: auto;\nsnippet cp:r\n clip: rect(${1:0} ${2:0} ${3:0} ${4:0});\nsnippet c\n color: #${1:000};\nsnippet ct\n content: ${1};\nsnippet ct:a\n content: attr(${1});\nsnippet ct:cq\n content: close-quote;\nsnippet ct:c\n content: counter(${1});\nsnippet ct:cs\n content: counters(${1});\nsnippet ct:ncq\n content: no-close-quote;\nsnippet ct:noq\n content: no-open-quote;\nsnippet ct:n\n content: normal;\nsnippet ct:oq\n content: open-quote;\nsnippet coi\n counter-increment: ${1};\nsnippet cor\n counter-reset: ${1};\nsnippet cur\n cursor: ${1};\nsnippet cur:a\n cursor: auto;\nsnippet cur:c\n cursor: crosshair;\nsnippet cur:d\n cursor: default;\nsnippet cur:ha\n cursor: hand;\nsnippet cur:he\n cursor: help;\nsnippet cur:m\n cursor: move;\nsnippet cur:p\n cursor: pointer;\nsnippet cur:t\n cursor: text;\nsnippet d\n display: ${1};\nsnippet d:mib\n display: -moz-inline-box;\nsnippet d:mis\n display: -moz-inline-stack;\nsnippet d:b\n display: block;\nsnippet d:cp\n display: compact;\nsnippet d:ib\n display: inline-block;\nsnippet d:itb\n display: inline-table;\nsnippet d:i\n display: inline;\nsnippet d:li\n display: list-item;\nsnippet d:n\n display: none;\nsnippet d:ri\n display: run-in;\nsnippet d:tbcp\n display: table-caption;\nsnippet d:tbc\n display: table-cell;\nsnippet d:tbclg\n display: table-column-group;\nsnippet d:tbcl\n display: table-column;\nsnippet d:tbfg\n display: table-footer-group;\nsnippet d:tbhg\n display: table-header-group;\nsnippet d:tbrg\n display: table-row-group;\nsnippet d:tbr\n display: table-row;\nsnippet d:tb\n display: table;\nsnippet ec\n empty-cells: ${1};\nsnippet ec:h\n empty-cells: hide;\nsnippet ec:s\n empty-cells: show;\nsnippet exp\n expression()\nsnippet fl\n float: ${1};\nsnippet fl:l\n float: left;\nsnippet fl:n\n float: none;\nsnippet fl:r\n float: right;\nsnippet f+\n font: ${1:1em} ${2:Arial},${3:sans-serif};\nsnippet fef\n font-effect: ${1};\nsnippet fef:eb\n font-effect: emboss;\nsnippet fef:eg\n font-effect: engrave;\nsnippet fef:n\n font-effect: none;\nsnippet fef:o\n font-effect: outline;\nsnippet femp\n font-emphasize-position: ${1};\nsnippet femp:a\n font-emphasize-position: after;\nsnippet femp:b\n font-emphasize-position: before;\nsnippet fems\n font-emphasize-style: ${1};\nsnippet fems:ac\n font-emphasize-style: accent;\nsnippet fems:c\n font-emphasize-style: circle;\nsnippet fems:ds\n font-emphasize-style: disc;\nsnippet fems:dt\n font-emphasize-style: dot;\nsnippet fems:n\n font-emphasize-style: none;\nsnippet fem\n font-emphasize: ${1};\nsnippet ff\n font-family: ${1};\nsnippet ff:c\n font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\nsnippet ff:f\n font-family: ${1:Capitals,Impact},fantasy;\nsnippet ff:m\n font-family: ${1:Monaco,'Courier New'},monospace;\nsnippet ff:ss\n font-family: ${1:Helvetica,Arial},sans-serif;\nsnippet ff:s\n font-family: ${1:Georgia,'Times New Roman'},serif;\nsnippet fza\n font-size-adjust: ${1};\nsnippet fza:n\n font-size-adjust: none;\nsnippet fz\n font-size: ${1};\nsnippet fsm\n font-smooth: ${1};\nsnippet fsm:aw\n font-smooth: always;\nsnippet fsm:a\n font-smooth: auto;\nsnippet fsm:n\n font-smooth: never;\nsnippet fst\n font-stretch: ${1};\nsnippet fst:c\n font-stretch: condensed;\nsnippet fst:e\n font-stretch: expanded;\nsnippet fst:ec\n font-stretch: extra-condensed;\nsnippet fst:ee\n font-stretch: extra-expanded;\nsnippet fst:n\n font-stretch: normal;\nsnippet fst:sc\n font-stretch: semi-condensed;\nsnippet fst:se\n font-stretch: semi-expanded;\nsnippet fst:uc\n font-stretch: ultra-condensed;\nsnippet fst:ue\n font-stretch: ultra-expanded;\nsnippet fs\n font-style: ${1};\nsnippet fs:i\n font-style: italic;\nsnippet fs:n\n font-style: normal;\nsnippet fs:o\n font-style: oblique;\nsnippet fv\n font-variant: ${1};\nsnippet fv:n\n font-variant: normal;\nsnippet fv:sc\n font-variant: small-caps;\nsnippet fw\n font-weight: ${1};\nsnippet fw:b\n font-weight: bold;\nsnippet fw:br\n font-weight: bolder;\nsnippet fw:lr\n font-weight: lighter;\nsnippet fw:n\n font-weight: normal;\nsnippet f\n font: ${1};\nsnippet h\n height: ${1};\nsnippet h:a\n height: auto;\nsnippet l\n left: ${1};\nsnippet l:a\n left: auto;\nsnippet lts\n letter-spacing: ${1};\nsnippet lh\n line-height: ${1};\nsnippet lisi\n list-style-image: url(${1});\nsnippet lisi:n\n list-style-image: none;\nsnippet lisp\n list-style-position: ${1};\nsnippet lisp:i\n list-style-position: inside;\nsnippet lisp:o\n list-style-position: outside;\nsnippet list\n list-style-type: ${1};\nsnippet list:c\n list-style-type: circle;\nsnippet list:dclz\n list-style-type: decimal-leading-zero;\nsnippet list:dc\n list-style-type: decimal;\nsnippet list:d\n list-style-type: disc;\nsnippet list:lr\n list-style-type: lower-roman;\nsnippet list:n\n list-style-type: none;\nsnippet list:s\n list-style-type: square;\nsnippet list:ur\n list-style-type: upper-roman;\nsnippet lis\n list-style: ${1};\nsnippet lis:n\n list-style: none;\nsnippet mb\n margin-bottom: ${1};\nsnippet mb:a\n margin-bottom: auto;\nsnippet ml\n margin-left: ${1};\nsnippet ml:a\n margin-left: auto;\nsnippet mr\n margin-right: ${1};\nsnippet mr:a\n margin-right: auto;\nsnippet mt\n margin-top: ${1};\nsnippet mt:a\n margin-top: auto;\nsnippet m\n margin: ${1};\nsnippet m:4\n margin: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet m:3\n margin: ${1:0} ${2:0} ${3:0};\nsnippet m:2\n margin: ${1:0} ${2:0};\nsnippet m:0\n margin: 0;\nsnippet m:a\n margin: auto;\nsnippet mah\n max-height: ${1};\nsnippet mah:n\n max-height: none;\nsnippet maw\n max-width: ${1};\nsnippet maw:n\n max-width: none;\nsnippet mih\n min-height: ${1};\nsnippet miw\n min-width: ${1};\nsnippet op\n opacity: ${1};\nsnippet op:ie\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\nsnippet op:ms\n -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\nsnippet orp\n orphans: ${1};\nsnippet o+\n outline: ${1:1px} ${2:solid} #${3:000};\nsnippet oc\n outline-color: ${1:#000};\nsnippet oc:i\n outline-color: invert;\nsnippet oo\n outline-offset: ${1};\nsnippet os\n outline-style: ${1};\nsnippet ow\n outline-width: ${1};\nsnippet o\n outline: ${1};\nsnippet o:n\n outline: none;\nsnippet ovs\n overflow-style: ${1};\nsnippet ovs:a\n overflow-style: auto;\nsnippet ovs:mq\n overflow-style: marquee;\nsnippet ovs:mv\n overflow-style: move;\nsnippet ovs:p\n overflow-style: panner;\nsnippet ovs:s\n overflow-style: scrollbar;\nsnippet ovx\n overflow-x: ${1};\nsnippet ovx:a\n overflow-x: auto;\nsnippet ovx:h\n overflow-x: hidden;\nsnippet ovx:s\n overflow-x: scroll;\nsnippet ovx:v\n overflow-x: visible;\nsnippet ovy\n overflow-y: ${1};\nsnippet ovy:a\n overflow-y: auto;\nsnippet ovy:h\n overflow-y: hidden;\nsnippet ovy:s\n overflow-y: scroll;\nsnippet ovy:v\n overflow-y: visible;\nsnippet ov\n overflow: ${1};\nsnippet ov:a\n overflow: auto;\nsnippet ov:h\n overflow: hidden;\nsnippet ov:s\n overflow: scroll;\nsnippet ov:v\n overflow: visible;\nsnippet pb\n padding-bottom: ${1};\nsnippet pl\n padding-left: ${1};\nsnippet pr\n padding-right: ${1};\nsnippet pt\n padding-top: ${1};\nsnippet p\n padding: ${1};\nsnippet p:4\n padding: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet p:3\n padding: ${1:0} ${2:0} ${3:0};\nsnippet p:2\n padding: ${1:0} ${2:0};\nsnippet p:0\n padding: 0;\nsnippet pgba\n page-break-after: ${1};\nsnippet pgba:aw\n page-break-after: always;\nsnippet pgba:a\n page-break-after: auto;\nsnippet pgba:l\n page-break-after: left;\nsnippet pgba:r\n page-break-after: right;\nsnippet pgbb\n page-break-before: ${1};\nsnippet pgbb:aw\n page-break-before: always;\nsnippet pgbb:a\n page-break-before: auto;\nsnippet pgbb:l\n page-break-before: left;\nsnippet pgbb:r\n page-break-before: right;\nsnippet pgbi\n page-break-inside: ${1};\nsnippet pgbi:a\n page-break-inside: auto;\nsnippet pgbi:av\n page-break-inside: avoid;\nsnippet pos\n position: ${1};\nsnippet pos:a\n position: absolute;\nsnippet pos:f\n position: fixed;\nsnippet pos:r\n position: relative;\nsnippet pos:s\n position: static;\nsnippet q\n quotes: ${1};\nsnippet q:en\n quotes: '\\201C' '\\201D' '\\2018' '\\2019';\nsnippet q:n\n quotes: none;\nsnippet q:ru\n quotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\nsnippet rz\n resize: ${1};\nsnippet rz:b\n resize: both;\nsnippet rz:h\n resize: horizontal;\nsnippet rz:n\n resize: none;\nsnippet rz:v\n resize: vertical;\nsnippet r\n right: ${1};\nsnippet r:a\n right: auto;\nsnippet tbl\n table-layout: ${1};\nsnippet tbl:a\n table-layout: auto;\nsnippet tbl:f\n table-layout: fixed;\nsnippet tal\n text-align-last: ${1};\nsnippet tal:a\n text-align-last: auto;\nsnippet tal:c\n text-align-last: center;\nsnippet tal:l\n text-align-last: left;\nsnippet tal:r\n text-align-last: right;\nsnippet ta\n text-align: ${1};\nsnippet ta:c\n text-align: center;\nsnippet ta:l\n text-align: left;\nsnippet ta:r\n text-align: right;\nsnippet td\n text-decoration: ${1};\nsnippet td:l\n text-decoration: line-through;\nsnippet td:n\n text-decoration: none;\nsnippet td:o\n text-decoration: overline;\nsnippet td:u\n text-decoration: underline;\nsnippet te\n text-emphasis: ${1};\nsnippet te:ac\n text-emphasis: accent;\nsnippet te:a\n text-emphasis: after;\nsnippet te:b\n text-emphasis: before;\nsnippet te:c\n text-emphasis: circle;\nsnippet te:ds\n text-emphasis: disc;\nsnippet te:dt\n text-emphasis: dot;\nsnippet te:n\n text-emphasis: none;\nsnippet th\n text-height: ${1};\nsnippet th:a\n text-height: auto;\nsnippet th:f\n text-height: font-size;\nsnippet th:m\n text-height: max-size;\nsnippet th:t\n text-height: text-size;\nsnippet ti\n text-indent: ${1};\nsnippet ti:-\n text-indent: -9999px;\nsnippet tj\n text-justify: ${1};\nsnippet tj:a\n text-justify: auto;\nsnippet tj:d\n text-justify: distribute;\nsnippet tj:ic\n text-justify: inter-cluster;\nsnippet tj:ii\n text-justify: inter-ideograph;\nsnippet tj:iw\n text-justify: inter-word;\nsnippet tj:k\n text-justify: kashida;\nsnippet tj:t\n text-justify: tibetan;\nsnippet to+\n text-outline: ${1:0} ${2:0} #${3:000};\nsnippet to\n text-outline: ${1};\nsnippet to:n\n text-outline: none;\nsnippet tr\n text-replace: ${1};\nsnippet tr:n\n text-replace: none;\nsnippet tsh+\n text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet tsh\n text-shadow: ${1};\nsnippet tsh:n\n text-shadow: none;\nsnippet tt\n text-transform: ${1};\nsnippet tt:c\n text-transform: capitalize;\nsnippet tt:l\n text-transform: lowercase;\nsnippet tt:n\n text-transform: none;\nsnippet tt:u\n text-transform: uppercase;\nsnippet tw\n text-wrap: ${1};\nsnippet tw:no\n text-wrap: none;\nsnippet tw:n\n text-wrap: normal;\nsnippet tw:s\n text-wrap: suppress;\nsnippet tw:u\n text-wrap: unrestricted;\nsnippet t\n top: ${1};\nsnippet t:a\n top: auto;\nsnippet va\n vertical-align: ${1};\nsnippet va:bl\n vertical-align: baseline;\nsnippet va:b\n vertical-align: bottom;\nsnippet va:m\n vertical-align: middle;\nsnippet va:sub\n vertical-align: sub;\nsnippet va:sup\n vertical-align: super;\nsnippet va:tb\n vertical-align: text-bottom;\nsnippet va:tt\n vertical-align: text-top;\nsnippet va:t\n vertical-align: top;\nsnippet v\n visibility: ${1};\nsnippet v:c\n visibility: collapse;\nsnippet v:h\n visibility: hidden;\nsnippet v:v\n visibility: visible;\nsnippet whsc\n white-space-collapse: ${1};\nsnippet whsc:ba\n white-space-collapse: break-all;\nsnippet whsc:bs\n white-space-collapse: break-strict;\nsnippet whsc:k\n white-space-collapse: keep-all;\nsnippet whsc:l\n white-space-collapse: loose;\nsnippet whsc:n\n white-space-collapse: normal;\nsnippet whs\n white-space: ${1};\nsnippet whs:n\n white-space: normal;\nsnippet whs:nw\n white-space: nowrap;\nsnippet whs:pl\n white-space: pre-line;\nsnippet whs:pw\n white-space: pre-wrap;\nsnippet whs:p\n white-space: pre;\nsnippet wid\n widows: ${1};\nsnippet w\n width: ${1};\nsnippet w:a\n width: auto;\nsnippet wob\n word-break: ${1};\nsnippet wob:ba\n word-break: break-all;\nsnippet wob:bs\n word-break: break-strict;\nsnippet wob:k\n word-break: keep-all;\nsnippet wob:l\n word-break: loose;\nsnippet wob:n\n word-break: normal;\nsnippet wos\n word-spacing: ${1};\nsnippet wow\n word-wrap: ${1};\nsnippet wow:no\n word-wrap: none;\nsnippet wow:n\n word-wrap: normal;\nsnippet wow:s\n word-wrap: suppress;\nsnippet wow:u\n word-wrap: unrestricted;\nsnippet z\n z-index: ${1};\nsnippet z:a\n z-index: auto;\nsnippet zoo\n zoom: 1;\n"}),ace.define("ace/snippets/css",["require","exports","module","ace/snippets/css.snippets"],function(e,t,n){"use strict";t.snippetText=e("./css.snippets"),t.scope="css"}); (function() { + ace.require(["ace/snippets/css"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/csv.js b/mixly/common/modules/web-modules/ace/snippets/csv.js new file mode 100644 index 00000000..b04d5ad0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/csv.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/csv"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/curly.js b/mixly/common/modules/web-modules/ace/snippets/curly.js new file mode 100644 index 00000000..9861fd8a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/curly.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/curly"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/cuttlefish.js b/mixly/common/modules/web-modules/ace/snippets/cuttlefish.js new file mode 100644 index 00000000..cfa0d272 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/cuttlefish.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/cuttlefish"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/d.js b/mixly/common/modules/web-modules/ace/snippets/d.js new file mode 100644 index 00000000..2f9baec5 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/d.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/d"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/dart.js b/mixly/common/modules/web-modules/ace/snippets/dart.js new file mode 100644 index 00000000..b1f5c6b6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/dart.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/dart.snippets",["require","exports","module"],function(e,t,n){n.exports="snippet lib\n library ${1};\n ${2}\nsnippet im\n import '${1}';\n ${2}\nsnippet pa\n part '${1}';\n ${2}\nsnippet pao\n part of ${1};\n ${2}\nsnippet main\n void main() {\n ${1:/* code */}\n }\nsnippet st\n static ${1}\nsnippet fi\n final ${1}\nsnippet re\n return ${1}\nsnippet br\n break;\nsnippet th\n throw ${1}\nsnippet cl\n class ${1:`Filename(\"\", \"untitled\")`} ${2}\nsnippet imp\n implements ${1}\nsnippet ext\n extends ${1}\nsnippet if\n if (${1:true}) {\n ${2}\n }\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${3}\n }\nsnippet el\n else\nsnippet sw\n switch (${1}) {\n ${2}\n }\nsnippet cs\n case ${1}:\n ${2}\nsnippet de\n default:\n ${1}\nsnippet for\n for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n ${4:$1[$2]}\n }\nsnippet fore\n for (final ${2:item} in ${1:itemList}) {\n ${3:/* code */}\n }\nsnippet wh\n while (${1:/* condition */}) {\n ${2:/* code */}\n }\nsnippet dowh\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\nsnippet as\n assert(${1:/* condition */});\nsnippet try\n try {\n ${2}\n } catch (${1:Exception e}) {\n }\nsnippet tryf\n try {\n ${2}\n } catch (${1:Exception e}) {\n } finally {\n }\n"}),ace.define("ace/snippets/dart",["require","exports","module","ace/snippets/dart.snippets"],function(e,t,n){"use strict";t.snippetText=e("./dart.snippets"),t.scope="dart"}); (function() { + ace.require(["ace/snippets/dart"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/diff.js b/mixly/common/modules/web-modules/ace/snippets/diff.js new file mode 100644 index 00000000..8f6d3aac --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/diff.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/diff.snippets",["require","exports","module"],function(e,t,n){n.exports='# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\nsnippet header DEP-3 style header\n Description: ${1}\n Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n Bug: ${4:url in upstream bugtracker}\n Forwarded: ${5:no|not-needed|url}\n Author: ${6:`g:snips_author`}\n Reviewed-by: ${7:name and email}\n Last-Update: ${8:`strftime("%Y-%m-%d")`}\n Applied-Upstream: ${9:upstream version|url|commit}\n\n'}),ace.define("ace/snippets/diff",["require","exports","module","ace/snippets/diff.snippets"],function(e,t,n){"use strict";t.snippetText=e("./diff.snippets"),t.scope="diff"}); (function() { + ace.require(["ace/snippets/diff"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/django.js b/mixly/common/modules/web-modules/ace/snippets/django.js new file mode 100644 index 00000000..c429942d --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/django.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/django.snippets",["require","exports","module"],function(e,t,n){n.exports="# Model Fields\n\n# Note: Optional arguments are using defaults that match what Django will use\n# as a default, e.g. with max_length fields. Doing this as a form of self\n# documentation and to make it easy to know whether you should override the\n# default or not.\n\n# Note: Optional arguments that are booleans will use the opposite since you\n# can either not specify them, or override them, e.g. auto_now_add=False.\n\nsnippet auto\n ${1:FIELDNAME} = models.AutoField(${2})\nsnippet bool\n ${1:FIELDNAME} = models.BooleanField(${2:default=True})\nsnippet char\n ${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True})\nsnippet comma\n ${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True})\nsnippet date\n ${1:FIELDNAME} = models.DateField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\nsnippet datetime\n ${1:FIELDNAME} = models.DateTimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\nsnippet decimal\n ${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3})\nsnippet email\n ${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True})\nsnippet file\n ${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100})\nsnippet filepath\n ${1:FIELDNAME} = models.FilePathField(path=${2:\"/abs/path/to/dir\"}${3:, max_length=100}${4:, match=\"*.ext\"}${5:, recursive=True}${6:, blank=True, })\nsnippet float\n ${1:FIELDNAME} = models.FloatField(${2})\nsnippet image\n ${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})\nsnippet int\n ${1:FIELDNAME} = models.IntegerField(${2})\nsnippet ip\n ${1:FIELDNAME} = models.IPAddressField(${2})\nsnippet nullbool\n ${1:FIELDNAME} = models.NullBooleanField(${2})\nsnippet posint\n ${1:FIELDNAME} = models.PositiveIntegerField(${2})\nsnippet possmallint\n ${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})\nsnippet slug\n ${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})\nsnippet smallint\n ${1:FIELDNAME} = models.SmallIntegerField(${2})\nsnippet text\n ${1:FIELDNAME} = models.TextField(${2:blank=True})\nsnippet time\n ${1:FIELDNAME} = models.TimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\nsnippet url\n ${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True})\nsnippet xml\n ${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True})\n# Relational Fields\nsnippet fk\n ${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, to_field=''})\nsnippet m2m\n ${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, symmetrical=False}${6:, through=''}${7:, db_table=''})\nsnippet o2o\n ${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''})\n\n# Code Skeletons\n\nsnippet form\n class ${1:FormName}(forms.Form):\n \"\"\"${2:docstring}\"\"\"\n ${3}\n\nsnippet model\n class ${1:ModelName}(models.Model):\n \"\"\"${2:docstring}\"\"\"\n ${3}\n \n class Meta:\n ${4}\n \n def __unicode__(self):\n ${5}\n \n def save(self, force_insert=False, force_update=False):\n ${6}\n \n @models.permalink\n def get_absolute_url(self):\n return ('${7:view_or_url_name}' ${8})\n\nsnippet modeladmin\n class ${1:ModelName}Admin(admin.ModelAdmin):\n ${2}\n \n admin.site.register($1, $1Admin)\n \nsnippet tabularinline\n class ${1:ModelName}Inline(admin.TabularInline):\n model = $1\n\nsnippet stackedinline\n class ${1:ModelName}Inline(admin.StackedInline):\n model = $1\n\nsnippet r2r\n return render_to_response('${1:template.html}', {\n ${2}\n }${3:, context_instance=RequestContext(request)}\n )\n"}),ace.define("ace/snippets/django",["require","exports","module","ace/snippets/django.snippets"],function(e,t,n){"use strict";t.snippetText=e("./django.snippets"),t.scope="django"}); (function() { + ace.require(["ace/snippets/django"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/dockerfile.js b/mixly/common/modules/web-modules/ace/snippets/dockerfile.js new file mode 100644 index 00000000..e2313fc3 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/dockerfile.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/dockerfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/dot.js b/mixly/common/modules/web-modules/ace/snippets/dot.js new file mode 100644 index 00000000..bed351f2 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/dot.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/dot"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/drools.js b/mixly/common/modules/web-modules/ace/snippets/drools.js new file mode 100644 index 00000000..87d69361 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/drools.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/drools.snippets",["require","exports","module"],function(e,t,n){n.exports='\nsnippet rule\n rule "${1?:rule_name}"\n when\n ${2:// when...} \n then\n ${3:// then...}\n end\n\nsnippet query\n query ${1?:query_name}\n ${2:// find} \n end\n \nsnippet declare\n declare ${1?:type_name}\n ${2:// attributes} \n end\n\n'}),ace.define("ace/snippets/drools",["require","exports","module","ace/snippets/drools.snippets"],function(e,t,n){"use strict";t.snippetText=e("./drools.snippets"),t.scope="drools"}); (function() { + ace.require(["ace/snippets/drools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/edifact.js b/mixly/common/modules/web-modules/ace/snippets/edifact.js new file mode 100644 index 00000000..ed6475cc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/edifact.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/edifact.snippets",["require","exports","module"],function(e,t,n){n.exports='## Access Modifiers\nsnippet u\n UN\nsnippet un\n UNB\nsnippet pr\n private\n##\n## Annotations\nsnippet before\n @Before\n static void ${1:intercept}(${2:args}) { ${3} }\nsnippet mm\n @ManyToMany\n ${1}\nsnippet mo\n @ManyToOne\n ${1}\nsnippet om\n @OneToMany${1:(cascade=CascadeType.ALL)}\n ${2}\nsnippet oo\n @OneToOne\n ${1}\n##\n## Basic Java packages and import\nsnippet im\n import\nsnippet j.b\n java.beans.\nsnippet j.i\n java.io.\nsnippet j.m\n java.math.\nsnippet j.n\n java.net.\nsnippet j.u\n java.util.\n##\n## Class\nsnippet cl\n class ${1:`Filename("", "untitled")`} ${2}\nsnippet in\n interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3}\nsnippet tc\n public class ${1:`Filename()`} extends ${2:TestCase}\n##\n## Class Enhancements\nsnippet ext\n extends \nsnippet imp\n implements\n##\n## Comments\nsnippet /*\n /*\n * ${1}\n */\n##\n## Constants\nsnippet co\n static public final ${1:String} ${2:var} = ${3};${4}\nsnippet cos\n static public final String ${1:var} = "${2}";${3}\n##\n## Control Statements\nsnippet case\n case ${1}:\n ${2}\nsnippet def\n default:\n ${2}\nsnippet el\n else\nsnippet elif\n else if (${1}) ${2}\nsnippet if\n if (${1}) ${2}\nsnippet sw\n switch (${1}) {\n ${2}\n }\n##\n## Create a Method\nsnippet m\n ${1:void} ${2:method}(${3}) ${4:throws }${5}\n##\n## Create a Variable\nsnippet v\n ${1:String} ${2:var}${3: = null}${4};${5}\n##\n## Enhancements to Methods, variables, classes, etc.\nsnippet ab\n abstract\nsnippet fi\n final\nsnippet st\n static\nsnippet sy\n synchronized\n##\n## Error Methods\nsnippet err\n System.err.print("${1:Message}");\nsnippet errf\n System.err.printf("${1:Message}", ${2:exception});\nsnippet errln\n System.err.println("${1:Message}");\n##\n## Exception Handling\nsnippet as\n assert ${1:test} : "${2:Failure message}";${3}\nsnippet ca\n catch(${1:Exception} ${2:e}) ${3}\nsnippet thr\n throw\nsnippet ths\n throws\nsnippet try\n try {\n ${3}\n } catch(${1:Exception} ${2:e}) {\n }\nsnippet tryf\n try {\n ${3}\n } catch(${1:Exception} ${2:e}) {\n } finally {\n }\n##\n## Find Methods\nsnippet findall\n List<${1:listName}> ${2:items} = ${1}.findAll();${3}\nsnippet findbyid\n ${1:var} ${2:item} = ${1}.findById(${3});${4}\n##\n## Javadocs\nsnippet /**\n /**\n * ${1}\n */\nsnippet @au\n @author `system("grep \\`id -un\\` /etc/passwd | cut -d \\":\\" -f5 | cut -d \\",\\" -f1")`\nsnippet @br\n @brief ${1:Description}\nsnippet @fi\n @file ${1:`Filename()`}.java\nsnippet @pa\n @param ${1:param}\nsnippet @re\n @return ${1:param}\n##\n## Logger Methods\nsnippet debug\n Logger.debug(${1:param});${2}\nsnippet error\n Logger.error(${1:param});${2}\nsnippet info\n Logger.info(${1:param});${2}\nsnippet warn\n Logger.warn(${1:param});${2}\n##\n## Loops\nsnippet enfor\n for (${1} : ${2}) ${3}\nsnippet for\n for (${1}; ${2}; ${3}) ${4}\nsnippet wh\n while (${1}) ${2}\n##\n## Main method\nsnippet main\n public static void main (String[] args) {\n ${1:/* code */}\n }\n##\n## Print Methods\nsnippet print\n System.out.print("${1:Message}");\nsnippet printf\n System.out.printf("${1:Message}", ${2:args});\nsnippet println\n System.out.println(${1});\n##\n## Render Methods\nsnippet ren\n render(${1:param});${2}\nsnippet rena\n renderArgs.put("${1}", ${2});${3}\nsnippet renb\n renderBinary(${1:param});${2}\nsnippet renj\n renderJSON(${1:param});${2}\nsnippet renx\n renderXml(${1:param});${2}\n##\n## Setter and Getter Methods\nsnippet set\n ${1:public} void set${3:}(${2:String} ${4:}){\n this.$4 = $4;\n }\nsnippet get\n ${1:public} ${2:String} get${3:}(){\n return this.${4:};\n }\n##\n## Terminate Methods or Loops\nsnippet re\n return\nsnippet br\n break;\n##\n## Test Methods\nsnippet t\n public void test${1:Name}() throws Exception {\n ${2}\n }\nsnippet test\n @Test\n public void test${1:Name}() throws Exception {\n ${2}\n }\n##\n## Utils\nsnippet Sc\n Scanner\n##\n## Miscellaneous\nsnippet action\n public static void ${1:index}(${2:args}) { ${3} }\nsnippet rnf\n notFound(${1:param});${2}\nsnippet rnfin\n notFoundIfNull(${1:param});${2}\nsnippet rr\n redirect(${1:param});${2}\nsnippet ru\n unauthorized(${1:param});${2}\nsnippet unless\n (unless=${1:param});${2}\n'}),ace.define("ace/snippets/edifact",["require","exports","module","ace/snippets/edifact.snippets"],function(e,t,n){"use strict";t.snippetText=e("./edifact.snippets"),t.scope="edifact"}); (function() { + ace.require(["ace/snippets/edifact"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/eiffel.js b/mixly/common/modules/web-modules/ace/snippets/eiffel.js new file mode 100644 index 00000000..86c09b86 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/eiffel.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/eiffel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/ejs.js b/mixly/common/modules/web-modules/ace/snippets/ejs.js new file mode 100644 index 00000000..5ceb6577 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/ejs.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/ejs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/elixir.js b/mixly/common/modules/web-modules/ace/snippets/elixir.js new file mode 100644 index 00000000..1611c326 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/elixir.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/elixir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/elm.js b/mixly/common/modules/web-modules/ace/snippets/elm.js new file mode 100644 index 00000000..377d4f37 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/elm.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/elm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/erlang.js b/mixly/common/modules/web-modules/ace/snippets/erlang.js new file mode 100644 index 00000000..caedfae0 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/erlang.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/erlang.snippets",["require","exports","module"],function(e,t,n){n.exports="# module and export all\nsnippet mod\n -module(${1:`Filename('', 'my')`}).\n \n -compile([export_all]).\n \n start() ->\n ${2}\n \n stop() ->\n ok.\n# define directive\nsnippet def\n -define(${1:macro}, ${2:body}).${3}\n# export directive\nsnippet exp\n -export([${1:function}/${2:arity}]).\n# include directive\nsnippet inc\n -include(\"${1:file}\").${2}\n# behavior directive\nsnippet beh\n -behaviour(${1:behaviour}).${2}\n# if expression\nsnippet if\n if\n ${1:guard} ->\n ${2:body}\n end\n# case expression\nsnippet case\n case ${1:expression} of\n ${2:pattern} ->\n ${3:body};\n end\n# anonymous function\nsnippet fun\n fun (${1:Parameters}) -> ${2:body} end${3}\n# try...catch\nsnippet try\n try\n ${1}\n catch\n ${2:_:_} -> ${3:got_some_exception}\n end\n# record directive\nsnippet rec\n -record(${1:record}, {\n ${2:field}=${3:value}}).${4}\n# todo comment\nsnippet todo\n %% TODO: ${1}\n## Snippets below (starting with '%') are in EDoc format.\n## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details\n# doc comment\nsnippet %d\n %% @doc ${1}\n# end of doc comment\nsnippet %e\n %% @end\n# specification comment\nsnippet %s\n %% @spec ${1}\n# private function marker\nsnippet %p\n %% @private\n# OTP application\nsnippet application\n -module(${1:`Filename('', 'my')`}).\n\n -behaviour(application).\n\n -export([start/2, stop/1]).\n\n start(_Type, _StartArgs) ->\n case ${2:root_supervisor}:start_link() of\n {ok, Pid} ->\n {ok, Pid};\n Other ->\n {error, Other}\n end.\n\n stop(_State) ->\n ok. \n# OTP supervisor\nsnippet supervisor\n -module(${1:`Filename('', 'my')`}).\n\n -behaviour(supervisor).\n\n %% API\n -export([start_link/0]).\n\n %% Supervisor callbacks\n -export([init/1]).\n\n -define(SERVER, ?MODULE).\n\n start_link() ->\n supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\n init([]) ->\n Server = {${2:my_server}, {$2, start_link, []},\n permanent, 2000, worker, [$2]},\n Children = [Server],\n RestartStrategy = {one_for_one, 0, 1},\n {ok, {RestartStrategy, Children}}.\n# OTP gen_server\nsnippet gen_server\n -module(${1:`Filename('', 'my')`}).\n\n -behaviour(gen_server).\n\n %% API\n -export([\n start_link/0\n ]).\n\n %% gen_server callbacks\n -export([init/1, handle_call/3, handle_cast/2, handle_info/2,\n terminate/2, code_change/3]).\n\n -define(SERVER, ?MODULE).\n\n -record(state, {}).\n\n %%%===================================================================\n %%% API\n %%%===================================================================\n\n start_link() ->\n gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\n %%%===================================================================\n %%% gen_server callbacks\n %%%===================================================================\n\n init([]) ->\n {ok, #state{}}.\n\n handle_call(_Request, _From, State) ->\n Reply = ok,\n {reply, Reply, State}.\n\n handle_cast(_Msg, State) ->\n {noreply, State}.\n\n handle_info(_Info, State) ->\n {noreply, State}.\n\n terminate(_Reason, _State) ->\n ok.\n\n code_change(_OldVsn, State, _Extra) ->\n {ok, State}.\n\n %%%===================================================================\n %%% Internal functions\n %%%===================================================================\n\n"}),ace.define("ace/snippets/erlang",["require","exports","module","ace/snippets/erlang.snippets"],function(e,t,n){"use strict";t.snippetText=e("./erlang.snippets"),t.scope="erlang"}); (function() { + ace.require(["ace/snippets/erlang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/flix.js b/mixly/common/modules/web-modules/ace/snippets/flix.js new file mode 100644 index 00000000..2b69cf4e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/flix.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/flix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/forth.js b/mixly/common/modules/web-modules/ace/snippets/forth.js new file mode 100644 index 00000000..8e93e586 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/forth.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/forth"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/fortran.js b/mixly/common/modules/web-modules/ace/snippets/fortran.js new file mode 100644 index 00000000..cd7afc61 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/fortran.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/fortran"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/fsharp.js b/mixly/common/modules/web-modules/ace/snippets/fsharp.js new file mode 100644 index 00000000..592f0335 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/fsharp.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/fsharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/fsl.js b/mixly/common/modules/web-modules/ace/snippets/fsl.js new file mode 100644 index 00000000..80f510e6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/fsl.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/fsl.snippets",["require","exports","module"],function(e,t,n){n.exports='snippet header\n machine_name : "";\n machine_author : "";\n machine_license : MIT;\n machine_comment : "";\n machine_language : en;\n machine_version : 1.0.0;\n fsl_version : 1.0.0;\n start_states : [];\n'}),ace.define("ace/snippets/fsl",["require","exports","module","ace/snippets/fsl.snippets"],function(e,t,n){"use strict";t.snippetText=e("./fsl.snippets"),t.scope="fsl"}); (function() { + ace.require(["ace/snippets/fsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/ftl.js b/mixly/common/modules/web-modules/ace/snippets/ftl.js new file mode 100644 index 00000000..24901a69 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/ftl.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/ftl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/gcode.js b/mixly/common/modules/web-modules/ace/snippets/gcode.js new file mode 100644 index 00000000..834f2f3a --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/gcode.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/gcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/gherkin.js b/mixly/common/modules/web-modules/ace/snippets/gherkin.js new file mode 100644 index 00000000..0b6d043c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/gherkin.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/gherkin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/gitignore.js b/mixly/common/modules/web-modules/ace/snippets/gitignore.js new file mode 100644 index 00000000..5c4605ce --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/gitignore.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/gitignore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/glsl.js b/mixly/common/modules/web-modules/ace/snippets/glsl.js new file mode 100644 index 00000000..2d9a09f8 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/glsl.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/glsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/gobstones.js b/mixly/common/modules/web-modules/ace/snippets/gobstones.js new file mode 100644 index 00000000..c6798629 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/gobstones.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/gobstones.snippets",["require","exports","module"],function(e,t,n){n.exports='# scope: gobstones\n\n# program\nsnippet program\n program {\n ${1:// cuerpo...}\n }\n\n# interactive program\nsnippet interactive program\n interactive program {\n ${1:INIT} -> { ${2:// cuerpo...} }\n ${3:TIMEOUT(${4:5000}) -> { ${5:// cuerpo...} }\n ${6:K_ENTER} -> { ${7:// cuerpo...} }\n _ -> {}\n }\n\n# procedure\nsnippet procedure\n procedure ${1:Nombre}(${2:parametros}) {\n ${3:// cuerpo...}\n }\n\n# function\nsnippet function\n function ${1:nombre}(${2:parametros}) {\n return (${3:expresi\u00f3n..})\n }\n\n# return\nsnippet return\n return (${1:expresi\u00f3n...})\n\n# type\nsnippet type\n type ${1:Nombre}\n\n# is variant\nsnippet is variant\n is variant {\n case ${1:NombreDelValor1} {}\n case ${2:NombreDelValor2} {}\n case ${3:NombreDelValor3} {}\n case ${4:NombreDelValor4} {}\n }\n\n# is record\nsnippet is record\n is record {\n field ${1:campo1} // ${2:Tipo}\n field ${3:campo2} // ${4:Tipo}\n field ${5:campo3} // ${6:Tipo}\n field ${7:campo4} // ${8:Tipo}\n }\n\n# type _ is variant\nsnippet type _ is variant\n type ${1:Nombre} is variant {\n case ${2:NombreDelValor1} {}\n case ${3:NombreDelValor2} {}\n case ${4:NombreDelValor3} {}\n case ${5:NombreDelValor4} {}\n }\n\n# type _ is record\nsnippet type _ is record\n type ${1:Nombre} is record {\n field ${2:campo1} // ${3:Tipo}\n field ${4:campo2} // ${5:Tipo}\n field ${6:campo3} // ${7:Tipo}\n field ${8:campo4} // ${9:Tipo}\n }\n\n# repeat\nsnippet repeat\n repeat ${1:cantidad} {\n ${2:// cuerpo...}\n }\n\n# foreach\nsnippet foreach\n foreach ${1:\u00edndice} in ${2:lista} {\n ${3:// cuerpo...}\n }\n\n# while\nsnippet while\n while (${1?:condici\u00f3n}) {\n ${2:// cuerpo...}\n }\n\n# if\nsnippet if\n if (${1?:condici\u00f3n}) {\n ${2:// cuerpo...}\n }\n\n# elseif\nsnippet elseif\n elseif (${1?:condici\u00f3n}) {\n ${2:// cuerpo...}\n }\n\n# else\nsnippet else\n else {\n ${1:// cuerpo...}\n }\n\n# if (con else)\nsnippet if (con else)\n if (${1:condici\u00f3n}) {\n ${2:// cuerpo...}\n } else {\n ${3:// cuerpo....}\n }\n\n# if (con elseif)\nsnippet if (con elseif)\n if (${1:condici\u00f3n}) {\n ${2:// cuerpo...}\n } elseif (${3:condici\u00f3n}) {\n ${4:// cuerpo...}\n }\n\n# if (con elseif y else)\nsnippet if (con elseif y else)\n if (${1:condici\u00f3n}) {\n ${2:// cuerpo...}\n } elseif (${3:condici\u00f3n}) {\n ${4:// cuerpo...}\n } else {\n ${5:// cuerpo....}\n }\n\n# if (con 3 elseif)\nsnippet if (con 3 elseif)\n if (${1:condici\u00f3n}) {\n ${2:// cuerpo...}\n } elseif (${3:condici\u00f3n}) {\n ${4:// cuerpo...}\n } elseif (${5:condici\u00f3n}) {\n ${6:// cuerpo...}\n } elseif (${7:condici\u00f3n}) {\n ${8:// cuerpo...}\n }\n\n# choose (2 valores)\nsnippet choose (2 valores)\n choose\n ${1:Valor1} when (${2:condici\u00f3n})\n ${3:Valor2} otherwise\n\n# choose (2 valores y boom)\nsnippet choose (2 valores y boom)\n choose\n ${1:Valor1} when (${2:condici\u00f3n})\n ${3:Valor2} when (${4:condici\u00f3n})\n ${5:Valor3} when (${6:condici\u00f3n})\n ${7:Valor4} when (${8:condici\u00f3n})\n boom("${9:No es un valor v\u00e1lido}") otherwise\n\n# matching (4 valores)\nsnippet matching (4 valores)\n matching (${1:variable}) select\n ${2:Valor1} on ${3:opci\u00f3n1}\n ${4:Valor2} on ${5:opci\u00f3n2}\n ${6:Valor3} on ${7:opci\u00f3n3}\n ${8:Valor4} on ${9:opci\u00f3n4}\n boom("${10:No es un valor v\u00e1lido}") otherwise\n\n# select (4 casos)\nsnippet select (4 casos)\n select\n ${1:Valor1} on (${2:opci\u00f3n1})\n ${3:Valor2} on (${4:opci\u00f3n2})\n ${5:Valor3} on (${6:opci\u00f3n3})\n ${7:Valor4} on (${8:opci\u00f3n4})\n boom("${9:No es un valor v\u00e1lido}") otherwise\n\n# switch\nsnippet switch\n switch (${1:variable}) {\n ${2:Valor1} -> {${3:// cuerpo...}}\n ${4:Valor2} -> {${5:// cuerpo...}}\n ${6:Valor3} -> {${7:// cuerpo...}}\n ${8:Valor4} -> {${9:// cuerpo...}}\n _ -> {${10:// cuerpo...}}\n }\n\n# Poner\nsnippet Poner\n Poner(${1:color})\n\n# Sacar\nsnippet Sacar\n Sacar(${1:color})\n\n# Mover\nsnippet Mover\n Mover(${1:direcci\u00f3n})\n\n# IrAlBorde\nsnippet IrAlBorde\n IrAlBorde(${1:direcci\u00f3n})\n\n# VaciarTablero\nsnippet VaciarTablero\n VaciarTablero()\n\n# BOOM\nsnippet BOOM\n BOOM("${1:Mensaje de error}")\n\n# hayBolitas\nsnippet hayBolitas\n hayBolitas(${1:color})\n\n# nroBolitas\nsnippet nroBolitas\n nroBolitas(${1:color})\n\n# puedeMover\nsnippet puedeMover\n puedeMover(${1:direcci\u00f3n})\n\n# siguiente\nsnippet siguiente\n siguiente(${1:color|direcci\u00f3n})\n\n# previo\nsnippet previo\n previo(${1:color|direcci\u00f3n})\n\n# opuesto\nsnippet opuesto\n opuesto(${1:direcci\u00f3n})\n\n# minDir\nsnippet minDir\n minDir()\n\n# maxDir\nsnippet maxDir\n maxDir()\n\n# minColor\nsnippet minColor\n minDir()\n\n# maxColor\nsnippet maxColor\n maxDir()\n\n# minBool\nsnippet minBool\n minBool()\n\n# maxBool\nsnippet maxBool\n maxBool()\n\n# primero\nsnippet primero\n primero(${1:lista})\n\n# sinElPrimero\nsnippet sinElPrimero\n sinElPrimero(${1:lista})\n\n# esVac\u00eda\nsnippet esVac\u00eda\n esVac\u00eda(${1:lista})\n\n# boom\nsnippet boom\n boom("${1:Mensaje de error}")\n\n# Azul\nsnippet Azul\n Azul\n\n# Negro\nsnippet Negro\n Negro\n\n# Rojo\nsnippet Rojo\n Rojo\n\n# Verde\nsnippet Verde\n Verde\n\n# Norte\nsnippet Norte\n Norte\n\n# Este\nsnippet Este\n Este\n\n# Sur\nsnippet Sur\n Sur\n\n# Oeste\nsnippet Oeste\n Oeste\n\n# True\nsnippet True\n True\n\n# False\nsnippet False\n False\n\n# INIT\nsnippet INIT\n INIT -> {$1:// cuerpo...}\n\n# TIMEOUT\nsnippet TIMEOUT\n TIMEOUT(${1:5000}) -> {$2:// cuerpo...}\n\n# K_A\nsnippet K_A\n K_A -> { ${1://cuerpo...} }\n# K_CTRL_A\nsnippet K_CTRL_A\n K_CTRL_A -> { ${1://cuerpo...} }\n# K_ALT_A\nsnippet K_ALT_A\n K_ALT_A -> { ${1://cuerpo...} }\n# K_SHIFT_A\nsnippet K_SHIFT_A\n K_SHIFT_A -> { ${1://cuerpo...} }\n# K_CTRL_ALT_A\nsnippet K_CTRL_ALT_A\n K_CTRL_ALT_A -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_A\nsnippet K_CTRL_SHIFT_A\n K_CTRL_SHIFT_A -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_A\nsnippet K_CTRL_ALT_SHIFT_A\n K_CTRL_ALT_SHIFT_A -> { ${1://cuerpo...} }\n\n# K_B\nsnippet K_B\n K_B -> { ${1://cuerpo...} }\n# K_CTRL_B\nsnippet K_CTRL_B\n K_CTRL_B -> { ${1://cuerpo...} }\n# K_ALT_B\nsnippet K_ALT_B\n K_ALT_B -> { ${1://cuerpo...} }\n# K_SHIFT_B\nsnippet K_SHIFT_B\n K_SHIFT_B -> { ${1://cuerpo...} }\n# K_CTRL_ALT_B\nsnippet K_CTRL_ALT_B\n K_CTRL_ALT_B -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_B\nsnippet K_CTRL_SHIFT_B\n K_CTRL_SHIFT_B -> { ${1://cuerpo...} }\n# K_ALT_SHIFT_C\nsnippet K_ALT_SHIFT_C\n K_ALT_SHIFT_C -> { ${1://cuerpo...} }\n# K_CTRL_BLT_SHIFT_B\nsnippet K_CTRL_BLT_SHIFT_B\n K_CTRL_ALT_SHIFT_B -> { ${1://cuerpo...} }\n\n# K_C\nsnippet K_C\n K_C -> { ${1://cuerpo...} }\n# K_CTRL_C\nsnippet K_CTRL_C\n K_CTRL_C -> { ${1://cuerpo...} }\n# K_ALT_C\nsnippet K_ALT_C\n K_ALT_C -> { ${1://cuerpo...} }\n# K_SHIFT_C\nsnippet K_SHIFT_C\n K_SHIFT_C -> { ${1://cuerpo...} }\n# K_CTRL_ALT_C\nsnippet K_CTRL_ALT_C\n K_CTRL_ALT_C -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_C\nsnippet K_CTRL_SHIFT_C\n K_CTRL_SHIFT_C -> { ${1://cuerpo...} }\n# K_ALT_SHIFT_C\nsnippet K_ALT_SHIFT_C\n K_ALT_SHIFT_C -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_C\nsnippet K_CTRL_ALT_SHIFT_C\n K_CTRL_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\n# K_D\nsnippet K_D\n K_D -> { ${1://cuerpo...} }\n# K_CTRL_D\nsnippet K_CTRL_D\n K_CTRL_D -> { ${1://cuerpo...} }\n# K_ALT_D\nsnippet K_ALT_D\n K_DLT_D -> { ${1://cuerpo...} }\n# K_SHIFT_D\nsnippet K_SHIFT_D\n K_SHIFT_D -> { ${1://cuerpo...} }\n# K_CTRL_ALT_D\nsnippet K_CTRL_ALT_D\n K_CTRL_DLT_D -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_D\nsnippet K_CTRL_SHIFT_D\n K_CTRL_SHIFT_D -> { ${1://cuerpo...} }\n# K_ALT_SHIFT_D\nsnippet K_ALT_SHIFT_D\n K_ALT_SHIFT_D -> { ${1://cuerpo...} }\n# K_CTRL_DLT_SHIFT_D\nsnippet K_CTRL_DLT_SHIFT_D\n K_CTRL_ALT_SHIFT_D -> { ${1://cuerpo...} }\n\n# K_E\nsnippet K_E\n K_E -> { ${1://cuerpo...} }\n# K_CTRL_E\nsnippet K_CTRL_E\n K_CTRL_E -> { ${1://cuerpo...} }\n# K_ALT_E\nsnippet K_ALT_E\n K_ALT_E -> { ${1://cuerpo...} }\n# K_SHIFT_E\nsnippet K_SHIFT_E\n K_SHIFT_E -> { ${1://cuerpo...} }\n# K_CTRL_ALT_E\nsnippet K_CTRL_ALT_E\n K_CTRL_ALT_E -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_E\nsnippet K_CTRL_SHIFT_E\n K_CTRL_SHIFT_E -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_E\nsnippet K_CTRL_ALT_SHIFT_E\n K_CTRL_ALT_SHIFT_E -> { ${1://cuerpo...} }\n\n# K_F\nsnippet K_F\n K_F -> { ${1://cuerpo...} }\n# K_CTRL_F\nsnippet K_CTRL_F\n K_CTRL_F -> { ${1://cuerpo...} }\n# K_ALT_F\nsnippet K_ALT_F\n K_ALT_F -> { ${1://cuerpo...} }\n# K_SHIFT_F\nsnippet K_SHIFT_F\n K_SHIFT_F -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F\nsnippet K_CTRL_ALT_F\n K_CTRL_ALT_F -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F\nsnippet K_CTRL_SHIFT_F\n K_CTRL_SHIFT_F -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F\nsnippet K_CTRL_ALT_SHIFT_F\n K_CTRL_ALT_SHIFT_F -> { ${1://cuerpo...} }\n\n# K_G\nsnippet K_G\n K_G -> { ${1://cuerpo...} }\n# K_CTRL_G\nsnippet K_CTRL_G\n K_CTRL_G -> { ${1://cuerpo...} }\n# K_ALT_G\nsnippet K_ALT_G\n K_ALT_G -> { ${1://cuerpo...} }\n# K_SHIFT_G\nsnippet K_SHIFT_G\n K_SHIFT_G -> { ${1://cuerpo...} }\n# K_CTRL_ALT_G\nsnippet K_CTRL_ALT_G\n K_CTRL_ALT_G -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_G\nsnippet K_CTRL_SHIFT_G\n K_CTRL_SHIFT_G -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_G\nsnippet K_CTRL_ALT_SHIFT_G\n K_CTRL_ALT_SHIFT_G -> { ${1://cuerpo...} }\n\n# K_H\nsnippet K_H\n K_H -> { ${1://cuerpo...} }\n# K_CTRL_H\nsnippet K_CTRL_H\n K_CTRL_H -> { ${1://cuerpo...} }\n# K_ALT_H\nsnippet K_ALT_H\n K_ALT_H -> { ${1://cuerpo...} }\n# K_SHIFT_H\nsnippet K_SHIFT_H\n K_SHIFT_H -> { ${1://cuerpo...} }\n# K_CTRL_ALT_H\nsnippet K_CTRL_ALT_H\n K_CTRL_ALT_H -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_H\nsnippet K_CTRL_SHIFT_H\n K_CTRL_SHIFT_H -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_H\nsnippet K_CTRL_ALT_SHIFT_H\n K_CTRL_ALT_SHIFT_H -> { ${1://cuerpo...} }\n\n# K_I\nsnippet K_I\n K_I -> { ${1://cuerpo...} }\n# K_CTRL_I\nsnippet K_CTRL_I\n K_CTRL_I -> { ${1://cuerpo...} }\n# K_ALT_I\nsnippet K_ALT_I\n K_ALT_I -> { ${1://cuerpo...} }\n# K_SHIFT_I\nsnippet K_SHIFT_I\n K_SHIFT_I -> { ${1://cuerpo...} }\n# K_CTRL_ALT_I\nsnippet K_CTRL_ALT_I\n K_CTRL_ALT_I -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_I\nsnippet K_CTRL_SHIFT_I\n K_CTRL_SHIFT_I -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_I\nsnippet K_CTRL_ALT_SHIFT_I\n K_CTRL_ALT_SHIFT_I -> { ${1://cuerpo...} }\n\n# K_J\nsnippet K_J\n K_J -> { ${1://cuerpo...} }\n# K_CTRL_J\nsnippet K_CTRL_J\n K_CTRL_J -> { ${1://cuerpo...} }\n# K_ALT_J\nsnippet K_ALT_J\n K_ALT_J -> { ${1://cuerpo...} }\n# K_SHIFT_J\nsnippet K_SHIFT_J\n K_SHIFT_J -> { ${1://cuerpo...} }\n# K_CTRL_ALT_J\nsnippet K_CTRL_ALT_J\n K_CTRL_ALT_J -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_J\nsnippet K_CTRL_SHIFT_J\n K_CTRL_SHIFT_J -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_J\nsnippet K_CTRL_ALT_SHIFT_J\n K_CTRL_ALT_SHIFT_J -> { ${1://cuerpo...} }\n\n# K_K\nsnippet K_K\n K_K -> { ${1://cuerpo...} }\n# K_CTRL_K\nsnippet K_CTRL_K\n K_CTRL_K -> { ${1://cuerpo...} }\n# K_ALT_K\nsnippet K_ALT_K\n K_ALT_K -> { ${1://cuerpo...} }\n# K_SHIFT_K\nsnippet K_SHIFT_K\n K_SHIFT_K -> { ${1://cuerpo...} }\n# K_CTRL_ALT_K\nsnippet K_CTRL_ALT_K\n K_CTRL_ALT_K -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_K\nsnippet K_CTRL_SHIFT_K\n K_CTRL_SHIFT_K -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_K\nsnippet K_CTRL_ALT_SHIFT_K\n K_CTRL_ALT_SHIFT_K -> { ${1://cuerpo...} }\n\n# K_L\nsnippet K_L\n K_L -> { ${1://cuerpo...} }\n# K_CTRL_L\nsnippet K_CTRL_L\n K_CTRL_L -> { ${1://cuerpo...} }\n# K_ALT_L\nsnippet K_ALT_L\n K_ALT_L -> { ${1://cuerpo...} }\n# K_SHIFT_L\nsnippet K_SHIFT_L\n K_SHIFT_L -> { ${1://cuerpo...} }\n# K_CTRL_ALT_L\nsnippet K_CTRL_ALT_L\n K_CTRL_ALT_L -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_L\nsnippet K_CTRL_SHIFT_L\n K_CTRL_SHIFT_L -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_L\nsnippet K_CTRL_ALT_SHIFT_L\n K_CTRL_ALT_SHIFT_L -> { ${1://cuerpo...} }\n\n# K_M\nsnippet K_M\n K_M -> { ${1://cuerpo...} }\n# K_CTRL_M\nsnippet K_CTRL_M\n K_CTRL_M -> { ${1://cuerpo...} }\n# K_ALT_M\nsnippet K_ALT_M\n K_ALT_M -> { ${1://cuerpo...} }\n# K_SHIFT_M\nsnippet K_SHIFT_M\n K_SHIFT_M -> { ${1://cuerpo...} }\n# K_CTRL_ALT_M\nsnippet K_CTRL_ALT_M\n K_CTRL_ALT_M -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_M\nsnippet K_CTRL_SHIFT_M\n K_CTRL_SHIFT_M -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_M\nsnippet K_CTRL_ALT_SHIFT_M\n K_CTRL_ALT_SHIFT_M -> { ${1://cuerpo...} }\n\n# K_N\nsnippet K_N\n K_N -> { ${1://cuerpo...} }\n# K_CTRL_N\nsnippet K_CTRL_N\n K_CTRL_N -> { ${1://cuerpo...} }\n# K_ALT_N\nsnippet K_ALT_N\n K_ALT_N -> { ${1://cuerpo...} }\n# K_SHIFT_N\nsnippet K_SHIFT_N\n K_SHIFT_N -> { ${1://cuerpo...} }\n# K_CTRL_ALT_N\nsnippet K_CTRL_ALT_N\n K_CTRL_ALT_N -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_N\nsnippet K_CTRL_SHIFT_N\n K_CTRL_SHIFT_N -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_N\nsnippet K_CTRL_ALT_SHIFT_N\n K_CTRL_ALT_SHIFT_N -> { ${1://cuerpo...} }\n\n# K_\u00d1\nsnippet K_\u00d1\n K_\u00d1 -> { ${1://cuerpo...} }\n# K_CTRL_\u00d1\nsnippet K_CTRL_\u00d1\n K_CTRL_\u00d1 -> { ${1://cuerpo...} }\n# K_ALT_\u00d1\nsnippet K_ALT_\u00d1\n K_ALT_\u00d1 -> { ${1://cuerpo...} }\n# K_SHIFT_\u00d1\nsnippet K_SHIFT_\u00d1\n K_SHIFT_\u00d1 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_\u00d1\nsnippet K_CTRL_ALT_\u00d1\n K_CTRL_ALT_\u00d1 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_\u00d1\nsnippet K_CTRL_SHIFT_\u00d1\n K_CTRL_SHIFT_\u00d1 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_\u00d1\nsnippet K_CTRL_ALT_SHIFT_\u00d1\n K_CTRL_ALT_SHIFT_\u00d1 -> { ${1://cuerpo...} }\n\n# K_O\nsnippet K_O\n K_O -> { ${1://cuerpo...} }\n# K_CTRL_O\nsnippet K_CTRL_O\n K_CTRL_O -> { ${1://cuerpo...} }\n# K_ALT_O\nsnippet K_ALT_O\n K_ALT_O -> { ${1://cuerpo...} }\n# K_SHIFT_O\nsnippet K_SHIFT_O\n K_SHIFT_O -> { ${1://cuerpo...} }\n# K_CTRL_ALT_O\nsnippet K_CTRL_ALT_O\n K_CTRL_ALT_O -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_O\nsnippet K_CTRL_SHIFT_O\n K_CTRL_SHIFT_O -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_O\nsnippet K_CTRL_ALT_SHIFT_O\n K_CTRL_ALT_SHIFT_O -> { ${1://cuerpo...} }\n\n# K_P\nsnippet K_P\n K_P -> { ${1://cuerpo...} }\n# K_CTRL_P\nsnippet K_CTRL_P\n K_CTRL_P -> { ${1://cuerpo...} }\n# K_ALT_P\nsnippet K_ALT_P\n K_ALT_P -> { ${1://cuerpo...} }\n# K_SHIFT_P\nsnippet K_SHIFT_P\n K_SHIFT_P -> { ${1://cuerpo...} }\n# K_CTRL_ALT_P\nsnippet K_CTRL_ALT_P\n K_CTRL_ALT_P -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_P\nsnippet K_CTRL_SHIFT_P\n K_CTRL_SHIFT_P -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_P\nsnippet K_CTRL_ALT_SHIFT_P\n K_CTRL_ALT_SHIFT_P -> { ${1://cuerpo...} }\n\n# K_Q\nsnippet K_Q\n K_Q -> { ${1://cuerpo...} }\n# K_CTRL_Q\nsnippet K_CTRL_Q\n K_CTRL_Q -> { ${1://cuerpo...} }\n# K_ALT_Q\nsnippet K_ALT_Q\n K_ALT_Q -> { ${1://cuerpo...} }\n# K_SHIFT_Q\nsnippet K_SHIFT_Q\n K_SHIFT_Q -> { ${1://cuerpo...} }\n# K_CTRL_ALT_Q\nsnippet K_CTRL_ALT_Q\n K_CTRL_ALT_Q -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_Q\nsnippet K_CTRL_SHIFT_Q\n K_CTRL_SHIFT_Q -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_Q\nsnippet K_CTRL_ALT_SHIFT_Q\n K_CTRL_ALT_SHIFT_Q -> { ${1://cuerpo...} }\n\n# K_R\nsnippet K_R\n K_R -> { ${1://cuerpo...} }\n# K_CTRL_R\nsnippet K_CTRL_R\n K_CTRL_R -> { ${1://cuerpo...} }\n# K_ALT_R\nsnippet K_ALT_R\n K_ALT_R -> { ${1://cuerpo...} }\n# K_SHIFT_R\nsnippet K_SHIFT_R\n K_SHIFT_R -> { ${1://cuerpo...} }\n# K_CTRL_ALT_R\nsnippet K_CTRL_ALT_R\n K_CTRL_ALT_R -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_R\nsnippet K_CTRL_SHIFT_R\n K_CTRL_SHIFT_R -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_R\nsnippet K_CTRL_ALT_SHIFT_R\n K_CTRL_ALT_SHIFT_R -> { ${1://cuerpo...} }\n\n# K_S\nsnippet K_S\n K_S -> { ${1://cuerpo...} }\n# K_CTRL_S\nsnippet K_CTRL_S\n K_CTRL_S -> { ${1://cuerpo...} }\n# K_ALT_S\nsnippet K_ALT_S\n K_ALT_S -> { ${1://cuerpo...} }\n# K_SHIFT_S\nsnippet K_SHIFT_S\n K_SHIFT_S -> { ${1://cuerpo...} }\n# K_CTRL_ALT_S\nsnippet K_CTRL_ALT_S\n K_CTRL_ALT_S -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_S\nsnippet K_CTRL_SHIFT_S\n K_CTRL_SHIFT_S -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_S\nsnippet K_CTRL_ALT_SHIFT_S\n K_CTRL_ALT_SHIFT_S -> { ${1://cuerpo...} }\n\n# K_T\nsnippet K_T\n K_T -> { ${1://cuerpo...} }\n# K_CTRL_T\nsnippet K_CTRL_T\n K_CTRL_T -> { ${1://cuerpo...} }\n# K_ALT_T\nsnippet K_ALT_T\n K_ALT_T -> { ${1://cuerpo...} }\n# K_SHIFT_T\nsnippet K_SHIFT_T\n K_SHIFT_T -> { ${1://cuerpo...} }\n# K_CTRL_ALT_T\nsnippet K_CTRL_ALT_T\n K_CTRL_ALT_T -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_T\nsnippet K_CTRL_SHIFT_T\n K_CTRL_SHIFT_T -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_T\nsnippet K_CTRL_ALT_SHIFT_T\n K_CTRL_ALT_SHIFT_T -> { ${1://cuerpo...} }\n\n# K_U\nsnippet K_U\n K_U -> { ${1://cuerpo...} }\n# K_CTRL_U\nsnippet K_CTRL_U\n K_CTRL_U -> { ${1://cuerpo...} }\n# K_ALT_U\nsnippet K_ALT_U\n K_ALT_U -> { ${1://cuerpo...} }\n# K_SHIFT_U\nsnippet K_SHIFT_U\n K_SHIFT_U -> { ${1://cuerpo...} }\n# K_CTRL_ALT_U\nsnippet K_CTRL_ALT_U\n K_CTRL_ALT_U -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_U\nsnippet K_CTRL_SHIFT_U\n K_CTRL_SHIFT_U -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_U\nsnippet K_CTRL_ALT_SHIFT_U\n K_CTRL_ALT_SHIFT_U -> { ${1://cuerpo...} }\n\n# K_V\nsnippet K_V\n K_V -> { ${1://cuerpo...} }\n# K_CTRL_V\nsnippet K_CTRL_V\n K_CTRL_V -> { ${1://cuerpo...} }\n# K_ALT_V\nsnippet K_ALT_V\n K_ALT_V -> { ${1://cuerpo...} }\n# K_SHIFT_V\nsnippet K_SHIFT_V\n K_SHIFT_V -> { ${1://cuerpo...} }\n# K_CTRL_ALT_V\nsnippet K_CTRL_ALT_V\n K_CTRL_ALT_V -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_V\nsnippet K_CTRL_SHIFT_V\n K_CTRL_SHIFT_V -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_V\nsnippet K_CTRL_ALT_SHIFT_V\n K_CTRL_ALT_SHIFT_V -> { ${1://cuerpo...} }\n\n# K_W\nsnippet K_W\n K_W -> { ${1://cuerpo...} }\n# K_CTRL_W\nsnippet K_CTRL_W\n K_CTRL_W -> { ${1://cuerpo...} }\n# K_ALT_W\nsnippet K_ALT_W\n K_ALT_W -> { ${1://cuerpo...} }\n# K_SHIFT_W\nsnippet K_SHIFT_W\n K_SHIFT_W -> { ${1://cuerpo...} }\n# K_CTRL_ALT_W\nsnippet K_CTRL_ALT_W\n K_CTRL_ALT_W -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_W\nsnippet K_CTRL_SHIFT_W\n K_CTRL_SHIFT_W -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_W\nsnippet K_CTRL_ALT_SHIFT_W\n K_CTRL_ALT_SHIFT_W -> { ${1://cuerpo...} }\n\n# K_X\nsnippet K_X\n K_X -> { ${1://cuerpo...} }\n# K_CTRL_X\nsnippet K_CTRL_X\n K_CTRL_X -> { ${1://cuerpo...} }\n# K_ALT_X\nsnippet K_ALT_X\n K_ALT_X -> { ${1://cuerpo...} }\n# K_SHIFT_X\nsnippet K_SHIFT_X\n K_SHIFT_X -> { ${1://cuerpo...} }\n# K_CTRL_ALT_X\nsnippet K_CTRL_ALT_X\n K_CTRL_ALT_X -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_X\nsnippet K_CTRL_SHIFT_X\n K_CTRL_SHIFT_X -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_X\nsnippet K_CTRL_ALT_SHIFT_X\n K_CTRL_ALT_SHIFT_X -> { ${1://cuerpo...} }\n\n# K_Y\nsnippet K_Y\n K_Y -> { ${1://cuerpo...} }\n# K_CTRL_Y\nsnippet K_CTRL_Y\n K_CTRL_Y -> { ${1://cuerpo...} }\n# K_ALT_Y\nsnippet K_ALT_Y\n K_ALT_Y -> { ${1://cuerpo...} }\n# K_SHIFT_Y\nsnippet K_SHIFT_Y\n K_SHIFT_Y -> { ${1://cuerpo...} }\n# K_CTRL_ALT_Y\nsnippet K_CTRL_ALT_Y\n K_CTRL_ALT_Y -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_Y\nsnippet K_CTRL_SHIFT_Y\n K_CTRL_SHIFT_Y -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_Y\nsnippet K_CTRL_ALT_SHIFT_Y\n K_CTRL_ALT_SHIFT_Y -> { ${1://cuerpo...} }\n\n# K_Z\nsnippet K_Z\n K_Z -> { ${1://cuerpo...} }\n# K_CTRL_Z\nsnippet K_CTRL_Z\n K_CTRL_Z -> { ${1://cuerpo...} }\n# K_ALT_Z\nsnippet K_ALT_Z\n K_ALT_Z -> { ${1://cuerpo...} }\n# K_SHIFT_Z\nsnippet K_SHIFT_Z\n K_SHIFT_Z -> { ${1://cuerpo...} }\n# K_CTRL_ALT_Z\nsnippet K_CTRL_ALT_Z\n K_CTRL_ALT_Z -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_Z\nsnippet K_CTRL_SHIFT_Z\n K_CTRL_SHIFT_Z -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_Z\nsnippet K_CTRL_ALT_SHIFT_Z\n K_CTRL_ALT_SHIFT_Z -> { ${1://cuerpo...} }\n\n# K_0\nsnippet K_0\n K_0 -> { ${1://cuerpo...} }\n# K_CTRL_0\nsnippet K_CTRL_0\n K_CTRL_0 -> { ${1://cuerpo...} }\n# K_ALT_0\nsnippet K_ALT_0\n K_ALT_0 -> { ${1://cuerpo...} }\n# K_SHIFT_0\nsnippet K_SHIFT_0\n K_SHIFT_0 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_0\nsnippet K_CTRL_ALT_0\n K_CTRL_ALT_0 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_0\nsnippet K_CTRL_SHIFT_0\n K_CTRL_SHIFT_0 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_0\nsnippet K_CTRL_ALT_SHIFT_0\n K_CTRL_ALT_SHIFT_0 -> { ${1://cuerpo...} }\n\n# K_1\nsnippet K_1\n K_1 -> { ${1://cuerpo...} }\n# K_CTRL_1\nsnippet K_CTRL_1\n K_CTRL_1 -> { ${1://cuerpo...} }\n# K_ALT_1\nsnippet K_ALT_1\n K_ALT_1 -> { ${1://cuerpo...} }\n# K_SHIFT_1\nsnippet K_SHIFT_1\n K_SHIFT_1 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_1\nsnippet K_CTRL_ALT_1\n K_CTRL_ALT_1 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_1\nsnippet K_CTRL_SHIFT_1\n K_CTRL_SHIFT_1 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_1\nsnippet K_CTRL_ALT_SHIFT_1\n K_CTRL_ALT_SHIFT_1 -> { ${1://cuerpo...} }\n\n# K_2\nsnippet K_2\n K_2 -> { ${1://cuerpo...} }\n# K_CTRL_2\nsnippet K_CTRL_2\n K_CTRL_2 -> { ${1://cuerpo...} }\n# K_ALT_2\nsnippet K_ALT_2\n K_ALT_2 -> { ${1://cuerpo...} }\n# K_SHIFT_2\nsnippet K_SHIFT_2\n K_SHIFT_2 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_2\nsnippet K_CTRL_ALT_2\n K_CTRL_ALT_2 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_2\nsnippet K_CTRL_SHIFT_2\n K_CTRL_SHIFT_2 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_2\nsnippet K_CTRL_ALT_SHIFT_2\n K_CTRL_ALT_SHIFT_2 -> { ${1://cuerpo...} }\n\n# K_3\nsnippet K_3\n K_3 -> { ${1://cuerpo...} }\n# K_CTRL_3\nsnippet K_CTRL_3\n K_CTRL_3 -> { ${1://cuerpo...} }\n# K_ALT_3\nsnippet K_ALT_3\n K_ALT_3 -> { ${1://cuerpo...} }\n# K_SHIFT_3\nsnippet K_SHIFT_3\n K_SHIFT_3 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_3\nsnippet K_CTRL_ALT_3\n K_CTRL_ALT_3 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_3\nsnippet K_CTRL_SHIFT_3\n K_CTRL_SHIFT_3 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_3\nsnippet K_CTRL_ALT_SHIFT_3\n K_CTRL_ALT_SHIFT_3 -> { ${1://cuerpo...} }\n\n# K_4\nsnippet K_4\n K_4 -> { ${1://cuerpo...} }\n# K_CTRL_4\nsnippet K_CTRL_4\n K_CTRL_4 -> { ${1://cuerpo...} }\n# K_ALT_4\nsnippet K_ALT_4\n K_ALT_4 -> { ${1://cuerpo...} }\n# K_SHIFT_4\nsnippet K_SHIFT_4\n K_SHIFT_4 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_4\nsnippet K_CTRL_ALT_4\n K_CTRL_ALT_4 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_4\nsnippet K_CTRL_SHIFT_4\n K_CTRL_SHIFT_4 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_4\nsnippet K_CTRL_ALT_SHIFT_4\n K_CTRL_ALT_SHIFT_4 -> { ${1://cuerpo...} }\n\n# K_5\nsnippet K_5\n K_5 -> { ${1://cuerpo...} }\n# K_CTRL_5\nsnippet K_CTRL_5\n K_CTRL_5 -> { ${1://cuerpo...} }\n# K_ALT_5\nsnippet K_ALT_5\n K_ALT_5 -> { ${1://cuerpo...} }\n# K_SHIFT_5\nsnippet K_SHIFT_5\n K_SHIFT_5 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_5\nsnippet K_CTRL_ALT_5\n K_CTRL_ALT_5 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_5\nsnippet K_CTRL_SHIFT_5\n K_CTRL_SHIFT_5 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_5\nsnippet K_CTRL_ALT_SHIFT_5\n K_CTRL_ALT_SHIFT_5 -> { ${1://cuerpo...} }\n\n# K_6\nsnippet K_6\n K_6 -> { ${1://cuerpo...} }\n# K_CTRL_6\nsnippet K_CTRL_6\n K_CTRL_6 -> { ${1://cuerpo...} }\n# K_ALT_6\nsnippet K_ALT_6\n K_ALT_6 -> { ${1://cuerpo...} }\n# K_SHIFT_6\nsnippet K_SHIFT_6\n K_SHIFT_6 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_6\nsnippet K_CTRL_ALT_6\n K_CTRL_ALT_6 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_6\nsnippet K_CTRL_SHIFT_6\n K_CTRL_SHIFT_6 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_6\nsnippet K_CTRL_ALT_SHIFT_6\n K_CTRL_ALT_SHIFT_6 -> { ${1://cuerpo...} }\n\n# K_7\nsnippet K_7\n K_7 -> { ${1://cuerpo...} }\n# K_CTRL_7\nsnippet K_CTRL_7\n K_CTRL_7 -> { ${1://cuerpo...} }\n# K_ALT_7\nsnippet K_ALT_7\n K_ALT_7 -> { ${1://cuerpo...} }\n# K_SHIFT_7\nsnippet K_SHIFT_7\n K_SHIFT_7 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_7\nsnippet K_CTRL_ALT_7\n K_CTRL_ALT_7 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_7\nsnippet K_CTRL_SHIFT_7\n K_CTRL_SHIFT_7 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_7\nsnippet K_CTRL_ALT_SHIFT_7\n K_CTRL_ALT_SHIFT_7 -> { ${1://cuerpo...} }\n\n# K_8\nsnippet K_8\n K_8 -> { ${1://cuerpo...} }\n# K_CTRL_8\nsnippet K_CTRL_8\n K_CTRL_8 -> { ${1://cuerpo...} }\n# K_ALT_8\nsnippet K_ALT_8\n K_ALT_8 -> { ${1://cuerpo...} }\n# K_SHIFT_8\nsnippet K_SHIFT_8\n K_SHIFT_8 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_8\nsnippet K_CTRL_ALT_8\n K_CTRL_ALT_8 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_8\nsnippet K_CTRL_SHIFT_8\n K_CTRL_SHIFT_8 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_8\nsnippet K_CTRL_ALT_SHIFT_8\n K_CTRL_ALT_SHIFT_8 -> { ${1://cuerpo...} }\n\n# K_9\nsnippet K_9\n K_9 -> { ${1://cuerpo...} }\n# K_CTRL_9\nsnippet K_CTRL_9\n K_CTRL_9 -> { ${1://cuerpo...} }\n# K_ALT_9\nsnippet K_ALT_9\n K_ALT_9 -> { ${1://cuerpo...} }\n# K_SHIFT_9\nsnippet K_SHIFT_9\n K_SHIFT_9 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_9\nsnippet K_CTRL_ALT_9\n K_CTRL_ALT_9 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_9\nsnippet K_CTRL_SHIFT_9\n K_CTRL_SHIFT_9 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_9\nsnippet K_CTRL_ALT_SHIFT_9\n K_CTRL_ALT_SHIFT_9 -> { ${1://cuerpo...} }\n\n# K_F1\nsnippet K_F1\n K_F1 -> { ${1://cuerpo...} }\n# K_CTRL_F1\nsnippet K_CTRL_F1\n K_CTRL_F1 -> { ${1://cuerpo...} }\n# K_ALT_F1\nsnippet K_ALT_F1\n K_ALT_F1 -> { ${1://cuerpo...} }\n# K_SHIFT_F1\nsnippet K_SHIFT_F1\n K_SHIFT_F1 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F1\nsnippet K_CTRL_ALT_F1\n K_CTRL_ALT_F1 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F1\nsnippet K_CTRL_SHIFT_F1\n K_CTRL_SHIFT_F1 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F1\nsnippet K_CTRL_ALT_SHIFT_F1\n K_CTRL_ALT_SHIFT_F1 -> { ${1://cuerpo...} }\n\n# K_F2\nsnippet K_F2\n K_F2 -> { ${1://cuerpo...} }\n# K_CTRL_F2\nsnippet K_CTRL_F2\n K_CTRL_F2 -> { ${1://cuerpo...} }\n# K_ALT_F2\nsnippet K_ALT_F2\n K_ALT_F2 -> { ${1://cuerpo...} }\n# K_SHIFT_F2\nsnippet K_SHIFT_F2\n K_SHIFT_F2 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F2\nsnippet K_CTRL_ALT_F2\n K_CTRL_ALT_F2 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F2\nsnippet K_CTRL_SHIFT_F2\n K_CTRL_SHIFT_F2 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F2\nsnippet K_CTRL_ALT_SHIFT_F2\n K_CTRL_ALT_SHIFT_F2 -> { ${1://cuerpo...} }\n\n# K_F3\nsnippet K_F3\n K_F3 -> { ${1://cuerpo...} }\n# K_CTRL_F3\nsnippet K_CTRL_F3\n K_CTRL_F3 -> { ${1://cuerpo...} }\n# K_ALT_F3\nsnippet K_ALT_F3\n K_ALT_F3 -> { ${1://cuerpo...} }\n# K_SHIFT_F3\nsnippet K_SHIFT_F3\n K_SHIFT_F3 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F3\nsnippet K_CTRL_ALT_F3\n K_CTRL_ALT_F3 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F3\nsnippet K_CTRL_SHIFT_F3\n K_CTRL_SHIFT_F3 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F3\nsnippet K_CTRL_ALT_SHIFT_F3\n K_CTRL_ALT_SHIFT_F3 -> { ${1://cuerpo...} }\n\n# K_A\nsnippet K_A\n K_A -> { ${1://cuerpo...} }\n# K_CTRL_A\nsnippet K_CTRL_A\n K_CTRL_A -> { ${1://cuerpo...} }\n# K_ALT_A\nsnippet K_ALT_A\n K_ALT_A -> { ${1://cuerpo...} }\n# K_SHIFT_A\nsnippet K_SHIFT_A\n K_SHIFT_A -> { ${1://cuerpo...} }\n# K_CTRL_ALT_A\nsnippet K_CTRL_ALT_A\n K_CTRL_ALT_A -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_A\nsnippet K_CTRL_SHIFT_A\n K_CTRL_SHIFT_A -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_A\nsnippet K_CTRL_ALT_SHIFT_A\n K_CTRL_ALT_SHIFT_A -> { ${1://cuerpo...} }\n\n# K_F5\nsnippet K_F5\n K_F5 -> { ${1://cuerpo...} }\n# K_CTRL_F5\nsnippet K_CTRL_F5\n K_CTRL_F5 -> { ${1://cuerpo...} }\n# K_ALT_F5\nsnippet K_ALT_F5\n K_ALT_F5 -> { ${1://cuerpo...} }\n# K_SHIFT_F5\nsnippet K_SHIFT_F5\n K_SHIFT_F5 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F5\nsnippet K_CTRL_ALT_F5\n K_CTRL_ALT_F5 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F5\nsnippet K_CTRL_SHIFT_F5\n K_CTRL_SHIFT_F5 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F5\nsnippet K_CTRL_ALT_SHIFT_F5\n K_CTRL_ALT_SHIFT_F5 -> { ${1://cuerpo...} }\n\n# K_F6\nsnippet K_F6\n K_F6 -> { ${1://cuerpo...} }\n# K_CTRL_F6\nsnippet K_CTRL_F6\n K_CTRL_F6 -> { ${1://cuerpo...} }\n# K_ALT_F6\nsnippet K_ALT_F6\n K_ALT_F6 -> { ${1://cuerpo...} }\n# K_SHIFT_F6\nsnippet K_SHIFT_F6\n K_SHIFT_F6 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F6\nsnippet K_CTRL_ALT_F6\n K_CTRL_ALT_F6 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F6\nsnippet K_CTRL_SHIFT_F6\n K_CTRL_SHIFT_F6 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F6\nsnippet K_CTRL_ALT_SHIFT_F6\n K_CTRL_ALT_SHIFT_F6 -> { ${1://cuerpo...} }\n\n# K_F7\nsnippet K_F7\n K_F7 -> { ${1://cuerpo...} }\n# K_CTRL_F7\nsnippet K_CTRL_F7\n K_CTRL_F7 -> { ${1://cuerpo...} }\n# K_ALT_F7\nsnippet K_ALT_F7\n K_ALT_F7 -> { ${1://cuerpo...} }\n# K_SHIFT_F7\nsnippet K_SHIFT_F7\n K_SHIFT_F7 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F7\nsnippet K_CTRL_ALT_F7\n K_CTRL_ALT_F7 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F7\nsnippet K_CTRL_SHIFT_F7\n K_CTRL_SHIFT_F7 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F7\nsnippet K_CTRL_ALT_SHIFT_F7\n K_CTRL_ALT_SHIFT_F7 -> { ${1://cuerpo...} }\n\n# K_F8\nsnippet K_F8\n K_F8 -> { ${1://cuerpo...} }\n# K_CTRL_F8\nsnippet K_CTRL_F8\n K_CTRL_F8 -> { ${1://cuerpo...} }\n# K_ALT_F8\nsnippet K_ALT_F8\n K_ALT_F8 -> { ${1://cuerpo...} }\n# K_SHIFT_F8\nsnippet K_SHIFT_F8\n K_SHIFT_F8 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F8\nsnippet K_CTRL_ALT_F8\n K_CTRL_ALT_F8 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F8\nsnippet K_CTRL_SHIFT_F8\n K_CTRL_SHIFT_F8 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F8\nsnippet K_CTRL_ALT_SHIFT_F8\n K_CTRL_ALT_SHIFT_F8 -> { ${1://cuerpo...} }\n\n# K_F9\nsnippet K_F9\n K_F9 -> { ${1://cuerpo...} }\n# K_CTRL_F9\nsnippet K_CTRL_F9\n K_CTRL_F9 -> { ${1://cuerpo...} }\n# K_ALT_F9\nsnippet K_ALT_F9\n K_ALT_F9 -> { ${1://cuerpo...} }\n# K_SHIFT_F9\nsnippet K_SHIFT_F9\n K_SHIFT_F9 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F9\nsnippet K_CTRL_ALT_F9\n K_CTRL_ALT_F9 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F9\nsnippet K_CTRL_SHIFT_F9\n K_CTRL_SHIFT_F9 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F9\nsnippet K_CTRL_ALT_SHIFT_F9\n K_CTRL_ALT_SHIFT_F9 -> { ${1://cuerpo...} }\n\n# K_F10\nsnippet K_F10\n K_F10 -> { ${1://cuerpo...} }\n# K_CTRL_F10\nsnippet K_CTRL_F10\n K_CTRL_F10 -> { ${1://cuerpo...} }\n# K_ALT_F10\nsnippet K_ALT_F10\n K_ALT_F10 -> { ${1://cuerpo...} }\n# K_SHIFT_F10\nsnippet K_SHIFT_F10\n K_SHIFT_F10 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F10\nsnippet K_CTRL_ALT_F10\n K_CTRL_ALT_F10 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F10\nsnippet K_CTRL_SHIFT_F10\n K_CTRL_SHIFT_F10 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F10\nsnippet K_CTRL_ALT_SHIFT_F10\n K_CTRL_ALT_SHIFT_F10 -> { ${1://cuerpo...} }\n\n# K_F11\nsnippet K_F11\n K_F11 -> { ${1://cuerpo...} }\n# K_CTRL_F11\nsnippet K_CTRL_F11\n K_CTRL_F11 -> { ${1://cuerpo...} }\n# K_ALT_F11\nsnippet K_ALT_F11\n K_ALT_F11 -> { ${1://cuerpo...} }\n# K_SHIFT_F11\nsnippet K_SHIFT_F11\n K_SHIFT_F11 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F11\nsnippet K_CTRL_ALT_F11\n K_CTRL_ALT_F11 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F11\nsnippet K_CTRL_SHIFT_F11\n K_CTRL_SHIFT_F11 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F11\nsnippet K_CTRL_ALT_SHIFT_F11\n K_CTRL_ALT_SHIFT_F11 -> { ${1://cuerpo...} }\n\n# K_F12\nsnippet K_F12\n K_F12 -> { ${1://cuerpo...} }\n# K_CTRL_F12\nsnippet K_CTRL_F12\n K_CTRL_F12 -> { ${1://cuerpo...} }\n# K_ALT_F12\nsnippet K_ALT_F12\n K_ALT_F12 -> { ${1://cuerpo...} }\n# K_SHIFT_F12\nsnippet K_SHIFT_F12\n K_SHIFT_F12 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_F12\nsnippet K_CTRL_ALT_F12\n K_CTRL_ALT_F12 -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_F12\nsnippet K_CTRL_SHIFT_F12\n K_CTRL_SHIFT_F12 -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_F12\nsnippet K_CTRL_ALT_SHIFT_F12\n K_CTRL_ALT_SHIFT_F12 -> { ${1://cuerpo...} }\n\n# K_RETURN\nsnippet K_RETURN\n K_RETURN -> { ${1://cuerpo...} }\n# K_CTRL_RETURN\nsnippet K_CTRL_RETURN\n K_CTRL_RETURN -> { ${1://cuerpo...} }\n# K_ALT_RETURN\nsnippet K_ALT_RETURN\n K_ALT_RETURN -> { ${1://cuerpo...} }\n# K_SHIFT_RETURN\nsnippet K_SHIFT_RETURN\n K_SHIFT_RETURN -> { ${1://cuerpo...} }\n# K_CTRL_ALT_RETURN\nsnippet K_CTRL_ALT_RETURN\n K_CTRL_ALT_RETURN -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_RETURN\nsnippet K_CTRL_SHIFT_RETURN\n K_CTRL_SHIFT_RETURN -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_RETURN\nsnippet K_CTRL_ALT_SHIFT_RETURN\n K_CTRL_ALT_SHIFT_RETURN -> { ${1://cuerpo...} }\n\n# K_SPACE\nsnippet K_SPACE\n K_SPACE -> { ${1://cuerpo...} }\n# K_CTRL_SPACE\nsnippet K_CTRL_SPACE\n K_CTRL_SPACE -> { ${1://cuerpo...} }\n# K_ALT_SPACE\nsnippet K_ALT_SPACE\n K_ALT_SPACE -> { ${1://cuerpo...} }\n# K_SHIFT_SPACE\nsnippet K_SHIFT_SPACE\n K_SHIFT_SPACE -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SPACE\nsnippet K_CTRL_ALT_SPACE\n K_CTRL_ALT_SPACE -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_SPACE\nsnippet K_CTRL_SHIFT_SPACE\n K_CTRL_SHIFT_SPACE -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_SPACE\nsnippet K_CTRL_ALT_SHIFT_SPACE\n K_CTRL_ALT_SHIFT_SPACE -> { ${1://cuerpo...} }\n\n# K_ESCAPE\nsnippet K_ESCAPE\n K_ESCAPE -> { ${1://cuerpo...} }\n# K_CTRL_ESCAPE\nsnippet K_CTRL_ESCAPE\n K_CTRL_ESCAPE -> { ${1://cuerpo...} }\n# K_ALT_ESCAPE\nsnippet K_ALT_ESCAPE\n K_ALT_ESCAPE -> { ${1://cuerpo...} }\n# K_SHIFT_ESCAPE\nsnippet K_SHIFT_ESCAPE\n K_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n# K_CTRL_ALT_ESCAPE\nsnippet K_CTRL_ALT_ESCAPE\n K_CTRL_ALT_ESCAPE -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_ESCAPE\nsnippet K_CTRL_SHIFT_ESCAPE\n K_CTRL_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_ESCAPE\nsnippet K_CTRL_ALT_SHIFT_ESCAPE\n K_CTRL_ALT_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\n# K_BACKSPACE\nsnippet K_BACKSPACE\n K_BACKSPACE -> { ${1://cuerpo...} }\n# K_CTRL_BACKSPACE\nsnippet K_CTRL_BACKSPACE\n K_CTRL_BACKSPACE -> { ${1://cuerpo...} }\n# K_ALT_BACKSPACE\nsnippet K_ALT_BACKSPACE\n K_ALT_BACKSPACE -> { ${1://cuerpo...} }\n# K_SHIFT_BACKSPACE\nsnippet K_SHIFT_BACKSPACE\n K_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n# K_CTRL_ALT_BACKSPACE\nsnippet K_CTRL_ALT_BACKSPACE\n K_CTRL_ALT_BACKSPACE -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_BACKSPACE\nsnippet K_CTRL_SHIFT_BACKSPACE\n K_CTRL_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_BACKSPACE\nsnippet K_CTRL_ALT_SHIFT_BACKSPACE\n K_CTRL_ALT_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\n# K_TAB\nsnippet K_TAB\n K_TAB -> { ${1://cuerpo...} }\n# K_CTRL_TAB\nsnippet K_CTRL_TAB\n K_CTRL_TAB -> { ${1://cuerpo...} }\n# K_ALT_TAB\nsnippet K_ALT_TAB\n K_ALT_TAB -> { ${1://cuerpo...} }\n# K_SHIFT_TAB\nsnippet K_SHIFT_TAB\n K_SHIFT_TAB -> { ${1://cuerpo...} }\n# K_CTRL_ALT_TAB\nsnippet K_CTRL_ALT_TAB\n K_CTRL_ALT_TAB -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_TAB\nsnippet K_CTRL_SHIFT_TAB\n K_CTRL_SHIFT_TAB -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_TAB\nsnippet K_CTRL_ALT_SHIFT_TAB\n K_CTRL_ALT_SHIFT_TAB -> { ${1://cuerpo...} }\n\n# K_UP\nsnippet K_UP\n K_UP -> { ${1://cuerpo...} }\n# K_CTRL_UP\nsnippet K_CTRL_UP\n K_CTRL_UP -> { ${1://cuerpo...} }\n# K_ALT_UP\nsnippet K_ALT_UP\n K_ALT_UP -> { ${1://cuerpo...} }\n# K_SHIFT_UP\nsnippet K_SHIFT_UP\n K_SHIFT_UP -> { ${1://cuerpo...} }\n# K_CTRL_ALT_UP\nsnippet K_CTRL_ALT_UP\n K_CTRL_ALT_UP -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_UP\nsnippet K_CTRL_SHIFT_UP\n K_CTRL_SHIFT_UP -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_UP\nsnippet K_CTRL_ALT_SHIFT_UP\n K_CTRL_ALT_SHIFT_UP -> { ${1://cuerpo...} }\n\n# K_DOWN\nsnippet K_DOWN\n K_DOWN -> { ${1://cuerpo...} }\n# K_CTRL_DOWN\nsnippet K_CTRL_DOWN\n K_CTRL_DOWN -> { ${1://cuerpo...} }\n# K_ALT_DOWN\nsnippet K_ALT_DOWN\n K_ALT_DOWN -> { ${1://cuerpo...} }\n# K_SHIFT_DOWN\nsnippet K_SHIFT_DOWN\n K_SHIFT_DOWN -> { ${1://cuerpo...} }\n# K_CTRL_ALT_DOWN\nsnippet K_CTRL_ALT_DOWN\n K_CTRL_ALT_DOWN -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_DOWN\nsnippet K_CTRL_SHIFT_DOWN\n K_CTRL_SHIFT_DOWN -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_DOWN\nsnippet K_CTRL_ALT_SHIFT_DOWN\n K_CTRL_ALT_SHIFT_DOWN -> { ${1://cuerpo...} }\n\n# K_LEFT\nsnippet K_LEFT\n K_LEFT -> { ${1://cuerpo...} }\n# K_CTRL_LEFT\nsnippet K_CTRL_LEFT\n K_CTRL_LEFT -> { ${1://cuerpo...} }\n# K_ALT_LEFT\nsnippet K_ALT_LEFT\n K_ALT_LEFT -> { ${1://cuerpo...} }\n# K_SHIFT_LEFT\nsnippet K_SHIFT_LEFT\n K_SHIFT_LEFT -> { ${1://cuerpo...} }\n# K_CTRL_ALT_LEFT\nsnippet K_CTRL_ALT_LEFT\n K_CTRL_ALT_LEFT -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_LEFT\nsnippet K_CTRL_SHIFT_LEFT\n K_CTRL_SHIFT_LEFT -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_LEFT\nsnippet K_CTRL_ALT_SHIFT_LEFT\n K_CTRL_ALT_SHIFT_LEFT -> { ${1://cuerpo...} }\n\n# K_RIGHT\nsnippet K_RIGHT\n K_RIGHT -> { ${1://cuerpo...} }\n# K_CTRL_RIGHT\nsnippet K_CTRL_RIGHT\n K_CTRL_RIGHT -> { ${1://cuerpo...} }\n# K_ALT_RIGHT\nsnippet K_ALT_RIGHT\n K_ALT_RIGHT -> { ${1://cuerpo...} }\n# K_SHIFT_RIGHT\nsnippet K_SHIFT_RIGHT\n K_SHIFT_RIGHT -> { ${1://cuerpo...} }\n# K_CTRL_ALT_RIGHT\nsnippet K_CTRL_ALT_RIGHT\n K_CTRL_ALT_RIGHT -> { ${1://cuerpo...} }\n# K_CTRL_SHIFT_RIGHT\nsnippet K_CTRL_SHIFT_RIGHT\n K_CTRL_SHIFT_RIGHT -> { ${1://cuerpo...} }\n# K_CTRL_ALT_SHIFT_RIGHT\nsnippet K_CTRL_ALT_SHIFT_RIGHT\n K_CTRL_ALT_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\n# recorrido (simple)\nsnippet recorrido (simple)\n ${1:// Ir al inicio}\n while (not ${2:// es \u00faltimo elemento}) {\n ${3:// Procesar el elemento}\n ${4:// Ir al pr\u00f3ximo elemento}\n }\n ${5:// Finalizar}\n\n# recorrido (de acumulaci\u00f3n)\nsnippet recorrido (de acumulaci\u00f3n)\n ${1:// Ir al inicio}\n ${2:cantidadVistos} := ${3:// contar elementos en lugar actual}\n while (not ${4:// es \u00faltimo elemento}) {\n ${4:// Ir al pr\u00f3ximo elemento}\n ${2:cantidadVistos} := ${2:cantidadVistos} + ${3:// contar elementos en lugar actual}\n }\n return (${2:cantidadVistos})\n\n# recorrido (de b\u00fasqueda)\nsnippet recorrido (de b\u00fasqueda)\n ${1:// Ir al inicio}\n while (not ${2:// encontr\u00e9 lo que buscaba}) {\n ${3:// Ir al pr\u00f3ximo elemento}\n }\n return (${2:// encontr\u00e9 lo que buscaba })\n\n# recorrido (de b\u00fasqueda con borde)\nsnippet recorrido (de b\u00fasqueda con borde)\n ${1:// Ir al inicio}\n while (not ${2:// encontr\u00e9 lo que buscaba} && not ${3:// es \u00faltimo elemento}) {\n ${4:// Ir al pr\u00f3ximo elemento}\n }\n return (${2:// encontr\u00e9 lo que buscaba })\n\n# recorrido (de tipos enumerativos)\nsnippet recorrido (de tipos enumerativos)\n ${1:elementoActual} := ${2:minElemento()}\n while (${1:elementoActual} /= ${3:maxElemento()}) {\n ${4:// Procesar con elemento actual}\n ${1:elementoActual} := siguiente(${1:elementoActual})\n }\n ${4:// Procesar con elemento actual}\n\n# recorrido (de b\u00fasqueda sobre lista)\nsnippet recorrido (de b\u00fasqueda sobre lista)\n ${1:listaRecorrida} := ${2:lista}\n while (primero(${1:listaRecorrida}) /= ${3://elemento buscado}) {\n ${1:elementoActual} := sinElPrimero(${1:elementoActual})\n }\n return (primero(${1:listaRecorrida}))\n\n# recorrido (de b\u00fasqueda sobre lista con borde)\nsnippet recorrido (de b\u00fasqueda sobre lista con borde)\n ${1:listaRecorrida} := ${2:lista}\n while (not esVac\u00eda(${1:listaRecorrida}) && primero(${1:listaRecorrida}) /= ${3://elemento buscado}) {\n ${1:elementoActual} := sinElPrimero(${1:elementoActual})\n }\n return (not esVac\u00eda(${1:listaRecorrida}))\n\n# docs (procedimiento)\nsnippet docs (procedimiento)\n /*\n @PROP\u00d3SITO: ${1:...}\n @PRECONDICI\u00d3N: ${2:...}\n */\n\n# docs (procedimiento con par\u00e1metros)\nsnippet docs (procedimiento con par\u00e1metros)\n /*\n @PROP\u00d3SITO: ${1:...}\n @PRECONDICI\u00d3N: ${2:...}\n @PAR\u00c1METROS:\n * ${3:nombreDelPar\u00e1metro} : ${4:Tipo} - ${5:descripci\u00f3n}\n */\n\n# docs (funci\u00f3n)\nsnippet docs (funci\u00f3n)\n /*\n @PROP\u00d3SITO: ${1:...}\n @PRECONDICI\u00d3N: ${2:...}\n @TIPO: ${3:...}\n */\n\n# docs (funci\u00f3n con par\u00e1metros)\nsnippet docs (funci\u00f3n con par\u00e1metros)\n /*\n @PROP\u00d3SITO: ${1:...}\n @PRECONDICI\u00d3N: ${2:...}\n @PAR\u00c1METROS:\n * ${3:nombreDelPar\u00e1metro} : ${4:Tipo} - ${5:descripci\u00f3n}\n @TIPO: ${6:...}\n */\n'}),ace.define("ace/snippets/gobstones",["require","exports","module","ace/snippets/gobstones.snippets"],function(e,t,n){"use strict";t.snippetText=e("./gobstones.snippets"),t.scope="gobstones"}); (function() { + ace.require(["ace/snippets/gobstones"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/golang.js b/mixly/common/modules/web-modules/ace/snippets/golang.js new file mode 100644 index 00000000..642c7055 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/golang.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/golang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/graphqlschema.js b/mixly/common/modules/web-modules/ace/snippets/graphqlschema.js new file mode 100644 index 00000000..a35335ae --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/graphqlschema.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/graphqlschema.snippets",["require","exports","module"],function(e,t,n){n.exports="# Type Snippet\ntrigger type\nsnippet type\n type ${1:type_name} {\n ${2:type_siblings}\n }\n\n# Input Snippet\ntrigger input\nsnippet input\n input ${1:input_name} {\n ${2:input_siblings}\n }\n\n# Interface Snippet\ntrigger interface\nsnippet interface\n interface ${1:interface_name} {\n ${2:interface_siblings}\n }\n\n# Interface Snippet\ntrigger union\nsnippet union\n union ${1:union_name} = ${2:type} | ${3: type}\n\n# Enum Snippet\ntrigger enum\nsnippet enum\n enum ${1:enum_name} {\n ${2:enum_siblings}\n }\n"}),ace.define("ace/snippets/graphqlschema",["require","exports","module","ace/snippets/graphqlschema.snippets"],function(e,t,n){"use strict";t.snippetText=e("./graphqlschema.snippets"),t.scope="graphqlschema"}); (function() { + ace.require(["ace/snippets/graphqlschema"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/groovy.js b/mixly/common/modules/web-modules/ace/snippets/groovy.js new file mode 100644 index 00000000..8fe8720c --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/groovy.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/groovy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/haml.js b/mixly/common/modules/web-modules/ace/snippets/haml.js new file mode 100644 index 00000000..226190d6 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/haml.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/haml.snippets",["require","exports","module"],function(e,t,n){n.exports="snippet t\n %table\n %tr\n %th\n ${1:headers}\n %tr\n %td\n ${2:headers}\nsnippet ul\n %ul\n %li\n ${1:item}\n %li\nsnippet =rp\n = render :partial => '${1:partial}'\nsnippet =rpl\n = render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n = render :partial => '${1:partial}', :collection => @$1\n\n"}),ace.define("ace/snippets/haml",["require","exports","module","ace/snippets/haml.snippets"],function(e,t,n){"use strict";t.snippetText=e("./haml.snippets"),t.scope="haml"}); (function() { + ace.require(["ace/snippets/haml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/handlebars.js b/mixly/common/modules/web-modules/ace/snippets/handlebars.js new file mode 100644 index 00000000..fdfc6759 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/handlebars.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/handlebars"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/haskell.js b/mixly/common/modules/web-modules/ace/snippets/haskell.js new file mode 100644 index 00000000..562b57fc --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/haskell.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/haskell.snippets",["require","exports","module"],function(e,t,n){n.exports="snippet lang\n {-# LANGUAGE ${1:OverloadedStrings} #-}\nsnippet info\n -- |\n -- Module : ${1:Module.Namespace}\n -- Copyright : ${2:Author} ${3:2011-2012}\n -- License : ${4:BSD3}\n --\n -- Maintainer : ${5:email@something.com}\n -- Stability : ${6:experimental}\n -- Portability : ${7:unknown}\n --\n -- ${8:Description}\n --\nsnippet import\n import ${1:Data.Text}\nsnippet import2\n import ${1:Data.Text} (${2:head})\nsnippet importq\n import qualified ${1:Data.Text} as ${2:T}\nsnippet inst\n instance ${1:Monoid} ${2:Type} where\n ${3}\nsnippet type\n type ${1:Type} = ${2:Type}\nsnippet data\n data ${1:Type} = ${2:$1} ${3:Int}\nsnippet newtype\n newtype ${1:Type} = ${2:$1} ${3:Int}\nsnippet class\n class ${1:Class} a where\n ${2}\nsnippet module\n module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n ) where\n `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\nsnippet const\n ${1:name} :: ${2:a}\n $1 = ${3:undefined}\nsnippet fn\n ${1:fn} :: ${2:a} -> ${3:a}\n $1 ${4} = ${5:undefined}\nsnippet fn2\n ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n $1 ${5} = ${6:undefined}\nsnippet ap\n ${1:map} ${2:fn} ${3:list}\nsnippet do\n do\n \nsnippet \u03bb\n \\${1:x} -> ${2}\nsnippet \\\n \\${1:x} -> ${2}\nsnippet <-\n ${1:a} <- ${2:m a}\nsnippet \u2190\n ${1:a} <- ${2:m a}\nsnippet ->\n ${1:m a} -> ${2:a}\nsnippet \u2192\n ${1:m a} -> ${2:a}\nsnippet tup\n (${1:a}, ${2:b})\nsnippet tup2\n (${1:a}, ${2:b}, ${3:c})\nsnippet tup3\n (${1:a}, ${2:b}, ${3:c}, ${4:d})\nsnippet rec\n ${1:Record} { ${2:recFieldA} = ${3:undefined}\n , ${4:recFieldB} = ${5:undefined}\n }\nsnippet case\n case ${1:something} of\n ${2} -> ${3}\nsnippet let\n let ${1} = ${2}\n in ${3}\nsnippet where\n where\n ${1:fn} = ${2:undefined}\n"}),ace.define("ace/snippets/haskell",["require","exports","module","ace/snippets/haskell.snippets"],function(e,t,n){"use strict";t.snippetText=e("./haskell.snippets"),t.scope="haskell"}); (function() { + ace.require(["ace/snippets/haskell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/haskell_cabal.js b/mixly/common/modules/web-modules/ace/snippets/haskell_cabal.js new file mode 100644 index 00000000..155dd987 --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/haskell_cabal.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/haskell_cabal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/haxe.js b/mixly/common/modules/web-modules/ace/snippets/haxe.js new file mode 100644 index 00000000..2400059b --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/haxe.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/haxe"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/hjson.js b/mixly/common/modules/web-modules/ace/snippets/hjson.js new file mode 100644 index 00000000..473e600e --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/hjson.js @@ -0,0 +1,8 @@ +; (function() { + ace.require(["ace/snippets/hjson"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/mixly/common/modules/web-modules/ace/snippets/html.js b/mixly/common/modules/web-modules/ace/snippets/html.js new file mode 100644 index 00000000..e151048b --- /dev/null +++ b/mixly/common/modules/web-modules/ace/snippets/html.js @@ -0,0 +1,8 @@ +ace.define("ace/snippets/html.snippets",["require","exports","module"],function(e,t,n){n.exports='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n  \n# \u2190\nsnippet left\n ←\n# \u2192\nsnippet right\n →\n# \u2191\nsnippet up\n ↑\n# \u2193\nsnippet down\n ↓\n# \u21a9\nsnippet return\n ↩\n# \u21e4\nsnippet backtab\n ⇤\n# \u21e5\nsnippet tab\n ⇥\n# \u21e7\nsnippet shift\n ⇧\n# \u2303\nsnippet ctrl\n ⌃\n# \u2305\nsnippet enter\n ⌅\n# \u2318\nsnippet cmd\n ⌘\n# \u2325\nsnippet option\n ⌥\n# \u2326\nsnippet delete\n ⌦\n# \u232b\nsnippet backspace\n ⌫\n# \u238b\nsnippet esc\n ⎋\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n \nsnippet doctype HTML 4.01 Transitional\n \nsnippet doctype HTML 5\n \nsnippet doctype XHTML 1.0 Frameset\n \nsnippet doctype XHTML 1.0 Strict\n \nsnippet doctype XHTML 1.0 Transitional\n \nsnippet doctype XHTML 1.1\n \n# HTML Doctype 4.01 Strict\nsnippet docts\n \n# HTML Doctype 4.01 Transitional\nsnippet doct\n \n# HTML Doctype 5\nsnippet doct5\n \n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n \n# XHTML Doctype 1.0 Strict\nsnippet docxs\n \n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n \n# XHTML Doctype 1.1\nsnippet docx\n \n# html5shiv\nsnippet html5shiv\n \nsnippet html5printshiv\n \n# Attributes\nsnippet attr\n ${1:attribute}="${2:property}"\nsnippet attr+\n ${1:attribute}="${2:property}" attr+${3}\nsnippet .\n class="${1}"${2}\nsnippet #\n id="${1}"${2}\nsnippet alt\n alt="${1}"${2}\nsnippet charset\n charset="${1:utf-8}"${2}\nsnippet data\n data-${1}="${2:$1}"${3}\nsnippet for\n for="${1}"${2}\nsnippet height\n height="${1}"${2}\nsnippet href\n href="${1:#}"${2}\nsnippet lang\n lang="${1:en}"${2}\nsnippet media\n media="${1}"${2}\nsnippet name\n name="${1}"${2}\nsnippet rel\n rel="${1}"${2}\nsnippet scope\n scope="${1:row}"${2}\nsnippet src\n src="${1}"${2}\nsnippet title=\n title="${1}"${2}\nsnippet type\n type="${1}"${2}\nsnippet value\n value="${1}"${2}\nsnippet width\n width="${1}"${2}\n# Elements\nsnippet a\n ${2:$1}\nsnippet a.\n ${3:$1}\nsnippet a#\n ${3:$1}\nsnippet a:ext\n ${2:$1}\nsnippet a:mail\n ${3:email me}\nsnippet abbr\n ${2}\nsnippet address\n
\n ${1}\n
\nsnippet area\n ${4}\nsnippet area+\n ${4}\n area+${5}\nsnippet area:c\n ${3}\nsnippet area:d\n ${3}\nsnippet area:p\n ${3}\nsnippet area:r\n ${3}\nsnippet article\n
\n ${1}\n
\nsnippet article.\n
\n ${2}\n
\nsnippet article#\n
\n ${2}\n
\nsnippet aside\n \nsnippet aside.\n \nsnippet aside#\n \nsnippet audio\n